@@ -308,7 +310,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
}
public boolean a() {
- return true;
+ return this.a.canWander && new com.destroystokyo.paper.event.entity.SlimeWanderEvent((org.bukkit.entity.Slime) this.a.getBukkitEntity()).callEvent(); // Paper
}
public void e() {
@@ -327,7 +329,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
}
public boolean a() {
- return this.a.isInWater() || this.a.ax();
+ return (this.a.isInWater() || this.a.ax()) && this.a.canWander && new com.destroystokyo.paper.event.entity.SlimeSwimEvent((org.bukkit.entity.Slime) this.a.getBukkitEntity()).callEvent(); // Paper
}
public void e() {
@@ -351,13 +353,17 @@ public class EntitySlime extends EntityInsentient implements IMonster {
+ if (this.a.canWander && new com.destroystokyo.paper.event.entity.SlimeTargetLivingEntityEvent((org.bukkit.entity.Slime) this.a.getBukkitEntity(), (org.bukkit.entity.LivingEntity) entityliving.getBukkitEntity()).callEvent()) {
+ return true;
+ }
+ this.b = 0;
+ this.a.setGoalTarget(null);
+ }
+ return false;
+ // Paper end
}
public void c() {
@@ -388,7 +403,16 @@ public class EntitySlime extends EntityInsentient implements IMonster {
+ if (this.a.canWander && new com.destroystokyo.paper.event.entity.SlimeTargetLivingEntityEvent((org.bukkit.entity.Slime) this.a.getBukkitEntity(), (org.bukkit.entity.LivingEntity) entityliving.getBukkitEntity()).callEvent()) {
+ return true;
+ }
+ this.b = 0;
+ this.a.setGoalTarget(null);
+ }
+ return false;
+ // Paper end
}
public void e() {
@@ -452,4 +476,15 @@ public class EntitySlime extends EntityInsentient implements IMonster {