How to make a sword that deals extra damage to the attacker

Started by Kenjisaurus on

Topic category: Help with modding (Java Edition)

Last seen on 04:02, 13. Nov 2021
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make a sword that deals extra damage to the attacker

How can i make a tool that deals extra damage to any entity that attacks the user of the tool.

Last seen on 15:54, 5. Sep 2021
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Well you can use “spike”…
Sun, 08/15/2021 - 05:45

Well you can use “spike” enchantment effect procedure when the sword in your inventory

Last seen on 15:54, 5. Sep 2021
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Tool = sword 
Sun, 08/15/2021 - 05:46

Tool = sword 

Last seen on 04:13, 6. May 2023
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
*On entity hit with tool" …
Sun, 08/15/2021 - 09:27

*On entity hit with tool"
*Deal damage to "source entity"*

Last seen on 04:02, 13. Nov 2021
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
what I mean is when a mob…
Mon, 08/16/2021 - 04:38

what I mean is when a mob hits you and you have the sword in main hand if you hit that mob then it takes more damage 

 

Last seen on 04:02, 13. Nov 2021
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
nevermind i found a way to…
Mon, 08/16/2021 - 11:09

nevermind i found a way to do it

 

Last seen on 15:15, 20. Oct 2023
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How did you manage to make…
Mon, 10/09/2023 - 20:00

How did you manage to make the enchant? I'd like to know if that's alright

Last seen on 03:13, 12. Oct 2023
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Probably using a custom…
Wed, 10/11/2023 - 16:03

Probably using a custom effect or NBT tag applied to any entity that attacks someone holding the tool, and on hit, the sword checks if the entity has the effect and does extra damage if true.