[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)

Active 1 year ago
Joined Sep 2024
Points:
100

User statistics:

  • Modifications: 0
  • Forum topics: 7
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 8
[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
Active 5 months ago
Joined Jul 2022
Points:
561

User statistics:

  • Modifications: 1
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 237
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.

Active 5 months ago
Joined Jul 2022
Points:
561

User statistics:

  • Modifications: 1
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 237
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.

Active 1 year ago
Joined Sep 2024
Points:
100

User statistics:

  • Modifications: 0
  • Forum topics: 7
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 8
Thanks!
Thu, 09/26/2024 - 23:53

Thanks!