public class BlockHandler
extends java.lang.Object
| Constructor and Description |
|---|
BlockHandler() |
BlockHandler(int id) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
areItemsEqual(net.minecraft.item.ItemStack stack1,
net.minecraft.item.ItemStack stack2) |
boolean |
buildBlockFromSchematic(net.minecraft.world.World world,
BlueprintBuilder.SchematicBuilder builder,
IBlueprintBuilderAgent builderAgent)
This function handles the placement of the block in the world.
|
boolean |
canPlaceNow(net.minecraft.world.World world,
int x,
int y,
int z,
net.minecraftforge.common.util.ForgeDirection blueprintOrientation,
net.minecraft.nbt.NBTTagCompound data)
Can the block be placed currently or is it waiting on some other block to
be placed first?
|
boolean |
canSaveToSchematic(net.minecraft.item.ItemStack stack)
By default we will ignore all blocks with Tile Entities.
|
boolean |
canSaveToSchematic(net.minecraft.world.World world,
int x,
int y,
int z)
By default we will ignore all blocks with Tile Entities.
|
boolean |
doesBlockMatchSchematic(net.minecraft.world.World world,
int x,
int y,
int z,
net.minecraftforge.common.util.ForgeDirection blueprintOrientation,
net.minecraft.nbt.NBTTagCompound data)
Checks if the block matches the schematic.
|
static BlockHandler |
get(net.minecraft.block.Block block) |
static BlockHandler |
get(int id) |
static BlockHandler |
get(net.minecraft.item.Item item) |
java.util.List<net.minecraft.item.ItemStack> |
getCostForSchematic(net.minecraft.nbt.NBTTagCompound data)
Provide a list of all the items that must be present to build this
schematic.
|
boolean |
isComplete(net.minecraft.world.World worldObj,
BlueprintBuilder.SchematicBuilder schematicBuilder) |
static void |
registerHandler(net.minecraft.block.Block block,
BlockHandler handler) |
static void |
registerHandler(int id,
BlockHandler handler) |
static void |
registerHandler(net.minecraft.item.Item item,
BlockHandler handler) |
void |
saveToSchematic(net.minecraft.item.ItemStack stack,
net.minecraft.nbt.NBTTagCompound data)
It is assumed that Blueprints always face North on save.
|
void |
saveToSchematic(net.minecraft.world.World world,
int x,
int y,
int z,
net.minecraft.nbt.NBTTagCompound data)
It is assumed that Blueprints always face North on save.
|
public static BlockHandler get(net.minecraft.item.Item item)
public static BlockHandler get(net.minecraft.block.Block block)
public static BlockHandler get(int id)
public static void registerHandler(net.minecraft.block.Block block,
BlockHandler handler)
public static void registerHandler(net.minecraft.item.Item item,
BlockHandler handler)
public static void registerHandler(int id,
BlockHandler handler)
public boolean canSaveToSchematic(net.minecraft.world.World world,
int x,
int y,
int z)
public boolean canSaveToSchematic(net.minecraft.item.ItemStack stack)
public void saveToSchematic(net.minecraft.world.World world,
int x,
int y,
int z,
net.minecraft.nbt.NBTTagCompound data)
public void saveToSchematic(net.minecraft.item.ItemStack stack,
net.minecraft.nbt.NBTTagCompound data)
public java.util.List<net.minecraft.item.ItemStack> getCostForSchematic(net.minecraft.nbt.NBTTagCompound data)
protected final boolean areItemsEqual(net.minecraft.item.ItemStack stack1,
net.minecraft.item.ItemStack stack2)
public boolean canPlaceNow(net.minecraft.world.World world,
int x,
int y,
int z,
net.minecraftforge.common.util.ForgeDirection blueprintOrientation,
net.minecraft.nbt.NBTTagCompound data)
public boolean buildBlockFromSchematic(net.minecraft.world.World world,
BlueprintBuilder.SchematicBuilder builder,
IBlueprintBuilderAgent builderAgent)
public boolean doesBlockMatchSchematic(net.minecraft.world.World world,
int x,
int y,
int z,
net.minecraftforge.common.util.ForgeDirection blueprintOrientation,
net.minecraft.nbt.NBTTagCompound data)
public boolean isComplete(net.minecraft.world.World worldObj,
BlueprintBuilder.SchematicBuilder schematicBuilder)