Jump to content

Block with custom Fire spreading behaviour?


cinco

Recommended Posts

I'm coding a mod that adds placeable Gunpowder into the game, which behaves similarly to Redstone in terms of placing. I also want it to be flammable, so that it can be used as a fuse. However, the default fire spreading behaviour works well for this - the blocks ignite randomly, and they can burn out without spreading the fire to the next block. I want to make it so that, when the gunpowder is set on fire, instead of the Fire block simply floating above it or going to the side, it should replace the gunpowder block every time. I would also like to make fire spread to gunpowder faster than it does to regular blocks, because that would make it more practical as a fuse. I really don't know how I would go about doing these things. I suppose I could make a function in the gunpowder's block class that detects fire and turns into it separately from regular firetick, but that could have problems with things like Soul Fire, especially in terms of compatibility with mods that add other types of fire. Also, there are a bunch of other sources of fire: Flint and Steel, Fire Charges either from a player's hand or a Dispenser, fireballs shot by Ghasts and Blazes, not to mention any modded sources of fire. Is there any way to just make all sources of fire behave differently for this block?

Link to comment
Share on other sites

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.



×
×
  • Create New...

Important Information

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