Bound Shears

This commit is contained in:
Jeremy Diamond committed 2014-05-13 03:05:05 -07:00
1 parent 29230129a0
commit d965a7ac6a
2 files changed
+95

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 B

@@ -0,0 +1,95 @@
package com.spiteful.forbidden.items;
import com.spiteful.forbidden.Forbidden;
import com.spiteful.forbidden.Config;
import com.google.common.collect.Multimap;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
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.util.Icon;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
public class ItemBoundShears extends ItemSword implements IBindable {
public Icon icon;
public ItemBoundShears(int id, EnumToolMaterial mat){
super(id, mat);
this.setCreativeTab(Forbidden.tab);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister ir)
{
this.icon = ir.registerIcon("forbidden:bound_shears");
}
@Override
@SideOnly(Side.CLIENT)
public Icon getIconFromDamage(int par1)
{
return this.icon;
}
@Override
/**
* Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
* sword
*/
public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block)
{
return par2Block.blockID != Block.web.blockID && par2Block.blockID != Block.leaves.blockID ? (par2Block.blockID == Block.cloth.blockID ? 5.0F : super.getStrVsBlock(par1ItemStack, par2Block)) : 15.0F;
}
@Override
/**
* returns the action that specifies what animation to play when the items is being used
*/
public EnumAction getItemUseAction(ItemStack par1ItemStack)
{
return EnumAction.none;
}
@Override
/**
* How long it takes to use or consume an item
*/
public int getMaxItemUseDuration(ItemStack par1ItemStack)
{
return 0;
}
@Override
/**
* Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
*/
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
return par1ItemStack;
}
@Override
/**
* Returns if the item (tool) can harvest results from the block type.
*/
public boolean canHarvestBlock(Block par1Block)
{
return par1Block.blockID == Block.web.blockID || par1Block.blockID == Block.redstoneWire.blockID || par1Block.blockID == Block.tripWire.blockID;
}
}