How do I make Creepers peaceful to any players wearing specific armour?

Started by akisephila on

Topic category: Help with modding (Java Edition)

Last seen on 07:56, 15. Nov 2022
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I make Creepers peaceful to any players wearing specific armour?

In my large content expansion mod, there is going to be an armour set that when worn will make Creepers peaceful toward you (Unless you hit them). 
But I don't know how to do this!! Please help.
The mod I am making is for 1.16.5 and I am using the latest MCreator version.

Last seen on 20:39, 27. May 2021
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
only thing i could think of…
Tue, 05/25/2021 - 22:57

only thing i could think of is invisibility but that would apply to all mobs or somehow rework creeper ai

Last seen on 04:13, 6. May 2023
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Try using a global procedure…
Sat, 07/03/2021 - 23:44

Try using a global procedure that activates when a mob finds its attack target, then make it so that it cancels the trigger if the target/source (dont which one it would be in this case) is wearing said armor

 

idk if this will work but its worth trying

Last seen on 07:56, 15. Nov 2022
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I actually ended up solving…
Sun, 07/04/2021 - 00:02

I actually ended up solving this a long time ago and I guess I forgot to update the thread?
I created several procedures for this. One for when a world is first loaded up, where it creates a scoreboard called 'creeperFriendly'. One for when a creeper spawns, where it adds the creeper to the scoreboard 'creeperFriendly'. One for on player tick update, if not wearing the entire armour set then remove the player from the scoreboard creeperFriendly, and finally one for the Armour tick update, if wearing a full set add player to scoreboard creeperFriendly