public final class BlueprintData
extends java.lang.Object
implements net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.NBTTagCompound>
| Modifier and Type | Class and Description |
|---|---|
static class |
BlueprintData.Builder |
| Constructor and Description |
|---|
BlueprintData() |
| Modifier and Type | Method and Description |
|---|---|
void |
addShift(net.minecraft.util.math.Vec3i value)
Adjust the current shift of this blueprint by the specified amount.
|
int |
count()
Get the number of blocks set in this blueprint.
|
void |
createJobs(net.minecraft.entity.player.EntityPlayer player,
boolean allowPartial,
net.minecraft.util.math.BlockPos pos)
Create the jobs required to realize this blueprint in the world.
|
void |
deserializeNBT(net.minecraft.nbt.NBTTagCompound nbt) |
java.util.stream.Stream<net.minecraft.util.math.BlockPos> |
getBlocks(net.minecraft.entity.player.EntityPlayer player,
net.minecraft.util.math.BlockPos pos)
Get a list of positions in this blueprint, as they would be placed in
the cell containing the specified world position.
|
net.minecraft.util.math.AxisAlignedBB |
getCellBounds(net.minecraft.entity.player.EntityPlayer player,
net.minecraft.util.math.BlockPos pos)
Get the bounds of the blueprint placement cell containing the specified
world position.
|
java.util.List<java.lang.String> |
getCosts()
Compute the total costs in items it would take to deserialize this block.
|
net.minecraft.util.Rotation |
getRotation()
Get the current rotation of this blueprint.
|
boolean |
isEmpty()
Check whether this blueprint is empty.
|
void |
rotate(net.minecraft.util.Rotation amount)
Rotate this blueprint by the specified amount.
|
net.minecraft.nbt.NBTTagCompound |
serializeNBT() |
public boolean isEmpty()
public int count()
public void addShift(net.minecraft.util.math.Vec3i value)
This will automatically wrap the shift if it exceeds the blueprint's bounds.
value - the amount by which to shift the blueprint.public void rotate(net.minecraft.util.Rotation amount)
amount - the amount by which to rotate the blueprint.public net.minecraft.util.Rotation getRotation()
public net.minecraft.util.math.AxisAlignedBB getCellBounds(net.minecraft.entity.player.EntityPlayer player,
net.minecraft.util.math.BlockPos pos)
This is the bounds of the blueprint snapped to a grid defined by the size of those very bounds.
player - the player requesting the bounds.pos - the position in the cell to get the bounds for.public java.util.stream.Stream<net.minecraft.util.math.BlockPos> getBlocks(net.minecraft.entity.player.EntityPlayer player,
net.minecraft.util.math.BlockPos pos)
player - the player requesting the blocks.pos - the position in the cell defining the origin position.public java.util.List<java.lang.String> getCosts()
Returns a list of distinct item stacks with their count set accordingly.
public void createJobs(net.minecraft.entity.player.EntityPlayer player,
boolean allowPartial,
net.minecraft.util.math.BlockPos pos)
The positions are defined the same way as in getBlocks(EntityPlayer, BlockPos).
player - the player placing the blueprint.allowPartial - whether to allow partial placement.pos - the position of the cell defining the origin position.public net.minecraft.nbt.NBTTagCompound serializeNBT()
serializeNBT in interface net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.NBTTagCompound>public void deserializeNBT(net.minecraft.nbt.NBTTagCompound nbt)
deserializeNBT in interface net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.NBTTagCompound>