mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-13 20:44:08 +00:00
Restore the npc step height even if the hitbox nudge throws
This commit is contained in:
1 parent
b6f2bae770
commit
8612d4442a
1 file changed
+5
-2
@@ -1343,8 +1343,11 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
|
|||||||
// npc up onto whatever it now touches. Only the horizontal push is wanted here.
|
// npc up onto whatever it now touches. Only the horizontal push is wanted here.
|
||||||
float prevStepHeight = this.stepHeight;
|
float prevStepHeight = this.stepHeight;
|
||||||
this.stepHeight = 0.0F;
|
this.stepHeight = 0.0F;
|
||||||
this.moveEntity(oldWidth - newWidth, 0.0D, oldWidth - newWidth);
|
try {
|
||||||
this.stepHeight = prevStepHeight;
|
this.moveEntity(oldWidth - newWidth, 0.0D, oldWidth - newWidth);
|
||||||
|
} finally {
|
||||||
|
this.stepHeight = prevStepHeight;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user