How Do i add potion effect when a full set is weared?

Started by TheMajikPug on Tue, 04/12/2016 - 14:08

Topic category: Help with modding (Java Edition)

Last seen on 11:19, 25. Jul 2018
Joined Feb 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How Do i add potion effect when a full set is weared?
Tue, 04/12/2016 - 14:08

How do i add potion effects to an armor but only if i wear the full set?

Last seen on 11:19, 25. Jul 2018
Joined Feb 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
and if you know to add
Tue, 04/12/2016 - 14:10

and if you know to add atributes to the armor please tell me too

 

Last seen on 23:39, 23. Apr 2017
Joined Nov 2015
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I know how to do the potion
Tue, 04/12/2016 - 20:00

I know how to do the potion thing im making a video on it soon kk

 

Last seen on 23:39, 23. Apr 2017
Joined Nov 2015
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
This is the code for
Tue, 04/12/2016 - 20:11

This is the code for enchantments:

 boolean flag = par3EntityPlayer.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, par1ItemStack) > 0;

{This was part of the guns source code}

Last seen on 12:58, 23. Sep 2019
Joined Aug 2014
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
RE:https://youtu.be/0NcKDNoO_K8
Sat, 04/23/2016 - 15:55

@#5 It does not work for me :/

dunno, maybe I set variable (in variable list) wrong, but I did exactly what you did...

Last seen on 23:39, 23. Apr 2017
Joined Nov 2015
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
RE:RE:https://youtu.be/0NcKDNoO_K8
Sat, 04/23/2016 - 16:35

@#5.1  ok so are you not getting an effect or is it showing up as an error?

Last seen on 12:58, 23. Sep 2019
Joined Aug 2014
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
RE:RE:RE:https://youtu.be/0NcKDNoO_K8
Sun, 04/24/2016 - 10:01

@#5.1.1 no effect.

And if i set the variable (in varible list) to 4, i get the effect when i wear boots, but when I wear full armor not (or better I get it intermittently D: )

Last seen on 02:49, 1. Oct 2020
Joined Dec 2014
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
RE:RE:RE:RE:https://youtu.be/0NcKDNoO_K8
Sun, 04/24/2016 - 14:35

@#5.1.1.1 I've asked this question before as well. When you put the armor on, it adds a number to the variable, and if the variable is some number, the potion effect is given. However, there is some way for when you take off the armor it decreases the variable amount, but idk what it is :/

Last seen on 23:39, 23. Apr 2017
Joined Nov 2015
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Watch the entire video
Sun, 04/24/2016 - 14:39

Put the potion effect on the boots have them only work if the variable is 3 them have the boots set the variable from 3 to 4

Last seen on 12:58, 23. Sep 2019
Joined Aug 2014
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
RE:Watch the entire video
Sun, 04/24/2016 - 15:39

@#6 nope... intermittence like in your video :/ I tried to add the "0 to 4" event to leggins insted of chestplate, but nothing changes...

It seems the variable takes too much time to do that "circle" from 0 to 4 so we get intermittence 

Last seen on 12:58, 23. Sep 2019
Joined Aug 2014
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
RE:RE:Watch the entire video
Sun, 04/24/2016 - 15:49

@#6.1 lol fail

it seems to work if i add more ticks to the potion effect... :P

Thx for this @SpideyBren2000

Last seen on 21:42, 5. Nov 2016
Joined Mar 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
RE:https://youtu.be/0NcKDNoO_K8
Mon, 08/22/2016 - 01:23

@#5 @#5  The video link doesn't work.

Last seen on 20:10, 1. Mar 2017
Joined Apr 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
RE:RE:RE:RE:https://youtu.be/0NcKDNoO_K8
Mon, 08/22/2016 - 13:17

@#5.1.1.1 Then try to add "1" for each piece of armor you are currently wearing, If the number is 4, you get the set bonus. Simple :)