how to add potion effect properly

Started by tzaxp on

Topic category: Help with modding (Java Edition)

Last seen on 22:20, 8. Feb 2018
Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to add potion effect properly

I try to make a sword with potion effect. I created a "key bind" with "add potion effect even" in the condition of "itemInPlayersHand[] == mysword". When I hold the sword and press specific buttion it give me potion effect. I found the potion effects it given to me only have iron and show remain time but dont have any actual effect (such as Regeneration II do not recover my health).   I also used "special feature" to check my sword, but it have same result.Is anyone could help me deal with this situation?

I am sorry for my English . I am not English speaker.

Last seen on 17:17, 10. Jan 2024
Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It is because key bind is
Fri, 03/25/2016 - 22:21

It is because key bind is "client-side" , but you need add the effect on "server-side".

Last seen on 22:20, 8. Feb 2018
Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:It is because key bind is
Sat, 03/26/2016 - 09:35

@#1 thank you

Last seen on 04:29, 30. May 2020
Joined Jun 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:It is because key bind is
Sun, 03/27/2016 - 04:18

@#1 since you seemingly  know what you are doing, how come when i have a potion effect "on shooting gun" and i do regeneration or id number 10, it doesnt work, so i messed around with the amplifier and duration and it made no difference, i guess what im asking is 

1.how do i make it work (lol)

2.what do amplifier and duration do/mean

thanks

Last seen on 22:00, 11. Nov 2019
Joined Aug 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
MLGopposite, I was having
Sun, 03/27/2016 - 16:10

MLGopposite, I was having trouble assigning specific potions/potion effects as well, and found I had to go into the mods source to edit the event in which the potion was added and add my potion dec value to the end of the string because mcreator was just trying to give me regular water bottles lol

Last seen on 23:46, 24. Aug 2021
Joined Feb 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i am trying to do something
Mon, 05/16/2016 - 18:59

i am trying to do something similar but potion effects on armor