mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-21 04:22:26 +00:00
Added sustained fluid and gas tanks to PRC and Electrolytic Separator, fixed Gas Generator losing energy when being picked up
This commit is contained in:
1 parent
bb8985b6f8
commit
ba289ced25
3 files changed
+63
-2
No files matched your search
@@ -34,8 +34,10 @@ import mekanism.common.tile.TileEntityChemicalOxidizer;
|
||||
import mekanism.common.tile.TileEntityDigitalMiner;
|
||||
import mekanism.common.tile.TileEntityElectricBlock;
|
||||
import mekanism.common.tile.TileEntityElectricChest;
|
||||
import mekanism.common.tile.TileEntityElectrolyticSeparator;
|
||||
import mekanism.common.tile.TileEntityFactory;
|
||||
import mekanism.common.tile.TileEntityLogisticalSorter;
|
||||
import mekanism.common.tile.TileEntityPRC;
|
||||
import mekanism.common.tile.TileEntityPortableTank;
|
||||
import mekanism.common.tile.TileEntityRotaryCondensentrator;
|
||||
import mekanism.common.transporter.TransporterFilter;
|
||||
@@ -378,6 +380,26 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
|
||||
((TileEntityChemicalInfuser)tileEntity).centerTank.setGas(GasStack.readFromNBT(stack.stackTagCompound.getCompoundTag("centerTank")));
|
||||
}
|
||||
}
|
||||
|
||||
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));
|
||||
|
||||
|
||||
Reference in new issue
Block a user