Jump to content

Recommended Posts

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.