How do I check a players armor slots for an entitys AI-condition?

Started by Stella on

Topic category: Help with modding (Java Edition)

Last seen on 11:38, 2. Sep 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I check a players armor slots for an entitys AI-condition?

Hi, 

I am completely new here, started modding literally today. I have modded an entity by now and want it to only attack me if I am not wearing a special hat. I tried: 

If [get item from armor slot [3] of [Event/target entity] = *special hat] do [...] 

and it does not work. Is slot 3 the wrong one for helmets or am I as player not the Event/target entity?

Please help :(

~Stella

Last seen on 11:38, 2. Sep 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Found the problem, was using…
Sat, 07/06/2024 - 08:05

Found the problem, was using the wrong item 😵‍💫