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.

[1.7.2][Fixed]Block/ItemBlock RuntimeException at registration

Featured Replies

Posted

The code I am running :

bush = GameRegistry.registerBlock(new BlockBushes().func_149663_c(Strings.BUSH_NAME), ItemBlockMulti.class, Strings.BUSH_NAME, Reference.MOD_ID, BUSH_TYPES);

ItemBlockMulti extends ItemBlockWithMetadata, with a constructor using (Block, ArrayList<String>), and BUSH_TYPES is of type ArrayList<String>, by the way.

It doesn't matter actually, if commented out, it crashes the same with the next block registration attempt.

 

The debug reached there:

592435bug.png

 

It looks like the ItemBlock couldn't get the same id as its Block, for some reason ?

Note that the block id reached exactly 256, which may be related to that. (The previous block used blockId=255, and loaded correctly with itemId = 255)

Looking into itemRegistry didn't give me anything.

  • Author

If it wasn't obvious from this screenshot, that GameData is from the cpw.mods.fml.common.registry package.

I am not using IDs. FML is.

Make sure you update to the latest Forge version. It shouldn't give you 256 as a ID in the block list, if it does i'll have to poke cpw about it.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

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.