public class MultiBlockComponent extends java.lang.Object implements IBlockComponent
| Modifier and Type | Class and Description |
|---|---|
static interface |
MultiBlockComponent.IMultiBlockProvider |
| Modifier and Type | Field and Description |
|---|---|
static net.minecraft.block.properties.PropertyBool |
ORIGIN |
| Constructor and Description |
|---|
MultiBlockComponent(MultiBlock multiBlock) |
MultiBlockComponent(MultiBlockComponent.IMultiBlockProvider provider) |
| Modifier and Type | Method and Description |
|---|---|
void |
breakBlock(net.minecraft.block.Block block,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state)
Called when the
Block is broken. |
java.util.List<IComponent> |
getDependencies()
Gets the additional components that this
IComponent depends on. |
int |
getMetaFromState(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
Gets the metadata from the
IBlockState. |
MultiBlock |
getMultiBlock() |
static MultiBlock |
getMultiBlock(net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state,
net.minecraft.item.ItemStack itemStack) |
net.minecraft.block.properties.PropertyBool |
getProperty()
Gets the
IProperty used by this IBlockComponent. |
MultiBlockComponent.IMultiBlockProvider |
getProvider() |
net.minecraft.block.state.IBlockState |
getStateFromMeta(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state,
int meta)
Gets the
IBlockState from meta. |
static boolean |
isOrigin(net.minecraft.block.state.IBlockState state) |
static boolean |
isOrigin(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos) |
net.minecraft.block.state.IBlockState |
onBlockPlaced(net.minecraft.block.Block block,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state,
net.minecraft.util.EnumFacing facing,
float hitX,
float hitY,
float hitZ,
int meta,
net.minecraft.entity.EntityLivingBase placer)
Called when the
Block is placed in the World. |
void |
onBlockPlacedBy(net.minecraft.block.Block block,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state,
net.minecraft.entity.EntityLivingBase placer,
net.minecraft.item.ItemStack stack)
Called when the
Block is placed by an EntityLivingBase in the World |
net.minecraft.block.state.IBlockState |
setDefaultState(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
Sets the default values for the
IBlockState. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcanPlaceBlockAt, canPlaceBlockOnSide, damageDropped, getBoundingBox, getBoundingBoxes, getItem, getItemDropped, getLightOpacity, getMapColor, getPackedLightmapCoords, getProperties, getSubBlocks, getUnlocalizedName, isFullBlock, isFullCube, isOpaqueCube, onBlockActivated, onBlockAdded, onNeighborBlockChange, quantityDropped, shouldSideBeRenderedgetComponent, isClientComponentpublic MultiBlockComponent(MultiBlock multiBlock)
public MultiBlockComponent(MultiBlockComponent.IMultiBlockProvider provider)
public MultiBlock getMultiBlock()
public MultiBlockComponent.IMultiBlockProvider getProvider()
public net.minecraft.block.properties.PropertyBool getProperty()
IBlockComponentIProperty used by this IBlockComponent.getProperty in interface IBlockComponentpublic net.minecraft.block.state.IBlockState setDefaultState(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
IBlockComponentIBlockState.setDefaultState in interface IBlockComponentblock - the blockstate - the statepublic java.util.List<IComponent> getDependencies()
IComponentIComponent depends on.getDependencies in interface IComponentpublic net.minecraft.block.state.IBlockState onBlockPlaced(net.minecraft.block.Block block,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state,
net.minecraft.util.EnumFacing facing,
float hitX,
float hitY,
float hitZ,
int meta,
net.minecraft.entity.EntityLivingBase placer)
IBlockComponentBlock is placed in the World.onBlockPlaced in interface IBlockComponentblock - the blockworld - the worldpos - the posstate - the statefacing - the facinghitX - the hit xhitY - the hit yhitZ - the hit zmeta - the metaplacer - the placerpublic void onBlockPlacedBy(net.minecraft.block.Block block,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state,
net.minecraft.entity.EntityLivingBase placer,
net.minecraft.item.ItemStack stack)
IBlockComponentBlock is placed by an EntityLivingBase in the WorldonBlockPlacedBy in interface IBlockComponentblock - the blockworld - the worldpos - the posstate - the stateplacer - the placerstack - the stackpublic void breakBlock(net.minecraft.block.Block block,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state)
IBlockComponentBlock is broken.breakBlock in interface IBlockComponentblock - the blockworld - the worldpos - the posstate - the statepublic net.minecraft.block.state.IBlockState getStateFromMeta(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state,
int meta)
IBlockComponentIBlockState from meta.getStateFromMeta in interface IBlockComponentblock - the blockmeta - the metapublic int getMetaFromState(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
IBlockComponentIBlockState.getMetaFromState in interface IBlockComponentblock - the blockstate - the statepublic static boolean isOrigin(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos)
public static boolean isOrigin(net.minecraft.block.state.IBlockState state)
public static MultiBlock getMultiBlock(net.minecraft.world.IBlockAccess world, net.minecraft.util.math.BlockPos pos, net.minecraft.block.state.IBlockState state, net.minecraft.item.ItemStack itemStack)