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.

How do I reintroduce a block in my mod class?

Featured Replies

Posted

I want to change a property of a block that is defined in the Block class, but I don't know how to do that without editing the base class. There must be some way for Forge to remove it and then put it back in again.

 

The block in question is the pumpkin stem. I don't want to edit the BlockStem class, just change the FruitType of the pumpkin stem.

  • Author

I figured it out. The code I needed was:

 

		ModLoader.setPrivateValue(net.minecraft.src.BlockStem.class, (BlockStem)Block.pumpkinStem, "fruitType", realPumpkin);

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.