Stops balloons from 'growing up'

This commit is contained in:
LCastr0 2017-04-08 22:58:14 -03:00
parent e4fc53d5ce
commit 1f0a22eb94

View File

@ -58,6 +58,7 @@ public class BalloonItem extends BalloonGadget
{
Zombie zombie = player.getWorld().spawn(player.getLocation(), Zombie.class);
zombie.setBaby(true);
((Ageable) zombie).setAgeLock(true);
UtilEnt.vegetate(zombie);
UtilEnt.silence(zombie, true);
addEntity(player, zombie);
@ -68,7 +69,10 @@ public class BalloonItem extends BalloonGadget
Entity entity = player.getWorld().spawnEntity(player.getLocation(), _balloonType.getEntityType());
if (_balloonType.isBaby() && entity instanceof Ageable)
{
((Ageable) entity).setBaby();
((Ageable) entity).setAgeLock(true);
}
UtilEnt.vegetate(entity);
UtilEnt.silence(entity, true);
addEntity(player, entity);