Updated:
Piglin: entity ID and summon command
The entity ID for Piglin is minecraft:piglin. Use it with /summon and in selectors such as @e[type=…]. It was added in Java 1.16.
Basic data
| Name | Piglin |
|---|---|
| ID (Java Edition) | minecraft:piglin |
| Type | Hostile mob |
| Java versions | Java 1.16 and later |
| Bedrock 26.52 | Same ID works (tested on a server) |
| Size | 0.6 wide × 1.95 tall (blocks) |
| Spawn egg | Piglin Spawn Egg |
Commands you can copy
Java Edition
Summon at your position
/summon minecraft:piglin ~ ~ ~Summon with no AI
/summon minecraft:piglin ~ ~ ~ {NoAI:1b}Remove all of them
/kill @e[type=minecraft:piglin]Remove only within 10 blocks
/kill @e[type=minecraft:piglin,distance=..10]Test whether one exists
/execute if entity @e[type=minecraft:piglin]Teleport the nearest one to you
/tp @e[type=minecraft:piglin,sort=nearest,limit=1] @sGive the spawn egg
/give @p minecraft:piglin_spawn_egg 1Bedrock Edition
Summon at your position
/summon piglinRemove all of them
/kill @e[type=piglin]Remove only within 10 blocks
/kill @e[type=piglin,r=10]Version notes
It was added in Java 1.16. Older versions report that the ID is unknown.
In selectors, Java Edition uses type=minecraft:ID and Bedrock uses type=ID. Add ! as in type=!minecraft:ID to match everything else.
Questions
What is the ID for Piglin?
It is minecraft:piglin. In commands you can also write piglin without minecraft:.
Why does Piglin disappear right after summoning?
On Peaceful difficulty, hostile mobs are removed at once. Raise the difficulty, for example with /difficulty easy.
How far does /kill reach?
@e[type=minecraft:piglin] matches every one in loaded chunks. To limit it to nearby ones, add distance=..10 (r=10 on Bedrock).