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 |
|---|---|
boolean |
doNotBuild()
Return true if the block should not be placed to the world.
|
BuildingPermission |
getBuildingPermission()
Return the building permission for blueprint containing this schematic.
|
Schematic.BuildingStage |
getBuildStage()
Return the stage where this schematic has to be built.
|
double |
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.
|
java.util.LinkedList<net.minecraft.item.ItemStack> |
getStacksToDisplay(java.util.LinkedList<net.minecraft.item.ItemStack> stackConsumed) |
void |
idsToSchematic(MappingRegistry registry) |
void |
idsToWorld(MappingRegistry registry) |
void |
inventorySlotsToSchematic(MappingRegistry registry,
net.minecraft.nbt.NBTTagCompound nbt,
java.lang.String nbtName) |
void |
inventorySlotsToWorld(MappingRegistry registry,
net.minecraft.nbt.NBTTagCompound nbt,
java.lang.String nbtName) |
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 |
postProcessing(IBuilderContext context,
int x,
int y,
int z)
Called on a block when the blueprint has finished to place all the
blocks.
|
void |
readFromNBT(net.minecraft.nbt.NBTTagCompound nbt,
MappingRegistry registry) |
void |
rotateLeft(IBuilderContext context)
Perform a 90 degree rotation to the slot.
|
void |
translateToSchematic(Translation transform)
Applies translations to all positions in the schematic to center in the
blueprint referencial
|
void |
translateToWorld(Translation transform)
Apply translations to all positions in the schematic to center in the
builder referencial
|
net.minecraft.item.ItemStack |
useItem(IBuilderContext context,
net.minecraft.item.ItemStack req,
IInvSlot slot)
This is called each time an item matches a reqquirement, 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 |
writeRequirementsToBuilder(IBuilderContext context,
java.util.LinkedList<net.minecraft.item.ItemStack> requirements)
Returns the requirements needed to build this block.
|
void |
writeRequirementsToSchematic(IBuilderContext context,
int x,
int y,
int z) |
void |
writeToNBT(net.minecraft.nbt.NBTTagCompound nbt,
MappingRegistry registry) |
void |
writeToSchematic(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 |
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,
using the stack in parameters
|
public boolean isAlreadyBuilt(IBuilderContext context, int x, int y, int z)
public boolean doNotBuild()
public net.minecraft.item.ItemStack useItem(IBuilderContext context, net.minecraft.item.ItemStack req, IInvSlot slot)
public void rotateLeft(IBuilderContext context)
public void translateToSchematic(Translation transform)
public void translateToWorld(Translation transform)
public void idsToSchematic(MappingRegistry registry)
public void idsToWorld(MappingRegistry registry)
public void writeToWorld(IBuilderContext context, int x, int y, int z, java.util.LinkedList<net.minecraft.item.ItemStack> stacks)
public void writeToSchematic(IBuilderContext context, int x, int y, int z)
public void postProcessing(IBuilderContext context, int x, int y, int z)
public void writeRequirementsToSchematic(IBuilderContext context, int x, int y, int z)
public void writeRequirementsToBuilder(IBuilderContext context, java.util.LinkedList<net.minecraft.item.ItemStack> requirements)
public void writeToNBT(net.minecraft.nbt.NBTTagCompound nbt,
MappingRegistry registry)
public void readFromNBT(net.minecraft.nbt.NBTTagCompound nbt,
MappingRegistry registry)
public void inventorySlotsToSchematic(MappingRegistry registry, net.minecraft.nbt.NBTTagCompound nbt, java.lang.String nbtName)
public void inventorySlotsToWorld(MappingRegistry registry, net.minecraft.nbt.NBTTagCompound nbt, java.lang.String nbtName)
public java.util.LinkedList<net.minecraft.item.ItemStack> getStacksToDisplay(java.util.LinkedList<net.minecraft.item.ItemStack> stackConsumed)
public Schematic.BuildingStage getBuildStage()
public BuildingPermission getBuildingPermission()
public double getEnergyRequirement(java.util.LinkedList<net.minecraft.item.ItemStack> stacksUsed)