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

Started by axlvc on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Execute if entity/player isn't wearing any armor with enchantment.

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.

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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.

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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