diff --git a/changelog.md b/changelog.md index be6d1ff..8df5175 100644 --- a/changelog.md +++ b/changelog.md @@ -20,6 +20,7 @@ These changes will (most likely) be included in the next version. ### Changed - Recurrent waves can now be randomized. If two or more recurrent waves clash on wave number, frequency, _and_ priority, MobArena will now randomly pick between them. This should make it easier to create more varied and interesting wave setups without having to resort to only massively randomized default waves. - Single waves can now be randomized. If two or more single waves clash on wave number, MobArena will now randomly pick between them. This means it is now possible to make randomly selected bosses for boss waves, for instance. +- Slimes, Magma Cubes, Bats, Ghasts, Phantoms, and Ender Dragons now all target players in the same way other monsters do. ### Fixed - MobArena no longer throws errors when handling block explosions on Minecraft 1.21. diff --git a/src/main/java/com/garbagemule/MobArena/waves/MACreature.java b/src/main/java/com/garbagemule/MobArena/waves/MACreature.java index 43dcca5..abd71e8 100644 --- a/src/main/java/com/garbagemule/MobArena/waves/MACreature.java +++ b/src/main/java/com/garbagemule/MobArena/waves/MACreature.java @@ -7,11 +7,11 @@ import org.bukkit.DyeColor; import org.bukkit.Location; import org.bukkit.World; import org.bukkit.entity.Bee; -import org.bukkit.entity.Creature; import org.bukkit.entity.Creeper; import org.bukkit.entity.EntityType; import org.bukkit.entity.Hoglin; import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Mob; import org.bukkit.entity.PigZombie; import org.bukkit.entity.PiglinAbstract; import org.bukkit.entity.Rabbit; @@ -181,9 +181,9 @@ public class MACreature { break; } - if (e instanceof Creature) { - Creature c = (Creature) e; - c.setTarget(WaveUtils.getClosestPlayer(arena, e)); + if (e instanceof Mob) { + Mob m = (Mob) e; + m.setTarget(WaveUtils.getClosestPlayer(arena, e)); } return e;