Tamed entity attacking other tamed entities

Started by progamezia on Fri, 05/27/2022 - 15:02

Topic category: Help with modding (Java Edition)

Last seen on 16:18, 4. Jul 2022
Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Tamed entity attacking other tamed entities
Fri, 05/27/2022 - 15:02

Hello.I am making a mod with guns,and i added soldiers which you can tame and who'll just stop fighting for you if you dont pay them,they work just fine,but often when i have a lot of them and i give them a target to shoot,they end up shooting each other and they all just shoot each other.So,is there any way to prevent them from reacting aggresively to another soldier tamed by the same person,I dont want all soldiers to not fight each other,i just want the soldiers with a shared owner to not fight each other.Thank you

Last seen on 03:08, 8. Jun 2022
Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I am making a similar mod…
Sun, 06/05/2022 - 11:39

I am making a similar mod that has had the same issue the way I fixed it was with variables. 
if they are tamed there in Var 2 else var 1 and if a entity hits one from the same team the both get regeneration. It still means they fight each other but they don’t kill there team.

I’ll try to find the procedure to show because I remember I did something with teleporting to put them out of agro range too but can’t remember how.

Last seen on 03:08, 8. Jun 2022
Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
But your best bet is to mess…
Sun, 06/05/2022 - 11:40

But your best bet is to mess with variables. They tend to be very help full