diff options
author | Alkalus <draknyte1@hotmail.com> | 2017-09-12 11:19:33 +1000 |
---|---|---|
committer | Alkalus <draknyte1@hotmail.com> | 2017-09-12 11:19:33 +1000 |
commit | f91fdfd23342cb2b3d759fe2c317ab632352d0b5 (patch) | |
tree | 6b2b893886ce519ba782dfb960cdd5dc3538c79b /src/Java/gtPlusPlus/core/inventories | |
parent | 7721a5dd91d121a0921350572a45a1a39ee1ecfe (diff) | |
download | GT5-Unofficial-f91fdfd23342cb2b3d759fe2c317ab632352d0b5.tar.gz GT5-Unofficial-f91fdfd23342cb2b3d759fe2c317ab632352d0b5.tar.bz2 GT5-Unofficial-f91fdfd23342cb2b3d759fe2c317ab632352d0b5.zip |
+ Basic support for Project Table results within the large Auto-Crafter.
% More Project Table work.
Diffstat (limited to 'src/Java/gtPlusPlus/core/inventories')
-rw-r--r-- | src/Java/gtPlusPlus/core/inventories/projecttable/InventoryProjectMain.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/core/inventories/projecttable/InventoryProjectMain.java b/src/Java/gtPlusPlus/core/inventories/projecttable/InventoryProjectMain.java index f1b3ae76a2..4857c9b29c 100644 --- a/src/Java/gtPlusPlus/core/inventories/projecttable/InventoryProjectMain.java +++ b/src/Java/gtPlusPlus/core/inventories/projecttable/InventoryProjectMain.java @@ -1,5 +1,6 @@ package gtPlusPlus.core.inventories.projecttable; +import gtPlusPlus.core.util.Utils; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; @@ -69,7 +70,17 @@ public class InventoryProjectMain implements IInventory{ @Override public ItemStack getStackInSlot(final int slot) { + //Utils.LOG_INFO("getStackInSlot["+slot+"]"); + try { + if (slot>= this.inventory.length){ + //Utils.LOG_INFO("Returning invalid slot item."); + return null; + } return this.inventory[slot]; + } catch (Throwable t){ + t.printStackTrace(); + return null; + } } @Override @@ -104,6 +115,9 @@ public class InventoryProjectMain implements IInventory{ @Override public void setInventorySlotContents(final int slot, final ItemStack stack) { + if (slot >= this.inventory.length){ + return; + } this.inventory[slot] = stack; if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) |