mojira.dev
MC-95782

Iron golems attack hostile mobs within close proximity that are on the same team as them

The Bug:

Iron golems attack hostile mobs within close proximity that are on the same team as them.

By default, iron golems are designed to attack hostile mobs such as zombies, blazes, and skeletons, but when both the iron golem and the hostile mob are on the same team, the iron golem will only attack the given entity if they are incredibly close to them. If the given entity is distant, the iron golem will ignore and not try to attack them.

Steps to Reproduce:

  1. Create a team by using the command provided below.

    /team add MC-95782
  2. Summon an iron golem that's on the team you just created by using the command provided below.

    /summon minecraft:iron_golem ~ ~ ~ {Team:"MC-95782"}
  3. Now summon a hostile entity, for example, a blaze that's on the same team as the iron golem by using the command provided below.

    /summon minecraft:blaze ~ ~ ~ {Team:"MC-95782"}
  4. Observe the behavior of the iron golem closely.

  5. Take note as to whether or not iron golems attack hostile mobs within close proximity that are on the same team as them.

Observed Behavior:

Iron golems attack hostile mobs within close proximity that are on the same team as them.

Expected Behavior:

Iron golems would not attack hostile mobs that are on the same team as them under any circumstances.

Linked issues

Attachments

Comments 22

Dlawso the Really Lucky Rabbit

Dupe of MC-88001

i noticed it too

 

while hostile mobs do not attack their teammates, Golems do,

 

Zombies do not attack Villagers on the same team either, but iron golems do, Well kinda

 

Summoning an iron golem before summoning a mob causes him to be slightly friendly to the mob...until he realizes and goes nuts on them, then proceeds to spaz out after,

 

im assuming all of this is a bug..if zombies dont attack villagers, golems shouldnt murder normal mobs either

Can confirm for Minecraft 1.14. This bug report was marked as a Duplicate, yet the post linked does not appear to be the same bug. Iron Golems can still kill a hostile mob on the same team, but only IF that hostile mob is RIDING the Iron Golem.

If you summon /summon iron_golem ~ ~ ~ {Team:"Test"} and also ~/summon silverfish ~ ~ ~ {Team:"Test"} as the same Team, for this example we'll be using the team Test. Make sure to create the team ahead of time: /team add Test~ and run /team modify Test friendlyFire false

You'll see those two mobs ignore each other.

Now run: ~/summon iron_golem ~ ~ ~ {Team:"Test",Passengers:[{id:"minecraft:silverfish",Team:"Test"}]}~

You'll quickly see the Iron Golem kill the Silverfish

Reopened, and can confirm.

Confirmed for 1.14.2.

12 more comments

Can confirm in 1.17.

confirmed in 21w43a

Can confirm in 1.18.2 and 22w15a.

Can confirm in 1.19.

can confirm in 1.20.4

user-c4d60

Avoma

(Unassigned)

Confirmed

Gameplay

Low

Mob behaviour

iron_golem

Minecraft 16w02a, Minecraft 1.13, Minecraft 1.14, Minecraft 1.14.2, 1.15 Pre-release 1, ..., 1.21.2 Pre-Release 3, 1.21.3, 1.21.4, 25w08a, 1.21.5

Retrieved