Jump to content

Recommended Posts

Posted

Hello, I'm very new to forge and got stuck on something that I thought would be rather simple. I wanted to change the spawnrate of certain vanilla entities (mobs), and change

the limit of the max amount of entities that can be spawned. I've been looking a lot at the forge code, and documentation, but failed to figure it out. A nudge in the right direction

would be highly appreciated. :)

Posted (edited)

Thanks, I was trying to make it work, thought I would do something like this.

 

    @EventHandler
    public void init(FMLInitializationEvent event)
    {
        MinecraftForge.EVENT_BUS.register(new MySpawnEventHandler());
        EntityRegistry.removeSpawn(EntityZombie.class, EnumCreatureType.MONSTER);
        EntityRegistry.removeSpawn(EntitySkeleton.class, EnumCreatureType.MONSTER);
        EntityRegistry.removeSpawn(EntitySpider.class, EnumCreatureType.MONSTER);
        EntityRegistry.removeSpawn(EntityEnderman.class, EnumCreatureType.MONSTER);
        EntityRegistry.removeSpawn(EntitySlime.class, EnumCreatureType.MONSTER);
        EntityRegistry.addSpawn(EntityZombie.class, 100, 100, 100, EnumCreatureType.MONSTER);
    }

But it doesn't seem to be working and I don't really know what I'm doing wrong to be honest. I thought it made sense to call these methods in the init method since they are static anyway, does that make sense? I'd make a seperate method if it worked of course.

Edited by Grazen

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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