0

I'm trying to put a specific spawn egg in a chest using blockdata for a project I'm doing. I'm trying to put a blaze spawn egg with enchants, and a custom name. I know the data value for a blaze is 61, however when I put this command in and press the button the chest has a white spawn egg that spawns nothing. Anyone know how to fix this?

Here's my command:

/blockdata ~ ~1 ~ {Items:[{id:spawn_egg,Count:1,Damage:61}]}

Also, can anyone figure out how to add a custom name and enchant? Thanks!

1

As of 1.9, spawn eggs use the EntityTag compound to specify the entity's name ID, rather than the Damage value of the item.

All tags for items that are not the root id, Damage, Count, and Slot must be placed within a single tag compound.

The following provides a blaze spawn egg enchanted with Sharpness 3, and with a custom display name.

/blockdata ~ ~1 ~ {Items:[{id:"minecraft:spawn_egg",Count:1,tag:{EntityTag:{id:"Blaze"},ench:[{id:16s,lvl:3s}],display:{Name:"Custom Name"}}}]}

You can find all item NBT data here.

2
  • Thanks! It Worked! By the way, do you know how to name the item as well? I need a named item for it to work in my project Im doing. Thanks. – Cobalt772 Feb 19 '17 at 22:24
  • @Cobalt772 Sure, added to the command. – Skylinerw Feb 19 '17 at 22:29
-1

Thanks! It Worked! By the way, do you know how to name the item, and specify which slot that item will be in as well? I need a named item for it to work in my project Im doing. Thanks!

0

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.