diff --git a/changelog.md b/changelog.md index a021940..579ded0 100644 --- a/changelog.md +++ b/changelog.md @@ -13,6 +13,7 @@ These changes will (most likely) be included in the next version. ## [Unreleased] ### Added - New monster variant `angry-bees` can be used to spawn angry bees. +- Husks, drowned, piglins, hoglins, and zoglins can now be spawned in their baby versions using the `baby` prefix seen on other monster types (e.g. `baby-zombie`). - Pet names are now per-class configurable via the optional `pet-name` property, which defaults to `'s pet` (the `` variable is also supported). - New per-arena setting `auto-leave-on-end` can be used to automatically "kick" spectators when the current session ends. - Added boss abilities `disorient-all`, `fetch-all`, `pull-all`, and `throw-all`. These abilities work like their target-specific and distance-based counterparts, but affect all players in the arena. @@ -27,6 +28,7 @@ These changes will (most likely) be included in the next version. ### Fixed - Pillagers and vindicators no longer spawn without their much-needed weapons. - Piglins, piglin brutes, and hoglins no longer zombify. This fixes a bug where the mobs would despawn due to the zombification process. +- Zombies, husks, drowned, zombie villagers, piglins, hoglins, and zoglins without the `baby` prefix are now forced into adulthood to prevent them from occasionally spawning as babies. - Reward groups with `nothing` in them no longer cause errors when earned/granted. - The title-based announcer and the title-based boss health bar have been fixed to work with the breaking change to the Title API in Spigot 1.17. diff --git a/src/main/java/com/garbagemule/MobArena/waves/MACreature.java b/src/main/java/com/garbagemule/MobArena/waves/MACreature.java index 12ce1ca..43dcca5 100644 --- a/src/main/java/com/garbagemule/MobArena/waves/MACreature.java +++ b/src/main/java/com/garbagemule/MobArena/waves/MACreature.java @@ -5,20 +5,20 @@ import com.garbagemule.MobArena.framework.Arena; import org.bukkit.Bukkit; import org.bukkit.DyeColor; import org.bukkit.Location; -import org.bukkit.Material; 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.LivingEntity; import org.bukkit.entity.Hoglin; -import org.bukkit.entity.PiglinAbstract; +import org.bukkit.entity.LivingEntity; import org.bukkit.entity.PigZombie; +import org.bukkit.entity.PiglinAbstract; import org.bukkit.entity.Rabbit; import org.bukkit.entity.Sheep; import org.bukkit.entity.Slime; import org.bukkit.entity.Wolf; +import org.bukkit.entity.Zoglin; import org.bukkit.entity.Zombie; import org.bukkit.inventory.ItemStack; import org.bukkit.plugin.Plugin; @@ -131,19 +131,39 @@ public class MACreature { case "magmacubehuge": ((Slime) e).setSize(4); break; + case "babydrowned": + case "babyhusk": case "babyzombievillager": case "babyzombie": ((Zombie) e).setBaby(true); break; + case "babyhoglin": + ((Hoglin) e).setImmuneToZombification(true); + ((Hoglin) e).setBaby(); + break; + case "babypiglin": + ((PiglinAbstract) e).setBaby(); + ((PiglinAbstract) e).setImmuneToZombification(true); + break; case "babypigman": case "babyzombifiedpiglin": ((Zombie) e).setBaby(true); ((PigZombie) e).setAngry(true); break; + case "babyzoglin": + ((Zoglin) e).setBaby(); + break; case "pigzombie": case "zombiepigman": case "zombifiedpiglin": ((PigZombie) e).setAngry(true); + ((PigZombie) e).setBaby(false); + break; + case "husk": + case "drowned": + case "zombievillager": + case "zombie": + ((Zombie) e).setBaby(false); break; case "killerbunny": ((Rabbit) e).setRabbitType(Rabbit.Type.THE_KILLER_BUNNY); @@ -151,9 +171,11 @@ public class MACreature { case "piglin": case "piglinbrute": ((PiglinAbstract) e).setImmuneToZombification(true); + ((PiglinAbstract) e).setAdult(); break; case "hoglin": ((Hoglin) e).setImmuneToZombification(true); + ((Hoglin) e).setAdult(); break; default: break; @@ -241,6 +263,11 @@ public class MACreature { // put("angrybee", "angrybees", "BEE", null); put("angrywolf", "angrywolves", "WOLF"); + put("babydrowned", "babydrowned", "DROWNED"); + put("babyhoglin", "babyhoglins", "HOGLIN", null); + put("babyhusk", "babyhusks", "HUSK"); + put("babypiglin", "babypiglins", "PIGLIN", null); + put("babyzoglin", "babyzoglins", "ZOGLIN", null); put("babyzombie", "babyzombies", "ZOMBIE"); put("babyzombievillager", "babyzombievillagers", "ZOMBIE_VILLAGER"); put("killerbunny", "killerbunnies", "RABBIT");