Sword enchantment magic damage lowers overall damage

Started by ScareForceOne on

Topic category: Help with modding (Java Edition)

Last seen on 22:35, 16. Dec 2023
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sword enchantment magic damage lowers overall damage

Im trying to add an effect like sharpness that does extra magic damage on every hit , but instead  it lowers the damage of the weapon and deals the difference as magic damage. 

For exaple if the sword did normally 10 damage , with the enchantment it would deal 8 physical + 2 magic damage . I really dont understand what im doing wrong but i am a beginner

 at modding so i would appreciate all the help i  can get. https://imgur.com/a/AogVzbh

 

 

 

Last seen on 13:36, 11. Apr 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Its not that its doing less…
Tue, 01/17/2023 - 11:48

Its not that its doing less damage, its actually not dealing the damage due to a change that Mojang made to Minecraft that gives entities damage prevention after being attacked, around 0.3s. Try using GENERIC damage type.
 

No clue if that will change anything for you but it did work for my mod.
https://imgur.com/a/zR9pNzc

Last seen on 22:35, 16. Dec 2023
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks for the tip , i'll…
Tue, 01/17/2023 - 12:56

Thanks for the tip , i'll try it out , but im pretty sure it does deal the damage. I tried it out using the Target dummy mod which  color codes the damage types and im pretty sure it did deal the extra magic damage.