mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 08:17:35 +00:00
Fix ignoring maxUpStep method overrides on entities (#9583)
This commit is contained in:
1 parent
9450dfd67c
commit
a43be39137
4 files changed
+20
-11
No files matched your search
@@ -203,13 +203,13 @@ public interface IForgeEntity extends ICapabilitySerializable<CompoundTag>
|
||||
|
||||
/**
|
||||
* @return Return the height in blocks the Entity can step up without needing to jump
|
||||
* This is the sum of vanilla's {@link Entity#maxUpStep} field and the current value
|
||||
* This is the sum of vanilla's {@link Entity#maxUpStep()} method and the current value
|
||||
* of the {@link net.minecraftforge.common.ForgeMod#STEP_HEIGHT_ADDITION} attribute
|
||||
* (if this Entity is a {@link LivingEntity} and has the attribute), clamped at 0.
|
||||
*/
|
||||
default float getStepHeight()
|
||||
{
|
||||
float vanillaStep = self().maxUpStep;
|
||||
float vanillaStep = self().maxUpStep();
|
||||
if (self() instanceof LivingEntity living)
|
||||
{
|
||||
AttributeInstance stepHeightAttribute = living.getAttribute(ForgeMod.STEP_HEIGHT_ADDITION.get());
|
||||
|
||||
Reference in new issue
Block a user