Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.malkuthe.apotheosis.items.reference;
- import com.malkuthe.apotheosis.items.ItemBlessing;
- import com.malkuthe.apotheosis.items.ItemBoon;
- import com.malkuthe.apotheosis.items.ItemConsumingRage;
- import com.malkuthe.apotheosis.items.songs.ItemSongs;
- import com.malkuthe.apotheosis.util.reference.ModuleSAAInfo;
- import cpw.mods.fml.common.registry.GameRegistry;
- import net.minecraft.client.renderer.texture.IIconRegister;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.item.Item;
- import net.minecraft.item.ItemStack;
- import net.minecraft.world.World;
- import java.util.Locale;
- public class SAAItem extends Item {
- private String texture;
- public SAAItem(String name){
- String _name = diverseName(name);
- setUnlocalizedName(_name);
- texture = _name;
- GameRegistry.registerItem(this, "item_" + _name );
- }
- protected String diverseName(String name){
- return name.replaceAll(" ", "_").replaceAll("'", "-").toLowerCase(Locale.ENGLISH);
- }
- public static void registerItems(){
- ItemRepo.item_boon = (SAAItem) (new ItemBoon("Arawn's Boon"));
- ItemRepo.item_blessing = (SAAItem) (new ItemBlessing("saaItemBlessing"));
- ItemRepo.item_songs = (SAAItem) (new ItemSongs("Ritual Songs"));
- ItemRepo.item_song_empowered_rage = (SAAItem) (new ItemConsumingRage("Song Empowered Rage"));
- }
- @Override
- public void registerIcons(IIconRegister iconRegister){
- this.itemIcon = iconRegister.registerIcon(ModuleSAAInfo.ID + ":" + this.texture);
- }
- public void onUpdate(ItemStack itemstack, World world, EntityPlayer player, int par1, boolean par2){
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment