mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 21:09:45 +00:00
Improved fluid handling
This commit is contained in:
1 parent
b8f3a3e0b2
commit
08700a82e7
20 files changed
+339
-80
No files matched your search
@@ -0,0 +1,44 @@
|
||||
package mekanism.common.base;
|
||||
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.capability.FluidTankProperties;
|
||||
import net.minecraftforge.fluids.capability.IFluidHandler;
|
||||
import net.minecraftforge.fluids.capability.IFluidTankProperties;
|
||||
|
||||
public class FluidHandlerWrapper implements IFluidHandler
|
||||
{
|
||||
public IFluidHandlerWrapper wrapper;
|
||||
|
||||
public EnumFacing side;
|
||||
|
||||
public FluidHandlerWrapper(IFluidHandlerWrapper w, EnumFacing s)
|
||||
{
|
||||
wrapper = w;
|
||||
side = s;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFluidTankProperties[] getTankProperties()
|
||||
{
|
||||
return FluidTankProperties.convert(wrapper.getTankInfo(side));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int fill(FluidStack resource, boolean doFill)
|
||||
{
|
||||
return wrapper.fill(side, resource, doFill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidStack drain(FluidStack resource, boolean doDrain)
|
||||
{
|
||||
return wrapper.drain(side, resource, doDrain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidStack drain(int maxDrain, boolean doDrain)
|
||||
{
|
||||
return wrapper.drain(side, maxDrain, doDrain);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user