Mojira Archive
MC-265046

Conduit Power cannot apply to entities in the rain while inside/next to non-full blocks

The Bug:

When the player is standing inside of a position with a non-full block (both at the foot and head) which does not occlude the sky, the conduit power effect will not be applied.

Steps to Reproduce:

  1. Set weather to rain
    /weather rain
  1. Replicate the following setup:

Observed Results:

The player will not be given the conduit power effect.

Expected Results:

The player would be given the conduit power effect as they are underneath rainfall overhead.

Screenshots/Videos:

The player is immediately given the conduit power effect after leaving the two trapdoors:
2023-08-25_19-51-12.mp4

Code Analysis:

This is because of the isRainingAt() method in Level.java (net.minecraft.world.level)
which chcecks the heightmap type of a given block position 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;
      }
   }

Won't Fix

[Mod] Jiingy

2023-08-26, 02:00 AM

2023-08-30, 07:11 AM

2023-08-30, 07:11 AM

1

3

Confirmed

Block states

1.20.1, 23w33a

-