Burnable blocks don't burn properly

Upvotes: 7
Issue description

(I opened a thread for it, but I guess opening a ticket won't hurt)
The "Is flammable" option makes it so the block can catch on fire. However, the block will never disappear, instead it just burns indefinitely. This happens because the "flammability" property isn't defined. The required code is:

public int getFlammability(IBlockAccess world, BlockPos pos, EnumFacing face) {
	return 10;

The return value is an integer between 0 and 300, which determines how quickly the block is consumed by fire. Having some way to set this value would fix the problem.
(Another property that would be helpful is the fire spread speed. The required code is:

public int getFireSpreadSpeed(IBlockAccess world, BlockPos pos, EnumFacing face) {
	return 30;

The return value is an integer determining how quickly the fire spreads to other blocks)

Issue comments

Will consider adding this option in the next update. Thank you for opening the ticket and explaining this in-depth.

In procedures, it can be done through:

getFlammability: By checking whether there is a block of fire around the block and giving it a chance to delete itself at xyz.

getFireSpread: By placing blocks of fire when that block at xOffset, yOffset, zOffset is equal to air, causing other blocks with flammable checked to also burn when they get an adjacent block of of fire as result.

The 6x6 template is very useful for this.

(The coding solution is superior to this)

Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.