Heyo, i recently came across a massive exploit where players can piston small magmacubes/slimes and if they are stacked up to 1k it can crash my server after they all die from the piston. I know this is a noob question but it'd be nice for a little advance help tysm
Easiest thing Might be to just not let them spawn and just sell like slime balls and what not in a store. EDIT: Not sure if you code or not but a simple line like below could fix that. Code (Text): @EventHandler public void entitySpawn(EntitySpawnEvent event) { Entity entity = event.getEntity(); if (entity instanceof Slime) { event.setCancelled(true); } }
You dont need a specific fix for this, just limit the number of mobs per chunk (in config file) and get Mobstacker. Fix the real issue.
There is Slime#getSize() Code (Java): @EventHandler public void entitySpawn(EntitySpawnEvent event) { Entity entity = event.getEntity(); // Where X is the size and under you don't want spawning if (entity instanceof Slime && ((Slime)entity).getSize() <= X ) { event.setCancelled(true); } }
Hmm, true could be a way but i'd rather deny baby mobs all up as i just want a grinder/magma grinder that has a specific size/age.
Welp, that's how you do that... There is no such thing as a baby magmacube/slimecube. They are sizes.
http://minecraft.gamepedia.com/Slime http://minecraft.gamepedia.com/Magma_Cube https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/Slime.html Again, there is no such thing as baby Slime or Magma Cube.
Slime dont have the status Baby or Adult. It's indicated by the Entity Size. For the baby the Size is 1 (the default others: 2 and 4)