public class MultiBlock
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
MultiBlock.IProvider |
Modifier and Type | Field and Description |
---|---|
protected net.minecraft.util.AxisAlignedBB |
aabb |
protected net.minecraft.block.Block |
block |
protected net.minecraftforge.common.util.ForgeDirection |
direction |
protected net.minecraft.world.World |
world |
protected int |
x |
protected int |
y |
protected int |
z |
Constructor and Description |
---|
MultiBlock(int x,
int y,
int z) |
MultiBlock(net.minecraft.nbt.NBTTagCompound tag) |
MultiBlock(net.minecraft.world.World world,
int x,
int y,
int z) |
MultiBlock(net.minecraft.world.World world,
int x,
int y,
int z,
net.minecraft.util.AxisAlignedBB aabb) |
MultiBlock(net.minecraft.world.World world,
int x,
int y,
int z,
int width,
int height,
int depth) |
Modifier and Type | Method and Description |
---|---|
static boolean |
destroy(net.minecraft.world.World world,
int x,
int y,
int z)
Destroy this
MultiBlock . |
net.minecraft.util.AxisAlignedBB |
getBounds() |
net.minecraftforge.common.util.ForgeDirection |
getDirection() |
protected net.minecraft.world.ChunkPosition[] |
getListPositions()
Gets a list of
ChunkPosition for this MultiBlock . |
static MultiBlock |
getMultiBlock(net.minecraft.world.IBlockAccess world,
int x,
int y,
int z)
Gets the
MultiBlock instance at the specified coordinates. |
static <T extends net.minecraft.tileentity.TileEntity & MultiBlock.IProvider> |
getOriginProvider(java.lang.Class<T> providerClass,
net.minecraft.world.IBlockAccess world,
int x,
int y,
int z) |
static <T extends net.minecraft.tileentity.TileEntity & MultiBlock.IProvider> |
getOriginProvider(T provider) |
net.minecraft.util.AxisAlignedBB |
getWorldBounds() |
int |
getX() |
int |
getY() |
int |
getZ() |
static boolean |
isOrigin(net.minecraft.world.IBlockAccess world,
int x,
int y,
int z)
Checks whether the coordinates passed are the origin of a
MultiBlock . |
boolean |
isOrigin(int x,
int y,
int z)
Checks whether the coordinates passed are the origin of this
MultiBlock . |
boolean |
placeBlocks()
Place Block for every position occupied by this
MultiBlock . |
boolean |
placeBlocks(boolean placeOrigin)
Place Block for every position occupied by this
MultiBlock . |
void |
readFromNBT(net.minecraft.nbt.NBTTagCompound tag)
Creates MultiBlock structure using the provided NBTTagCompound.
|
boolean |
removeBlocks()
Removes the blocks composing this
MultiBlock , including the origin. |
void |
setBlock(net.minecraft.block.Block block) |
void |
setBounds(net.minecraft.util.AxisAlignedBB aabb)
Sets a bounding box for this
MultiBlock . |
void |
setDirection(net.minecraftforge.common.util.ForgeDirection direction)
Sets a facing for this
MultiBlock . |
void |
setSize(int width,
int height,
int depth)
Sets the size for this
MultiBlock . |
void |
setWorld(net.minecraft.world.World world)
Sets the world object for this
MultiBlock . |
void |
writeToNBT(net.minecraft.nbt.NBTTagCompound tag)
Write this
MultiBlock informations into the provided NBTTagCompound. |
protected net.minecraft.world.World world
protected net.minecraft.block.Block block
protected net.minecraft.util.AxisAlignedBB aabb
protected net.minecraftforge.common.util.ForgeDirection direction
protected int x
protected int y
protected int z
public MultiBlock(int x, int y, int z)
public MultiBlock(net.minecraft.world.World world, int x, int y, int z)
public MultiBlock(net.minecraft.world.World world, int x, int y, int z, net.minecraft.util.AxisAlignedBB aabb)
public MultiBlock(net.minecraft.world.World world, int x, int y, int z, int width, int height, int depth)
public MultiBlock(net.minecraft.nbt.NBTTagCompound tag)
public int getX()
public int getY()
public int getZ()
public void setBlock(net.minecraft.block.Block block)
public void setWorld(net.minecraft.world.World world)
MultiBlock
.MultiBlock
.world
- the worldpublic void setDirection(net.minecraftforge.common.util.ForgeDirection direction)
MultiBlock
.direction
- the directionpublic net.minecraftforge.common.util.ForgeDirection getDirection()
public boolean isOrigin(int x, int y, int z)
MultiBlock
.x
- the xy
- the yz
- the zpublic void setSize(int width, int height, int depth)
MultiBlock
.width
- the widthheight
- the heightdepth
- the depthpublic void setBounds(net.minecraft.util.AxisAlignedBB aabb)
MultiBlock
. To be used when the origin needs not to be in a corner.aabb
- the new boundspublic net.minecraft.util.AxisAlignedBB getBounds()
public net.minecraft.util.AxisAlignedBB getWorldBounds()
protected net.minecraft.world.ChunkPosition[] getListPositions()
ChunkPosition
for this MultiBlock
. Does not include original block position.public boolean placeBlocks()
MultiBlock
.Block.onBlockPlacedBy(World, int, int, int, net.minecraft.entity.EntityLivingBase, net.minecraft.item.ItemStack)
.public boolean placeBlocks(boolean placeOrigin)
MultiBlock
.Block.onBlockPlacedBy(World, int, int, int, net.minecraft.entity.EntityLivingBase, net.minecraft.item.ItemStack)
.placeOrigin
- true if the origin block should be place. The block must be already setpublic boolean removeBlocks()
MultiBlock
, including the origin.public void writeToNBT(net.minecraft.nbt.NBTTagCompound tag)
MultiBlock
informations into the provided NBTTagCompound.tag
- the tagpublic void readFromNBT(net.minecraft.nbt.NBTTagCompound tag)
tag
- the tagpublic static boolean destroy(net.minecraft.world.World world, int x, int y, int z)
MultiBlock
. MultiBlock
structure.world
- the worldx
- the xy
- the yz
- the zpublic static MultiBlock getMultiBlock(net.minecraft.world.IBlockAccess world, int x, int y, int z)
MultiBlock
instance at the specified coordinates.world
- the worldx
- the xy
- the yz
- the zpublic static boolean isOrigin(net.minecraft.world.IBlockAccess world, int x, int y, int z)
MultiBlock
.world
- the worldx
- the xy
- the yz
- the zpublic static <T extends net.minecraft.tileentity.TileEntity & MultiBlock.IProvider> T getOriginProvider(java.lang.Class<T> providerClass, net.minecraft.world.IBlockAccess world, int x, int y, int z)
public static <T extends net.minecraft.tileentity.TileEntity & MultiBlock.IProvider> T getOriginProvider(T provider)