garbagemule / MobArena

MobArena plugin for Minecraft
GNU General Public License v3.0
196 stars 151 forks source link

Fix some Ageable Entities spawning as baby versions sometimes, and add more baby variants #703

Closed Maroon28 closed 3 years ago

Maroon28 commented 3 years ago

Sometimes, adult entities used to spawn as babies. Not only that, but some of the baby variants were missing. This commit adds any missing variants and fixes the issue with adults turning to babies randomly, by making sure to set any

Summary

Problem

As described in issue #687, entities with ageable variants sometimes spawn as babies. And not only that, some of said baby variants are missing from the MACreature file, as described in issue #689. This pull request makes sure any entities that are not supposed to be babies are set as adults, and adds more baby types.

Solution

Simply put, just turn any regular entities to adults, and only turn them into babies when specified. I would've made an if statement by checking e instanceof ageable then turning it into an adult if true, just to save a bit of branches. Sadly, that would break any old versions running Mobarena, since they don't have the ageable option.

Maroon28 commented 3 years ago

Just pushed a commit to make all these changes!