Making a animal that is automatically tamed by the person that spawns it

Started by Olaizjul on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Making a animal that is automatically tamed by the person that spawns it

Basically, i wanted to make a entity that follows the player around but only the player that is its owner. How do i make it so the mob is automatically tamed by the person that spawned it? By the way, i will not be using a default spawn egg for this and the entity won't appear in the nature. I will use a custom summoning item.

Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Maybe you could use code in…
Fri, 12/11/2020 - 19:08

Maybe you could use code in the "on initial entity spawn" trigger to make the entity follow the closest player. You would have to make it only follow that player though, not just whichever player is closest to it. I'm not sure how you would do that.

Joined Apr 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i would also like to know i…
Sat, 04/23/2022 - 09:52

i would also like to know i made a mob that also does not spawn on its own instead i use an item like you and i want to know how to make it auto tamed by the player that spawned it with the item pls help