Execute if entity/player isn't wearing any armor with enchantment.

Started by axlvc on Tue, 05/03/2022 - 20:00

Topic category: Help with modding (Java Edition)

Last seen on 14:15, 11. May 2022
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Execute if entity/player isn't wearing any armor with enchantment.
Tue, 05/03/2022 - 20:00

So I added a custom set of weapons and an enchantment for armor. If the weapon is used on an entity who isn't wearing any armor with this enchantment all it's potion effects should get cleared but if any of the armor pieces do have the enchantment it shoudn't do antything. It works just fine on mobs but for whatever reason it just won't work on players, If I only have the clear all potion effects block without any of the if statements it does work on players so something in the if statements does work on mobs but not on players. It's something with the "get item from armor" or the "has enchatnment" block because that's all the if statements contain, but how can I fix or get around this issue?

The code block on top does the same as the one at the bottom just without the logs and using or instead of multiple if statements.

Last seen on 01:37, 29. Jun 2022
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Post a picture and I may be…
Tue, 05/03/2022 - 21:45

Post a picture and I may be able to help.

Last seen on 14:15, 11. May 2022
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
looks like the image didn't…
Wed, 05/04/2022 - 16:05

looks like the image didn't work, I'll try to reupload it here.

image