mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-19 19:49:50 +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
@@ -73,7 +73,6 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
@@ -1168,6 +1167,46 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IPer
|
||||
itemStack.stackTagCompound.setTag("leftTank", infuser.centerTank.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