slime movement
This commit is contained in:
parent
3515fb1792
commit
262a4adfe0
1 changed files with 10 additions and 1 deletions
|
@ -94,6 +94,15 @@ public class EntitySlime extends EntityNPC
|
||||||
return rand.pick(Alignment.LAWFUL_EVIL, Alignment.EVIL);
|
return rand.pick(Alignment.LAWFUL_EVIL, Alignment.EVIL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void updateEntityActionState()
|
||||||
|
{
|
||||||
|
super.updateEntityActionState();
|
||||||
|
if(this.isPlayer() && this.onGround) {
|
||||||
|
this.moveStrafe = 0.0f;
|
||||||
|
this.moveForward = 0.0f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// public boolean canAmbush(EntityLiving entity) {
|
// public boolean canAmbush(EntityLiving entity) {
|
||||||
// return true;
|
// return true;
|
||||||
// }
|
// }
|
||||||
|
@ -450,7 +459,7 @@ public class EntitySlime extends EntityNPC
|
||||||
}
|
}
|
||||||
|
|
||||||
protected double getJumpMovement() {
|
protected double getJumpMovement() {
|
||||||
return ExtMath.clampd(this.rand.drange(0.3, 0.8) * this.height, 0.2, 1.0);
|
return ExtMath.clampd((this.isPlayer() ? (this.isSneaking() ? 0.3 : (this.isSprinting() ? 0.8 : 0.55)) : this.rand.drange(0.3, 0.8)) * this.height, 0.2, 1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue