
tterrag is a meany face and yelled at me for using class.getSimpleName(). So here's an API-friendly re-work of the registration system. This allows all our Items/Blocks to be obtained via the API. Just add a new enum.
26 lines
932 B
Java
26 lines
932 B
Java
package WayofTime.bloodmagic.item.sigil;
|
|
|
|
import WayofTime.bloodmagic.api.Constants;
|
|
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;
|
|
|
|
public class ItemSigilElementalAffinity extends ItemSigilToggleable
|
|
{
|
|
public ItemSigilElementalAffinity()
|
|
{
|
|
super("elementalAffinity", 200);
|
|
setRegistryName(Constants.BloodMagicItem.SIGIL_ELEMENTAL_AFFINITY.getRegName());
|
|
}
|
|
|
|
@Override
|
|
public void onSigilUpdate(ItemStack stack, World world, EntityPlayer player, int itemSlot, boolean isSelected)
|
|
{
|
|
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));
|
|
}
|
|
}
|