Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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);
            }
    }
}

 

 

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

 

  • 3 years later...
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.

in serverconfig directory under your world save directory, find  forge-server.toml

set the chance to 0. those damn things shouldn't exist.

Edited 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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.