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

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! :)

  • Author

Anyone? :( Sorry for the double post, I'm just anxious to get my mod updated to 1.4.2 and continue development on it.

  • Author

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

  • Author

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.

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.