Guest User

Untitled

a guest
Jun 24th, 2014
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.69 KB | None | 0 0
  1. package com.malkuthe.apotheosis.items.reference;
  2.  
  3. import com.malkuthe.apotheosis.items.ItemBlessing;
  4. import com.malkuthe.apotheosis.items.ItemBoon;
  5. import com.malkuthe.apotheosis.items.ItemConsumingRage;
  6. import com.malkuthe.apotheosis.items.songs.ItemSongs;
  7. import com.malkuthe.apotheosis.util.reference.ModuleSAAInfo;
  8. import cpw.mods.fml.common.registry.GameRegistry;
  9. import net.minecraft.client.renderer.texture.IIconRegister;
  10. import net.minecraft.entity.player.EntityPlayer;
  11. import net.minecraft.item.Item;
  12. import net.minecraft.item.ItemStack;
  13. import net.minecraft.world.World;
  14.  
  15. import java.util.Locale;
  16.  
  17. public class SAAItem extends Item {
  18.  
  19.     private String texture;
  20.  
  21.     public SAAItem(String name){
  22.         String _name = diverseName(name);
  23.         setUnlocalizedName(_name);
  24.         texture = _name;
  25.         GameRegistry.registerItem(this, "item_" + _name );
  26.     }
  27.  
  28.     protected String diverseName(String name){
  29.  
  30.         return name.replaceAll(" ", "_").replaceAll("'", "-").toLowerCase(Locale.ENGLISH);
  31.     }
  32.    
  33.     public static void registerItems(){
  34.  
  35.         ItemRepo.item_boon = (SAAItem) (new ItemBoon("Arawn's Boon"));
  36.         ItemRepo.item_blessing = (SAAItem) (new ItemBlessing("saaItemBlessing"));
  37.         ItemRepo.item_songs = (SAAItem) (new ItemSongs("Ritual Songs"));
  38.         ItemRepo.item_song_empowered_rage = (SAAItem) (new ItemConsumingRage("Song Empowered Rage"));
  39.  
  40.     }
  41.  
  42.     @Override
  43.     public void registerIcons(IIconRegister iconRegister){
  44.         this.itemIcon = iconRegister.registerIcon(ModuleSAAInfo.ID + ":" + this.texture);
  45.     }
  46.  
  47.     public void onUpdate(ItemStack itemstack, World world, EntityPlayer player, int par1, boolean par2){
  48.  
  49.     }
  50.  
  51.  
  52.    
  53. }
Advertisement
Add Comment
Please, Sign In to add comment