chiyin00 Posted June 18, 2014 Share Posted June 18, 2014 Hi, I am working on a food that will heal the player 2 hearts after ate. I've used the method setPotionEffect, I've tested it with moveSpeed and it worked. But the Instant heal seems not working Here's the code this.setPotionEffect(Potion.heal.id, 1, 4, 100); When I test the food. It didn't heal me 2 hearts but heal my bar full. How should I modify the method so that it will only heal 2 hearts? Sorry for my bad English. But please help Quote Link to comment Share on other sites More sharing options...
coolboy4531 Posted June 18, 2014 Share Posted June 18, 2014 If I remember an amplifier of 4 (Healing IV) will heal quite a lot. Try and lower it. Quote Link to comment Share on other sites More sharing options...
chiyin00 Posted June 19, 2014 Author Share Posted June 19, 2014 Even the level is 0 it still heals my bar full. Because I got a 1 second instant heal effect. And it heals me 10 hearts in just a second. But if I set the time to 0 second. It won't heal me. What should I do? Quote Link to comment Share on other sites More sharing options...
Bedrock_Miner Posted June 19, 2014 Share Posted June 19, 2014 use the onEaten method and write player.addPotionEffect(new PotionEffect(Potion.heal.id, duration (1), amplifier(0))); or just use player.heal(amount); Quote http://i.imgur.com/wNvtGZw.png[/img] MODS and MODDING TUTORIALS Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.