What trigger is it on, are you summoning minions or something with an item. If its a custom entity it should be pretty easy like this:
Obviously replace Wolf with your custom mob. If the entity your spawning could also be fighting you/ in the same area. Then make a seperate entity being the tameable one that spawns.
I put two if statements because I dont know what your trigger is but the tamed by will be either event/target entity or source entity (being the player).
Not working on Mcreator version 2025.2, showing Required dependencies missing "sourceentity, x, y, z, World", for which version this procedure is? im going to downgrade my version of Mcreator to one where this works as i haven't been able to find a version that works on 2025.2
It's on the "Right-Clicked" trigger of a tool, also tried on the "OnInitialEntitySpawn" trigger of the custom mob but didn't work, any help or direction for where to put it would be appreciated as this part is the last thing i need for my custom mob.
I can't even see what image I posted up there as imgur is no longer available in the uk. Anyway on right clicked you summon the mob. On right clicked entity position, the player performing the action is the event/target entity. There is no source entity but you definitely have world and x y z.
Your procedure would be something like this:
Spawn entity [custom_entity] at x y z
For each entity as [entity_iterator] at x y z in cube [3~]
If [entity_iterator] is the same entity as [custom_entity]
Tame [entity_iterator] by [event/target_entity]
That should work is your spawned/tamed entity is not naturally occuring otherwise it will tame all entities of that type within a 3 block area. If what I said there is a problem then what you can do is make another procedure on the entity. On spawn set a global player variable to true. Then check in an area if a player has that variable as true. Then tame the entity using the player:
Item: On right clicked
Spawn entity [custom_entity] at x y z
Set logic global: [custom_entity_taming] to [true] for entity [event/target_entity]
Custom_entity: On initial entity spawn
For each entity as [entity_iterator] at x y z in cube [3~]
If {is [entity_iterator] is subtype of player = [true]}------{optional}
And get logic [custom_entity_taming] for entity [entity_iterator] = [true]
Tame [event/target_entity] by [entity_iterator]
Set logic global: [custom_entity_taming] to [false] for entity [entity_iterator]
Use the block: [Tame (event/target entity) by (source entity)], where event/target entity is the mob and the source entity is the player.
how to do this
What trigger is it on, are you summoning minions or something with an item. If its a custom entity it should be pretty easy like this:
Obviously replace Wolf with your custom mob. If the entity your spawning could also be fighting you/ in the same area. Then make a seperate entity being the tameable one that spawns.
I put two if statements because I dont know what your trigger is but the tamed by will be either event/target entity or source entity (being the player).
Not working on Mcreator version 2025.2, showing Required dependencies missing "sourceentity, x, y, z, World", for which version this procedure is? im going to downgrade my version of Mcreator to one where this works as i haven't been able to find a version that works on 2025.2
It will work on 2025.2, for the missing dependencies, that all depends on what is triggering the action you are attempting to do. What is the trigger?
It's on the "Right-Clicked" trigger of a tool, also tried on the "OnInitialEntitySpawn" trigger of the custom mob but didn't work, any help or direction for where to put it would be appreciated as this part is the last thing i need for my custom mob.
I can't even see what image I posted up there as imgur is no longer available in the uk. Anyway on right clicked you summon the mob. On right clicked entity position, the player performing the action is the event/target entity. There is no source entity but you definitely have world and x y z.
Your procedure would be something like this:
Spawn entity [custom_entity] at x y z
For each entity as [entity_iterator] at x y z in cube [3~]
If [entity_iterator] is the same entity as [custom_entity]
Tame [entity_iterator] by [event/target_entity]
That should work is your spawned/tamed entity is not naturally occuring otherwise it will tame all entities of that type within a 3 block area. If what I said there is a problem then what you can do is make another procedure on the entity. On spawn set a global player variable to true. Then check in an area if a player has that variable as true. Then tame the entity using the player:
Item: On right clicked
Spawn entity [custom_entity] at x y z
Set logic global: [custom_entity_taming] to [true] for entity [event/target_entity]
Custom_entity: On initial entity spawn
For each entity as [entity_iterator] at x y z in cube [3~]
If {is [entity_iterator] is subtype of player = [true]}------{optional}
And get logic [custom_entity_taming] for entity [entity_iterator] = [true]
Tame [event/target_entity] by [entity_iterator]
Set logic global: [custom_entity_taming] to [false] for entity [entity_iterator]
Should work.