Guest User

BlueLightsaber

a guest
Oct 19th, 2013
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1.  
  2. package Seroemod.Lightsabers;
  3.  
  4.  
  5. import Seroemod.SeroeMod;
  6. import cpw.mods.fml.relauncher.Side;
  7. import cpw.mods.fml.relauncher.SideOnly;
  8. import net.minecraft.client.renderer.texture.IconRegister;
  9. import net.minecraft.creativetab.CreativeTabs;
  10. import net.minecraft.entity.EntityLivingBase;
  11. import net.minecraft.entity.player.EntityPlayer;
  12. import net.minecraft.item.EnumAction;
  13. import net.minecraft.item.EnumToolMaterial;
  14. import net.minecraft.item.Item;
  15. import net.minecraft.item.ItemStack;
  16. import net.minecraft.item.ItemSword;
  17. import net.minecraft.item.ItemTool;
  18. import net.minecraft.world.World;
  19.  
  20. public class BlueLightsaber extends Item {
  21.  
  22.  
  23. public BlueLightsaber(int par1, EnumToolMaterial par2EnumToolMaterial) {
  24. super(par1);
  25. this.setUnlocalizedName("blue_lightsaber");
  26. this.setCreativeTab(CreativeTabs.tabCombat);
  27. this.canRepair = true;
  28. }
  29.  
  30. @Override
  31. public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
  32. {
  33. par3World.playSoundAtEntity(par2EntityPlayer, "seroemod:swing", 500.0F, 1.0F);
  34. return true;
  35. }
  36.  
  37.  
  38. @SideOnly(Side.CLIENT)
  39. public void registerIcons(IconRegister reg)
  40. {
  41. this.itemIcon = reg.registerIcon("seroemod:blue_lightsaber");
  42. }
  43.  
  44.  
  45.  
  46.  
  47.  
  48. ItemStack hilt = new ItemStack(SeroeMod.hiltBlueLightsaber);
  49.  
  50. public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
  51. {
  52. par2World.playSoundAtEntity(par3EntityPlayer, "seroemod:return", 500.0F, 1.0F);
  53.  
  54. return hilt;
  55. }
  56.  
  57.  
  58.  
  59.  
  60.  
  61. }
Advertisement
Add Comment
Please, Sign In to add comment