Item in hand that was used to attack

Started by iodine131 on

Topic category: Help with modding (Java Edition)

Last seen on 16:43, 22. Apr 2024
Joined Apr 2024

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Item in hand that was used to attack
Wed, 04/17/2024 - 17:44 (edited)

I made an enchantment that gives an effect with a random chance when you hit a mob. 
The issue is that I use BetterCombat mod so i can use 2 weapons. So how can I make a condition that would check item-that-was-used-to-attack instead of item in main hand or in off-hand.

This is my current "build" which sucks cause even if I hit a mob with off-hand weapon that has no enchantment I would still get the effect if my main hand weapon has the enchantment.

Edited by iodine131 on Wed, 04/17/2024 - 17:44