From 2214833189caf3eb262f049746be4987b97aa6a7 Mon Sep 17 00:00:00 2001 From: Alkalus Date: Fri, 15 Dec 2017 18:15:08 +1000 Subject: More fixes pre-gtnh update (#168) $ Tree Farmer Fix (a) $ Multitank Fix. ^ Version Bump. * + Added Chainsaw support to treefarm. + Added check for creative tools to tree farm for creative testing. --- src/Java/gtPlusPlus/core/slots/SlotBuzzSaw.java | 33 ++++++++++++++++--------- 1 file changed, 22 insertions(+), 11 deletions(-) (limited to 'src/Java/gtPlusPlus/core/slots') diff --git a/src/Java/gtPlusPlus/core/slots/SlotBuzzSaw.java b/src/Java/gtPlusPlus/core/slots/SlotBuzzSaw.java index 3578eaedf1..af7c7c9c59 100644 --- a/src/Java/gtPlusPlus/core/slots/SlotBuzzSaw.java +++ b/src/Java/gtPlusPlus/core/slots/SlotBuzzSaw.java @@ -31,25 +31,36 @@ public class SlotBuzzSaw extends Slot { if (OrePrefixes.craftingTool.contains(itemstack)) { if (itemstack.getDisplayName().toLowerCase().contains("saw") || itemstack.getDisplayName().toLowerCase().contains("gt.metatool.01.10") + || itemstack.getDisplayName().toLowerCase().contains("gt.metatool.01.110") + || itemstack.getDisplayName().toLowerCase().contains("gt.metatool.01.112") + || itemstack.getDisplayName().toLowerCase().contains("gt.metatool.01.114") || itemstack.getDisplayName().toLowerCase().contains("gt.metatool.01.140")) { if (itemstack.getItemDamage() == 10) { isValid = true; this.currentTool = SAWTOOL.SAW; } - if (itemstack.getItemDamage() == 140) { + else if (itemstack.getItemDamage() == 110) { + isValid = true; + this.currentTool = SAWTOOL.CHAINSAW; + } + else if (itemstack.getItemDamage() == 112) { + isValid = true; + this.currentTool = SAWTOOL.CHAINSAW; + } + else if (itemstack.getItemDamage() == 114) { + isValid = true; + this.currentTool = SAWTOOL.CHAINSAW; + } + else if (itemstack.getItemDamage() == 140) { isValid = true; this.currentTool = SAWTOOL.BUZZSAW; } + return isValid; } - } else { - this.currentTool = SAWTOOL.NONE; - } - } else { - this.currentTool = SAWTOOL.NONE; - } - } else { - this.currentTool = SAWTOOL.NONE; - } + } + } + } + this.currentTool = SAWTOOL.NONE; return isValid; } @@ -59,7 +70,7 @@ public class SlotBuzzSaw extends Slot { } public enum SAWTOOL { - NONE, SAW, BUZZSAW + NONE, SAW, BUZZSAW, CHAINSAW } } -- cgit