From 245465dc8c357fdae3d5f461b42545e83aec6017 Mon Sep 17 00:00:00 2001 From: aidancbrady Date: Mon, 5 Sep 2016 15:28:55 -0400 Subject: [PATCH] Bump up Dynamic Tank max storage, fixed Factory container issue --- .../content/tank/TankUpdateProtocol.java | 2 +- .../inventory/container/ContainerFactory.java | 24 ++++--------------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/src/main/java/mekanism/common/content/tank/TankUpdateProtocol.java b/src/main/java/mekanism/common/content/tank/TankUpdateProtocol.java index 12cebf11d..995051974 100644 --- a/src/main/java/mekanism/common/content/tank/TankUpdateProtocol.java +++ b/src/main/java/mekanism/common/content/tank/TankUpdateProtocol.java @@ -16,7 +16,7 @@ import net.minecraft.item.ItemStack; public class TankUpdateProtocol extends UpdateProtocol { - public static final int FLUID_PER_TANK = 16000; + public static final int FLUID_PER_TANK = 64000; public TankUpdateProtocol(TileEntityDynamicTank tileEntity) { diff --git a/src/main/java/mekanism/common/inventory/container/ContainerFactory.java b/src/main/java/mekanism/common/inventory/container/ContainerFactory.java index 088e03932..03643cb52 100644 --- a/src/main/java/mekanism/common/inventory/container/ContainerFactory.java +++ b/src/main/java/mekanism/common/inventory/container/ContainerFactory.java @@ -116,7 +116,7 @@ public class ContainerFactory extends Container { ItemStack stack = null; Slot currentSlot = (Slot)inventorySlots.get(slotID); - + if(currentSlot != null && currentSlot.getHasStack()) { ItemStack slotStack = currentSlot.getStack(); @@ -178,7 +178,7 @@ public class ContainerFactory extends Container } else if(tileEntity.recipeType.getItemGas(slotStack) != null) { - if(slotID > tileEntity.inventory.length-1) + if(slotID >= tileEntity.inventory.length-1) { if(!mergeItemStack(slotStack, 3, 4, false)) { @@ -194,7 +194,7 @@ public class ContainerFactory extends Container } else if(tileEntity.recipeType == RecipeType.INFUSING && InfuseRegistry.getObject(slotStack) != null && (tileEntity.infuseStored.type == null || tileEntity.infuseStored.type == InfuseRegistry.getObject(slotStack).type)) { - if(slotID > tileEntity.inventory.length-1) + if(slotID >= tileEntity.inventory.length-1) { if(!mergeItemStack(slotStack, 3, 4, false)) { @@ -267,25 +267,11 @@ public class ContainerFactory extends Container public boolean isInputSlot(int slot) { - if(tileEntity.tier == Tier.FactoryTier.BASIC) - return slot >= 4 && slot <= 6; - if(tileEntity.tier == Tier.FactoryTier.ADVANCED) - return slot >= 4 && slot <= 8; - if(tileEntity.tier == Tier.FactoryTier.ELITE) - return slot >= 4 && slot <= 10; - - return false; + return slot >= 4 && slot < 4+tileEntity.tier.processes; } public boolean isOutputSlot(int slot) { - if(tileEntity.tier == Tier.FactoryTier.BASIC) - return slot >= 7 && slot <= 9; - if(tileEntity.tier == Tier.FactoryTier.ADVANCED) - return slot >= 9 && slot <= 13; - if(tileEntity.tier == Tier.FactoryTier.ELITE) - return slot >= 11 && slot <= 17; - - return false; + return slot >= 4+tileEntity.tier.processes && slot < 4+tileEntity.tier.processes*2; } }