Pre-Existing Mob AI

Started by RyanDxxx on

Topic category: Help with MCreator software

Joined Aug 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Pre-Existing Mob AI

I've been trying to think of how I could do this, but it'll most likely require Java code, but the idea was having a certain potion effect, let's just call it "Teammate", when you have this potion effect active, all illagers, illusioners, ravagers, raiders, etc become Neutral, so the idea would be, if you hit one of them, and had Teammate potion effect, it'd remove the potion effect, reverting them back to their normal AI of being hostile towards you.

I don't know if this is possible in the base engine alone but probably not, just wondering if anyone had any thoughts and or ideas?

Joined Jan 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This should be some help…
Sat, 01/14/2023 - 05:17

This should be some help

  • TeammateEffectStartedApplied

Execute command / "team join passive" in the name of Event/Target entityScreenshot-2023-01-13-225814

 

  • TeammateEffectExpired

Execute command / "team leave @s" in the name of Event/Target entity

Screenshot-2023-01-13-231507

 

  • (Global Trigger) Player joins the world

Execute command / "team add passive" in the name of Event/Target entity

Execute command / "team join passive" in the name of Event/Target entityScreenshot-2023-01-13-225855

Joined Apr 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
there is already such a mod,…
Sat, 01/14/2023 - 06:11

there is already such a mod, called Neutrality

Joined Aug 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Daniil_WhiteLooked it up,…
Sat, 01/14/2023 - 21:00

Daniil_White
Looked it up, yeah, very similar to the idea I had in mind, as for my mod, I've been re-adding back old removed/exclusive/mentioned features back into the game, and I'm adding the Ruby, and I want it to have it's own unique flare so I was gonna have something similar to Trading/Bartering, but you'd have to Haggle.

Killing a Villager, will yield Rubies, but the potion effect "Villain of the Village", the higher rank the Villager is, more Rubies it'll drop, low ranks won't drop any, making player's have to trade with them.

With the potion effect, you can't trade with Villager's and Iron Golem's are hostile against you, Villager's will also run from you.
But with the potion effect, Illager's, Witches, Evokers, Vex's and Ravager's become Neutral to you, attacking any of them will cause the potion effect to get removed.

But with the effect on, you can trade with Illager's and Pillager's and they'll be haggling a random item, some exclusive ones as well like a TNT Arrow (Old mentioned arrow from Notch), Scarecrow, etc, just a few unused items I could probably give them, the item they'll be haggling can range from a varied price depending on the actual item, for example, let's go with 16x TNT Arrows, this Illager is looking for 6+ Rubies for them (The player doesn't know), so you have 3 guess'/haggle chances, you haggle 2 rubies, he denies, haggle 4 rubies, he denies, so your last chance to try to get it is to risk it all by haggling high money, or try to go a bit lower, but if you get denied a 3rd time, you can't trade with them till the next day.

But coding this would be a slight pain, so idk, might just try to find a new use.

Joined Aug 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Super_Steve_Time Thank you,…
Wed, 01/18/2023 - 12:16

Super_Steve_Time Thank you, but I don't think it'll work, as teams no longer work like that (as well as tried to make it work but it just didn't), even with Friendly Fire turned off, entities will still attack you regardless of team, and I don't want to use normal Minecraft teams as it might interfere with someone's already pre-made teams like if they had a server and made a team just so player's wouldn't pvp or to show visiblity, etc.

But I thank you for trying to help.

Joined Jan 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It worked for me, but it…
Wed, 01/18/2023 - 14:40

It worked for me, but it might not work on multiplayer. You'd just have to edit some code or find out another way