Jump to content

[Solved][1.7.10]How do I ge Regeneration working?


Caleb6801

Recommended Posts

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.