From 604023eb80fe0c50fac956e93625c9be88bb9cd8 Mon Sep 17 00:00:00 2001 From: Draknyte1 Date: Thu, 20 Oct 2016 16:43:59 +1000 Subject: $ Fixed the workbench crafting grid/output doing odd things (Client side item dupes & actual item dupes) % Changed the workbench textures. --- .../core/inventories/InventoryWorkbenchHoloCrafting.java | 6 ++---- .../core/inventories/InventoryWorkbenchHoloSlots.java | 10 +++++++--- 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'src/Java/gtPlusPlus/core/inventories') 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