How to get the item causing the dammages ?

Started by CCC_Studio on

Topic category: Help with Minecraft modding (Java Edition)

Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to get the item causing the dammages ?

How to get the item causing the damage ? I want to be able to retrieve the “itemstack” object and its enchantments with one of the “when entity is hurt” or “when entity is attacked”(or other) events.