Fixed the crouching pony bunny hop bug

This commit is contained in:
Sollace 2018-10-27 10:19:34 +02:00
parent 737bb7cca6
commit d35f839c3f
4 changed files with 5 additions and 7 deletions

View file

@ -88,7 +88,7 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel, P
isChild = entity.isChild();
isSneak = entity.isSneaking();
isSleeping = entity.isPlayerSleeping();
isFlying = pony.isPegasusFlying(entity);
isFlying = pony.isFlying(entity);
isElytraFlying = entity.isElytraFlying();
isSwimming = pony.isSwimming(entity);
headGear = pony.isWearingHeadgear(entity);

View file

@ -14,7 +14,6 @@ public class ModelZombiePony extends ModelMobPony {
@Override
public void setLivingAnimations(EntityLivingBase entity, float move, float swing, float ticks) {
isPegasus = entity.getUniqueID().getLeastSignificantBits() % 30 == 0;
isFlying = !entity.onGround;
}
@Override

View file

@ -27,12 +27,12 @@ public interface IPony {
/**
* Returns true if the provided entity is flying like a pegasus.
* True if the entity is off the ground, has race with wings.
* True if the entity is off the ground.
* Creative flight counts only if the entity is <i>not</i> on the ground.
*
* Entities that are riding, climbing a ladder, or swimming are <i>not</i> flying.
*/
boolean isPegasusFlying(EntityLivingBase entity);
boolean isFlying(EntityLivingBase entity);
/**
* Returns true if the provided antity is actively wimming.

View file

@ -99,9 +99,8 @@ public class Pony implements IPony {
}
@Override
public boolean isPegasusFlying(EntityLivingBase entity) {
return getRace(false).hasWings() &&
!(entity.onGround || entity.isRiding() || entity.isOnLadder() || entity.isInWater());
public boolean isFlying(EntityLivingBase entity) {
return !(entity.onGround || entity.isRiding() || entity.isOnLadder() || entity.isInWater());
}
@Override