public abstract class Schematic
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Schematic.BuildingStage
Blocks are build in various stages, in order to make sure that a block
can indeed be placed, and that it's unlikely to disturb other blocks.
|
| Constructor and Description |
|---|
Schematic() |
| Modifier and Type | Method and Description |
|---|---|
int |
buildTime()
Returns the number of cycles to wait after building this schematic.
|
boolean |
canPlaceInWorld(IBuilderContext context,
int x,
int y,
int z)
Can the block be placed in the world at these coordinates now?
This function is only used to *delay* block placement until other
prerequisites are met.
|
boolean |
doNotBuild()
Return true if the block should not be placed to the world.
|
boolean |
doNotUse()
Return true if the schematic should not be used at all.
|
BuildingPermission |
getBuildingPermission()
Return the maximium building permission for blueprint containing this
schematic.
|
Schematic.BuildingStage |
getBuildStage()
Return the stage where this schematic has to be built.
|
int |
getEnergyRequirement(java.util.LinkedList<net.minecraft.item.ItemStack> stacksUsed)
Returns the amount of energy required to build this slot, depends on the
stacks selected for the build.
|
void |
getRequirementsForPlacement(IBuilderContext context,
java.util.LinkedList<net.minecraft.item.ItemStack> requirements)
Returns the requirements needed to build this block.
|
java.util.LinkedList<net.minecraft.item.ItemStack> |
getStacksToDisplay(java.util.LinkedList<net.minecraft.item.ItemStack> stackConsumed)
Returns the flying stacks to display in the builder animation.
|
void |
idsToBlueprint(MappingRegistry registry)
Translates blocks and item ids to the blueprint referential
|
void |
idsToWorld(MappingRegistry registry)
Translates blocks and item ids to the world referential
|
void |
initializeFromObjectAt(IBuilderContext context,
int x,
int y,
int z)
Initializes a schematic for blueprint according to an objet placed on {x,
y, z} on 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 |
placeInWorld(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,
using the stack in parameters
|
void |
postProcessing(IBuilderContext context,
int x,
int y,
int z)
Called on a block when the blueprint has finished to place all the
blocks.
|
void |
readSchematicFromNBT(net.minecraft.nbt.NBTTagCompound nbt,
MappingRegistry registry)
Loads this schematic from the blueprint NBT.
|
void |
rotateLeft(IBuilderContext context)
Perform a 90 degree rotation to the slot.
|
void |
storeRequirements(IBuilderContext context,
int x,
int y,
int z)
Write specific requirements coming from the world to the blueprint.
|
void |
translateToBlueprint(Translation transform)
Applies translations to all positions in the schematic to center in the
blueprint referential
|
void |
translateToWorld(Translation transform)
Apply translations to all positions in the schematic to center in the
builder referential
|
net.minecraft.item.ItemStack |
useItem(IBuilderContext context,
net.minecraft.item.ItemStack req,
IInvSlot slot)
This is called each time an item matches a requirement.
|
void |
writeSchematicToNBT(net.minecraft.nbt.NBTTagCompound nbt,
MappingRegistry registry)
Saves this schematic to the blueprint NBT.
|
public net.minecraft.item.ItemStack useItem(IBuilderContext context, net.minecraft.item.ItemStack req, IInvSlot slot)
public void rotateLeft(IBuilderContext context)
public void translateToBlueprint(Translation transform)
public void translateToWorld(Translation transform)
public void idsToBlueprint(MappingRegistry registry)
public void idsToWorld(MappingRegistry registry)
public void initializeFromObjectAt(IBuilderContext context, int x, int y, int z)
public boolean canPlaceInWorld(IBuilderContext context, int x, int y, int z)
public void placeInWorld(IBuilderContext context, int x, int y, int z, java.util.LinkedList<net.minecraft.item.ItemStack> stacks)
public void storeRequirements(IBuilderContext context, int x, int y, int z)
public void getRequirementsForPlacement(IBuilderContext context, java.util.LinkedList<net.minecraft.item.ItemStack> requirements)
public int getEnergyRequirement(java.util.LinkedList<net.minecraft.item.ItemStack> stacksUsed)
public java.util.LinkedList<net.minecraft.item.ItemStack> getStacksToDisplay(java.util.LinkedList<net.minecraft.item.ItemStack> stackConsumed)
public Schematic.BuildingStage getBuildStage()
public boolean isAlreadyBuilt(IBuilderContext context, int x, int y, int z)
public boolean doNotBuild()
public boolean doNotUse()
public BuildingPermission getBuildingPermission()
public void postProcessing(IBuilderContext context, int x, int y, int z)
public void writeSchematicToNBT(net.minecraft.nbt.NBTTagCompound nbt,
MappingRegistry registry)
public void readSchematicFromNBT(net.minecraft.nbt.NBTTagCompound nbt,
MappingRegistry registry)
public int buildTime()