2015-12-27 19:38:12 -05:00
|
|
|
package WayofTime.bloodmagic.item.sigil;
|
|
|
|
|
2016-01-18 22:34:12 -08:00
|
|
|
import WayofTime.bloodmagic.api.Constants;
|
2015-12-27 19:38:12 -05:00
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import net.minecraft.potion.Potion;
|
|
|
|
import net.minecraft.potion.PotionEffect;
|
|
|
|
import net.minecraft.world.World;
|
|
|
|
|
2015-12-30 15:34:40 -05:00
|
|
|
public class ItemSigilElementalAffinity extends ItemSigilToggleable
|
|
|
|
{
|
|
|
|
public ItemSigilElementalAffinity()
|
|
|
|
{
|
2015-12-27 19:38:12 -05:00
|
|
|
super("elementalAffinity", 200);
|
2016-01-18 22:34:12 -08:00
|
|
|
setRegistryName(Constants.BloodMagicItem.SIGIL_ELEMENTAL_AFFINITY.getRegName());
|
2015-12-27 19:38:12 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2015-12-30 15:34:40 -05:00
|
|
|
public void onSigilUpdate(ItemStack stack, World world, EntityPlayer player, int itemSlot, boolean isSelected)
|
|
|
|
{
|
2015-12-27 19:38:12 -05:00
|
|
|
player.fallDistance = 0;
|
|
|
|
player.extinguish();
|
|
|
|
player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 2, 1, true, false));
|
|
|
|
player.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 2, 0, true, false));
|
|
|
|
}
|
|
|
|
}
|