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?

  • Not a direct answer to your question - but instead of taming the wolf in the shop, you could summon a separate tamed wolf and give it to the player. That would likely be the easier option. – Ben Nov 20 '15 at 5:01
  • That'd be fine, but then how do I make the summoned wolf be tamed and owned by the player? I'm trying to give them a wolf that will teleport to them and which they can make sit or stand. – IceMetalPunk Nov 20 '15 at 5:48
  • 1
    I think your best bet is to summon a wild wolf and give the player some bones – ModDL Nov 20 '15 at 6:29
  • 1
    This is not possible AFAIK. – SirBenet Nov 20 '15 at 17:16
  • 1
    This is not possible. – deprilula28 Nov 28 '15 at 23:08

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:

/summon Wolf ~ ~1 ~ {Owner:Notch}

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.)

  • As I mentioned in the original question, I have no way of knowing the player who will have this dog. It's a map I'd like to release to the public. That's why it can't be hardcoded. – IceMetalPunk Jan 19 '16 at 21:21

Summon a willed wolf with a command block then have the same circuit that activated the first command block to activate another command block which will give the player some bones.

Sorry for not getting the exact answer you wanted, but this will still work because this way you don't need to know the players name and they still get their pet wolf.


command block one          command block two
/summon wolf ~ ~1 ~         /give @p bone 15

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.