How to make a weapon increase damage when you wear armor?

Started by KaidinOk on

Topic category: Help with modding (Java Edition)

Last seen on 18:02, 22. Feb 2024
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make a weapon increase damage when you wear armor?
Wed, 04/06/2022 - 01:58 (edited)

i'm making a mod which adds classes and instead of adding potion effects when you equip a weapon with armor on i wanted to make it increase the base damage, i tried it, but its not working.

Heres the procedure: 

https://imgur.com/a/AJermGc

Edited by KaidinOk on Wed, 04/06/2022 - 01:58
Last seen on 21:45, 30. Apr 2024
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
well thats going to increase…
Fri, 04/08/2022 - 14:44

well thats going to increase the durability slightly over time

to actually do what youre saying you have to use the 'armor value of [entity]' block

what i would do is give it sharpness for every armor value you have (or every two) since im not sure if theres a way to change the damage value of an item without a custom enchant or something similar

Last seen on 12:31, 22. Jan 2024
Joined Jul 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
"Set damage of item" refers…
Mon, 04/18/2022 - 15:06

"Set damage of item" refers to the durability like mdpotato said

not the total durability but how broken an item is

instead of increasing the base damage, you should make a procedure that triggers when a player hits something, sense if the player is wearing armour, then damage the event/target entity with however much you want to add on

Last seen on 18:02, 22. Feb 2024
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ok, thanks for helping :)
Mon, 04/18/2022 - 16:01

ok, thanks for helping :)