Why isn't this lifesteal enchantment working.

Started by IFCreative on

Topic category: Help with modding (Java Edition)

Last seen on 15:25, 15. Apr 2021
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Why isn't this lifesteal enchantment working.

my code

Why isn't this working
I have the enchantment enchanted on an iron sword and it doesn't give me health.

Last seen on 12:11, 28. Mar 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Its because its not checking…
Sat, 04/17/2021 - 13:22

Its because its not checking for the item with the enchantment in Your hand, its checking for the item with the enchantment in the Opposing entities hand. To fix this simply change Event/target Entity to Source Entity and it will work.

Last seen on 07:40, 10. Feb 2022
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Set "Item in main-hand of…
Mon, 04/19/2021 - 06:43

Set "Item in main-hand of Event/Target entity" to "Item in main-hand of Source entity". Simple!