Jump to content

Recommended Posts

Posted

Hi, so I have a script that adds Regeneration when holding a certain item. It adds the regeneration but the regeneration does not work as in it does not regenerate my hearts. I am using this to add regeneration:

player.addPotionEffect(new PotionEffect(Potion.regeneration.getId(), 5, 2));  <---Adds Regeneation 3 for 5 ticks.

 

Also I want to have jump boost five working using that same code, I have jump boost 1,2,3 and 4 working but not 5. I am using:

player.addPotionEffect(new PotionEffect(Potion.jump.getId(), 5, 4));  <---Adds jump boost 5 for 5 ticks.

If this is not possible to get jump boost 5 please tell me and I'll just remove it from my mod.

 

Thanks in advanced!

Posted

Regeneration regenerates 1 (Half Heart) over time every 50 ticks.

 

Which means you need to apply the effect, wait for it to tick away, then re-apply it.  Constantly setting the time to 5 ticks isn't going to work (Regen 3 takes 12 ticks).

 

Second, make sure that you apply the effect on the server.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Okay thanks, also will Regeneration 4 and 5 work or is that not possible? And do you know how to get jump boost 5 working or is that not possible also?

Posted

Haven't messed with them.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

When I put the:

player.addPotionEffect(new PotionEffect(Potion.jump.getId(), 5, 4));

for jump boost 5, it only gives me jump boost 3. I don't know why.

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.