Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package swords.weapon;
- import net.minecraft.client.renderer.texture.IconRegister;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.entity.projectile.EntitySmallFireball;
- import net.minecraft.item.EnumToolMaterial;
- import net.minecraft.item.ItemStack;
- import net.minecraft.item.ItemSword;
- import net.minecraft.world.World;
- import swords.entity.EntityFlames;
- import swords.main.SwordMain;
- public class ItemflameStaff extends ItemSword
- {
- public ItemflameStaff(int par1, EnumToolMaterial par2EnumToolMaterial)
- {
- super(par1, par2EnumToolMaterial);
- this.setCreativeTab(SwordMain.SwordTab);
- }
- public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
- {
- if (!par3EntityPlayer.capabilities.isCreativeMode)
- {
- --par1ItemStack.stackSize;
- }
- par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
- if (!par2World.isRemote)
- {
- par2World.spawnEntityInWorld(new EntityFlames(par2World, 0.0, 0.0, 0.0));
- }
- return par1ItemStack;
- }
- public void registerIcons(IconRegister iconRegister)
- {
- itemIcon = iconRegister.registerIcon("swordsmod:staff_Flames");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement