Started by
AliveWater
on
Topic category: Help with Minecraft modding (Java Edition)
So I'm create a mod with bunch of custom enchantments and can't figure out how to give the player extra exp when killing mob with a weapon that has this enchantment. Anyone who knows how to do this?
Edited by AliveWater on Sun, 09/29/2024 - 18:01
On entity dies trigger. Get if source entity is type player, if so get item in main hand is enchanted with enchantment (custom enchantment). If so give player exp. Idk if theres a procedure to get exp of an entity, if there is then use that to get the exp amount of the event target entity and give it to the source entity.
I meant use the exp of the event target entity to for example: /2 and add to player to get 50% bonus exp.
Thanks!