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)
Set weather to rainy, and apply regeneration (for ease of reproduction)
/weather rain
/effect give @a minecraft:regeneration infinite 20
Locate a desert biome
/locate biome minecraft:desert
Replicate this setup on the border of the desert biome, and a rainy biome:
[media]Stand in the fire long enough to be lit on fire
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:
[media]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:
[media]
Notes:
Relates to MC-211475, MC-265046, MC-265047, MC-265048 and MC-265049
Linked issues
relates to 1
Attachments
Comments 0
No comments.