Stops balloons from 'growing up'
This commit is contained in:
parent
e4fc53d5ce
commit
1f0a22eb94
|
@ -58,6 +58,7 @@ public class BalloonItem extends BalloonGadget
|
||||||
{
|
{
|
||||||
Zombie zombie = player.getWorld().spawn(player.getLocation(), Zombie.class);
|
Zombie zombie = player.getWorld().spawn(player.getLocation(), Zombie.class);
|
||||||
zombie.setBaby(true);
|
zombie.setBaby(true);
|
||||||
|
((Ageable) zombie).setAgeLock(true);
|
||||||
UtilEnt.vegetate(zombie);
|
UtilEnt.vegetate(zombie);
|
||||||
UtilEnt.silence(zombie, true);
|
UtilEnt.silence(zombie, true);
|
||||||
addEntity(player, zombie);
|
addEntity(player, zombie);
|
||||||
|
@ -68,7 +69,10 @@ public class BalloonItem extends BalloonGadget
|
||||||
|
|
||||||
Entity entity = player.getWorld().spawnEntity(player.getLocation(), _balloonType.getEntityType());
|
Entity entity = player.getWorld().spawnEntity(player.getLocation(), _balloonType.getEntityType());
|
||||||
if (_balloonType.isBaby() && entity instanceof Ageable)
|
if (_balloonType.isBaby() && entity instanceof Ageable)
|
||||||
|
{
|
||||||
((Ageable) entity).setBaby();
|
((Ageable) entity).setBaby();
|
||||||
|
((Ageable) entity).setAgeLock(true);
|
||||||
|
}
|
||||||
UtilEnt.vegetate(entity);
|
UtilEnt.vegetate(entity);
|
||||||
UtilEnt.silence(entity, true);
|
UtilEnt.silence(entity, true);
|
||||||
addEntity(player, entity);
|
addEntity(player, entity);
|
||||||
|
|
Loading…
Reference in New Issue