When you create an iron golem manually (4 iron blocks with a pumpkin on top), it automatically labels you as its creator, and will not attack when you hit it. However, using the /summon iron_golem command does no such thing. Is there something I'm missing?


Let's look at the Minecraft Wiki, specifically, the Iron Golem's Data Values: Minecraft Wiki Data Values These are the NBT tags being held by the Iron Golem. It looks like the Iron Golem has its own tag that shows whether it was created by a player.

When creating an Iron Golem manually, this tag is set to 1 (true). But the /summon command does no such thing by default.

But there is a way! Although /summon does not set NBT tags by default, you can tell it to by specifying the tags after the summon position.

Try this command:

/summon minecraft:iron_golem ~ ~ ~ {PlayerCreated:1b}

This command summons an Iron Golem with the PlayerCreated tag set to 1b.

Learn more about these concepts on the Minecraft Wiki:

  • Excellent! This is exactly what I was looking for! I was not sure what the argument was, and I was unable to find official documentation for Minecraft commands. Very helpful, thank you. – 12 rhombi in grid w no corners Jul 25 '20 at 17:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.