Started by
Lord Makishi
on
Topic category: Help with Minecraft modding (Java Edition)
As the title suggests i am trying to create an item that makes mobs passive/friendly to the player when right clicked with. Could anyone help me with this?
Thanks in advance!
Edited by Lord Makishi on Fri, 02/03/2023 - 22:43
Make it tame-able
Bo-Katan22 yeah but i also want this to work on vanilla mc mobs...
I just want to remove their aggresion towards the player.
Piglins... Try and borrow their code?
I hope it's possible
It‘s fine I already got my solution. I used the /team command! :}
Oh, great! Actually, can you tell me how?
I do beleive, putting something like;
check if there is a team called "mobc"
if not create one
under the whenplayerjoinsworld trigger then inside of that C Mob's Whenentityspawned trigger add /join blah blah team. would be enough.
You can add a player to the team while the item is in players hand and remove it when player doesnt holds it. Or, after the player eats a "certain thing/food" he joins that team permanently and becomes friendly with that mob.
The rest is up to your creativity.