#142 - Healing Stones fixed
This commit is contained in:
parent
65157beea0
commit
1462ad301d
2 changed files with 33 additions and 1 deletions
|
@ -16,6 +16,7 @@ import com.legacy.aether.common.items.dungeon.ItemDungeonKey;
|
|||
import com.legacy.aether.common.items.food.ItemAetherFood;
|
||||
import com.legacy.aether.common.items.food.ItemAmbrosiumShard;
|
||||
import com.legacy.aether.common.items.food.ItemGummySwet;
|
||||
import com.legacy.aether.common.items.food.ItemHealingStone;
|
||||
import com.legacy.aether.common.items.food.ItemLifeShard;
|
||||
import com.legacy.aether.common.items.food.ItemWhiteApple;
|
||||
import com.legacy.aether.common.items.staffs.ItemCloudStaff;
|
||||
|
@ -166,7 +167,7 @@ public class ItemsAether
|
|||
enchanted_blueberry = register("enchanted_blueberry", new ItemAetherFood(8));
|
||||
white_apple = register("white_apple", new ItemWhiteApple());
|
||||
gummy_swet = register("gummy_swet", new ItemGummySwet());
|
||||
healing_stone = register("healing_stone", new ItemAetherFood(0).setPotionEffect(new PotionEffect(MobEffects.REGENERATION, 30, 0), 1.0F).setAlwaysEdible());
|
||||
healing_stone = register("healing_stone", new ItemHealingStone());
|
||||
candy_cane = register("candy_cane", new ItemAetherFood(2));
|
||||
ginger_bread_man = register("ginger_bread_man", new ItemAetherFood(2));
|
||||
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
package com.legacy.aether.common.items.food;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemHealingStone extends ItemAetherFood
|
||||
{
|
||||
|
||||
public ItemHealingStone()
|
||||
{
|
||||
super(0);
|
||||
|
||||
this.setAlwaysEdible();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasEffect(ItemStack stack)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onFoodEaten(ItemStack stack, World worldIn, EntityPlayer player)
|
||||
{
|
||||
player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 610, 0));
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue