/summon con NBT: equipaggiamento, attributi e i tag per gestire i mob
Evocare un mob richiede una sola parola. Far sì che mantenga l'equipaggiamento, non despawni, non bruci e non si allontani richiede sei tag specifici. Ecco cosa fa ciascuno.
/summon zombie works. A zombie that keeps its armour, stands still, survives daylight and never despawns needs six more tags, and they are not discoverable from the command help.
I sei più importanti
/summon zombie ~ ~ ~ {PersistenceRequired:1b,NoAI:1b,Silent:1b,Invulnerable:1b,
CustomName:'"Guard"',CustomNameVisible:1b}
| Tag | Effetto |
|---|---|
PersistenceRequired:1b | Non despawna mai. Il più importante in assoluto per la creazione di mappe |
NoAI:1b | Congelato — niente movimento, niente attacchi, nessuna gravità |
NoGravity:1b | Fluttua, ma mantiene la sua IA |
Silent:1b | Nessun suono del mob |
Invulnerable:1b | Immune a tutto tranne /kill and the void |
Glowing:1b | Sagoma attraverso i muri |
PersistenceRequired and naming are related but not the same: a name tag also prevents despawn, but CustomName set via NBT non a meno che non aggiungi PersistenceRequired. That trips up nearly everyone building a shop NPC.
Equipaggiamento che non viene rilasciato
{HandItems:[{id:"minecraft:diamond_sword",count:1},{}],
ArmorItems:[{},{},{},{id:"minecraft:diamond_helmet",count:1}],
HandDropChances:[0f,0f],ArmorDropChances:[0f,0f,0f,0f]}
Due cose da notare. ArmorItems is ordered feet, legs, chest, head — dal basso verso l'alto, il contrario di come si elenca solitamente l'armatura. E il vuoto {} entries are required placeholders; you cannot skip slots.
Le probabilità di rilascio sono valori float da 0f to 1f. Anything above 1f guarantees the drop e mantiene intatti incantesimi e integrità dell'oggetto.
Attributi
{attributes:[{id:"minecraft:max_health",base:40},
{id:"minecraft:movement_speed",base:0.35}]}
Impostare max_health does non cura il mob al nuovo massimo — si genererà con il suo vecchio valore di salute e sembrerà danneggiato. Aggiungi Health:40f alongside it.
ID comuni: max_health, movement_speed, attack_damage, armor, knockback_resistance, follow_range, scale.
I passeggeri si impilano verso il basso
{Passengers:[{id:"minecraft:skeleton",Passengers:[{id:"minecraft:chicken"}]}]}
L'entità più esterna è quella in fondo. L'annidamento Passengers inside Passengers builds the tower upward. Each rider needs its own full NBT if you want it configured.
Bedrock è diversa
Bedrock non ha argomenti NBT su /summon. The syntax is /summon <entity> <pos> <yRot> <xRot> <spawnEvent> <name>, and behaviour is set through spawn events rather than tags. A Java NBT blob pasted into Bedrock will not run.
Scegli un mob e attiva questi tag visivamente — con l'ordine degli slot dell'armatura gestito per te — nel Generatore /summon.