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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • None
    • 1.20.1, 23w33a
    • None
    • Confirmed
    • Block states

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

        1. 2023-08-25_19.46.51.png
          2023-08-25_19.46.51.png
          2.60 MB
        2. 2023-08-25_19.48.56.png
          2023-08-25_19.48.56.png
          3.40 MB
        3. 2023-08-25_19.54.56.png
          2023-08-25_19.54.56.png
          3.70 MB
        4. 2023-08-25_19-51-12.mp4
          6.46 MB

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

              Created:
              Updated:
              Resolved:
              CHK: