Topic category: Help with Minecraft modding (Java Edition)
heyo rookie here,so ive been making this mod that would spawn zombies that would fight for you by using this tool,but I ran into some problems
1.how do you make it so that if they get too far,they teleport towards you
Is there like a way to make them teleport to you when they get far from you?I made it so that they attack me but do 0 dmg,so how do i make them teleport to attack me or just in general teleport to me as they follow me
2.(if no one found a way to make them follow the player)How do I make it so that if I left click with the tool,they are forced to follow you
3.how do i make it if 2 players use my tool,it will only make the ones they spawned follow them or go in attack mode
Im still new and suck at this so sorry :(
the first one I think is using a procedure.
Make the Zombie a seperate entity and then make it a pet to the player who used the staff. This will make it so it attacks other hostile entities and things you attack, not only that but like a dog, if it gets too far it teleports back!
Not sure how to make it a pet in procedures, but maybe you could have it tamed by feeding it something? Hope this helped!
Stay Safe. Stay Home