mojira.dev
MC-225779

Fire burns down blocks even faster in humid biomes

This bug is discovered with the official mapping.
In function

public void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, Random random)

inside the class FireBlock.java, the third input argument of function

private void checkBurnOut(Level level, BlockPos blockPos, int n, Random random, int n2)

is reduced by 50 if the fire is in a humid biome. However, in the implementation ofcheckBurnOut, the criteria of burning down a block is

random.nextInt(n) < n3

, where n is the third argument and n3 is the flammability. This line indicates that a smaller n value makes fire burn down blocks easier.

The combined effect is that the blocks burns down faster in humid biomes, which is counterintuitive.

The detailed code deobfuscated with mojang:

@Override
public void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, Random random) {
    //...
    int n3 = (bl = serverLevel.isHumidAt(blockPos)) ? -50 : 0;
    this.checkBurnOut(serverLevel, blockPos.east(), 300 + n3, random, n);
    //...
}

private void checkBurnOut(Level level, BlockPos blockPos, int n, Random random, int n2) {
    int n3 = this.getBurnOdd(level.getBlockState(blockPos));
    if (random.nextInt(n) < n3) {
        BlockState blockState = level.getBlockState(blockPos);
        if (random.nextInt(n2 + 10) < 5 && !level.isRainingAt(blockPos)) {
            int n4 = Math.min(n2 + random.nextInt(5) / 4, 15);
            level.setBlock(blockPos, this.getStateWithAge(level, blockPos, n4), 3);
        } else {
            level.removeBlock(blockPos, false);
        }
        Block block = blockState.getBlock();
        if (block instanceof TntBlock) {
            TntBlock cfr_ignored_0 = (TntBlock)block;
            TntBlock.explode(level, blockPos);
        }
    }
}

Linked issues

Attachments

Comments 3

In 1.17-pre1 this code analysis seems to be correct as well. In humid biomes:

  • fire replaces blocks it is attached to faster with new fire blocks (spreading to distant blocks is unaffected)

  • TNT explodes faster

Could you provide a practical example of a humid biome? For the sake of confirming this report, it would be helpful to know what biomes to reproduce this in, and what the exact expected vs. the observed speed of burning blocks is.

I actually can confirm this, I tested this in a Bamboo Jungle which is supposed to be a humid biome:

[media]

(24+ seconds)

[media]

(16 seconds)

LucunJi

(Unassigned)

Community Consensus

Block states

1.16.5, 1.17 Pre-release 1, 1.18.2, 22w11a, 1.21, 1.21.4

Retrieved