2015-06-23 22:29:05 +00:00
package gregtech.common.tools ;
import gregtech.api.GregTech_API ;
import gregtech.api.interfaces.IIconContainer ;
import gregtech.api.items.GT_MetaGenerated_Tool ;
import gregtech.common.items.behaviors.Behaviour_SoftHammer ;
import net.minecraft.block.Block ;
import net.minecraft.entity.Entity ;
import net.minecraft.entity.EntityLivingBase ;
import net.minecraft.item.ItemStack ;
import net.minecraft.util.ChatComponentText ;
import net.minecraft.util.EnumChatFormatting ;
import net.minecraft.util.IChatComponent ;
public class GT_Tool_SoftHammer
2015-10-22 02:06:25 +00:00
extends GT_Tool {
public int getToolDamagePerBlockBreak ( ) {
return 50 ;
}
public int getToolDamagePerDropConversion ( ) {
return 100 ;
}
public int getToolDamagePerContainerCraft ( ) {
return 800 ;
}
public int getToolDamagePerEntityAttack ( ) {
return 200 ;
}
public int getBaseQuality ( ) {
return 0 ;
}
public float getBaseDamage ( ) {
return 3 . 0F ;
}
public int getHurtResistanceTime ( int aOriginalHurtResistance , Entity aEntity ) {
return aOriginalHurtResistance * 2 ;
}
public float getSpeedMultiplier ( ) {
return 0 . 1F ;
}
public float getMaxDurabilityMultiplier ( ) {
return 8 . 0F ;
}
public String getCraftingSound ( ) {
return ( String ) GregTech_API . sSoundList . get ( Integer . valueOf ( 101 ) ) ;
}
public String getEntityHitSound ( ) {
return ( String ) GregTech_API . sSoundList . get ( Integer . valueOf ( 101 ) ) ;
}
public String getBreakingSound ( ) {
return ( String ) GregTech_API . sSoundList . get ( Integer . valueOf ( 0 ) ) ;
}
public String getMiningSound ( ) {
return ( String ) GregTech_API . sSoundList . get ( Integer . valueOf ( 101 ) ) ;
}
public boolean canBlock ( ) {
return true ;
}
public boolean isCrowbar ( ) {
return false ;
}
public boolean isMiningTool ( ) {
return false ;
}
public boolean isWeapon ( ) {
return true ;
}
public boolean isMinableBlock ( Block aBlock , byte aMetaData ) {
String tTool = aBlock . getHarvestTool ( aMetaData ) ;
return ( tTool ! = null ) & & ( tTool . equals ( " softhammer " ) ) ;
}
public ItemStack getBrokenItem ( ItemStack aStack ) {
return null ;
}
public IIconContainer getIcon ( boolean aIsToolHead , ItemStack aStack ) {
return aIsToolHead ? GT_MetaGenerated_Tool . getPrimaryMaterial ( aStack ) . mIconSet . mTextures [ gregtech . api . enums . OrePrefixes . toolHeadHammer . mTextureIndex ] : GT_MetaGenerated_Tool . getSecondaryMaterial ( aStack ) . mIconSet . mTextures [ gregtech . api . enums . OrePrefixes . stick . mTextureIndex ] ;
}
public short [ ] getRGBa ( boolean aIsToolHead , ItemStack aStack ) {
return aIsToolHead ? GT_MetaGenerated_Tool . getPrimaryMaterial ( aStack ) . mRGBa : GT_MetaGenerated_Tool . getSecondaryMaterial ( aStack ) . mRGBa ;
}
public void onStatsAddedToTool ( GT_MetaGenerated_Tool aItem , int aID ) {
aItem . addItemBehavior ( aID , new Behaviour_SoftHammer ( 100 ) ) ;
}
public IChatComponent getDeathMessage ( EntityLivingBase aPlayer , EntityLivingBase aEntity ) {
return new ChatComponentText ( EnumChatFormatting . RED + aEntity . getCommandSenderName ( ) + EnumChatFormatting . WHITE + " was hammered to death by " + EnumChatFormatting . GREEN + aPlayer . getCommandSenderName ( ) + EnumChatFormatting . WHITE ) ;
}
2015-06-23 22:29:05 +00:00
}