Minecraft, server crashes on mob spawn 1.9

The code I am using to spawn and edit the zombies is as follows:

    double strength = (int) (((wave * 100) + 50) / 50);
    Location location = new Location(loc.getLocation().getWorld(), loc.getLocation().getBlockX(), loc.getLocation().getBlockY(), loc.getLocation().getBlockZ());
    location.add(0.5, 0, 0.5);
    Zombie zomb = (Zombie) location.getWorld().spawnEntity(location, EntityType.ZOMBIE);
    setTotalHealth(zomb, strength);
    zomb.setHealth(strength <= 20D ? strength : 20D);

But whenever this runs and a zombie spawns, the server will register this and spawn the zombie in the right place. But when it does, it will freeze the zombie and then the server will crash. Thanks.


(I can't comment yet but try to take this as one and a possible answer)

According to my knowledge, you can't spawn entities with more than 2048 HP, that causes a server error (and maybe a crash on recent versions).

Need Your Help

MageUI.exe is not including a compatibleFrameworks element

.net-4.0 clickonce

I've got a ClickOnce .NET 4 application deployed by Visual Studio 2010, via a UNC path. I open the .application file, change the startup location to use the HTTP address, sign, and close. The appli...

Joomla link to barebones article content

html joomla hyperlink

I know a trick to make link to article without template (tmpl=component), but I see that it still links some styles: