public final class ConverterFluidBlock extends AbstractConverter
| Constructor and Description |
|---|
ConverterFluidBlock() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canSerialize(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos)
Checks if this converter can be used to serialize the block at the
specified world position.
|
protected boolean |
canSerialize(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state) |
java.lang.Iterable<net.minecraftforge.fluids.FluidStack> |
getFluidCosts(net.minecraft.nbt.NBTBase data)
Get a list of materials required to deserialize the block described by
the specified data.
|
protected net.minecraftforge.fluids.FluidStack |
getFluidStack(net.minecraft.nbt.NBTBase data)
Get the fluid stack required as materials to deserialize the block stored
in the specified data.
|
java.lang.Iterable<net.minecraft.item.ItemStack> |
getItemCosts(net.minecraft.nbt.NBTBase data)
Get a list of materials required to deserialize the block described by
the specified data.
|
int |
getSortIndex(net.minecraft.nbt.NBTBase data)
A sort index used to control in which order blocks are deserialized.
|
cancelDeserialization, deserialize, getBlockState, getItemStack, getItemStack, getUUID, postDeserialize, postSerialize, preDeserialize, serializepublic int getSortIndex(net.minecraft.nbt.NBTBase data)
ConverterBlocks being deserialized using converters that provide lower numbers here will be processed first.
This allows deserialization of solid blocks (e.g. cobble) before non- solid blocks (e.g. levers, water).
getSortIndex in interface ConvertergetSortIndex in class AbstractConverterdata - the serialized representation of the block in question.SortIndexpublic java.lang.Iterable<net.minecraft.item.ItemStack> getItemCosts(net.minecraft.nbt.NBTBase data)
Converter
The data passed along is guaranteed to be a value that was previously
produced by this converter's Converter.serialize(net.minecraft.world.World, net.minecraft.util.math.BlockPos) method.
This will typically return a singleton list or an empty list, but for more complex converters, e.g. ones handling multi-part blocks this returns an iterable.
This is not used for logic, purely for user feedback, e.g. in tooltips.
getItemCosts in interface ConvertergetItemCosts in class AbstractConverterdata - the data to get the costs for.public java.lang.Iterable<net.minecraftforge.fluids.FluidStack> getFluidCosts(net.minecraft.nbt.NBTBase data)
Converter
The data passed along is guaranteed to be a value that was previously
produced by this converter's Converter.serialize(net.minecraft.world.World, net.minecraft.util.math.BlockPos) method.
This will typically return a singleton list or an empty list, but for more complex converters, e.g. ones handling multi-part blocks this returns an iterable.
This is not used for logic, purely for user feedback, e.g. in tooltips.
getFluidCosts in interface ConvertergetFluidCosts in class AbstractConverterdata - the data to get the costs for.public boolean canSerialize(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos)
ConvertercanSerialize in interface ConvertercanSerialize in class AbstractConverterworld - the world containing the block to serialize.pos - the position of the block to serialize.true if the converter can serialize the block;
false otherwise;protected boolean canSerialize(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state)
canSerialize in class AbstractConverter@Nullable protected net.minecraftforge.fluids.FluidStack getFluidStack(net.minecraft.nbt.NBTBase data)
AbstractConvertergetFluidStack in class AbstractConverterdata - the serialized representation of the block.