aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/inventories
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-10-20 16:43:59 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-10-20 16:43:59 +1000
commit604023eb80fe0c50fac956e93625c9be88bb9cd8 (patch)
treeda73122574d7358b7ac07f21a8d6664a2ac68348 /src/Java/gtPlusPlus/core/inventories
parentb5268f7c54426ddc8289df99be5b1e81934536ba (diff)
downloadGT5-Unofficial-604023eb80fe0c50fac956e93625c9be88bb9cd8.tar.gz
GT5-Unofficial-604023eb80fe0c50fac956e93625c9be88bb9cd8.tar.bz2
GT5-Unofficial-604023eb80fe0c50fac956e93625c9be88bb9cd8.zip
$ Fixed the workbench crafting grid/output doing odd things (Client side item dupes & actual item dupes)
% Changed the workbench textures.
Diffstat (limited to 'src/Java/gtPlusPlus/core/inventories')
-rw-r--r--src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloCrafting.java6
-rw-r--r--src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloSlots.java10
2 files changed, 9 insertions, 7 deletions
diff --git a/src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloCrafting.java b/src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloCrafting.java
index 39d9113a31..f4fe78d458 100644
--- a/src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloCrafting.java
+++ b/src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloCrafting.java
@@ -3,8 +3,6 @@ package gtPlusPlus.core.inventories;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.nbt.NBTTagList;
public class InventoryWorkbenchHoloCrafting implements IInventory{
@@ -24,7 +22,7 @@ public class InventoryWorkbenchHoloCrafting implements IInventory{
}
- public void readFromNBT(NBTTagCompound nbt)
+ /*public void readFromNBT(NBTTagCompound nbt)
{
NBTTagList list = nbt.getTagList("Items", 10);
inventory = new ItemStack[INV_SIZE];
@@ -54,7 +52,7 @@ public class InventoryWorkbenchHoloCrafting implements IInventory{
}
}
nbt.setTag("Items", list);
- }
+ }*/
@Override
public int getSizeInventory()
diff --git a/src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloSlots.java b/src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloSlots.java
index 2bc84f492d..c5da273a11 100644
--- a/src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloSlots.java
+++ b/src/Java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloSlots.java
@@ -3,6 +3,7 @@ package gtPlusPlus.core.inventories;
import gtPlusPlus.core.util.Utils;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
+import net.minecraft.inventory.InventoryCraftResult;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
@@ -11,6 +12,9 @@ public class InventoryWorkbenchHoloSlots implements IInventory{
private String name = "Inventory Holo";
+ //Output Slot
+ public IInventory craftResult = new InventoryCraftResult();
+
/** Defining your inventory size this way is handy */
public static final int INV_SIZE = 6;
@@ -33,7 +37,7 @@ public class InventoryWorkbenchHoloSlots implements IInventory{
{
NBTTagCompound data = list.getCompoundTagAt(i);
int slot = data.getInteger("Slot");
- if(slot >= 0 && slot < INV_SIZE)
+ if(slot >= 1 && slot < INV_SIZE)
{
inventory[slot] = ItemStack.loadItemStackFromNBT(data);
}
@@ -46,7 +50,7 @@ public class InventoryWorkbenchHoloSlots implements IInventory{
for(int i = 0;i<INV_SIZE;i++)
{
ItemStack stack = inventory[i];
- if(stack != null)
+ if(stack != null && i != 0)
{
NBTTagCompound data = new NBTTagCompound();
stack.writeToNBT(data);
@@ -204,7 +208,7 @@ public class InventoryWorkbenchHoloSlots implements IInventory{
if (this.stackResult[0] != null)
{
- Utils.LOG_INFO("this.stackResult[0] == null - Really never should be here though. - Returning "+this.stackResult[0].getDisplayName());
+ Utils.LOG_INFO("this.stackResult[0] != null - Really never should be though. - Returning "+this.stackResult[0].getDisplayName());
ItemStack itemstack = this.stackResult[0];
this.stackResult[0] = null;
return itemstack;