[SOLVED] How to make an enchantment that deals extra damage to specific mobs.

Started by AliveWater on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[SOLVED] How to make an enchantment that deals extra damage to specific mobs.
Thu, 09/26/2024 - 23:53 (edited)

I'm trying to make a custom enchant that does more percentage towards ender mobs, Such as Enderman, Endermites, Skulkers, and the Ender Dragon. Screenshots and procedure files are appreciated but not required. Thanks in advance!

Edited by AliveWater on Thu, 09/26/2024 - 23:53
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Add the entities to a custom…
Thu, 09/26/2024 - 00:25

Add the entities to a custom tag. Make a procedure on global trigger entity attacked. Get is damagesource of type player. Then check item in main hand of player and check if the item has your custom enchantment. Call for the number dependency (amount) will give you how much damage the player just dealt. Then you can use that damage to add more. Eg add 10% more damage than what the player just used, if enchantment level =1 etc.

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Also check if event/target…
Thu, 09/26/2024 - 00:26

Also check if event/target entity is tagged in you custom tag. And that source entity is player.