Cockatrices no longer target the player in creative mode.

This commit is contained in:
bconlon 2021-02-23 16:46:11 -08:00
parent 8396db1ebc
commit 179eb6195d

View file

@ -62,7 +62,10 @@ public class EntityCockatrice extends EntityMob {
super.onUpdate();
if (this.getEntityToAttack() != null) {
if (this.getAttackTarget() instanceof EntityPlayer && ((EntityPlayer) this.getAttackTarget()).capabilities.isCreativeMode) {
this.setAttackTarget(null);
}
else {
double d = this.getEntityToAttack().posX - this.posX;
double d1 = this.getEntityToAttack().posZ - this.posZ;
@ -79,6 +82,7 @@ public class EntityCockatrice extends EntityMob {
this.rotationYaw = (float) ((Math.atan2(d1, d) * 180D) / 3.1415927410125732D) - 90F;
}
}
this.updateWingRotation();