public class SchematicBlock extends SchematicBlockBase implements java.lang.Comparable<SchematicBlock>
| Modifier and Type | Field and Description |
|---|---|
net.minecraft.block.Block |
block |
int |
meta |
net.minecraft.item.ItemStack[] |
storedRequirements
This field contains requirements for a given block when stored in the
blueprint.
|
| Constructor and Description |
|---|
SchematicBlock() |
| Modifier and Type | Method and Description |
|---|---|
void |
addRequirements(IBuilderContext context,
java.util.LinkedList<net.minecraft.item.ItemStack> requirements)
Returns the requirements needed to build this block.
|
int |
compareTo(SchematicBlock o) |
boolean |
ignoreBuilding()
Return true if the block should not be placed to the world.
|
boolean |
isAlreadyBuilt(IBuilderContext context,
int x,
int y,
int z)
Return true if the block on the world correspond to the block stored in
the blueprint at the location given by the slot.
|
void |
readFromNBT(net.minecraft.nbt.NBTTagCompound nbt,
MappingRegistry registry) |
void |
readFromWorld(IBuilderContext context,
int x,
int y,
int z)
Initializes a slot from the blueprint according to an objet placed on {x,
y, z} on the world.
|
void |
rotateLeft(IBuilderContext context)
Perform a 90 degree rotation to the slot.
|
net.minecraft.item.ItemStack |
useItem(IBuilderContext context,
net.minecraft.item.ItemStack req,
net.minecraft.item.ItemStack stack)
This is called each time an item matches a requirement, that is: (req id
== stack id) for damageable items (req id == stack id && req dmg == stack
dmg) for other items by default, it will increase damage of damageable
items by the amount of damage of the requirement, and remove the intended
amount of non damageable item.
|
void |
writeToNBT(net.minecraft.nbt.NBTTagCompound nbt,
MappingRegistry registry) |
void |
writeToWorld(IBuilderContext context,
int x,
int y,
int z,
java.util.LinkedList<net.minecraft.item.ItemStack> stacks)
Places the block in the world, at the location specified in the slot.
|
writeCompletedgetRequirements, inventorySlotsToBlueprint, inventorySlotsToBlueprint, inventorySlotsToWorld, inventorySlotsToWorld, postProcessing, transformToBlueprint, transformToWorldpublic net.minecraft.block.Block block
public int meta
public net.minecraft.item.ItemStack[] storedRequirements
public void addRequirements(IBuilderContext context, java.util.LinkedList<net.minecraft.item.ItemStack> requirements)
addRequirements in class Schematicpublic net.minecraft.item.ItemStack useItem(IBuilderContext context, net.minecraft.item.ItemStack req, net.minecraft.item.ItemStack stack)
public boolean isAlreadyBuilt(IBuilderContext context, int x, int y, int z)
isAlreadyBuilt in class Schematicpublic void rotateLeft(IBuilderContext context)
rotateLeft in class Schematicpublic void writeToWorld(IBuilderContext context, int x, int y, int z, java.util.LinkedList<net.minecraft.item.ItemStack> stacks)
writeToWorld in class Schematicpublic boolean ignoreBuilding()
ignoreBuilding in class SchematicBlockBasepublic void readFromWorld(IBuilderContext context, int x, int y, int z)
readFromWorld in class Schematicpublic void writeToNBT(net.minecraft.nbt.NBTTagCompound nbt,
MappingRegistry registry)
writeToNBT in class Schematicpublic void readFromNBT(net.minecraft.nbt.NBTTagCompound nbt,
MappingRegistry registry)
readFromNBT in class Schematicpublic int compareTo(SchematicBlock o)
compareTo in interface java.lang.Comparable<SchematicBlock>