aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/container
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-10-17 01:39:50 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-10-17 01:39:50 +1000
commitd6bf108b40f0b281ff7c3c2bc91e43ed2b9883f7 (patch)
tree0f00f90ad75043f47aac4cf68431f038adc5071d /src/Java/gtPlusPlus/core/container
parentb1aa7032fe9e6bfedccf1bb08952c68100002489 (diff)
downloadGT5-Unofficial-d6bf108b40f0b281ff7c3c2bc91e43ed2b9883f7.tar.gz
GT5-Unofficial-d6bf108b40f0b281ff7c3c2bc91e43ed2b9883f7.tar.bz2
GT5-Unofficial-d6bf108b40f0b281ff7c3c2bc91e43ed2b9883f7.zip
+ Added Tesseract Generators and Terminals.
+ Added a handful of new, old textures from GT4. % Rewrote portions of the Blueprint item again, to try make it work better with NBT. + Added an Example NBT item for myself~ because I am a derp. + Added some custom textures for the Industrial Centrifuge. % Moved all the GT4 Tile Entities to their own loading class.
Diffstat (limited to 'src/Java/gtPlusPlus/core/container')
-rw-r--r--src/Java/gtPlusPlus/core/container/Container_Workbench.java23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/Java/gtPlusPlus/core/container/Container_Workbench.java b/src/Java/gtPlusPlus/core/container/Container_Workbench.java
index 5ce6d0e1a2..b3b024f52c 100644
--- a/src/Java/gtPlusPlus/core/container/Container_Workbench.java
+++ b/src/Java/gtPlusPlus/core/container/Container_Workbench.java
@@ -188,8 +188,9 @@ public class Container_Workbench extends Container {
@Override
public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer){
+ if (!aPlayer.worldObj.isRemote){
if (aSlotIndex == 999 || aSlotIndex == -999){
- Utils.LOG_INFO("??? - "+aSlotIndex);
+ //Utils.LOG_INFO("??? - "+aSlotIndex);
}
if (aSlotIndex == slotOutput){
@@ -210,7 +211,7 @@ public class Container_Workbench extends Container {
Utils.LOG_INFO("Found a blueprint.");
ItemStack tempBlueprint = inventoryHolo.getStackInSlot(1);
ItemBlueprint tempItemBlueprint = (ItemBlueprint) tempBlueprint.getItem();
- if (inventoryHolo.getStackInSlot(0) != null){
+ if (inventoryHolo.getStackInSlot(0) != null && !tempItemBlueprint.hasBlueprint(tempBlueprint)){
Utils.LOG_INFO("Output slot was not empty.");
Utils.LOG_INFO("Trying to manipulate NBT data on the blueprint stack, then replace it with the new one.");
tempItemBlueprint.setBlueprint(inventoryHolo.getStackInSlot(1), craftMatrix, inventoryHolo.getStackInSlot(0));
@@ -219,7 +220,12 @@ public class Container_Workbench extends Container {
Utils.LOG_INFO(UtilsItems.getArrayStackNames(tempItemBlueprint.getBlueprint(newTempBlueprint)));
}
else {
- Utils.LOG_INFO("Output slot was empty.");
+ if (tempItemBlueprint.hasBlueprint(tempBlueprint)){
+ Utils.LOG_INFO("Blueprint already holds a recipe.");
+ }
+ else {
+ Utils.LOG_INFO("Output slot was empty.");
+ }
}
}
else {
@@ -257,6 +263,7 @@ public class Container_Workbench extends Container {
Utils.LOG_INFO("Player Clicked slot "+aSlotIndex+" in the tool Grid");
}
}
+ }
//Utils.LOG_INFO("Player Clicked slot "+aSlotIndex+" in the Grid");
return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
}
@@ -267,7 +274,15 @@ public class Container_Workbench extends Container {
//craftResult.setInventorySlotContents(0, Workbench_CraftingHandler.getInstance().findMatchingRecipe(craftMatrix, worldObj));
//Vanilla CraftingManager
- craftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(craftMatrix, worldObj));
+ Utils.LOG_INFO("checking crafting grid for a valid output.");
+ ItemStack temp = CraftingManager.getInstance().findMatchingRecipe(craftMatrix, worldObj);
+ if (temp != null){
+ Utils.LOG_INFO("Output found. "+temp.getDisplayName()+" x"+temp.stackSize);
+ inventoryHolo.setInventorySlotContents(slotOutput, temp);
+ }
+ else {
+ Utils.LOG_INFO("No Valid output found.");
+ }
}