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

Snow golem leaves snow trail while dying

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Works As Intended
    • None
    • Minecraft 1.10.2, Minecraft 1.11, Minecraft 16w50a, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 18w50a, Minecraft 19w02a, Minecraft 19w03a, Minecraft 19w03b, Minecraft 19w03c, Minecraft 19w05a, Minecraft 19w06a, Minecraft 19w07a
    • None
    • Confirmed

      The bug

      When you kill a snow golem with a bow, it will leave a trail of snow when he dies (video).

      How to reproduce

      1. Give yourself a bow with punch II, and summon a snow golem.
        /give @s bow{Enchantments:[{id:unbreaking,lvl:3},{id:punch,lvl:2}]}
        /summon minecraft:snow_golem
        
      2. Shoot the snow golem.
        Snow golem dies as expected
        but it left a snow trail behind while in it's death animation

      Code analysis

      Based on 1.12.2 names.
      This could be fixed by adding this.isEntityAlive() boolean-method in the method net.minecraft.entity.monster.EntitySnowman.onLivingUpdate() by the if-statment where it checks for the biome temperature, ect.

         for (int l = 0; l < 4; ++l)
                  {
                      i = MathHelper.floor(this.posX + (double)((float)(l % 2 * 2 - 1) * 0.25F));
                      j = MathHelper.floor(this.posY);
                      k = MathHelper.floor(this.posZ + (double)((float)(l / 2 % 2 * 2 - 1) * 0.25F));
                      BlockPos blockpos = new BlockPos(i, j, k);
                      //Added isEntityAlive() boolean-method here
                      if (this.isEntityAlive() && this.world.getBlockState(blockpos).getMaterial() == Material.AIR && this.world.getBiome(blockpos).getTemperature(blockpos) < 0.8F && Blocks.SNOW_LAYER.canPlaceBlockAt(this.world, blockpos))
                      {
                          this.world.setBlockState(blockpos, Blocks.SNOW_LAYER.getDefaultState());
                      }
                  }
      

            rockenroll4life rockenroll4life (Josh Letellier)
            duncte123 Duncan Sterken
            Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: