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

I am generating custom structures and want to set a random spawner type inside them.

That worked fine, until I set the entity to spawn to one of my own entities.

Working code:

logic.setEntityId(new ResourceLocation("Zombie"));

(logic is the MobSpawnerLogic)

 

New code:

logic.setEntityId(new ResourceLocation(Reference.MOD_ID, "Giant"));

The problem is that the spawner block is showing up in the game and the mob rotating inside is the right one, but it won't spawn anything.

 

I used a structure block to get the nbt data from the spawner that was generated and attached it to this post.

nbt_data_via_structure_block.nbt

  • Author

How should I access the entity type instead?

  • Guest locked this topic
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.