mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Fixed skeletons not lifting their arms when the player fires a bow
This commit is contained in:
parent
97f2eda351
commit
019a8da48d
1 changed files with 5 additions and 0 deletions
|
@ -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<T extends Entity> {
|
|||
((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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue