public class ConverterChiseledBlock extends AbstractConverter
| 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.minecraft.item.ItemStack> |
getItemCosts(net.minecraft.nbt.NBTBase data)
Get a list of materials required to deserialize the block described by
the specified data.
|
protected void |
postDeserialize(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state,
net.minecraft.nbt.NBTTagCompound data)
Allows hooking into the deserialization process, applying further changes
to the deserialized block.
|
protected void |
postSerialize(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state,
net.minecraft.nbt.NBTTagCompound data)
Allows hooking into the serialization process, adding additional NBT
data to the tag compound returned from the basic serialization.
|
boolean |
preDeserialize(MaterialSource materialSource,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.util.Rotation rotation,
net.minecraft.nbt.NBTBase data)
Called when a job for deserialization should be created.
|
cancelDeserialization, deserialize, getBlockState, getFluidCosts, getFluidStack, getItemStack, getItemStack, getSortIndex, getUUID, serializepublic 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 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 AbstractConverterprotected void postSerialize(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state,
net.minecraft.nbt.NBTTagCompound data)
AbstractConverter
Note that the tags name and meta will already
be set in the passed NBTTagCompound, and should usually not be
overwritten.
postSerialize in class AbstractConverterworld - the world the block to serialize lives in.pos - the position of the block to serialize.state - the block state of the block to serialize.data - the tag generated from the serialization process so far.public boolean preDeserialize(MaterialSource materialSource, net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos, net.minecraft.util.Rotation rotation, net.minecraft.nbt.NBTBase data)
Converter
The passed NBTBase 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 serves as a filter for which blocks in a blueprint actually can be
deserialized, in particular with respect to available materials which
are consumed from the specified IItemHandler.
preDeserialize in interface ConverterpreDeserialize in class AbstractConvertermaterialSource - access to building materials available for
deserialization.world - the world into which to deserialize the block.pos - the position at which to deserialize the block.rotation - the rotation to deserialize with.data - the serialized representation of the block to
deserialize.true if the data can be deserialized;
false otherwise.protected void postDeserialize(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state,
net.minecraft.nbt.NBTTagCompound data)
AbstractConverterpostDeserialize in class AbstractConverterworld - the world the block is being deserialized into.pos - the position the block is being deserialized at.state - the block state of the deserialized block.data - the serialized representation of the block to