Snow golems attack creepers
The Bug:
Snow golems attack creepers.
Steps to Reproduce:
- Summon a snow golem and a creeper by using the commands provided below.
/summon minecraft:snow_golem ~-3 ~ ~
/summon minecraft:creeper ~3 ~ ~
- Wait around ten seconds or so for the snow golem to notice the creeper.
- Take note as to whether or not snow golems attack creepers.
Observed Behavior:
Snow golems attack creepers.
Expected Behavior:
Snow golems would not be able to attack creepers.
Code Analysis:
Code analysis by [Mod] Avoma can be found below.
The following is based on a decompiled version of Minecraft 1.19.2 using MCP-Reborn.
public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackMob { ... protected void registerGoals() { ... this.targetSelector.addGoal(1, new NearestAttackableTargetGoal<>(this, Mob.class, 10, true, false, (livingEntity) -> { return livingEntity instanceof Enemy; })); } ...
If we look at the above class, we can see that snow golems are designed to attack any living entity that is considered an enemy. A creeper is considered a monster and a monster is considered an enemy, therefore allowing snow golems to attack creepers. The game doesn't check if the said entity is a creeper before allowing a snow golem to attack it, therefore resulting in this problem occurring.
Fix:
Simply allowing snow golems to override the canAttackType() method located within the Mob.java class to make it so that they cannot attack creepers will resolve this problem. The following lines of code can be added somewhere within the SnowGolem.java class to fix this issue.
public boolean canAttackType(EntityType<?> entityType) { return entityType != EntityType.CREEPER && super.canAttackType(entityType); }
Linked Issues
is duplicated by3
- Unresolved
[Mod] AvomaEarthcomputer
- 58
- 26
- Confirmed
Normal
- Gameplay
- Mob behaviour
- creeper snow_golem
1.8 - 1.21.4
1.8 1.8.8 15w43a 1.9 1.9.1-pre1 1.9.1-pre2 1.9.1-pre3 1.9.4 16w21a 1.10.2 16w32a 16w32b 16w33a 1.11.2 17w06a 1.12-pre2 1.12.2 18w16a 1.13 18w30b 1.13.2 18w43b 18w43c 18w44a 18w45a 18w48a 18w48b 18w49a 18w50a 19w08b 19w09a 1.14.4 19w34a 19w44a 1.15-pre1 1.15.2 20w12a 20w13b 20w15a 20w17a 20w19a 20w20b 20w21a 20w22a 1.16-pre3 1.16-pre5 1.16.2 1.16.3-rc1 1.16.3 1.16.4-pre2 20w46a 20w48a 20w51a 21w03a 1.16.5 21w05b 21w06a 21w07a 21w08b 21w11a 21w17a 21w20a 1.17-pre1 1.17-pre3 1.17-pre4 1.17-pre5 1.17-rc1 1.17-rc2 1.17 1.17.1-pre1 1.17.1-pre2 1.17.1-pre3 1.17.1-rc1 1.17.1-rc2 1.17.1 21w38a 21w39a 21w40a 21w41a 21w42a 21w43a 21w44a 1.18-pre1 1.18-pre7 1.18 1.18.1 22w03a 22w05a 22w06a 22w07a 1.18.2-rc1 1.18.2 22w12a 22w14a 22w17a 22w18a 1.19 1.19.1 1.19.2 22w42a 22w43a 1.19.3 1.19.4 1.20 1.20.1 1.20.2-pre2 1.20.4 23w51b 24w11a 1.20.6 24w19b 1.21 1.21.1 24w35a 1.21.3 1.21.4
Created Issue:
Creepers explode when provoked by Snow Golems
Put the summary of the bug you're having here
What I expected to happen was that the Creeper wouldn't react, since it should only be provoked by the player. This caused grieving in my creative world
Instead it should not explode at all in creative mode and only explode when provoked by the player in survival. Also, Snow Golems shouldn't attack when Iron Golems wouldn't attack in the same situation (this bug doesn't happen with an Iron Golem)The Creeper exploded when attacked by the Snow Golem
Steps to Reproduce:
1. In creative mode, create a 2x1 pen and make a Snow Golem in it
2. Spawn a creeper in it and watch the Golem attack the Creeper and the Creeper react!Environment
Windows 8.0
Put the summary of the bug you're having here
What I expected to happen was that the Creeper wouldn't react, since it should only be provoked by the player. This caused grieving in my creative world
Instead it should not explode at all in creative mode and only explode when provoked by the player in survival. Also, Snow Golems shouldn't attack when Iron Golems wouldn't attack in the same situation (this bug doesn't happen with an Iron Golem)The Creeper exploded when attacked by the Snow Golem
Steps to Reproduce:
1. In creative mode, create a 2x1 pen and make a Snow Golem in it
2. Spawn a creeper in it and watch the Golem attack the Creeper and the Creeper react!What I expected to happen was that the Creeper wouldn't react, since it should only be provoked by the player. This caused grieving in my creative world
Instead it should not explode at all in creative mode and only explode when provoked by the player in survival. Also, Snow Golems shouldn't attack when Iron Golems wouldn't attack in the same situation (this bug doesn't happen with an Iron Golem)The Creeper exploded when attacked by the Snow Golem
Steps to Reproduce:
1. In creative mode, create a 2x1 pen and make a Snow Golem in it
2. Spawn a creeper in it and watch the Golem attack the Creeper and the Creeper react!
Creepers explode when provoked by Snow GolemsSnow Golems attack in creative mode
What I expected to happen was that the Creeper wouldn't react, since it should only be provoked by the player. This caused grieving in my creative world
Instead it should not explode at all in creative mode and only explode when provoked by the player in survival. Also, Snow Golems shouldn't attack when Iron Golems wouldn't attack in the same situation (this bug doesn't happen with an Iron Golem)The Creeper exploded when attacked by the Snow Golem
Steps to Reproduce:
1. In creative mode, create a 2x1 pen and make a Snow Golem in it
2. Spawn acreeper in it and watch the Golem attack the Creeper and the Creeper react!What I expected to happen was that the Creeper wouldn't react, since it should only be provoked by the player. This caused grieving in my creative world
Instead it should not explode at all in creative mode except with flint and steel and only explode when provoked by the player in survival. Also, Snow Golems shouldn't attack when Iron Golems wouldn't attack in the same situation (i.e. not in creative mode) (this bug doesn't happen with an Iron Golem)The Creeper exploded when attacked by the Snow Golem
Steps to Reproduce:
1. In creative mode, create a 2x1 pen and make a Snow Golem in it
2. Spawn a Creeper in it and watch the Golem attack the Creeper and the Creeper react!
What I expected to happen was that the Creeper wouldn't react, since it should only be provoked by the player. This caused serious grieving in my creative world
Instead it should not explode at all in creative mode except with flint and steel and only explode when provoked by the player in survival. Also, Snow Golems shouldn't attack when Iron Golems wouldn't attack in the same situation (i.e. not in creative mode) (this bug doesn't happen with an Iron Golem)The Creeper exploded when attacked by the Snow Golem
Steps to Reproduce:
1. In creative mode, create a 2x1 pen and make a Snow Golem in it
2. Spawn a Creeper in it and watch the Golem attack the Creeper and the Creeper react!
Dupe of
MC-61844
relates to
What I expected to happen was that the Creeper wouldn't react, since it should only be provoked by the player. This caused serious grieving in my creative world
Instead it should not explode at all in creative mode except with flint and steel and only explode when provoked by the player in survival. Also, Snow Golems shouldn't attack when Iron Golems wouldn't attack in the same situation (i.e.not in creativemode) (this bug doesn't happen with an Iron Golem)The Creeper exploded when attacked by the Snow Golem
Steps to Reproduce:
1. In creative mode, create a 2x1 pen and make a Snow Golem in it
2. Spawn a Creeper in it and watch the Golem attack the Creeper and the Creeper react!What I expected to happen was that the Creeper wouldn't react, since it should only be provoked by the player. This caused serious grieving in my creative world
Instead it should not explode at all in creative mode except with flint and steel and only explode when provoked by the player in survival. Also, Snow Golems shouldn't attack when Iron Golems wouldn't attack in the same situation (i.e. man made) (this bug doesn't happen with an Iron Golem)The Creeper exploded when attacked by the Snow Golem
Steps to Reproduce:
1. In creative mode, create a 2x1 pen and make a Snow Golem in it
2. Spawn a Creeper in it and watch the Golem attack the Creeper and the Creeper react!
Snow Golems attackin creative modeSnow Golems attack creepers
What I expected to happen was that the
Creeper wouldn't react, since it should only be provoked by the player. This caused serious grieving in my creative world
Instead it should not explode at all in creative mode except with flint and steel and only explode when provoked by the player in survival. Also,SnowGolems shouldn't attack whenIronGolems wouldn't attack in the same situation (i.e. man made) (this bug doesn't happen with anIronGolem)The
Creeper exploded when attacked by theSnowGolemSteps to Reproduce:
1. In creative mode, create a 2x1 pen and make a Snow Golem in it
2. Spawn a Creeper in it and watch the Golem attack the Creeper and the Creeper react!What I expected to happen was that the creeper wouldn't react, since it should only be provoked by the player. This caused serious grieving in my creative world
Instead it should not explode at all in creative mode except with flint and steel and only explode when provoked by the player in survival. Also, snow golems shouldn't attack when iron golems wouldn't attack in the same situation (i.e. man made) (this bug doesn't happen with an iron golem)The creeper exploded when attacked by the snow golem.
How to reproduce
- In creative mode, create a 2 × 1 pen and make a snow golem in it
- Spawn a creeper in it and watch the golem attack the creeper and the creeper react
Windows 8.0
SnowGolems attack creepersSnow golems attack creepers
Can also confirm in 20w12a
Affects 20w12a
But Creepers also react when attacked by a Vindicator named "Johnny", and being shot by a Skeleton, so Creepers can be provoked not just by a survival player, but snow golems attacking them is still strange.
is duplicated by
relates to
What I expected to happen was that the creeper wouldn't react, since it should only be provoked by the player. This caused serious grieving in my creative world
Instead it should not explode at all in creative mode except with flint and steel and only explode when provoked by the player in survival. Also, snow golems shouldn't attack when iron golems wouldn't attack in the same situation (i.e. man made) (this bug doesn't happen with an iron golem)
The creeper exploded when attacked by the snow golem.How to reproduce
- In creative mode, create a 2 × 1 pen and make a snow golem in it
- Spawn a creeper in it and watch the golem attack the creeper and the creeper react
The Bug:
Snow golems can attack creepers.
Steps to Reproduce:
- Summon a snow golem and a creeper:
/summon minecraft:snow_golem ~ ~ ~ /summon minecraft:creeper ~ ~ ~
- →
Notice how snow golems can attack creepers.
The Bug:
Snow golems can attack creepers.
Steps to Reproduce:
- Summon a snow golem and a creeper:
/summon minecraft:snow_golem ~ ~ ~ /summon minecraft:creeper ~ ~ ~
- →
Notice how snow golems can attack creepers.
Can confirm in 1.17 and 1.17.1 Pre-release 1.
The Bug:
Snow golems can attack creepers.
Steps to Reproduce:
- Summon a snow golem and a creeper
:/summon minecraft:snow_golem ~ ~ ~ /summon minecraft:creeper ~ ~ ~
- →
Notice how snow golems can attack creepers.
The Bug:
Snow golems can attack creepers.
Steps to Reproduce:
- Summon a snow golem and a creeper.
/summon minecraft:snow_golem ~ ~ ~ /summon minecraft:creeper ~ ~ ~
- →
Notice how snow golems can attack creepers.
The Bug:
Snow golems can attack creepers.
Steps to Reproduce:
- Summon a snow golem and a creeper.
/summon minecraft:snow_golem ~ ~ ~ /summon minecraft:creeper ~ ~ ~
- →
Notice how snow golems can attack creepers.
Expected Behavior:
The expected behavior would be that snow golems cannot attack creepers.
The Bug:
Snow golems can attack creepers.
Steps to Reproduce:
- Summon a snow golem and a creeper.
/summon minecraft:snow_golem ~ ~ ~ /summon minecraft:creeper ~ ~ ~
- →
Notice how snow golems can attack creepers.
Expected Behavior:
The expected behavior would be that snow golems cannotattack creepers.The Bug:
Snow golems can attack creepers.
Steps to Reproduce:
- Summon a snow golem and a creeper.
/summon minecraft:snow_golem ~ ~ ~ /summon minecraft:creeper ~ ~ ~
- Observe the snow golem's behavior.
Observed Behavior:
Snow golems can attack creepers.
Expected Behavior:
Snow golems would not be able to attack creepers.
I think the creeper should dodge the snow golem's attacks.
The Bug:
Snow golems can attack creepers.
Steps to Reproduce:
- Summon a snow golem and a creeper.
/summon minecraft:snow_golem ~ ~ ~ /summon minecraft:creeper ~ ~ ~
Observe the snow golem's behavior.Observed Behavior:
Snow golems can attack creepers.
Expected Behavior:
Snow golems would not be able to attack creepers.
The Bug:
Snow golems can attack creepers.
Steps to Reproduce:
- Summon a snow golem and a creeper.
/summon minecraft:snow_golem ~ ~ ~ /summon minecraft:creeper ~ ~ ~
- Wait around ten seconds or so for the snow golem to notice the creeper.
- Take note as to whether or not snow golems can attack creepers.
Observed Behavior:
Snow golems can attack creepers.
Expected Behavior:
Snow golems would not be able to attack creepers.
Snow golems can attack creepers
The Bug:
Snow golems can attack creepers.
Steps to Reproduce:
- Summon a snow golem and a creeper.
/summon minecraft:snow_golem ~ ~ ~ /summon minecraft:creeper ~ ~ ~
- Wait around ten seconds or so for the snow golem to notice the creeper.
- Take note as to whether or not snow golems can attack creepers.
Observed Behavior:
Snow golems can attack creepers.
Expected Behavior:
Snow golems would not be able to attack creepers.
The Bug:
Snow golems can attack creepers.
Steps to Reproduce:
- Summon a snow golem and a creeper.
/summon minecraft:snow_golem ~ ~ ~ /summon minecraft:creeper ~ ~ ~
- Wait around ten seconds or so for the snow golem to notice the creeper.
- Take note as to whether or not snow golems can attack creepers.
Observed Behavior:
Snow golems can attack creepers.
Expected Behavior:
Snow golems would not be able to attack creepers.
The Bug:
Snow golems can attack creepers.
Steps to Reproduce:
- Summon a snow golem and a creeper.
/summon minecraft:snow_golem ~ ~ ~ /summon minecraft:creeper ~ ~ ~
- Wait around ten seconds or so for the snow golem to notice the creeper.
- Take note as to whether or not snow golems can attack creepers.
Observed Behavior:
Snow golems can attack creepers.
Expected Behavior:
Snow golems would not be able to attack creepers.
Code Analysis:
Tentative code analysis by [Mod] Avoma can be found below.
The following is based on a decompiled version of Minecraft 1.18.1 using MCP-Reborn.
net.minecraft.world.entity.animal.SnowGolem.javapublic class SnowGolem extends AbstractGolem implements Shearable, RangedAttackMob { ... public void performRangedAttack(LivingEntity $le, float $f) { Snowball snowball = new Snowball(this.level, this); double d0 = $le.getEyeY() - (double)1.1F; double d1 = $le.getX() - this.getX(); double d2 = d0 - snowball.getY(); double d3 = $le.getZ() - this.getZ(); double d4 = Math.sqrt(d1 * d1 + d3 * d3) * (double)0.2F; snowball.shoot(d1, d2 + d4, d3, 1.6F, 12.0F); this.playSound(SoundEvents.SNOW_GOLEM_SHOOT, 1.0F, 0.4F / (this.getRandom().nextFloat() * 0.4F + 0.8F)); this.level.addFreshEntity(snowball); } ...If we look at the above class, we can see that no checks are carried out to see what hostile entity snow golems should and should not be able to attack. Because of this, they can attack creepers, resulting in this issue occurring.
The Bug:
Snow golems can attack creepers.
Steps to Reproduce:
- Summon a snow golem and a creeper.
/summon minecraft:snow_golem ~ ~ ~ /summon minecraft:creeper ~ ~ ~
- Wait around ten seconds or so for the snow golem to notice the creeper.
- Take note as to whether or not snow golems can attack creepers.
Observed Behavior:
Snow golems can attack creepers.
Expected Behavior:
Snow golems would not be able to attack creepers.
Code Analysis:
Tentative code analysis by [Mod] Avoma can be found below.
The following is based on a decompiled version of Minecraft 1.18.1 using MCP-Reborn.
net.minecraft.world.entity.animal.SnowGolem.javapublic class SnowGolem extends AbstractGolem implements Shearable, RangedAttackMob { ... public void performRangedAttack(LivingEntity $le, float $f) { Snowball snowball = new Snowball(this.level, this); double d0 = $le.getEyeY() - (double)1.1F; double d1 = $le.getX() - this.getX(); double d2 = d0 - snowball.getY(); double d3 = $le.getZ() - this.getZ(); double d4 = Math.sqrt(d1 * d1 + d3 * d3) * (double)0.2F; snowball.shoot(d1, d2 + d4, d3, 1.6F, 12.0F); this.playSound(SoundEvents.SNOW_GOLEM_SHOOT, 1.0F, 0.4F / (this.getRandom().nextFloat() * 0.4F + 0.8F)); this.level.addFreshEntity(snowball); } ...If we look at the above class, we can see that no checks are carried out to see what hostile entity snow golems should and should not be able to attack. Because of this, they can perform ranged attacks on creepers, resulting in this issue occurring.
The Bug:
Snow golems can attack creepers.
Steps to Reproduce:
- Summon a snow golem and a creeper.
/summon minecraft:snow_golem ~ ~ ~ /summon minecraft:creeper ~ ~ ~
- Wait around ten seconds or so for the snow golem to notice the creeper.
- Take note as to whether or not snow golems can attack creepers.
Observed Behavior:
Snow golems can attack creepers.
Expected Behavior:
Snow golems would not be able to attack creepers.
Code Analysis:
Tentative code analysis by[Mod] Avoma can be found below.The following is based on a decompiled version of Minecraft 1.18.1 using MCP-Reborn.
net.minecraft.world.entity.animal.SnowGolem.javapublic class SnowGolem extends AbstractGolem implements Shearable, RangedAttackMob { ... public void performRangedAttack(LivingEntity $le, float $f) { Snowball snowball = new Snowball(this.level, this); double d0 = $le.getEyeY() - (double)1.1F; double d1 = $le.getX() - this.getX(); double d2 = d0 - snowball.getY(); double d3 = $le.getZ() - this.getZ(); double d4 = Math.sqrt(d1 * d1 + d3 * d3) * (double)0.2F; snowball.shoot(d1, d2 + d4, d3, 1.6F, 12.0F); this.playSound(SoundEvents.SNOW_GOLEM_SHOOT, 1.0F, 0.4F / (this.getRandom().nextFloat() * 0.4F + 0.8F)); this.level.addFreshEntity(snowball); } ...If we look at the above class, we can see that no checks are carried out to see what hostile entity snow golems should and should not be able to attack. Because of this, they can perform ranged attacks on creepers, resulting in this issue occurring.
The Bug:
Snow golems can attack creepers.
Steps to Reproduce:
- Summon a snow golem and a creeper.
/summon minecraft:snow_golem ~ ~ ~ /summon minecraft:creeper ~ ~ ~
- Wait around ten seconds or so for the snow golem to notice the creeper.
- Take note as to whether or not snow golems can attack creepers.
Observed Behavior:
Snow golems can attack creepers.
Expected Behavior:
Snow golems would not be able to attack creepers.
Code Analysis:
Code analysis by [Mod] Avoma can be found below.
The following is based on a decompiled version of Minecraft 1.18.1 using MCP-Reborn.
net.minecraft.world.entity.animal.SnowGolem.javapublic class SnowGolem extends AbstractGolem implements Shearable, RangedAttackMob { ... public void performRangedAttack(LivingEntity $le, float $f) { Snowball snowball = new Snowball(this.level, this); double d0 = $le.getEyeY() - (double)1.1F; double d1 = $le.getX() - this.getX(); double d2 = d0 - snowball.getY(); double d3 = $le.getZ() - this.getZ(); double d4 = Math.sqrt(d1 * d1 + d3 * d3) * (double)0.2F; snowball.shoot(d1, d2 + d4, d3, 1.6F, 12.0F); this.playSound(SoundEvents.SNOW_GOLEM_SHOOT, 1.0F, 0.4F / (this.getRandom().nextFloat() * 0.4F + 0.8F)); this.level.addFreshEntity(snowball); } ...If we look at the above class, we can see that no checks are carried out to see what hostile entity snow golems should and should not be able to attack. Because of this, they can perform ranged attacks on creepers, resulting in this issue occurring.
is duplicated by
The Bug:
Snow golems
canattack creepers.Steps to Reproduce:
- Summon a snow golem and a creeper.
/summon minecraft:snow_golem ~ ~ ~ /summon minecraft:creeper ~ ~ ~
- Wait around ten seconds or so for the snow golem to notice the creeper.
- Take note as to whether or not snow golems
canattack creepers.Observed Behavior:
Snow golems
canattack creepers.Expected Behavior:
Snow golems would not be able to attack creepers.
Code Analysis:
Code analysis by [Mod] Avoma can be found below.
The following is based on a decompiled version of Minecraft 1.18.1 using MCP-Reborn.
net.minecraft.world.entity.animal.SnowGolem.javapublic class SnowGolem extends AbstractGolem implements Shearable, RangedAttackMob { ... public void performRangedAttack(LivingEntity $le, float $f) { Snowball snowball = new Snowball(this.level, this); double d0 = $le.getEyeY() - (double)1.1F; double d1 = $le.getX() - this.getX(); double d2 = d0 - snowball.getY(); double d3 = $le.getZ() - this.getZ(); double d4 = Math.sqrt(d1 * d1 + d3 * d3) * (double)0.2F; snowball.shoot(d1, d2 + d4, d3, 1.6F, 12.0F); this.playSound(SoundEvents.SNOW_GOLEM_SHOOT, 1.0F, 0.4F / (this.getRandom().nextFloat() * 0.4F + 0.8F)); this.level.addFreshEntity(snowball); } ...If we look at the above class, we can see that no checks are carried out to see what hostile entity snow golems should and should not be able to attack. Because of this, they can perform ranged attacks on creepers, resulting in this issue occurring.
Snow golemscanattack creepers
The Bug:
Snow golems attack creepers.
Steps to Reproduce:
- Summon a snow golem and a creeper.
/summon minecraft:snow_golem ~ ~ ~/summon minecraft:creeper ~ ~ ~
- Wait around ten seconds or so for the snow golem to notice the creeper.
Take note as to whether or not snow golems attackcreepers.Observed Behavior:
Snow golems attack creepers.
Expected Behavior:
Snow golems would not be able to attack creepers.
Code Analysis:
Code analysis by [Mod] Avoma can be found below.
The following is based on a decompiled version of Minecraft 1.1
8.1using MCP-Reborn.net.minecraft.world.entity.animal.SnowGolem.javapublic class SnowGolem extends AbstractGolem implements Shearable, RangedAttackMob { ... public void performRangedAttack(LivingEntity $le, float $f) { Snowball snowball = new Snowball(this.level, this); double d0 = $le.getEyeY() - (double)1.1F; double d1 = $le.getX() - this.getX(); double d2 = d0 - snowball.getY(); double d3 = $le.getZ() - this.getZ(); double d4 = Math.sqrt(d1 * d1 + d3 * d3) * (double)0.2F; snowball.shoot(d1, d2 + d4, d3, 1.6F, 12.0F); this.playSound(SoundEvents.SNOW_GOLEM_SHOOT, 1.0F, 0.4F / (this.getRandom().nextFloat() * 0.4F + 0.8F)); this.level.addFreshEntity(snowball); } ...If we look at the above class, we can see that no
checks are carried out to see what hostile entity snow golems should and should not be able to attack. Because of this, they can perform ranged attacks on creepers,resulting in thisissueoccurring.The Bug:
Snow golems attack creepers.
Steps to Reproduce:
- Summon a snow golem and a creeper.
/summon minecraft:snow_golem ~ ~ ~
/summon minecraft:creeper ~ ~ ~
- Wait around ten seconds or so for the snow golem to notice the creeper.
- Take note as to whether or not snow golems attack creepers.
Observed Behavior:
Snow golems attack creepers.
Expected Behavior:
Snow golems would not be able to attack creepers.
Code Analysis:
Code analysis by [Mod] Avoma can be found below.
The following is based on a decompiled version of Minecraft 1.19.2 using MCP-Reborn.
net.minecraft.world.entity.animal.SnowGolem.javapublic class SnowGolem extends AbstractGolem implements Shearable, RangedAttackMob { ... protected void registerGoals() { ... this.targetSelector.addGoal(1, new NearestAttackableTargetGoal<>(this, Mob.class, 10, true, false, (livingEntity) -> { return livingEntity instanceof Enemy; })); } ...If we look at the above class, we can see that snow golems are designed to attack any living entity that is considered an enemy. A creeper is considered a monster and a monster is considered an enemy, therefore allowing snow golems to attack creepers. The game doesn't check if the said entity is a creeper before allowing a snow golem to attack it, therefore resulting in this problem occurring.
Fix:
Simply allowing snow golems to override the canAttackType() method located within the Mob.java class to make it so that they cannot attack creepers will resolve this problem. The following lines of code can be added somewhere within the SnowGolem.java class to fix this issue.
Fixed Code:public boolean canAttackType(EntityType<?> entityType) { return entityType != EntityType.CREEPER && super.canAttackType(entityType); }
The Bug:
Snow golems attack creepers.
Steps to Reproduce:
- Summon a snow golem and a creeper.
/summon minecraft:snow_golem ~ ~ ~
/summon minecraft:creeper ~ ~ ~
- Wait around ten seconds or so for the snow golem to notice the creeper.
- Take note as to whether or not snow golems attack creepers.
Observed Behavior:
Snow golems attack creepers.
Expected Behavior:
Snow golems would not be able to attack creepers.
Code Analysis:
Code analysis by [Mod] Avoma can be found below.
The following is based on a decompiled version of Minecraft 1.19.2 using MCP-Reborn.
net.minecraft.world.entity.animal.SnowGolem.javapublic class SnowGolem extends AbstractGolem implements Shearable, RangedAttackMob { ... protected void registerGoals() { ... this.targetSelector.addGoal(1, new NearestAttackableTargetGoal<>(this, Mob.class, 10, true, false, (livingEntity) -> { return livingEntity instanceof Enemy; })); } ...If we look at the above class, we can see that snow golems are designed to attack any living entity that is considered an enemy. A creeper is considered a monster and a monster is considered an enemy, therefore allowing snow golems to attack creepers. The game doesn't check if the said entity is a creeper before allowing a snow golem to attack it, therefore resulting in this problem occurring.
Fix:
Simply allowing snow golems to override the canAttackType() method located within the Mob.java class to make it so that they cannot attack creepers will resolve this problem. The following lines of code can be added somewhere within the SnowGolem.java class to fix this issue.
Fixed Code:public boolean canAttackType(EntityType<?> entityType) { return entityType != EntityType.CREEPER && super.canAttackType(entityType); }The Bug:
Snow golems attack creepers.
Steps to Reproduce:
- Summon a snow golem and a creeper.
/summon minecraft:snow_golem ~-3 ~ ~/summon minecraft:creeper ~3 ~ ~- Wait around ten seconds or so for the snow golem to notice the creeper.
- Take note as to whether or not snow golems attack creepers.
Observed Behavior:
Snow golems attack creepers.
Expected Behavior:
Snow golems would not be able to attack creepers.
Code Analysis:
Code analysis by [Mod] Avoma can be found below.
The following is based on a decompiled version of Minecraft 1.19.2 using MCP-Reborn.
net.minecraft.world.entity.animal.SnowGolem.javapublic class SnowGolem extends AbstractGolem implements Shearable, RangedAttackMob { ... protected void registerGoals() { ... this.targetSelector.addGoal(1, new NearestAttackableTargetGoal<>(this, Mob.class, 10, true, false, (livingEntity) -> { return livingEntity instanceof Enemy; })); } ...If we look at the above class, we can see that snow golems are designed to attack any living entity that is considered an enemy. A creeper is considered a monster and a monster is considered an enemy, therefore allowing snow golems to attack creepers. The game doesn't check if the said entity is a creeper before allowing a snow golem to attack it, therefore resulting in this problem occurring.
Fix:
Simply allowing snow golems to override the canAttackType() method located within the Mob.java class to make it so that they cannot attack creepers will resolve this problem. The following lines of code can be added somewhere within the SnowGolem.java class to fix this issue.
Fixed Code:public boolean canAttackType(EntityType<?> entityType) { return entityType != EntityType.CREEPER && super.canAttackType(entityType); }
The Bug:
Snow golems attack creepers.
Steps to Reproduce:
- Summon a snow golem and a creeper by using the commands provided below.
/summon minecraft:snow_golem ~-3 ~ ~/summon minecraft:creeper ~3 ~ ~- Wait around ten seconds or so for the snow golem to notice the creeper.
- Take note as to whether or not snow golems attack creepers.
Observed Behavior:
Snow golems attack creepers.
Expected Behavior:
Snow golems would not be able to attack creepers.
Code Analysis:
Code analysis by [Mod] Avoma can be found below.
The following is based on a decompiled version of Minecraft 1.19.2 using MCP-Reborn.
net.minecraft.world.entity.animal.SnowGolem.javapublic class SnowGolem extends AbstractGolem implements Shearable, RangedAttackMob { ... protected void registerGoals() { ... this.targetSelector.addGoal(1, new NearestAttackableTargetGoal<>(this, Mob.class, 10, true, false, (livingEntity) -> { return livingEntity instanceof Enemy; })); } ...If we look at the above class, we can see that snow golems are designed to attack any living entity that is considered an enemy. A creeper is considered a monster and a monster is considered an enemy, therefore allowing snow golems to attack creepers. The game doesn't check if the said entity is a creeper before allowing a snow golem to attack it, therefore resulting in this problem occurring.
Fix:
Simply allowing snow golems to override the canAttackType() method located within the Mob.java class to make it so that they cannot attack creepers will resolve this problem. The following lines of code can be added somewhere within the SnowGolem.java class to fix this issue.
Fixed Code:public boolean canAttackType(EntityType<?> entityType) { return entityType != EntityType.CREEPER && super.canAttackType(entityType); }
is duplicated by
In 1.20.2 Pre-Release 2
Duplicate of MC-73964
Relates to MC-73964
Thank you for your report!
We're tracking this issue in MC-73964, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Duplicate of MC-73964.





Iron Golems do actually attack Creepers occasionally, but I agree that Snow Golems shouldn't attack Creepers since they can't kill/damage them anyway.
I think it's fine that Snow Golems attack Creepers in general, but in creative mode...
Regression of (and relates to)
MC-61844Lucas, that talks only about iron golems.
@Sonic: Well then only relates to.
15w43a
Still in 1.9.1-pre3
Still in 16w21a
Renamed to the real issue.
Still in 1.11.2 - Snow golems will attack creepers, and in return, creepers will target the snow golems.
I think the real issue is actually the inconsistency between snow golems and iron golems. Iron golems won't attack creepers, whereas snow golems will. It used to be that creepers attack golems, which is what
MC-61844was about. Now the creeper sits there peacefully until the snow golem provokes it.I am unsure as to how this inconsistency would best be fixed. Preventing snow golems attacking creepers could break some creeper-based tree farms (but who still uses them?), but making iron golems attack creepers would just reverse the fix to
MC-61844.Its in 1.13 and in 18w30b.
Still in 1.14.4 and 19w34a
This sounds invalid, and more like a feature request.
Still in 19w44a
Still in 1.15 prerelease 1
Can confirm for 20w11a. Iron golems ignore creepers while snow golems attack them.
In 20w12a
Still in 20w12a
Still in 20w13b
Still in 20w15a
Creepers can get provoked by not just the player, but also vindicators named "Johnny", and skeletons who shoot them, so creepers attack the snow golem because they just got attacked, but snow golems attacking them at all is still an issue though.
Still in 20w17a
This bug can cause creepers to explodes without having a player near them which is very annoying if you have snow golems outside.
Affects 20w18a
Affects 20w19a
Affects 20w20b
In 1.16 Pre 3
Confirmed in 1.16-pre5.
Affects 20w27a
Confirmed in 1.16.2
It even happens even if the Snow Golem is inside a walled area, and then the creeper will blow a hole in the wall, adding more problems.
AttackablePage The vindicator named "Johnny" is really strong killing the creeper fast enough the creeper can't explode him
Affects 20w48a
Can confirm in 20w51a.
Can confirm in 21w03a.
WitherSlayer5000 this is not a forum. Please don't post off-topic comments.
ok [Mod] violine1101
WitherSlayer5000, please stop with the comments. This is not a discussion forum. Consider this an official warning.
oh... ok. I am really sorry. Now i think i know where my comments went...
ok i will stop.
Can confirm in 21w05b.
Can confirm in 21w06a.
Can confirm in 21w07a. Video attached.
Can confirm in 1.16.5 and 21w08b.
Can confirm in 21w11a.
Can confirm in 21w17a.
Can confirm in 21w20a. Relates to
MC-74908Can confirm in 1.17 Pre-release 1.
Hi, can someone please transfer the reporter from me, as I'm no longer interested in this issue and I get emails from it despite not watching it.
Can confirm in 1.17 Pre-release 2.
Can confirm in 1.17 Pre-release 3.
Also in Bedrock Edition
I would keep this bug.
Iron golems won't care creepers.
Can confirm in 1.17.1 Release Candidate 1.
[Mod] ampolive, this ticket already had 1.17.1 Release Candidate 1 marked as affected.
Sorry. Can confirm in 1.17.1 Release Candidate 2.
Can confirm in 21w39a.
The title should be changed to "Creepers explode after being hit by snow golems".
Totally agree, that's the real problem, in fact I think that was the reason they made iron golems not attack creepers. Basically creepers aren't supposed to explode unless near the player. If another entity aggros them by hitting them, they can head towards them to retaliate, but if they explode without the player being nearby, that goes against the "if anything bad happens, it's the players fault" philosophy that Mojang is following.
Affects 22w14a.
My preferred approach would be to allow creepers to attack other mobs (and these mobs to attack them), but give them an alternate attack when targeting another mob. Obviously that opens up lots of possibilities; the simplest example I can think of would be if the creeper flashed orange instead of white, and the resulting explosion did light damage to entities and set them alight while leaving blocks unharmed. It's a feature request, but it's also similar in scope to the AI updates other old mobs (namely zombies and skeletons) have received over the years.
Following on from my code analysis, I've double-checked my proposed fix and I can confidently confirm that it's fully functioning and works as expected, so I've attached a screenshot to this report that shows the method that needs to be added somewhere within the SnowGolem.java class to fix this issue. I feel this information may be quite insightful hence my reasoning for providing it.
MC-73964 - Fixed Code.png
In 1.20
In 23w31a
In 1.20.2 Pre-Release 2
Can confirm in 1.20.5 RC2.
Can confirm in 1.20.5.
In 24w34a
In 24w35a