public class ImplicitFluidConverter
extends java.lang.Object
| Constructor and Description |
|---|
ImplicitFluidConverter(net.minecraftforge.fluids.Fluid target)
Make a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addConverter(net.minecraftforge.fluids.Fluid fluid,
double rate)
Add a fluid converter.
|
boolean |
canConvert(net.minecraftforge.fluids.Fluid fluid)
If the given fluid can be converter.
|
net.minecraftforge.fluids.FluidStack |
convert(net.minecraftforge.fluids.FluidStack fluid)
Convert the given fluid to the target fluid.
|
net.minecraftforge.fluids.FluidStack |
convertReverse(net.minecraftforge.fluids.Fluid target,
net.minecraftforge.fluids.FluidStack fluid)
Convert the given fluid from target fluid to the given fluid.
|
double |
getRatio(net.minecraftforge.fluids.Fluid target)
The conversion ratio to the given target fluid.
|
net.minecraftforge.fluids.Fluid |
getTarget() |
void |
registerFromConfig(java.lang.String[] config)
Register the converters config from the given string array.
|
void |
setTarget(net.minecraftforge.fluids.Fluid target)
Set a new target, this will not remove the old target from the possible converters.
|
public ImplicitFluidConverter(net.minecraftforge.fluids.Fluid target)
target - The fluid to convert to.public void setTarget(net.minecraftforge.fluids.Fluid target)
target - The target fluid.public net.minecraftforge.fluids.Fluid getTarget()
public void addConverter(net.minecraftforge.fluids.Fluid fluid,
double rate)
fluid - The fluid to convert to.rate - The rate of conversion that will be multiplied with every conversion.public boolean canConvert(net.minecraftforge.fluids.Fluid fluid)
fluid - The fluid to convert.public net.minecraftforge.fluids.FluidStack convert(net.minecraftforge.fluids.FluidStack fluid)
fluid - The fluid stack to convert from.public net.minecraftforge.fluids.FluidStack convertReverse(net.minecraftforge.fluids.Fluid target,
net.minecraftforge.fluids.FluidStack fluid)
target - The fluid to convert to.fluid - The fluid stack to convert, it must be of the same fluid type of the main target of this converter instance.public double getRatio(net.minecraftforge.fluids.Fluid target)
target - The target fluid.public void registerFromConfig(java.lang.String[] config)
config - The config where each element is in the form 'fluidname:ratio'.