Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-225779

Fire burns down blocks even faster in humid biomes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.16.5, 1.17 Pre-release 1, 1.18.2, 22w11a, 1.21
    • None
    • Community Consensus
    • Block states

      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);
              }
          }
      }
      

        1. Bamboo Jungle (Humid).mp4
          5.81 MB
          BugTracker
        2. Normal.mp4
          8.40 MB
          BugTracker

            Unassigned Unassigned
            LucunJi LucunJi
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              CHK: