Topic category: Help with MCreator software
Hi, I'm working on a pet based mod, it has an item that spawns a pet when the user right clicks with it.
This is the only way to get the pets, so I'd like the pet to be tamed as soon as it's spawned, as well as being a baby.
The way I attempted this was making the item run a /summon command at the current location, to spawn the mob with a very negative age and the "Owner" set to be the name of the player who used the item (Using the Entity Name option in the procedure). This, however, spawns a mob that is a baby and tamed but the owner not being the player.
Here's the odd part, if I make the same procedure spit out text instead of a command, I can type that exact text into the chat and it'll produce a mob actually tamed to me. From what I can tell, commands ran through the console handle setting the owner tag entirely differently than doing it in the chat?
I'm not exactly attached to the idea of doing it this way, I just can't seem to figure out a way to make it spawn with both these tags. Can anyone either tell me what I'm doing wrong or recommend an alternative way to accomplish this? If there's any way to get the current entity(player)'s UUID, I believe that would fix it.
Thank you
That sounds awesome! Okay, so when you are on that page of your mob where you set actions such as open doors and etc, find that box in the upper left and set the AIBase as a wolf. Of course you'll need a bone for your mob to be tamed. But as the warning next to it says, it'll change some aspects. Other than that, the model and texture will stay the same. Hope this helps!
As i know there is no way to gat the uuid, but i'm am working on a mod has a feature like that, and i figured it out the next:
I place an execute command procedure block with the following textfield inside it:
replace "player" with "get display name of event/target entity" in "summon minecraft:wolf ~ ~ ~ {Owner:player}".
If you don't switch your display name it will be your playername and this way the replace procedure will change the player to your playername and the summoned entity will belongs to you.
This didnt work, is the command outdated?
Update to 2020.5 and you'll be able to do it:
Oops...
I suggest doing is an entity of type check before calling tame on block marked with NULL.
Or things might crash when there is no entity in the range.
DEFEATO I FREAKING THANK YOU FOR THIS ANSWER, JEEZ IVE NEEDED SOMETHING LIKE THIS FOR THE PAST 9 FREAKING MONTHS BUT IT NEVER SHOWED UP AND MY QUESTIONS WERE NEVER ANSWER