Minecraft – Giving players custom spawn eggs in 1.13

minecraft-commandsminecraft-java-edition

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?

Best Answer

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!

Related Topic