Started by
CCC_Studio
on
Topic category: Help with Minecraft modding (Java Edition)
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
You could get the item in main hand of the attacker.
This explains really well about the Source Entity types you will be using.
https://www.reddit.com/r/MCreator/comments/w5t3iw/whats_the_difference_between_source_entity_and/
oh yes : "get item <get entity that caused <provided dammage source>> is using"