Posted February 21, 20196 yr Myself and the group I play with heavily dislike baby zombies so I decided to try to remove them. However, whenever I test it by spawning a bunch of zombies, I still get a few babies in there. This is the code being used. Spoiler package kemanorel.nomorebabyzombies.common; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.event.FMLInitializationEvent; @Mod (modid = CancelBabyZombies.MODID, name = CancelBabyZombies.NAME, version = CancelBabyZombies.VERSION) public class CancelBabyZombies { public static final String MODID = "nomorebabyzombies"; public static final String NAME = "No More Baby Zombies"; public static final String VERSION = "1.0"; @EventHandler public void init(FMLInitializationEvent event) { MinecraftForge.EVENT_BUS.register(new SpawnHandler()); } } Spoiler package kemanorel.nomorebabyzombies.common; import net.minecraft.entity.monster.EntityMob; import net.minecraft.entity.monster.EntityZombie; import net.minecraftforge.event.entity.living.LivingSpawnEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; public class SpawnHandler { @SubscribeEvent public void onEntitySpawn(LivingSpawnEvent event) { if (event.getEntity() instanceof EntityMob) if (event.getEntity() instanceof EntityZombie) { EntityZombie zombie = (EntityZombie)event.getEntity(); if (zombie.isChild()) zombie.setChild(false); } } }
February 21, 20196 yr Forge already provides a config option: # Chance that a zombie (or subclass) is a baby. Allows changing the zombie spawning mechanic. D:zombieBabyChance=0.05
February 21, 20196 yr Author Huh, well, now I know why there aren't mods around for it. Thanks for letting me know.
May 20, 20223 yr On 2/22/2019 at 2:42 AM, quadraxis said: Forge already provides a config option: # Chance that a zombie (or subclass) is a baby. Allows changing the zombie spawning mechanic. D:zombieBabyChance=0.05 hello, i'm planning to play offline survival game without baby zombie in 1.16.5. i can't find mods nor any settings available to disable these baby zombies from spawning.
May 20, 20223 yr in serverconfig directory under your world save directory, find forge-server.toml set the chance to 0. those damn things shouldn't exist. Edited May 20, 20223 yr by MFMods
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.