mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 08:14:23 +01:00
Fixed flying animation not working when the player is on a ladder whilst flying in creative mode
This commit is contained in:
parent
cb721408ad
commit
9d2e4af715
1 changed files with 6 additions and 1 deletions
|
@ -13,6 +13,7 @@ import net.minecraft.client.renderer.texture.TextureUtil;
|
|||
import net.minecraft.client.resources.IResource;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
|
@ -100,7 +101,11 @@ public class Pony implements IPony {
|
|||
|
||||
@Override
|
||||
public boolean isFlying(EntityLivingBase entity) {
|
||||
return !(entity.onGround || entity.isRiding() || entity.isOnLadder() || entity.isInWater() || entity.isPlayerSleeping());
|
||||
return !(entity.onGround
|
||||
|| entity.isRiding()
|
||||
|| (entity.isOnLadder() && !(entity instanceof EntityPlayer && ((EntityPlayer)entity).capabilities.isFlying))
|
||||
|| entity.isInWater()
|
||||
|| entity.isPlayerSleeping());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue