even even even more work
This commit is contained in:
@@ -24,17 +24,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -0,0 +0,0 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
super.b(nbttagcompound);
|
||||
super.saveData(nbttagcompound);
|
||||
nbttagcompound.setInt("Size", this.getSize() - 1);
|
||||
nbttagcompound.setBoolean("wasOnGround", this.bx);
|
||||
nbttagcompound.setBoolean("wasOnGround", this.bw);
|
||||
+ nbttagcompound.setBoolean("Paper.canWander", this.canWander); // Paper
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -0,0 +0,0 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
this.setSize(i + 1, false);
|
||||
super.a(nbttagcompound);
|
||||
this.bx = nbttagcompound.getBoolean("wasOnGround");
|
||||
super.loadData(nbttagcompound);
|
||||
this.bw = nbttagcompound.getBoolean("wasOnGround");
|
||||
+ // Paper start - check exists before loading or this will be loaded as false
|
||||
+ if (nbttagcompound.hasKey("Paper.canWander")) {
|
||||
+ this.canWander = nbttagcompound.getBoolean("Paper.canWander");
|
||||
@@ -42,7 +42,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
public boolean ev() {
|
||||
public boolean eR() {
|
||||
@@ -0,0 +0,0 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
|
||||
@Override
|
||||
@@ -56,8 +56,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
@Override
|
||||
public boolean a() {
|
||||
- return (this.a.isInWater() || this.a.aH()) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime;
|
||||
+ return (this.a.isInWater() || this.a.aH()) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime && this.a.canWander && new SlimeSwimEvent((Slime) this.a.getBukkitEntity()).callEvent(); // Paper
|
||||
- return (this.a.isInWater() || this.a.aN()) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime;
|
||||
+ return (this.a.isInWater() || this.a.aN()) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime && this.a.canWander && new SlimeSwimEvent((Slime) this.a.getBukkitEntity()).callEvent(); // Paper
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -65,8 +65,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
@Override
|
||||
public boolean a() {
|
||||
- return this.a.getGoalTarget() == null && (this.a.onGround || this.a.isInWater() || this.a.aH() || this.a.hasEffect(MobEffects.LEVITATION)) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime;
|
||||
+ return this.a.canWander && this.a.getGoalTarget() == null && (this.a.onGround || this.a.isInWater() || this.a.aH() || this.a.hasEffect(MobEffects.LEVITATION)) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime;
|
||||
- return this.a.getGoalTarget() == null && (this.a.onGround || this.a.isInWater() || this.a.aN() || this.a.hasEffect(MobEffects.LEVITATION)) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime;
|
||||
+ return this.a.canWander && this.a.getGoalTarget() == null && (this.a.onGround || this.a.isInWater() || this.a.aN() || this.a.hasEffect(MobEffects.LEVITATION)) && this.a.getControllerMove() instanceof EntitySlime.ControllerMoveSlime;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -118,7 +118,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
@Override
|
||||
@@ -0,0 +0,0 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
this.a.a((Entity) this.a.getGoalTarget(), 10.0F, 10.0F);
|
||||
((EntitySlime.ControllerMoveSlime) this.a.getControllerMove()).a(this.a.yaw, this.a.eq());
|
||||
((EntitySlime.ControllerMoveSlime) this.a.getControllerMove()).a(this.a.yaw, this.a.eM());
|
||||
}
|
||||
+
|
||||
+ // Paper start - clear timer and target when goal resets
|
||||
|
||||
Reference in New Issue
Block a user