mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-19 19:49:50 +00:00
Finished off new system of sustained data
This commit is contained in:
1 parent
94c3a6aa60
commit
ab34edc46a
9 files changed
+165
-198
No files matched your search
@@ -1072,121 +1072,6 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IPer
|
||||
factoryItem.setRecipeType(((TileEntityFactory)tileEntity).recipeType, itemStack);
|
||||
}
|
||||
|
||||
if(tileEntity instanceof TileEntityChemicalOxidizer)
|
||||
{
|
||||
TileEntityChemicalOxidizer oxidizer = (TileEntityChemicalOxidizer)tileEntity;
|
||||
|
||||
if(oxidizer.gasTank.getGas() != null)
|
||||
{
|
||||
itemStack.stackTagCompound.setTag("gasTank", oxidizer.gasTank.getGas().write(new NBTTagCompound()));
|
||||
}
|
||||
}
|
||||
|
||||
if(tileEntity instanceof TileEntityChemicalInfuser)
|
||||
{
|
||||
TileEntityChemicalInfuser infuser = (TileEntityChemicalInfuser)tileEntity;
|
||||
|
||||
if(infuser.leftTank.getGas() != null)
|
||||
{
|
||||
itemStack.stackTagCompound.setTag("leftTank", infuser.leftTank.getGas().write(new NBTTagCompound()));
|
||||
}
|
||||
|
||||
if(infuser.rightTank.getGas() != null)
|
||||
{
|
||||
itemStack.stackTagCompound.setTag("rightTank", infuser.rightTank.getGas().write(new NBTTagCompound()));
|
||||
}
|
||||
|
||||
if(infuser.centerTank.getGas() != null)
|
||||
{
|
||||
itemStack.stackTagCompound.setTag("centerTank", infuser.centerTank.getGas().write(new NBTTagCompound()));
|
||||
}
|
||||
}
|
||||
|
||||
if(tileEntity instanceof TileEntityChemicalDissolutionChamber)
|
||||
{
|
||||
TileEntityChemicalDissolutionChamber chamber = (TileEntityChemicalDissolutionChamber)tileEntity;
|
||||
|
||||
if(chamber.injectTank.getGas() != null)
|
||||
{
|
||||
itemStack.stackTagCompound.setTag("injectTank", chamber.injectTank.getGas().write(new NBTTagCompound()));
|
||||
}
|
||||
|
||||
if(chamber.outputTank.getGas() != null)
|
||||
{
|
||||
itemStack.stackTagCompound.setTag("outputTank", chamber.outputTank.getGas().write(new NBTTagCompound()));
|
||||
}
|
||||
}
|
||||
|
||||
if(tileEntity instanceof TileEntityChemicalWasher)
|
||||
{
|
||||
TileEntityChemicalWasher washer = (TileEntityChemicalWasher)tileEntity;
|
||||
|
||||
if(washer.fluidTank.getFluid() != null)
|
||||
{
|
||||
itemStack.stackTagCompound.setTag("fluidTank", washer.fluidTank.getFluid().writeToNBT(new NBTTagCompound()));
|
||||
}
|
||||
|
||||
if(washer.inputTank.getGas() != null)
|
||||
{
|
||||
itemStack.stackTagCompound.setTag("inputTank", washer.inputTank.getGas().write(new NBTTagCompound()));
|
||||
}
|
||||
|
||||
if(washer.outputTank.getGas() != null)
|
||||
{
|
||||
itemStack.stackTagCompound.setTag("outputTank", washer.outputTank.getGas().write(new NBTTagCompound()));
|
||||
}
|
||||
}
|
||||
|
||||
if(tileEntity instanceof TileEntityChemicalCrystallizer)
|
||||
{
|
||||
TileEntityChemicalCrystallizer crystallizer = (TileEntityChemicalCrystallizer)tileEntity;
|
||||
|
||||
if(crystallizer.inputTank.getGas() != null)
|
||||
{
|
||||
itemStack.stackTagCompound.setTag("inputTank", crystallizer.inputTank.getGas().write(new NBTTagCompound()));
|
||||
}
|
||||
}
|
||||
|
||||
if(tileEntity instanceof TileEntityElectrolyticSeparator)
|
||||
{
|
||||
TileEntityElectrolyticSeparator separator = (TileEntityElectrolyticSeparator)tileEntity;
|
||||
|
||||
if(separator.fluidTank.getFluid() != null)
|
||||
{
|
||||
itemStack.stackTagCompound.setTag("fluidTank", separator.fluidTank.getFluid().writeToNBT(new NBTTagCompound()));
|
||||
}
|
||||
|
||||
if(separator.leftTank.getGas() != null)
|
||||
{
|
||||
itemStack.stackTagCompound.setTag("leftTank", separator.leftTank.getGas().write(new NBTTagCompound()));
|
||||
}
|
||||
|
||||
if(separator.rightTank.getGas() != null)
|
||||
{
|
||||
itemStack.stackTagCompound.setTag("rightTank", separator.rightTank.getGas().write(new NBTTagCompound()));
|
||||
}
|
||||
}
|
||||
|
||||
if(tileEntity instanceof TileEntityPRC)
|
||||
{
|
||||
TileEntityPRC prc = (TileEntityPRC)tileEntity;
|
||||
|
||||
if(prc.inputFluidTank.getFluid() != null)
|
||||
{
|
||||
itemStack.stackTagCompound.setTag("inputFluidTank", prc.inputFluidTank.getFluid().writeToNBT(new NBTTagCompound()));
|
||||
}
|
||||
|
||||
if(prc.inputGasTank.getGas() != null)
|
||||
{
|
||||
itemStack.stackTagCompound.setTag("inputGasTank", prc.inputGasTank.getGas().write(new NBTTagCompound()));
|
||||
}
|
||||
|
||||
if(prc.outputGasTank.getGas() != null)
|
||||
{
|
||||
itemStack.stackTagCompound.setTag("outputGasTank", prc.outputGasTank.getGas().write(new NBTTagCompound()));
|
||||
}
|
||||
}
|
||||
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user