Snow golem leaves snow trail while dying
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
- 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 - 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 (Josh Letellier)
2016-08-17, 06:58 PM
2024-03-02, 12:10 AM
2019-03-06, 02:39 PM
5
7
Minecraft 1.10.2 - Minecraft 19w07a
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
-