
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.
24 lines
734 B
Java
24 lines
734 B
Java
package WayofTime.bloodmagic.item.sigil;
|
|
|
|
import WayofTime.bloodmagic.api.Constants;
|
|
import WayofTime.bloodmagic.registry.ModPotions;
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.potion.PotionEffect;
|
|
import net.minecraft.world.World;
|
|
|
|
public class ItemSigilHaste extends ItemSigilToggleable
|
|
{
|
|
public ItemSigilHaste()
|
|
{
|
|
super("haste", 250);
|
|
setRegistryName(Constants.BloodMagicItem.SIGIL_HASTE.getRegName());
|
|
}
|
|
|
|
@Override
|
|
public void onSigilUpdate(ItemStack stack, World world, EntityPlayer player, int itemSlot, boolean isSelected)
|
|
{
|
|
player.addPotionEffect(new PotionEffect(ModPotions.boost.id, 2, 0, true, false));
|
|
}
|
|
}
|