Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Seroemod.Lightsabers;
- import Seroemod.SeroeMod;
- import cpw.mods.fml.relauncher.Side;
- import cpw.mods.fml.relauncher.SideOnly;
- import net.minecraft.client.renderer.texture.IconRegister;
- import net.minecraft.creativetab.CreativeTabs;
- import net.minecraft.entity.EntityLivingBase;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.item.EnumAction;
- import net.minecraft.item.EnumToolMaterial;
- import net.minecraft.item.Item;
- import net.minecraft.item.ItemStack;
- import net.minecraft.item.ItemSword;
- import net.minecraft.item.ItemTool;
- import net.minecraft.world.World;
- public class BlueLightsaber extends Item {
- public BlueLightsaber(int par1, EnumToolMaterial par2EnumToolMaterial) {
- super(par1);
- this.setUnlocalizedName("blue_lightsaber");
- this.setCreativeTab(CreativeTabs.tabCombat);
- this.canRepair = true;
- }
- @Override
- public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
- {
- par3World.playSoundAtEntity(par2EntityPlayer, "seroemod:swing", 500.0F, 1.0F);
- return true;
- }
- @SideOnly(Side.CLIENT)
- public void registerIcons(IconRegister reg)
- {
- this.itemIcon = reg.registerIcon("seroemod:blue_lightsaber");
- }
- ItemStack hilt = new ItemStack(SeroeMod.hiltBlueLightsaber);
- public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
- {
- par2World.playSoundAtEntity(par3EntityPlayer, "seroemod:return", 500.0F, 1.0F);
- return hilt;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment