How to make a sword that gives effect to player when hitting mob.

Started by RaphBizz on Mon, 07/22/2019 - 23:53

Topic category: Help with modding (Java Edition)

Last seen on 23:25, 23. Nov 2019
Joined Jul 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
How to make a sword that gives effect to player when hitting mob.
Mon, 07/22/2019 - 23:53

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?

Last seen on 09:43, 24. Jul 2019
Joined Dec 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
I'm pretty sure it can be…
Wed, 07/24/2019 - 09:33

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.

Last seen on 23:25, 23. Nov 2019
Joined Jul 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
I explored the coding blocks…
Sun, 07/28/2019 - 20:23

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.

 

Last seen on 11:22, 30. Mar 2020
Joined Mar 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
yeah ... that is my problem…
Mon, 03/16/2020 - 08:51

yeah ... that is my problem too... anyone can't help us ?

Last seen on 10:09, 2. Jul 2020
Joined Aug 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
I have made new procedure…
Mon, 03/23/2020 - 09:53

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

Last seen on 09:17, 2. Jul 2020
Joined Jun 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
just do when mobs hurt with…
Mon, 03/23/2020 - 10:34

just do when mobs hurt with tool

execute command /effect and the effect you want

Last seen on 10:09, 2. Jul 2020
Joined Aug 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
Could you please show me a…
Mon, 03/23/2020 - 11:27

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.

Last seen on 09:17, 2. Jul 2020
Joined Jun 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
vanilla commands for 1.14: …
Mon, 03/23/2020 - 11:29

vanilla commands

for 1.14:

/effect give @p resistance 100 2

gives resistance II for 100 secs

Last seen on 10:09, 2. Jul 2020
Joined Aug 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
I know vanilla commands ;D…
Mon, 03/23/2020 - 12:42

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

Last seen on 09:17, 2. Jul 2020
Joined Jun 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
your image does not work
Mon, 03/23/2020 - 13:22

your image does not work