Check if items can be used in main hand

Started by JennaF64 on

Topic category: Help with MCreator software

Last seen on 21:26, 2. Sep 2024
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Check if items can be used in main hand

I tried looking to see if there was a topic for this, but I couldn't find one. I was wondering if there was a way to detect if the player can use the item in the main hand. That way, I could have some of the custom items I create usable in the offhand (just like vanilla dual wielding). 

Now, this might just be solvable with tags, but it would need conditions. For example, if you're holding a snowball in your main hand, and a custom item in your offhand (that is also usable) I want it to just use the snowball, and not the item in the offhand. 

I know this can easily be solved by detecting if there is nothing in the offhand, but the item I'm creating would be very useful in combat (so I want it to be able to be used when the player is holding something in their main hand).

Like I said, this might already exist in Mcreator but I haven't found it, and if it does exist, I need some help finding it.

Last seen on 23:38, 28. Sep 2024
Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
There is a check for if you…
Tue, 03/22/2022 - 02:11

There is a check for if you're holding something in both main and off-hand blocks.