Piglin icon

Piglin Summon Command Generator

  • Category: passive
  • Baby variant: yes
  • Entity id: minecraft:piglin

Piglins are the gatekeepers of the Nether's bastion remnants, and a command-summoned one behaves exactly like a natural spawn: it checks whether you wear at least one piece of golden armor, it admires gold ingots, and it barters through the standard loot table. That makes the piglin one of the few hostile mobs you can turn into a functioning NPC with a single /summon command and no datapack.

The catch is zombification. Drop a piglin anywhere outside the Nether and it starts shaking, converting into a zombified piglin after roughly fifteen seconds. Map-makers building Overworld hub areas need the IsImmuneToZombification tag on every decorative or shopkeeper piglin, or the whole scene degrades the moment a player loads the chunk.

This generator assembles the full command for you: pick a golden sword or crossbow for the mainhand, layer on golden armor pieces so the mob reads as a bastion guard, set a visible custom name, and tune health for arena roles. The presets below cover the common builds, from a bartering post attendant to a glowing baby piglin that steals the show.

Example commands

Bastion gatekeeper

/summon minecraft:piglin ~ ~ ~ {equipment:{feet:{id:"minecraft:golden_boots",count:1},head:{id:"minecraft:golden_helmet",count:1},mainhand:{id:"minecraft:golden_sword",count:1,components:{"minecraft:enchantments":{"minecraft:fire_aspect":2}}}},PersistenceRequired:1b,CustomName:"Bastion Gatekeeper",CustomNameVisible:1b,Health:40f,attributes:[{id:"minecraft:max_health",base:40}]}

Combines a floating nameplate, boosted health, golden armor, and an enchanted sword — a checkpoint guard that punishes players who skip the gold-armor dress code.

Crossbow rampart sniper

/summon minecraft:piglin ~ ~ ~ {equipment:{mainhand:{id:"minecraft:crossbow",count:1}},PersistenceRequired:1b}

Roughly half of natural piglins carry crossbows instead of swords; hand one a crossbow explicitly to guarantee ranged pressure on a bastion wall.

Glowing baby pickpocket

/summon minecraft:piglin ~ ~ ~ {IsBaby:1b,Glowing:1b,CustomName:"Snout",CustomNameVisible:1b}

Baby piglins never barter — they grab a thrown gold ingot and sprint off with it, which makes a glowing named one a fun chase objective.

Silent shop attendant

/summon minecraft:piglin ~ ~ ~ {Silent:1b,PersistenceRequired:1b,CustomName:"Gold Trader",CustomNameVisible:1b}

Muting the snorts keeps a bartering-post piglin from drowning out ambient sound; players can still toss it ingots for loot-table returns.

The same build across versions

Rows appear only where the output actually changes -- copy the one that matches your world.

Java 1.16

/summon minecraft:piglin ~ ~ ~ {ArmorItems:[{id:"minecraft:golden_boots",Count:1b},{},{},{id:"minecraft:golden_helmet",Count:1b}],HandItems:[{id:"minecraft:golden_sword",Count:1b,tag:{Enchantments:[{id:"minecraft:fire_aspect",lvl:2s}]}},{}],PersistenceRequired:1b,CustomName:'{"text":"Bastion Gatekeeper"}',CustomNameVisible:1b,Health:40f,Attributes:[{Name:"generic.max_health",Base:40}]}

Java 1.21.4

/summon minecraft:piglin ~ ~ ~ {ArmorItems:[{id:"minecraft:golden_boots",count:1},{},{},{id:"minecraft:golden_helmet",count:1}],HandItems:[{id:"minecraft:golden_sword",count:1,components:{"minecraft:enchantments":{levels:{"minecraft:fire_aspect":2},show_in_tooltip:true}}},{}],PersistenceRequired:1b,CustomName:'{"text":"Bastion Gatekeeper"}',CustomNameVisible:1b,Health:40f,attributes:[{id:"minecraft:max_health",base:40}]}

Java 26.2

/summon minecraft:piglin ~ ~ ~ {equipment:{feet:{id:"minecraft:golden_boots",count:1},head:{id:"minecraft:golden_helmet",count:1},mainhand:{id:"minecraft:golden_sword",count:1,components:{"minecraft:enchantments":{"minecraft:fire_aspect":2}}}},PersistenceRequired:1b,CustomName:"Bastion Gatekeeper",CustomNameVisible:1b,Health:40f,attributes:[{id:"minecraft:max_health",base:40}]}

Bedrock 26.x

/summon minecraft:piglin "Bastion Gatekeeper" ~ ~ ~
  • Bedrock /summon does not accept Java entity NBT; omitted armor equipment, hand equipment, Health/Attributes, traits (persistent, custom_name_visible).

Worth knowing

  • Outside the Nether, a piglin shakes and converts into a zombified piglin after about 15 seconds; add IsImmuneToZombification:1b to the summon NBT to keep Overworld piglins stable.
  • Adult piglins stay neutral toward players wearing at least one piece of golden armor, but opening chests, breaking gold blocks, or attacking any piglin nearby still turns them hostile.
  • Tossing or using a gold ingot on an adult piglin triggers bartering: it examines the ingot for a few seconds, then throws back an item rolled from the bartering loot table.
  • Piglins retreat from soul fire, soul torches, soul lanterns, and soul campfires, and they also flee from zombified piglins — useful for herding them around a build.
  • Groups of adult piglins periodically hunt hoglins, and baby piglins sometimes hop on baby hoglins to ride them during play.

FAQ

Why does my summoned piglin turn into a zombified piglin?

Piglins only tolerate Nether dimensions; in the Overworld or End they convert after roughly 15 seconds. Set IsImmuneToZombification:1b in the summon data to cancel the conversion permanently.

Will a command-summoned piglin still barter with gold ingots?

Yes. As long as the mob is an adult and NoAI is off, throwing it a gold ingot starts the normal admiring animation and it returns an item from the standard bartering loot table.

Does gold armor stop piglins from attacking?

One piece of golden armor in any slot keeps regular piglins passive. They still anger if you open a chest, mine a gold-related block, or hurt one of them within their line of sight.