Jump to content

[Solved][1.7.2] setBurnProperties (how to set block on Fire with flint)


Conraad

Recommended Posts

Trying to set my wood block so that it catches fire but, there's no static method under block.java allowing me to set that atm.

 

I looked at the code in 1.6.4 BlockFire called the check using

 

private void setBurnRate(int par1, int par2, int par3)
    {
        Block.setBurnProperties(par1, par2, par3);
    }

 

in 1.7.2 it would appear that method has been changed or removed to this

 

    @Deprecated // Use setFireInfo
    public void func_149842_a(int p_149842_1_, int p_149842_2_, int p_149842_3_)
    {
        this.setFireInfo((Block)Block.blockRegistry.getObjectById(p_149842_1_), p_149842_2_, p_149842_3_);
    }

 

But there's now way for me to really be able to use that.

 

The question is now how do I set my block so that it can be destroyed by fire

 

Edit*

Blocks.fire.setFireInfo(RegBlocks.BlockFlowers, 8, 30);

 

This works thanks for pointing that out.

Link to comment
Share on other sites

Use Blocks.fire.setFireInfo(Block block, int fire_a, int fire_b). Block is the block you want to set to fire and fire_a/fire_b are the fire parameters (I think is how quickly it burns and how quickly it expands fire to other blocks, but I don't know it for sure, just play with them until you get the effect you want (or search were setFireInfo is called for vanilla wood and copy them)).

Link to comment
Share on other sites

  • 3 months later...

I'm doing something similar, but I'm imitating netherrack. I want my block to be flammable, but I don't want fire to spread or consume. Paradoxically, netherrack is missing from the list of examples in the vanilla BlockFire. It's perpetual fire must be declared somewhere else, but it's not in the netherrack subclass of Block.

 

Still hunting...

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

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.

Announcements



×
×
  • Create New...

Important Information

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