Started by
RaphBizz
on
Topic category: Help with Minecraft modding (Java Edition)
Hey guys can anyone tell me how to make a sword that gives a potion effect to a player when they hit an animal/a mob?
Topic category: Help with Minecraft modding (Java Edition)
Hey guys can anyone tell me how to make a sword that gives a potion effect to a player when they hit an animal/a mob?
I'm pretty sure it can be solved using Procedures. Try exploring the coding blocks, and tell me if you can or can't find a way to do it.
I explored the coding blocks but decided to do it again and could only find a way to give potion effects to the entity attacked and not to the player who attacked the entity.
yeah ... that is my problem too... anyone can't help us ?
I have made new procedure that when mob is killed with a chosen item in main hand it will give the player effect but for some reason if the item loses duration it will no longer give the player the effect. So if any of you know how to make the effect work even when the item loses duration please tell me. But this will work with item that does not lose duration.
Code: https://ctrlv.cz/Gc3D
just do when mobs hurt with tool
execute command /effect and the effect you want
Could you please show me a picture of the procedure? I tried multiple things with the execute command thing, but I cannot get it to work.
vanilla commands
for 1.14:
/effect give @p resistance 100 2
gives resistance II for 100 secs
I know vanilla commands ;D. I went to the tool procedures menu and picked "When mob is hit with tool" and added "execute command" procedure and added the "effect command", but in game when I hit something with it id does not give me any effect. I tried multiple ways to do it but nothing seems to work could you please make the procedure your self and post a screenshot It would be very helpful?
here are some ways i tried to do it but they didn't work: https://ctrlv.cz/XG3D
your image does not work
does this work?: https://easyupload.io/wzz8zv
no
you first create a procedure. then you go to your sword menu and go to triggers. there you can put your procedure in *when living entity is hit with tool* hope this helped you I was searching for that for a bit of time xD