How to make an entity spawn into the world tamed

Started by ja-xxx on

Topic category: Help with Minecraft modding (Java Edition)

Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make an entity spawn into the world tamed

I'm making a mod where you tame a bunch of creatures by nocking them out, everything works well except one thing. essentially you knock each creature out with a specific arrow type and it spawns the knocked out version of the mob which is a sperate entity (Geckolib if that matters), which you then feed in order to summon the tamed version which SHOULD spawn into the world tamed, however i cannot get this to work. what happens at the moment is you feed the unconscious creature, it tames, it dies and summons in its tamed varient but it doesent ACTUALLY tame

i have tried a million different variations of the code but it just wont do it, here is the current version

https://imgur.com/a/2xDAmSG

Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
There a lot of different…
Wed, 09/20/2023 - 12:04

There a lot of different ways to make it works:
 

  1. NBT Data
  2. Metadata Editor Plugin (You can add Metadata/NBT Data if your Entity gets spawn for example a NBT Data to check if its get tamed etc.)
  3. Using API Mods