Guest User

BlueLightsaberHilt

a guest
Oct 19th, 2013
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1.  
  2. package Seroemod.Lightsabers;
  3.  
  4. import cpw.mods.fml.relauncher.Side;
  5. import cpw.mods.fml.relauncher.SideOnly;
  6. import net.minecraft.client.renderer.texture.IconRegister;
  7. import net.minecraft.creativetab.CreativeTabs;
  8. import net.minecraft.entity.Entity;
  9. import net.minecraft.entity.player.EntityPlayer;
  10. import net.minecraft.item.Item;
  11. import net.minecraft.item.ItemStack;
  12. import net.minecraft.util.MovingObjectPosition;
  13. import net.minecraft.world.World;
  14. import net.minecraftforge.client.event.sound.PlaySoundEffectEvent;
  15. import net.minecraftforge.client.event.sound.PlaySoundEvent;
  16. import Seroemod.Lightsabers.BlueLightsaber;
  17. import Seroemod.SeroeMod;
  18. import Seroemod.SeroeModSound;
  19.  
  20. public class BlueLightsaberHilt extends Item
  21. {
  22.  
  23. public BlueLightsaberHilt(int par1) {
  24. super(par1);
  25. this.setMaxStackSize(1);
  26. this.setCreativeTab(CreativeTabs.tabCombat);
  27. this.setUnlocalizedName("hiltBlueLightsaber");
  28.  
  29. }
  30.  
  31. @Override
  32. public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
  33. {
  34. par2World.playSoundAtEntity(par3EntityPlayer, "seroemod:extend", 500.0F, 1.0F);
  35.  
  36. return ISblueLightsaber;
  37. }
  38.  
  39. @SideOnly(Side.CLIENT)
  40. public void registerIcons(IconRegister reg)
  41. {
  42. this.itemIcon = reg.registerIcon("seroemod:hilt_bluelightsaber");
  43. }
  44.  
  45. ItemStack ISblueLightsaber = new ItemStack(SeroeMod.blueLightsaber);
  46.  
  47.  
  48.  
  49. }
Advertisement
Add Comment
Please, Sign In to add comment