I'm trying to write a command that looks for a named mob, but I'm having a little trouble. Ideally I'd like it to be named "Boat (5)" (no quotes), but I haven't been able to get that working. What I've found so far is:
/tp @e[type=Chicken,name=Boat_5] ~0 ~-1000 ~0
will work, but if I use any spaces or brackets in the name (i.e. (), <>, {}, [] ), the command fails to recognize the name. The space I can live without, an underscore is fine enough, but I was really hoping there was a work-around so I could use brackets. I've tried putting the name in quotes:
/tp @e[type=Chicken,name="Boat_(5)"] ~0 ~-1000 ~0
But that didn't seem to work either. Any suggestions?
I'm trying to write a command that looks for a named mob, but I'm having a little trouble. Ideally I'd like it to be named "Boat (5)" (no quotes), but I haven't been able to get that working. What I've found so far is:
/tp @e[type=Chicken,name=Boat_5] ~0 ~-1000 ~0
will work, but if I use any spaces or brackets in the name (i.e. (), <>, {}, [] ), the command fails to recognize the name. The space I can live without, an underscore is fine enough, but I was really hoping there was a work-around so I could use brackets. I've tried putting the name in quotes:
/tp @e[type=Chicken,name="Boat_(5)"] ~0 ~-1000 ~0
But that didn't seem to work either. Any suggestions?
Due to the current limitations of player selectors, you'll need to use /scoreboard to assign a score based on NBT data:
/tp @e[type=Chicken,name=Boat_5] ~0 ~-1000 ~0
will work, but if I use any spaces or brackets in the name (i.e. (), <>, {}, [] ), the command fails to recognize the name. The space I can live without, an underscore is fine enough, but I was really hoping there was a work-around so I could use brackets. I've tried putting the name in quotes:
/tp @e[type=Chicken,name="Boat_(5)"] ~0 ~-1000 ~0
But that didn't seem to work either. Any suggestions?
Due to the current limitations of player selectors, you'll need to use /scoreboard to assign a score based on NBT data:
And then target them based on that score:
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/