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

Started by contanpe on Wed, 10/14/2020 - 17:15

Topic category: Help with MCreator software

Last seen on 05:17, 22. Nov 2020
Joined Dec 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Help with potion effect not working when item in offhand while holding weapon
Wed, 10/14/2020 - 17:15

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

 

Last seen on 11:10, 23. Nov 2020
Joined Aug 2020
User points:

User statistics:

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

Last seen on 05:17, 22. Nov 2020
Joined Dec 2018
User points:

User statistics:

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

Thank you so much!