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

Hi everyone ! I started to make a mod with forge recently, and tried to make a garbage mod to be comfortable with forge before making an actual mod, and I'm slowly making more and more things. I made a new log (and wood) type, to which i added tags like "logs_that_burn" to the Block and the BlockItem, as well as WOOD material during registration.
I registered it like this for the wood block (I have a similar function for the log block but the problem is the same) :

public static final RegistryObject<Block> RED_TULGEY_WOOD = BLOCKS.register("red_tulgey_wood", () -> new RotatedPillarBlock(AbstractBlock.Properties.of(Material.WOOD, MaterialColor.TERRACOTTA_RED).strength(2.0F).sound(SoundType.WOOD)));

BLOCKS being a DeferredRegistry of Blocks

So i saw that Minecraft was using a setFlammable function in the FireBlock class to register flammable blocks, and i also saw it used in other mods source code like Biome O Plenty's one.

But this function is private. I cannot register any flammable block using setFlammable and i don't know how to do make the game understand that my block can burn. Cause right now the fire acts like if it was a stone block, the fire just sits here and eventually disappears without destroying the block, and the fire doesn't propagate. I thought that setting the Material to WOOD would be enough. I don't think i should extends AbstractFlamableBlock and just copy and paste the FireBlock class as it wouldn't be the vanilla FireBlock anymore right ? It could create conflicts with other mods ?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

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.