Started by
Emilpop
on
Topic category: Help with Minecraft modding (Java Edition)
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.
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…