mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-26 06:18:00 +01:00
Fixed the crouching pony bunny hop bug
This commit is contained in:
parent
737bb7cca6
commit
d35f839c3f
4 changed files with 5 additions and 7 deletions
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue