Help with potion effect not working when item in offhand while holding weapon

Started by contanpe on

Topic category: Help with MCreator software

Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help with potion effect not working when item in offhand while holding weapon

I'm trying to make a double handed weapon, so when the player holds any item in their offhand while they're holding the weapon they get a mining fatigue effect. I made a procedure that activates when the player has a weapon in their hand each tick. However, the procedure doesn't work. I've taken a look at other forum posts and haven't seen anything that might break the procedure. Any ideas on why it's not working?

pic of the procedure:

https://imgur.com/a/REz2lSA

 

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think your procedure…
Sun, 10/18/2020 - 15:38

I think your procedure checks if the provided itemstack (the sword) is in the offhand, and if so it gives the player mining fatigue. I think instead you want to check if there is nothing in the offhand like this:

https://drive.google.com/file/d/1spLULJbIopO6dGc6SB0gpi6mmrH3GjGr/view?usp=sharing

Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you so much!
Sun, 11/22/2020 - 05:19

Thank you so much!