diff options
author | Draknyte1 <Draknyte1@hotmail.com> | 2016-04-10 16:43:50 +1000 |
---|---|---|
committer | Draknyte1 <Draknyte1@hotmail.com> | 2016-04-10 18:36:52 +1000 |
commit | 26e60b70204d0c013aaac1e16868d92487cbda28 (patch) | |
tree | c8d7219caa9e1db560c37642739ff3edd0c4e417 /src/main/java/gregtech | |
parent | a04b7f515957e6468963e40ce08d252ea49305d1 (diff) | |
download | GT5-Unofficial-26e60b70204d0c013aaac1e16868d92487cbda28.tar.gz GT5-Unofficial-26e60b70204d0c013aaac1e16868d92487cbda28.tar.bz2 GT5-Unofficial-26e60b70204d0c013aaac1e16868d92487cbda28.zip |
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
Diffstat (limited to 'src/main/java/gregtech')
9 files changed, 180 insertions, 139 deletions
diff --git a/src/main/java/gregtech/api/enums/OrePrefixes.java b/src/main/java/gregtech/api/enums/OrePrefixes.java index f5c53fc789..19786c732b 100644 --- a/src/main/java/gregtech/api/enums/OrePrefixes.java +++ b/src/main/java/gregtech/api/enums/OrePrefixes.java @@ -1,5 +1,8 @@ package gregtech.api.enums; +import static gregtech.api.enums.GT_Values.B; +import static gregtech.api.enums.GT_Values.D2; +import static gregtech.api.enums.GT_Values.M; import gregtech.api.enums.TC_Aspects.TC_AspectStack; import gregtech.api.interfaces.ICondition; import gregtech.api.interfaces.IOreRecipeRegistrator; @@ -8,14 +11,13 @@ import gregtech.api.objects.ItemData; import gregtech.api.objects.MaterialStack; import gregtech.api.util.GT_Log; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; import java.util.List; -import static gregtech.api.enums.GT_Values.*; +import net.minecraft.item.ItemStack; public enum OrePrefixes { @Deprecated pulp("Pulps", "", "", false, false, false, false, false, false, false, false, false, false, B[0] | B[1] | B[2] | B[3], -1, 64, -1), @@ -79,13 +81,12 @@ public enum OrePrefixes { stick("Sticks/Rods", "", " Rod", true, true, false, false, false, false, true, true, false, false, B[1] | B[2], M / 2, 64, 23), // Stick made of half an Ingot. Introduced by Eloraam round("Rounds", "", " Round", true, true, false, false, false, false, true, true, false, false, B[1], M / 9, 64, 25), // consisting out of one Nugget. bolt("Bolts", "", " Bolt", true, true, false, false, false, false, true, true, false, false, B[1] | B[2], M / 8, 64, 26), // consisting out of 1/8 Ingot or 1/4 Stick. - comb("Combs", "", " Comb", false, false, false, false, false, false, false, true, false, false, B[1] | B[2], M, 64, 101), // contain dusts screw("Screws", "", " Screw", true, true, false, false, false, false, true, true, false, false, B[1] | B[2], M / 9, 64, 27), // consisting out of a Bolt. ring("Rings", "", " Ring", true, true, false, false, false, false, true, true, false, false, B[1], M / 4, 64, 28), // consisting out of 1/2 Stick. springSmall("Small Springs", "Small ", " Spring", true, true, false, false, false, false, true, true, false, false, B[1], M / 4, 64, 55), // consisting out of 1 Fine Wire. spring("Springs", "", " Spring", true, true, false, false, false, false, true, true, false, false, B[1], M * 1, 64, 56), // consisting out of 2 Sticks. wireFine("Fine Wires", "Fine ", " Wire", true, true, false, false, false, false, true, true, false, false, B[1], M / 8, 64, 51), // consisting out of 1/8 Ingot or 1/4 Wire. - rotor("Rotors", "", " Rotor", true, true, false, false, false, false, true, true, false, false, B[7], M * 4 + M / 4, 16, 53), // consisting out of 4 Plates, 1 Ring and 1 Screw. + rotor("Rotors", "", " Rotor", true, true, false, false, false, false, true, true, false, false, B[7], M * 4 + M / 4 + M / 9, 16, 53), // consisting out of 4 Plates, 1 Ring and 1 Screw. gearGtSmall("Small Gears", "Small ", " Gear", true, true, false, false, false, false, true, true, false, false, B[7], M * 1, 64, 52), gearGt("Gears", "", " Gear", true, true, false, false, false, false, true, true, false, false, B[7], M * 4, 16, 63), // Introduced by me because BuildCraft has ruined the gear Prefix... lens("Lenses", "", " Lens", true, true, false, false, false, false, true, true, false, false, B[2], (M * 3) / 4, 64, 24), // 3/4 of a Plate or Gem used to shape a Lense. Normally only used on Transparent Materials. @@ -307,9 +308,12 @@ public enum OrePrefixes { ganys("Ganys Stuff", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), liquid("Liquids", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), bars("Bars", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), - bar("Bars", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1); - - public static volatile int VERSION = 509; + bar("Bars", "", "", false, false, false, false, false, false, false, false, false, false, 0, -1, 64, -1), + + toolHeadMallet("Mallet Heads", "", " Mallet Head", true, true, false, false, false, false, true, true, false, false, B[6], M * 6, 16, 127), // consisting out of 6 Ingots. + handleMallet("Mallet Handle", "", " Handle", true, true, false, false, false, false, true, true, false, false, B[1] | B[2], M / 2, 64, 126); // Stick made of half an Ingot. Introduced by Eloraam + + public static volatile int VERSION = 508; static { pulp.mPrefixInto = dust; @@ -490,11 +494,11 @@ public enum OrePrefixes { pipeRestrictiveMedium.mSecondaryMaterial = new MaterialStack(Materials.Steel, ring.mMaterialAmount * 3); pipeRestrictiveLarge.mSecondaryMaterial = new MaterialStack(Materials.Steel, ring.mMaterialAmount * 4); pipeRestrictiveHuge.mSecondaryMaterial = new MaterialStack(Materials.Steel, ring.mMaterialAmount * 5); - cableGt12.mSecondaryMaterial = new MaterialStack(Materials.Ash, dustSmall.mMaterialAmount * 4); - cableGt08.mSecondaryMaterial = new MaterialStack(Materials.Ash, dustSmall.mMaterialAmount * 3); - cableGt04.mSecondaryMaterial = new MaterialStack(Materials.Ash, dustSmall.mMaterialAmount * 2); - cableGt02.mSecondaryMaterial = new MaterialStack(Materials.Ash, dustSmall.mMaterialAmount); - cableGt01.mSecondaryMaterial = new MaterialStack(Materials.Ash, dustSmall.mMaterialAmount); + cableGt12.mSecondaryMaterial = new MaterialStack(Materials.Rubber, plate.mMaterialAmount * 4); + cableGt08.mSecondaryMaterial = new MaterialStack(Materials.Rubber, plate.mMaterialAmount * 3); + cableGt04.mSecondaryMaterial = new MaterialStack(Materials.Rubber, plate.mMaterialAmount * 2); + cableGt02.mSecondaryMaterial = new MaterialStack(Materials.Rubber, plate.mMaterialAmount); + cableGt01.mSecondaryMaterial = new MaterialStack(Materials.Rubber, plate.mMaterialAmount); bucket.mSecondaryMaterial = new MaterialStack(Materials.Iron, ingot.mMaterialAmount * 3); cell.mSecondaryMaterial = new MaterialStack(Materials.Tin, plate.mMaterialAmount * 2); cellPlasma.mSecondaryMaterial = new MaterialStack(Materials.Tin, plate.mMaterialAmount * 2); diff --git a/src/main/java/gregtech/api/enums/TextureSet.java b/src/main/java/gregtech/api/enums/TextureSet.java index 8448b0262a..4cedf08ec0 100644 --- a/src/main/java/gregtech/api/enums/TextureSet.java +++ b/src/main/java/gregtech/api/enums/TextureSet.java @@ -143,7 +143,7 @@ public class TextureSet { mTextures[123] = new Textures.ItemIcons.CustomIcon("materialicons/" + mSetName + "/void"); mTextures[124] = new Textures.ItemIcons.CustomIcon("materialicons/" + mSetName + "/void"); mTextures[125] = new Textures.ItemIcons.CustomIcon("materialicons/" + mSetName + "/void"); - mTextures[126] = new Textures.ItemIcons.CustomIcon("materialicons/" + mSetName + "/void"); - mTextures[127] = new Textures.ItemIcons.CustomIcon("materialicons/" + mSetName + "/void"); + mTextures[126] = new Textures.ItemIcons.CustomIcon("materialicons/" + mSetName + "/handleMallet"); + mTextures[127] = new Textures.ItemIcons.CustomIcon("materialicons/" + mSetName + "/toolHeadMallet"); } }
\ No newline at end of file diff --git a/src/main/java/gregtech/api/enums/ToolDictNames.java b/src/main/java/gregtech/api/enums/ToolDictNames.java index d81bbeae4e..e74cb90b36 100644 --- a/src/main/java/gregtech/api/enums/ToolDictNames.java +++ b/src/main/java/gregtech/api/enums/ToolDictNames.java @@ -22,7 +22,7 @@ public enum ToolDictNames { craftingToolWireCutter, craftingToolBranchCutter, craftingToolHardHammer, - craftingToolSoftHammer, + craftingToolSoftMallet, craftingToolJackHammer, craftingToolMiningDrill, craftingToolForgeHammer, diff --git a/src/main/java/gregtech/api/util/GT_ModHandler.java b/src/main/java/gregtech/api/util/GT_ModHandler.java index 83fe3ff509..9484b55108 100644 --- a/src/main/java/gregtech/api/util/GT_ModHandler.java +++ b/src/main/java/gregtech/api/util/GT_ModHandler.java @@ -726,7 +726,7 @@ public class GT_ModHandler { * 'k' ToolDictNames.craftingToolKnive * 'm' ToolDictNames.craftingToolMortar, * 'p' ToolDictNames.craftingToolDrawplate, - * 'r' ToolDictNames.craftingToolSoftHammer, + * 'r' ToolDictNames.craftingToolSoftMallet, * 's' ToolDictNames.craftingToolSaw, * 'w' ToolDictNames.craftingToolWrench, * 'x' ToolDictNames.craftingToolWireCutter, @@ -754,7 +754,7 @@ public class GT_ModHandler { * 'k' ToolDictNames.craftingToolKnive * 'm' ToolDictNames.craftingToolMortar, * 'p' ToolDictNames.craftingToolDrawplate, - * 'r' ToolDictNames.craftingToolSoftHammer, + * 'r' ToolDictNames.craftingToolSoftMallet, * 's' ToolDictNames.craftingToolSaw, * 'w' ToolDictNames.craftingToolWrench, * 'x' ToolDictNames.craftingToolWireCutter, @@ -842,7 +842,7 @@ public class GT_ModHandler { break; case 'r': tRecipeList.add(c); - tRecipeList.add(ToolDictNames.craftingToolSoftHammer.name()); + tRecipeList.add(ToolDictNames.craftingToolSoftMallet.name()); break; case 's': tRecipeList.add(c); diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java index 6e98629fdc..34a9cc0345 100644 --- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java +++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java @@ -1,11 +1,54 @@ package gregtech.common.items;
import gregtech.api.GregTech_API;
-import gregtech.api.enums.*;
+import gregtech.api.enums.ConfigCategories;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.TC_Aspects;
+import gregtech.api.enums.ToolDictNames;
import gregtech.api.items.GT_MetaGenerated_Tool;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.common.tools.*;
+import gregtech.common.tools.GT_Tool_Axe;
+import gregtech.common.tools.GT_Tool_BranchCutter;
+import gregtech.common.tools.GT_Tool_ButcheryKnife;
+import gregtech.common.tools.GT_Tool_BuzzSaw;
+import gregtech.common.tools.GT_Tool_Chainsaw_HV;
+import gregtech.common.tools.GT_Tool_Chainsaw_LV;
+import gregtech.common.tools.GT_Tool_Chainsaw_MV;
+import gregtech.common.tools.GT_Tool_Crowbar;
+import gregtech.common.tools.GT_Tool_Drill_HV;
+import gregtech.common.tools.GT_Tool_Drill_LV;
+import gregtech.common.tools.GT_Tool_Drill_MV;
+import gregtech.common.tools.GT_Tool_File;
+import gregtech.common.tools.GT_Tool_HardHammer;
+import gregtech.common.tools.GT_Tool_Hoe;
+import gregtech.common.tools.GT_Tool_JackHammer;
+import gregtech.common.tools.GT_Tool_Knife;
+import gregtech.common.tools.GT_Tool_Mortar;
+import gregtech.common.tools.GT_Tool_Pickaxe;
+import gregtech.common.tools.GT_Tool_Plow;
+import gregtech.common.tools.GT_Tool_Plunger;
+import gregtech.common.tools.GT_Tool_RollingPin;
+import gregtech.common.tools.GT_Tool_Saw;
+import gregtech.common.tools.GT_Tool_Scoop;
+import gregtech.common.tools.GT_Tool_Screwdriver;
+import gregtech.common.tools.GT_Tool_Screwdriver_LV;
+import gregtech.common.tools.GT_Tool_Sense;
+import gregtech.common.tools.GT_Tool_Shovel;
+import gregtech.common.tools.GT_Tool_SoftHammer;
+import gregtech.common.tools.GT_Tool_Soldering_Iron;
+import gregtech.common.tools.GT_Tool_Sword;
+import gregtech.common.tools.GT_Tool_Turbine_Huge;
+import gregtech.common.tools.GT_Tool_Turbine_Large;
+import gregtech.common.tools.GT_Tool_Turbine_Normal;
+import gregtech.common.tools.GT_Tool_Turbine_Small;
+import gregtech.common.tools.GT_Tool_UniversalSpade;
+import gregtech.common.tools.GT_Tool_WireCutter;
+import gregtech.common.tools.GT_Tool_Wrench;
+import gregtech.common.tools.GT_Tool_Wrench_HV;
+import gregtech.common.tools.GT_Tool_Wrench_LV;
+import gregtech.common.tools.GT_Tool_Wrench_MV;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
@@ -66,7 +109,7 @@ public class GT_MetaGenerated_Tool_01 addTool(8, "Hoe", "", new GT_Tool_Hoe(), new Object[]{ToolDictNames.craftingToolHoe, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 4L)});
addTool(10, "Saw", "Can also harvest Ice", new GT_Tool_Saw(), new Object[]{ToolDictNames.craftingToolSaw, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ARBOR, 2L)});
GregTech_API.registerTool(addTool(12, "Hammer", "Crushes Ores instead of harvesting them", new GT_Tool_HardHammer(), new Object[]{ToolDictNames.craftingToolHardHammer, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)}), GregTech_API.sHardHammerList);
- GregTech_API.registerTool(addTool(14, "Soft Hammer", "", new GT_Tool_SoftHammer(), new Object[]{ToolDictNames.craftingToolSoftHammer, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.LIMUS, 4L)}), GregTech_API.sSoftHammerList);
+ GregTech_API.registerTool(addTool(14, "Soft Mallet", "", new GT_Tool_SoftHammer(), new Object[]{ToolDictNames.craftingToolSoftMallet, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.LIMUS, 4L)}), GregTech_API.sSoftHammerList);
GregTech_API.registerTool(addTool(WRENCH, "Wrench", "Hold Leftclick to dismantle Machines", new GT_Tool_Wrench(), new Object[]{ToolDictNames.craftingToolWrench, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)}), GregTech_API.sWrenchList);
addTool(18, "File", "", new GT_Tool_File(), new Object[]{ToolDictNames.craftingToolFile, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)});
GregTech_API.registerTool(addTool(20, "Crowbar", "Dismounts Covers and Rotates Rails", new GT_Tool_Crowbar(), new Object[]{ToolDictNames.craftingToolCrowbar, new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.TELUM, 2L)}), GregTech_API.sCrowbarList);
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); + } +} diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipeLarge.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipeLarge.java index 8f55c61215..7fc57fbb85 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipeLarge.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipeLarge.java @@ -15,9 +15,7 @@ public class ProcessingPipeLarge implements gregtech.api.interfaces.IOreRecipeRe public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if ((!aMaterial.contains(SubTag.NO_WORKING)) && ((aMaterial.contains(SubTag.WOOD)) || (!aMaterial.contains(SubTag.NO_SMASHING)))) { - if (!(aMaterial == Materials.Redstone || aMaterial == Materials.Glowstone)) { - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PHP", "P P", "PWP", Character.valueOf('P'), aMaterial == Materials.Wood ? OrePrefixes.plank.get(aMaterial) : OrePrefixes.plate.get(aMaterial), Character.valueOf('H'), aMaterial.contains(SubTag.WOOD) ? ToolDictNames.craftingToolSoftHammer : ToolDictNames.craftingToolHardHammer, Character.valueOf('W'), aMaterial.contains(SubTag.WOOD) ? ToolDictNames.craftingToolSaw : ToolDictNames.craftingToolWrench}); - } + GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PHP", "P P", "PWP", Character.valueOf('P'), aMaterial == Materials.Wood ? OrePrefixes.plank.get(aMaterial) : OrePrefixes.plate.get(aMaterial), Character.valueOf('H'), aMaterial.contains(SubTag.WOOD) ? ToolDictNames.craftingToolSoftMallet : ToolDictNames.craftingToolHardHammer, Character.valueOf('W'), aMaterial.contains(SubTag.WOOD) ? ToolDictNames.craftingToolSaw : ToolDictNames.craftingToolWrench}); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipeMedium.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipeMedium.java index d889e8de73..299ba5302e 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipeMedium.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipeMedium.java @@ -15,9 +15,7 @@ public class ProcessingPipeMedium implements gregtech.api.interfaces.IOreRecipeR public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if ((!aMaterial.contains(SubTag.NO_WORKING)) && ((aMaterial.contains(SubTag.WOOD)) || (!aMaterial.contains(SubTag.NO_SMASHING)))) { - if (!(aMaterial == Materials.Redstone || aMaterial == Materials.Glowstone)) { - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PPP", "W H", "PPP", Character.valueOf('P'), aMaterial == Materials.Wood ? OrePrefixes.plank.get(aMaterial) : OrePrefixes.plate.get(aMaterial), Character.valueOf('H'), aMaterial.contains(SubTag.WOOD) ? ToolDictNames.craftingToolSoftHammer : ToolDictNames.craftingToolHardHammer, Character.valueOf('W'), aMaterial.contains(SubTag.WOOD) ? ToolDictNames.craftingToolSaw : ToolDictNames.craftingToolWrench}); - } + GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PPP", "W H", "PPP", Character.valueOf('P'), aMaterial == Materials.Wood ? OrePrefixes.plank.get(aMaterial) : OrePrefixes.plate.get(aMaterial), Character.valueOf('H'), aMaterial.contains(SubTag.WOOD) ? ToolDictNames.craftingToolSoftMallet : ToolDictNames.craftingToolHardHammer, Character.valueOf('W'), aMaterial.contains(SubTag.WOOD) ? ToolDictNames.craftingToolSaw : ToolDictNames.craftingToolWrench}); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipeSmall.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipeSmall.java index f60e99e2c8..239b51b8b8 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipeSmall.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPipeSmall.java @@ -15,9 +15,7 @@ public class ProcessingPipeSmall implements gregtech.api.interfaces.IOreRecipeRe public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if ((!aMaterial.contains(SubTag.NO_WORKING)) && ((aMaterial.contains(SubTag.WOOD)) || (!aMaterial.contains(SubTag.NO_SMASHING)))) { - if (!(aMaterial == Materials.Redstone || aMaterial == Materials.Glowstone)) { - GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(6L, new Object[]{aStack}), GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PWP", "P P", "PHP", Character.valueOf('P'), aMaterial == Materials.Wood ? OrePrefixes.plank.get(aMaterial) : OrePrefixes.plate.get(aMaterial), Character.valueOf('H'), aMaterial.contains(SubTag.WOOD) ? ToolDictNames.craftingToolSoftHammer : ToolDictNames.craftingToolHardHammer, Character.valueOf('W'), aMaterial.contains(SubTag.WOOD) ? ToolDictNames.craftingToolSaw : ToolDictNames.craftingToolWrench}); - } + GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(6L, new Object[]{aStack}), GT_ModHandler.RecipeBits.MIRRORED | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PWP", "P P", "PHP", Character.valueOf('P'), aMaterial == Materials.Wood ? OrePrefixes.plank.get(aMaterial) : OrePrefixes.plate.get(aMaterial), Character.valueOf('H'), aMaterial.contains(SubTag.WOOD) ? ToolDictNames.craftingToolSoftMallet : ToolDictNames.craftingToolHardHammer, Character.valueOf('W'), aMaterial.contains(SubTag.WOOD) ? ToolDictNames.craftingToolSaw : ToolDictNames.craftingToolWrench}); } } } |