Jump to content

Recommended Posts

Posted

Hello all! I'm new to Forge (obviously) and recently switched over from ModLoader.

 

Anyways, my mod removes a lot of the vanilla mobs and adds a few new ones, but the addSpawn and removeSpawn methods in EntityRegistry don't seem to be working for me... There are no errors, yet they don't... Work.

 

Some code:

EntityRegistry.removeSpawn(EntityPig.class, EnumCreatureType.creature, WorldType.base12Biomes);
EntityRegistry.addSpawn(EntityWalker.class, 50, 5, 20, EnumCreatureType.monster);

 

Would really appreciate some help with this, thanks! :)

Posted

Is it in your @Init method?

 

The removes are in a separate method that is called in the init method, so I can keep it less cluttered. The addSpawns are still inside the init method, though. Neither work. :( When I was using the ModLoader versions they seemed to work somewhat. Though monsters still spawned in dark places... Hence I tried switching to the EntityRegistry methods to see if they would fix that, but they didn't work at all... xD

 

EDIT: Thanks for the response, by the way. :)

Posted

Got it sorted out. Turns out the mobs were just spawning in the biomes that the "basic 12 biomes" didn't cover, and I used the ModLoader addSpawn to make the new mobs spawn... And everything works! :)

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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