Make mob spawn tamed

Started by JamesThatsSo on

Topic category: Help with MCreator software

Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make mob spawn tamed

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

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
That sounds awesome! Okay,…
Mon, 10/07/2019 - 21:04

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!

Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
As i know there is no way to…
Fri, 09/04/2020 - 10:30

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.

Joined Apr 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This didnt work, is the…
Wed, 10/28/2020 - 04:40

This didnt work, is the command outdated?

Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Update to 2020.5 and you'll…
Wed, 10/28/2020 - 06:07

Update to 2020.5 and you'll be able to do it:

I suggest doing is an entity…
Wed, 10/28/2020 - 11:45

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.

Joined Dec 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
DEFEATO I FREAKING THANK YOU…
Sun, 12/06/2020 - 16:47

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