mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-09 18:33:44 +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.
|
||||
float prevStepHeight = this.stepHeight;
|
||||
this.stepHeight = 0.0F;
|
||||
this.moveEntity(oldWidth - newWidth, 0.0D, oldWidth - newWidth);
|
||||
this.stepHeight = prevStepHeight;
|
||||
try {
|
||||
this.moveEntity(oldWidth - newWidth, 0.0D, oldWidth - newWidth);
|
||||
} finally {
|
||||
this.stepHeight = prevStepHeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user