In a map I'm making, I have a shop where players can buy rewards for collecting points (things like upgraded stats, items, etc.). One thing I'd like to have is a pet shop, where the player can buy a dog, cat, horse, or skeleton horse. When they buy one, it should become tamed by the player who bought it. There's a data tag on these mobs called OwnerUUID, which must be set to the owner's UUID to make this work…so how can I set it to a player's UUID when anyone could be playing the map, and any player could buy an animal? In other words, how do I calculate the player's UUID and set a data tag to it if their username/account is unknown? If there's no way to do this, how can I make an animal tamed another way with command blocks?
Minecraft – How to make a wolf tamed by an arbitrary player using command blocks
minecraft-commandsminecraft-java-edition
Related Topic
- Minecraft – How to determine the light level of a block with commands
- Minecraft – Stop Wolves From Becoming Angry Through Walls
- Minecraft – How to make a short timer using only command blocks
- Minecraft – How to make players share damage using command blocks
- Minecraft – How to make this contraption multiplayer
- Minecraft – How to detect for player with custom head
- Minecraft – How to make a secret room using command blocks
- Minecraft – the correct way of using /data merge on entity tags such as Passengers and Tags and Team
Best Answer
I don't know why so many players say this isn't possible. In fact, it is simple!
Just enter this command into a command block:
Of course, the name
Notch
could be replaced with the player's name that you wanted to have it tamed to.@p
does not work! (The command will generate a tamed wolf one block above the command block, tamed to the person of your liking.)