Flammable blocks don't burn properly

Started by SomeoneElse on

Topic category: Troubleshooting, bugs, and solutions

Last seen on 14:12, 3. Jun 2023
Joined Nov 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Flammable blocks don't burn properly

The checkbox to make blocks flammable only makes it so blocks can catch on fire. However, these blocks will burn indefinitely instead of disappearing. It's possible to fix the issue by adding these pieces of code:

// How quickly the block is destroyed, return an int between 0 and 300
public int getFlammability(IBlockAccess world, BlockPos pos, EnumFacing face) {
	return 5;
}

// How quickly fire spreads from this block, return an integer
public int getFireSpreadSpeed(IBlockAccess world, BlockPos pos, EnumFacing face) {
	return 20;
}

Some vanilla values are:

  • 5, 20 for planks and related blocks;
  • 5, 5 for logs and coal blocks;
  • 30, 60 for leaves and wool;
  • 60, 100 for most plants
Last seen on 05:50, 2. Jun 2023
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can I have a screenshot so I…
Wed, 10/23/2019 - 03:22

Can I have a screenshot so I know how to put it in?