using getters for abilities
and yRot
This commit is contained in:
parent
d8383121e3
commit
6e9d8e8b49
1 changed files with 7 additions and 7 deletions
|
@ -322,7 +322,7 @@ public class EndSlimeEntity extends Slime {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return livingEntity instanceof Player && ((Player) livingEntity).abilities.invulnerable ? false : EndSlimeEntity.this.getMoveControl() instanceof EndSlimeMoveControl;
|
return livingEntity instanceof Player && ((Player) livingEntity).getAbilities().invulnerable ? false : EndSlimeEntity.this.getMoveControl() instanceof EndSlimeMoveControl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -339,7 +339,7 @@ public class EndSlimeEntity extends Slime {
|
||||||
else if (!livingEntity.isAlive()) {
|
else if (!livingEntity.isAlive()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (livingEntity instanceof Player && ((Player) livingEntity).abilities.invulnerable) {
|
else if (livingEntity instanceof Player && ((Player) livingEntity).getAbilities().invulnerable) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -349,7 +349,7 @@ public class EndSlimeEntity extends Slime {
|
||||||
|
|
||||||
public void tick() {
|
public void tick() {
|
||||||
EndSlimeEntity.this.lookAt(EndSlimeEntity.this.getTarget(), 10.0F, 10.0F);
|
EndSlimeEntity.this.lookAt(EndSlimeEntity.this.getTarget(), 10.0F, 10.0F);
|
||||||
((EndSlimeMoveControl) EndSlimeEntity.this.getMoveControl()).look(EndSlimeEntity.this.yRot, EndSlimeEntity.this.isDealsDamage());
|
((EndSlimeMoveControl) EndSlimeEntity.this.getMoveControl()).look(EndSlimeEntity.this.getYRot(), EndSlimeEntity.this.isDealsDamage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -360,7 +360,7 @@ public class EndSlimeEntity extends Slime {
|
||||||
|
|
||||||
public EndSlimeMoveControl(EndSlimeEntity slime) {
|
public EndSlimeMoveControl(EndSlimeEntity slime) {
|
||||||
super(slime);
|
super(slime);
|
||||||
this.targetYaw = 180.0F * slime.yRot / 3.1415927F;
|
this.targetYaw = 180.0F * slime.getYRot() / 3.1415927F;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void look(float targetYaw, boolean jumpOften) {
|
public void look(float targetYaw, boolean jumpOften) {
|
||||||
|
@ -374,9 +374,9 @@ public class EndSlimeEntity extends Slime {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void tick() {
|
public void tick() {
|
||||||
this.mob.yRot = this.rotlerp(this.mob.yRot, this.targetYaw, 90.0F);
|
this.mob.setYRot(this.rotlerp(this.mob.getYRot(), this.targetYaw, 90.0F));
|
||||||
this.mob.yHeadRot = this.mob.yRot;
|
this.mob.yHeadRot = this.mob.getYRot();
|
||||||
this.mob.yBodyRot = this.mob.yRot;
|
this.mob.yBodyRot = this.mob.getYRot();
|
||||||
if (this.operation != MoveControl.Operation.MOVE_TO) {
|
if (this.operation != MoveControl.Operation.MOVE_TO) {
|
||||||
this.mob.setZza(0.0F);
|
this.mob.setZza(0.0F);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue