Recently I have been working on a mini-game that gives a few players custom spawn eggs. I want the mob to simply have a name and be on a team. I'm attempting to use this command:

/give @p[x=-102,y=48,z=81,distance=..1] shulker_spawn_egg{Team:PurpleTeam,CustomName:"\"Purple Turret\""}

It does give the player a spawn egg, but the resulting shulker spawn does not have a team or a name. Any ideas why this isn't working?

  • You need to put it into a tag that tells it that those aren't properties of the egg, but of the mob. Look up "chunk format" in the Minecraft wiki and then expand one of the things that contain items. Apr 12 '18 at 6:03
  • Could you add your solution as an answer please? So this question doesn't remain unanswered. :)
    – dly
    Apr 12 '18 at 8:05

I figured it out, I was trying to use {Tag:{ with no specifications. Using EntityTag was the needed change. This is the working command:

/give @p minecraft:shulker_spawn_egg{EntityTag:{CustomName:"\"Purple Turret\"",Team:PurpleTeam}} 

From here it's possible to add subsection for the shulkers color, open height, etc... Thanks for the help!

  • EntityTag doesn't work for me in prerelease 2. I'm trying to create a NoAI spawn egg Jun 17 '18 at 20:31

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.