public interface IBlockComponent extends IComponent
| Modifier and Type | Method and Description |
|---|---|
default 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. |
default boolean |
canPlaceBlockAt(net.minecraft.block.Block block,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos)
Whether the
Block can be placed at the position. |
default boolean |
canPlaceBlockOnSide(net.minecraft.block.Block block,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.util.EnumFacing side)
Whether the
Block can be placed on the side of another block. |
default boolean |
canProvidePower(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state) |
default int |
damageDropped(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
Gets the damage value for the item when the
Block is dropped. |
default net.minecraft.util.math.AxisAlignedBB |
getBoundingBox(net.minecraft.block.Block block,
net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state,
BoundingBoxType type)
Gets the bounding box for the
Block. |
default net.minecraft.util.math.AxisAlignedBB[] |
getBoundingBoxes(net.minecraft.block.Block block,
net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state,
BoundingBoxType type)
Gets the bounding boxes for the
Block. |
default boolean |
getHasSubtypes(net.minecraft.block.Block block,
net.minecraft.item.Item item)
Checks whether the Item has subtypes.
|
default net.minecraft.item.Item |
getItem(net.minecraft.block.Block block) |
default net.minecraft.item.Item |
getItemDropped(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state,
java.util.Random rand,
int fortune)
Gets the item dropped by the
Block when broken. |
default java.lang.Integer |
getLightOpacity(net.minecraft.block.Block block,
net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state)
Gets the light opacity for the
Block. |
default net.minecraft.block.material.MapColor |
getMapColor(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
Get the
MapColor for this Block and the given IBlockState. |
default int |
getMetaFromState(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
Gets the metadata from the
IBlockState. |
default java.lang.Integer |
getPackedLightmapCoords(net.minecraft.block.Block block,
net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state)
Gets the mixed brightness for the
Block. |
default net.minecraft.block.properties.IProperty<?>[] |
getProperties()
Gets the all the
properties used by this IBlockComponent. |
default net.minecraft.block.properties.IProperty<?> |
getProperty()
Gets the
IProperty used by this IBlockComponent. |
default net.minecraft.block.state.IBlockState |
getStateForPlacement(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,
net.minecraft.util.EnumHand hand)
Called when the
Block is placed in the World. |
default net.minecraft.block.state.IBlockState |
getStateFromMeta(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state,
int meta)
Gets the
IBlockState from meta. |
default void |
getSubBlocks(net.minecraft.block.Block block,
net.minecraft.item.Item item,
net.minecraft.creativetab.CreativeTabs tab,
net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> list)
Fills the list with the sub-blocks associated with this
Block. |
default java.lang.String |
getUnlocalizedName(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
Gets the unlocalized name for the specific
IBlockState. |
default java.lang.Boolean |
isFullBlock(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
Checks whether this
IBlockComponent represents a full Block. |
default java.lang.Boolean |
isFullCube(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
Checks whether this
IBlockComponent represents a full cube. |
default java.lang.Boolean |
isOpaqueCube(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
Checks whether this
IBlockComponent represents an opaque cube. |
default boolean |
onBlockActivated(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.player.EntityPlayer player,
net.minecraft.util.EnumHand hand,
net.minecraft.util.EnumFacing side,
float hitX,
float hitY,
float hitZ)
Called when the
Block is right-clicked by the player. |
default void |
onBlockAdded(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 added to the
World |
default 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 |
default void |
onNeighborBlockChange(net.minecraft.block.Block block,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state,
net.minecraft.block.Block neighborBlock,
net.minecraft.util.math.BlockPos neighborPos)
Called when a neighboring
Block changes. |
default java.lang.Integer |
quantityDropped(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state,
int fortune,
java.util.Random random)
Quantity the quantity dropped by the
Block when broken. |
default net.minecraft.block.state.IBlockState |
setDefaultState(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
Sets the default values for the
IBlockState. |
default java.lang.Boolean |
shouldSideBeRendered(net.minecraft.block.Block block,
net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state,
net.minecraft.util.EnumFacing side)
Checks whether a side should be rendered.
|
getComponent, getDependencies, isClientComponent, onComponentAddeddefault net.minecraft.block.properties.IProperty<?> getProperty()
IProperty used by this IBlockComponent.default net.minecraft.block.properties.IProperty<?>[] getProperties()
properties used by this IBlockComponent.default net.minecraft.block.state.IBlockState setDefaultState(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
IBlockState.block - the blockstate - the statedefault net.minecraft.item.Item getItem(net.minecraft.block.Block block)
default java.lang.String getUnlocalizedName(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
IBlockState.block - the blockstate - the statedefault void onBlockAdded(net.minecraft.block.Block block,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state)
Worldblock - the blockworld - the worldpos - the posstate - the statedefault net.minecraft.block.state.IBlockState getStateForPlacement(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,
net.minecraft.util.EnumHand hand)
Block is placed in the World.block - the blockworld - the worldpos - the posstate - the statefacing - the facinghitX - the hit xhitY - the hit yhitZ - the hit zmeta - the metaplacer - the placerhand - the handdefault 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)
Block is placed by an EntityLivingBase in the Worldblock - the blockworld - the worldpos - the posstate - the stateplacer - the placerstack - the stackdefault boolean onBlockActivated(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.player.EntityPlayer player,
net.minecraft.util.EnumHand hand,
net.minecraft.util.EnumFacing side,
float hitX,
float hitY,
float hitZ)
Block is right-clicked by the player.block - the blockworld - the worldpos - the posstate - the stateplayer - the playerhand - side - the sidehitX - the hit xhitY - the hit yhitZ - the hit zdefault void onNeighborBlockChange(net.minecraft.block.Block block,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state,
net.minecraft.block.Block neighborBlock,
net.minecraft.util.math.BlockPos neighborPos)
Block changes.block - the blockworld - the worldpos - the posstate - the stateneighborBlock - the neighbor blockneighborPos - TODOdefault void breakBlock(net.minecraft.block.Block block,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state)
Block is broken.block - the blockworld - the worldpos - the posstate - the statedefault net.minecraft.util.math.AxisAlignedBB getBoundingBox(net.minecraft.block.Block block,
net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state,
BoundingBoxType type)
Block.world - the worldpos - the postype - the typedefault net.minecraft.util.math.AxisAlignedBB[] getBoundingBoxes(net.minecraft.block.Block block,
net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state,
BoundingBoxType type)
Block.block - the blockworld - the worldpos - the postype - the typedefault boolean canPlaceBlockOnSide(net.minecraft.block.Block block,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.util.EnumFacing side)
Block can be placed on the side of another block.block - the blockworld - the worldpos - the posside - the sidedefault boolean canPlaceBlockAt(net.minecraft.block.Block block,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos)
Block can be placed at the position.world - the worldpos - the posdefault int damageDropped(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
Block is dropped.block - the blockstate - the statedefault boolean getHasSubtypes(net.minecraft.block.Block block,
net.minecraft.item.Item item)
default void getSubBlocks(net.minecraft.block.Block block,
net.minecraft.item.Item item,
net.minecraft.creativetab.CreativeTabs tab,
net.minecraft.util.NonNullList<net.minecraft.item.ItemStack> list)
Block.block - the blockitem - the itemtab - the tablist - the listdefault net.minecraft.block.material.MapColor getMapColor(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
MapColor for this Block and the given IBlockState.block - the blockstate - the statedefault net.minecraft.block.state.IBlockState getStateFromMeta(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state,
int meta)
IBlockState from meta.block - the blockmeta - the metadefault int getMetaFromState(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
IBlockState.block - the blockstate - the statedefault java.lang.Boolean shouldSideBeRendered(net.minecraft.block.Block block,
net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state,
net.minecraft.util.EnumFacing side)
block - the blockworld - the worldpos - the posstate - the stateside - the sidedefault java.lang.Boolean isFullBlock(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
IBlockComponent represents a full Block.block - the blockstate - the statedefault java.lang.Boolean isFullCube(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
IBlockComponent represents a full cube.block - the blockstate - the statedefault java.lang.Boolean isOpaqueCube(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
IBlockComponent represents an opaque cube.block - the blockstate - the statedefault boolean canProvidePower(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
default java.lang.Integer getPackedLightmapCoords(net.minecraft.block.Block block,
net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state)
Block.block - the blockworld - the worldpos - the posstate - default net.minecraft.item.Item getItemDropped(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state,
java.util.Random rand,
int fortune)
Block when broken.state - the staterand - the randfortune - the fortunedefault java.lang.Integer quantityDropped(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state,
int fortune,
java.util.Random random)
Block when broken.block - the blockstate - the statefortune - the fortunerandom - the randomdefault java.lang.Integer getLightOpacity(net.minecraft.block.Block block,
net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state)
Block.block - the blockworld - the worldpos - the posstate -