From 019a8da48dfc6e950f26032c8d53fb7b763567ba Mon Sep 17 00:00:00 2001 From: Sollace Date: Mon, 28 Sep 2020 21:27:46 +0200 Subject: [PATCH] Fixed skeletons not lifting their arms when the player fires a bow --- .../unicopia/entity/behaviour/EntityBehaviour.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/minelittlepony/unicopia/entity/behaviour/EntityBehaviour.java b/src/main/java/com/minelittlepony/unicopia/entity/behaviour/EntityBehaviour.java index ce2358c8..ea4bedde 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/behaviour/EntityBehaviour.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/behaviour/EntityBehaviour.java @@ -13,6 +13,7 @@ import net.minecraft.entity.EntityType; import net.minecraft.entity.EquipmentSlot; import net.minecraft.entity.FallingBlockEntity; import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.mob.AbstractSkeletonEntity; import net.minecraft.entity.passive.TameableEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; @@ -140,6 +141,10 @@ public class EntityBehaviour { ((TameableEntity)to).setSitting(from.isSneaking()); } + if (to instanceof AbstractSkeletonEntity) { + ((AbstractSkeletonEntity)to).setAttacking(from.getItemUseTimeLeft() > 0); + } + if (from.age < 100 || from instanceof PlayerEntity && ((PlayerEntity)from).isCreative()) { to.extinguish(); }