How to drop offhand item when holding another item.

Started by Trinity Slasher on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to drop offhand item when holding another item.

I am making a mod which has a greatsword in it. I want it to be two handed as it has high damage to balance it out. However, I want to make it so that any item in your offhand gets dropped as soon as the greatsword enters your main hand. Basically just make it so you cannot have two items held with this. I don't want the offhand item to be deleted, just dropped. If anyone knows a way to create this procedure I'd greatly appreciate it. Thanks.