Finished off new system of sustained data

This commit is contained in:
Aidan C. Brady committed 2014-07-26 18:44:24 -04:00
1 parent 94c3a6aa60
commit ab34edc46a
9 files changed
+165 -198

No files matched your search

@@ -307,71 +307,6 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
((TileEntityElectricChest)tileEntity).password = getPassword(stack);
}
if(tileEntity instanceof TileEntityChemicalOxidizer)
{
if(stack.stackTagCompound != null)
{
((TileEntityChemicalOxidizer)tileEntity).gasTank.setGas(GasStack.readFromNBT(stack.stackTagCompound.getCompoundTag("gasTank")));
}
}
if(tileEntity instanceof TileEntityChemicalInfuser)
{
if(stack.stackTagCompound != null)
{
((TileEntityChemicalInfuser)tileEntity).leftTank.setGas(GasStack.readFromNBT(stack.stackTagCompound.getCompoundTag("leftTank")));
((TileEntityChemicalInfuser)tileEntity).rightTank.setGas(GasStack.readFromNBT(stack.stackTagCompound.getCompoundTag("rightTank")));
((TileEntityChemicalInfuser)tileEntity).centerTank.setGas(GasStack.readFromNBT(stack.stackTagCompound.getCompoundTag("centerTank")));
}
}
if(tileEntity instanceof TileEntityChemicalDissolutionChamber)
{
if(stack.stackTagCompound != null)
{
((TileEntityChemicalDissolutionChamber)tileEntity).injectTank.setGas(GasStack.readFromNBT(stack.stackTagCompound.getCompoundTag("injectTank")));
((TileEntityChemicalDissolutionChamber)tileEntity).outputTank.setGas(GasStack.readFromNBT(stack.stackTagCompound.getCompoundTag("outputTank")));
}
}
if(tileEntity instanceof TileEntityChemicalWasher)
{
if(stack.stackTagCompound != null)
{
((TileEntityChemicalWasher)tileEntity).fluidTank.setFluid(FluidStack.loadFluidStackFromNBT(stack.stackTagCompound.getCompoundTag("fluidTank")));
((TileEntityChemicalWasher)tileEntity).inputTank.setGas(GasStack.readFromNBT(stack.stackTagCompound.getCompoundTag("inputTank")));
((TileEntityChemicalWasher)tileEntity).outputTank.setGas(GasStack.readFromNBT(stack.stackTagCompound.getCompoundTag("outputTank")));
}
}
if(tileEntity instanceof TileEntityChemicalCrystallizer)
{
if(stack.stackTagCompound != null)
{
((TileEntityChemicalCrystallizer)tileEntity).inputTank.setGas(GasStack.readFromNBT(stack.stackTagCompound.getCompoundTag("inputTank")));
}
}
if(tileEntity instanceof TileEntityElectrolyticSeparator)
{
if(stack.stackTagCompound != null)
{
((TileEntityElectrolyticSeparator)tileEntity).fluidTank.setFluid(FluidStack.loadFluidStackFromNBT(stack.stackTagCompound.getCompoundTag("fluidTank")));
((TileEntityElectrolyticSeparator)tileEntity).leftTank.setGas(GasStack.readFromNBT(stack.stackTagCompound.getCompoundTag("leftTank")));
((TileEntityElectrolyticSeparator)tileEntity).rightTank.setGas(GasStack.readFromNBT(stack.stackTagCompound.getCompoundTag("rightTank")));
}
}
if(tileEntity instanceof TileEntityPRC)
{
if(stack.stackTagCompound != null)
{
((TileEntityPRC)tileEntity).inputFluidTank.setFluid(FluidStack.loadFluidStackFromNBT(stack.stackTagCompound.getCompoundTag("inputFluidTank")));
((TileEntityPRC)tileEntity).inputGasTank.setGas(GasStack.readFromNBT(stack.stackTagCompound.getCompoundTag("inputGasTank")));
((TileEntityPRC)tileEntity).outputGasTank.setGas(GasStack.readFromNBT(stack.stackTagCompound.getCompoundTag("outputGasTank")));
}
}
((ISustainedInventory)tileEntity).setInventory(getInventory(stack));
if(tileEntity instanceof TileEntityElectricBlock)