how to add potion effect properly

Started by tzaxp on

Topic category: Help with Minecraft modding (Java Edition)

Active 7 years ago
Joined Dec 2014
Points:
721

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1
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.

Active 12 months ago
Joined Aug 2013
Points:
1162

User statistics:

  • Modifications: 4
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 737
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".

Active 7 years ago
Joined Dec 2014
Points:
721

User statistics:

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

@#1 thank you

Active 4 years ago
Joined Jun 2013
Points:
731

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 4
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

Active 5 years ago
Joined Aug 2015
Points:
773

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 103
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

Active 3 years ago
Joined Feb 2015
Points:
735

User statistics:

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

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