A sword that deals a half a heart to the Player but does massive amounts of damage to an entity?

Started by Emilpop on

Topic category: Help with modding (Java Edition)

Last seen on 03:59, 4. Feb 2021
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
A sword that deals a half a heart to the Player but does massive amounts of damage to an entity?

As the title says, I'm trying to make a sword that deals damage to the player but only when it hits another entity. This is my first "original" mod idea that I really want to make.

I have limited knowledge on making mods, but I do know how to say what I want in the language of code, for example:

>Add sword to inventory when Player Joins the world

>Add sword to inventory when Player respawns

>When sword deals damage to an entity, Player takes damage

>Repair sword with milk bucket

I just have no idea on where to start the code and on which procedure.

Last seen on 22:36, 27. Apr 2021
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
once you make the sword make…
Sun, 03/14/2021 - 21:16

once you make the sword make a procedure under the trigger "when the living entity is hit with tool"  then get a deal 1 damage block from entity management and replace entity/target with source entity to get this

https://docs.google.com/document/d/1JxFzIxdr-K6_v7fb7QY43hFlF6oY7lN4mPD…