Bump up Dynamic Tank max storage, fixed Factory container issue

This commit is contained in:
aidancbrady 2016-09-05 15:28:55 -04:00
parent 833d7372fb
commit 245465dc8c
2 changed files with 6 additions and 20 deletions

View file

@ -16,7 +16,7 @@ import net.minecraft.item.ItemStack;
public class TankUpdateProtocol extends UpdateProtocol<SynchronizedTankData>
{
public static final int FLUID_PER_TANK = 16000;
public static final int FLUID_PER_TANK = 64000;
public TankUpdateProtocol(TileEntityDynamicTank tileEntity)
{

View file

@ -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;
}
}