Durability when player picks up item

Started by Birbatiel on

Topic category: Help with modding (Java Edition)

Last seen on 22:32, 24. Aug 2022
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Durability when player picks up item

I'm trying to make a mod for my modpack.

When you are holding this item in the offhand, it will take 1 damage when the target entity picks up an item.
I want this damage to deal to the item depending on the stack size 1-64 of course... so maybe a variable for the damage?

Reason is, because one of the mods i'm using disables auto pickup. But it has the option to pick up items when a specific item is held in either main or offhand.

 

I'm new to this, so I could learn something from this!

Thanks for reading - Birbatiel.