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

Entities cannot be extinguished by rain when inside a position with a non-full block.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • None
    • 1.20.1, 23w33a, 23w35a
    • None
    • Windows
    • Confirmed
    • Entities

      The Bug

      When an entity is (either partially or completely) next to, or inside a non-full block, it will not be able to be extinguished by rainfall.

      Steps to Reproduce:

      (Issue is reproduced as a survival mode player, but issue applies to all entities)

      1. Set weather to rainy, and apply regeneration (for ease of reproduction)
        1. /weather rain
        2. /effect give @a minecraft:regeneration infinite 20
      2.  Locate a desert biome
        /locate biome minecraft:desert
      3. Replicate this setup on the border of the desert biome, and a rainy biome:
      4. Stand in the fire long enough to be lit on fire
      5. Walk into the open trapdoors

      Observed Results:

      The entity (a player in this case) will continue to be on fire despite having sky access to rain.

      Expected Results:

      The entity that is on fire would be extinguished properly as they are not blocked by the rain falling.

      Screenshots/Videos:

      2023-08-25_16-57-40.mp4

      Code Analysis (MCP):

      This is because of the isRainingAt() method in Level.java (net.minecraft.world.level).
      Specifically, the block position is checked to see if the hightmap type is "MOTION_BLOCKING".

         public boolean isRainingAt(BlockPos blockPos) {
            if (!this.isRaining()) {
               return false;
            } else if (!this.canSeeSky(blockPos)) {
               return false;
            } else if (this.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, blockPos).getY() > blockPos.getY()) {
               return false;
            } else {
               Biome biome = this.getBiome(blockPos).value();
               return biome.getPrecipitationAt(blockPos) == Biome.Precipitation.RAIN;
            }
         }
      

      (For demonstration only) After removing the getHeightmapPos() check, the player is properly extinguished as expected:
      2023-08-25_21-04-16.mp4

      Notes:
      Relates to MC-211475, MC-265046, MC-265047, MC-265048 and MC-265049

            Unassigned Unassigned
            Jingy [Mod] Jiingy
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: