aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/slots
diff options
context:
space:
mode:
authorAlkalus <draknyte1@hotmail.com>2016-10-03 23:33:28 +1000
committerGitHub <noreply@github.com>2016-10-03 23:33:28 +1000
commite3f4a410ef0867359cab3ade72a20c3679aaad06 (patch)
tree2f008c251c080a216b0fcf3d03667f7233edceca /src/Java/gtPlusPlus/core/slots
parent10aee9adf7a1ab793a05fd9327cec6fcc1b267d2 (diff)
parentbdb6fc4a5410d68cf517dbe90fa49cec45bbda5a (diff)
downloadGT5-Unofficial-e3f4a410ef0867359cab3ade72a20c3679aaad06.tar.gz
GT5-Unofficial-e3f4a410ef0867359cab3ade72a20c3679aaad06.tar.bz2
GT5-Unofficial-e3f4a410ef0867359cab3ade72a20c3679aaad06.zip
Merge pull request #19 from draknyte1/DesktopPC
+ Added some Buttons to the workbench (WIP) $ Workbench now uses the vanilla recipe handler. $ Fixed the tool slots on the Workbench accepting the wrong items in certain cases. + Added hundreds of new machine recipes for all of the materials, due to below. $ Rewrote recipe generation classes, things like plate bending and extrusion recipes now fall in line with GT tiering. + Added more functions to Materials.java, now you can get any item from them. (getDustSmall(5)) % Changed tool handling to better support older versions of Gregtech that don't allow Wrenchs to work as a BC/EIO wrench. % Moved more GT related content to HANDLER_GT. + Added a basic re-implementation of the Meta Tile Entity system for GT Machines, using my own blocks as a base. In a feeble attempt to store NBT data to Itemblocks on drop/break. % Changed lots of debug logging to only show in debug mode, if I missed anything, let me know.
Diffstat (limited to 'src/Java/gtPlusPlus/core/slots')
-rw-r--r--src/Java/gtPlusPlus/core/slots/SlotGtTool.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Java/gtPlusPlus/core/slots/SlotGtTool.java b/src/Java/gtPlusPlus/core/slots/SlotGtTool.java
index ec77aa10bd..cdea2fa43f 100644
--- a/src/Java/gtPlusPlus/core/slots/SlotGtTool.java
+++ b/src/Java/gtPlusPlus/core/slots/SlotGtTool.java
@@ -1,6 +1,7 @@
package gtPlusPlus.core.slots;
-import gregtech.api.interfaces.IToolStats;
+import gregtech.api.items.GT_MetaGenerated_Tool;
+import gtPlusPlus.core.util.Utils;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
@@ -14,7 +15,12 @@ public class SlotGtTool extends Slot{
@Override
public boolean isItemValid(ItemStack itemstack) {
- return itemstack.getItem() instanceof IToolStats;
+ if (itemstack.getItem() instanceof GT_MetaGenerated_Tool){
+ Utils.LOG_WARNING(itemstack.getDisplayName()+" is a valid Tool.");
+ return true;
+ }
+ Utils.LOG_WARNING(itemstack.getDisplayName()+" is not a valid Tool.");
+ return false;
}
@Override