mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-12-02 00:37:59 +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();
|
isChild = entity.isChild();
|
||||||
isSneak = entity.isSneaking();
|
isSneak = entity.isSneaking();
|
||||||
isSleeping = entity.isPlayerSleeping();
|
isSleeping = entity.isPlayerSleeping();
|
||||||
isFlying = pony.isPegasusFlying(entity);
|
isFlying = pony.isFlying(entity);
|
||||||
isElytraFlying = entity.isElytraFlying();
|
isElytraFlying = entity.isElytraFlying();
|
||||||
isSwimming = pony.isSwimming(entity);
|
isSwimming = pony.isSwimming(entity);
|
||||||
headGear = pony.isWearingHeadgear(entity);
|
headGear = pony.isWearingHeadgear(entity);
|
||||||
|
|
|
@ -14,7 +14,6 @@ public class ModelZombiePony extends ModelMobPony {
|
||||||
@Override
|
@Override
|
||||||
public void setLivingAnimations(EntityLivingBase entity, float move, float swing, float ticks) {
|
public void setLivingAnimations(EntityLivingBase entity, float move, float swing, float ticks) {
|
||||||
isPegasus = entity.getUniqueID().getLeastSignificantBits() % 30 == 0;
|
isPegasus = entity.getUniqueID().getLeastSignificantBits() % 30 == 0;
|
||||||
isFlying = !entity.onGround;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -27,12 +27,12 @@ public interface IPony {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if the provided entity is flying like a pegasus.
|
* 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.
|
* 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.
|
* 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.
|
* Returns true if the provided antity is actively wimming.
|
||||||
|
|
|
@ -99,9 +99,8 @@ public class Pony implements IPony {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isPegasusFlying(EntityLivingBase entity) {
|
public boolean isFlying(EntityLivingBase entity) {
|
||||||
return getRace(false).hasWings() &&
|
return !(entity.onGround || entity.isRiding() || entity.isOnLadder() || entity.isInWater());
|
||||||
!(entity.onGround || entity.isRiding() || entity.isOnLadder() || entity.isInWater());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue