[solved] 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:
[solved] How to get the item causing the dammages ?
Sat, 02/01/2025 - 07:56 (edited)

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.

Edited by CCC_Studio on Sat, 02/01/2025 - 07:56
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You could get the item in…
Mon, 01/27/2025 - 04:06

You could get the item in main hand of the attacker.

Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
oh yes : "get item <get…
Sat, 02/01/2025 - 07:55

oh yes : "get item <get entity that caused <provided dammage source>> is using"