From 26e60b70204d0c013aaac1e16868d92487cbda28 Mon Sep 17 00:00:00 2001 From: Draknyte1 Date: Sun, 10 Apr 2016 16:43:50 +1000 Subject: Changed a few things to make the Soft Hammer more noticeable from the Hard Hammer. Now it's a soft Mallet with an inverted icon, as requested by @DarknessShadow - https://github.com/Blood-Asp/GT5-Unofficial/issues/407 # Conflicts: # src/main/java/gregtech/api/enums/OrePrefixes.java # src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java # src/main/java/gregtech/loaders/oreprocessing/ProcessingPipeLarge.java # src/main/java/gregtech/loaders/oreprocessing/ProcessingPipeMedium.java # src/main/java/gregtech/loaders/oreprocessing/ProcessingPipeSmall.java --- .../gregtech/common/tools/GT_Tool_SoftHammer.java | 218 ++++++++++----------- 1 file changed, 109 insertions(+), 109 deletions(-) (limited to 'src/main/java/gregtech/common/tools') diff --git a/src/main/java/gregtech/common/tools/GT_Tool_SoftHammer.java b/src/main/java/gregtech/common/tools/GT_Tool_SoftHammer.java index 1f1624ea68..0b77a45ecd 100644 --- a/src/main/java/gregtech/common/tools/GT_Tool_SoftHammer.java +++ b/src/main/java/gregtech/common/tools/GT_Tool_SoftHammer.java @@ -1,109 +1,109 @@ -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 - 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); - } -} +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 + 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.toolHeadMallet.mTextureIndex] : GT_MetaGenerated_Tool.getSecondaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.handleMallet.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); + } +} -- cgit