mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-14 06:14:52 +00:00
Stop the hitbox nudge stepping npcs up when they lie down
This commit is contained in:
1 parent
e3a1017770
commit
b6f2bae770
1 file changed
+7
-1
@@ -1338,8 +1338,14 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
|
||||
this.height = newHeight;
|
||||
this.setPosition(posX, posY, posZ);
|
||||
|
||||
if (newWidth > oldWidth && !this.firstUpdate && !this.worldObj.isRemote)
|
||||
if (newWidth > oldWidth && !this.firstUpdate && !this.worldObj.isRemote) {
|
||||
// Lying and crawling widen the box, and moveEntity would answer that by stepping the
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user