aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/common/items
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-09-15 15:50:54 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-09-15 15:50:54 +1000
commita3aa117da7b7daedff109f826ec1e95cafaaad03 (patch)
tree4c90ae522ad0c5f08b4761956e649c8bf8b9074c /src/Java/gtPlusPlus/xmod/gregtech/common/items
parent2def9acccdf30a88947943673fcd695f1e59cb77 (diff)
downloadGT5-Unofficial-a3aa117da7b7daedff109f826ec1e95cafaaad03.tar.gz
GT5-Unofficial-a3aa117da7b7daedff109f826ec1e95cafaaad03.tar.bz2
GT5-Unofficial-a3aa117da7b7daedff109f826ec1e95cafaaad03.zip
$ Fixed the Skookum Choocher, not it:
> Behaves like a wrench unless you hold shift > While shift is held, it prospects like a Hard Hammer. > It functions as a wrench when mining machines and a Hard Hammer when mining anything else. > There are over 100 types available from GT's materials. + Added in the FluidItemBlock.class
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common/items')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java45
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java61
2 files changed, 79 insertions, 27 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java
index b63ea674ad..55eb19f80f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java
@@ -4,37 +4,28 @@ import gregtech.api.GregTech_API;
import gregtech.api.enums.TC_Aspects;
import gregtech.api.enums.ToolDictNames;
import gregtech.api.items.GT_MetaGenerated_Tool;
-import gregtech.common.items.GT_MetaGenerated_Tool_01;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechToolDictNames;
import gtPlusPlus.xmod.gregtech.common.tools.TOOL_Gregtech_Choocher;
public class MetaGeneratedGregtechTools extends GT_MetaGenerated_Tool {
-
- public static final short TURBINE_SMALL = 10;
- public static final short TURBINE = 12;
- public static final short TURBINE_LARGE = 14;
- public static final short HUGE_ITEM = 16;
- public static final short TURBINE_BLADE = 18;
-
- public static final short HARDHAMMER = 20;
- public static final short SOFTHAMMER = 22;
- public static final short WRENCH = 24;
-
- public static GT_MetaGenerated_Tool_01 INSTANCE;
- public MetaGeneratedGregtechTools() {
- super("GT++_metatool");
- INSTANCE = GT_MetaGenerated_Tool_01.INSTANCE;
-
- GregTech_API.registerTool(addTool(7734, "Skookum Choocher", "Can Really Chooch. Does a Skookum job at Hammering and Wrenching stuff.", new TOOL_Gregtech_Choocher(), new Object[]{GregtechToolDictNames.craftingToolSkookumChoocher, ToolDictNames.craftingToolHardHammer, ToolDictNames.craftingToolWrench, 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.sWrenchList);
-
-
- //GregTech_API.registerTool(addTool(WRENCH, "Wrench", "Hold Leftclick to dismantle Machines", (Interface_ToolStats) 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(TURBINE_SMALL, "Small Turbine", "Turbine Rotors for your power station", new GT_Tool_Turbine_Small(), new Object[]{});
- //addTool(TURBINE, "Turbine", "Turbine Rotors for your power station", new GT_Tool_Turbine_Normal(), new Object[]{});
- //addTool(TURBINE_LARGE, "Large Turbine", "Turbine Rotors for your power station", new GT_Tool_Turbine_Large(), new Object[]{});
- //addTool(HUGE_ITEM, "Huge Item", "Item 4 for your power station", new TOOL_Gregtech_MaxEfficiencyMultiBlockItem(), new Object[]{});
+ public static final short SKOOKUM_CHOOCHER = 7734;
+ public static MetaGeneratedGregtechTools INSTANCE;
- }
+ public MetaGeneratedGregtechTools() {
+ super("++.metatool.01");
+ INSTANCE = this;
+ GregTech_API.registerTool(
+ addTool(
+ SKOOKUM_CHOOCHER, "Skookum Choocher",
+ "Can Really Chooch. Does a Skookum job at Hammering and Wrenching stuff.",
+ new TOOL_Gregtech_Choocher(),
+ new Object[]{GregtechToolDictNames.craftingToolSkookumChoocher,
+ ToolDictNames.craftingToolHardHammer,
+ ToolDictNames.craftingToolWrench,
+ 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.sWrenchList);
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java
new file mode 100644
index 0000000000..93bf8f4a65
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Choocher.java
@@ -0,0 +1,61 @@
+package gtPlusPlus.xmod.gregtech.common.items.behaviours;
+
+import gregtech.api.items.GT_MetaBase_Item;
+import gregtech.api.util.GT_LanguageManager;
+import gregtech.common.items.behaviors.Behaviour_None;
+import gregtech.common.items.behaviors.Behaviour_Prospecting;
+import gregtech.common.items.behaviors.Behaviour_Wrench;
+
+import java.util.List;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+
+public class Behaviour_Choocher
+ extends Behaviour_None {
+ private final Behaviour_Wrench wrench = new Behaviour_Wrench(150);
+ private final Behaviour_Prospecting prospecting = new Behaviour_Prospecting(1, 1250);
+ private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.choochering", "Wrench by default, Hold shift & Right click to prospect.");
+
+ public Behaviour_Choocher() {
+
+ }
+
+ @Override
+ public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
+ if (aWorld.isRemote) {
+ return false;
+ }
+ if (!aPlayer.isSneaking()){
+ //Utils.LOG_INFO("Using Choocher as a wrench.");
+ wrench.onItemUseFirst(aItem, aStack, aPlayer, aWorld, aSide, aSide, aSide, aSide, hitZ, hitZ, hitZ);
+ return false;
+ }
+ //Utils.LOG_INFO("Using Choocher as a hard hammer.");
+ prospecting.onItemUseFirst(aItem, aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ);
+
+ return false;
+ }
+
+ /*@Override
+ public boolean onItemUse(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
+ if (aWorld.isRemote) {
+ return false;
+ }
+ if (!aPlayer.isSneaking()){
+ Utils.LOG_INFO("Using Choocher as a wrench.");
+ wrench.onItemUseFirst(aItem, aStack, aPlayer, aWorld, aSide, aSide, aSide, aSide, hitZ, hitZ, hitZ);
+ return false;
+ }
+ Utils.LOG_INFO("Using Choocher as a hard hammer.");
+ prospecting.onItemUseFirst(aItem, aStack, aPlayer, aWorld, aX, aY, aZ, aSide, hitX, hitY, hitZ);
+
+ return false;
+ }*/
+
+ public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) {
+ aList.add(this.mTooltip);
+ return aList;
+ }
+}