public class SlabComponent extends java.lang.Object implements IBlockComponent, IMergedBlock, ISmartCull
| Modifier and Type | Field and Description |
|---|---|
net.minecraft.block.properties.PropertyBool |
BOTTOM |
net.minecraft.block.properties.PropertyBool |
TOP |
| Constructor and Description |
|---|
SlabComponent() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canMerge(net.minecraft.item.ItemStack itemStack,
net.minecraft.entity.player.EntityPlayer player,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.util.EnumFacing side)
Checks whether the current
IBlockState can be merged into another one. |
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. |
net.minecraft.block.properties.PropertyBool |
getBottomProperty() |
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. |
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. |
int |
getMetaFromState(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
Gets the metadata from the
IBlockState. |
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. |
net.minecraft.block.properties.PropertyBool[] |
getProperties()
Gets the all the
properties used by this IBlockComponent. |
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. |
net.minecraft.block.state.IBlockState |
getStateFromMeta(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state,
int meta)
Gets the
IBlockState from meta. |
net.minecraft.block.properties.PropertyBool |
getTopProperty() |
static boolean |
isDoubleSlab(net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos) |
static boolean |
isDoubleSlab(net.minecraft.block.state.IBlockState state) |
java.lang.Boolean |
isFullBlock(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
Checks whether this
IBlockComponent represents a full Block. |
java.lang.Boolean |
isFullCube(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
Checks whether this
IBlockComponent represents a full cube. |
java.lang.Boolean |
isOpaqueCube(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
Checks whether this
IBlockComponent represents an opaque cube. |
static boolean |
isSlab(net.minecraft.block.Block block) |
static boolean |
isSlab(net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos) |
net.minecraft.block.state.IBlockState |
mergeBlock(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state,
net.minecraft.item.ItemStack itemStack,
net.minecraft.entity.player.EntityPlayer player,
net.minecraft.util.EnumFacing side,
float hitX,
float hitY,
float hitZ)
Merges the
IBlockState. |
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. |
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, waitbreakBlock, canPlaceBlockAt, canPlaceBlockOnSide, canProvidePower, getBoundingBoxes, getHasSubtypes, getItem, getItemDropped, getMapColor, getProperty, getSubBlocks, getUnlocalizedName, onBlockActivated, onBlockAdded, onBlockPlacedBy, onNeighborBlockChange, shouldSideBeRenderedgetComponent, getDependencies, isClientComponent, onComponentAddedmergeSelfOnlyshouldSmartCull, shouldSmartCullpublic net.minecraft.block.properties.PropertyBool BOTTOM
public net.minecraft.block.properties.PropertyBool TOP
public net.minecraft.block.properties.PropertyBool[] getProperties()
IBlockComponentproperties used by this IBlockComponent.getProperties in interface IBlockComponentpublic net.minecraft.block.properties.PropertyBool getTopProperty()
public net.minecraft.block.properties.PropertyBool getBottomProperty()
public 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 boolean canMerge(net.minecraft.item.ItemStack itemStack,
net.minecraft.entity.player.EntityPlayer player,
net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.util.EnumFacing side)
IMergedBlockIBlockState can be merged into another one.canMerge in interface IMergedBlockitemStack - the item stackplayer - the playerworld - the worldpos - the posside - the sidepublic net.minecraft.block.state.IBlockState mergeBlock(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.state.IBlockState state,
net.minecraft.item.ItemStack itemStack,
net.minecraft.entity.player.EntityPlayer player,
net.minecraft.util.EnumFacing side,
float hitX,
float hitY,
float hitZ)
IMergedBlockIBlockState.mergeBlock in interface IMergedBlockworld - the worldpos - the posstate - the stateitemStack - the item stackplayer - the playerside - the sidehitX - the hit xhitY - the hit yhitZ - the hit zIBlockState resulting of the merge, null if no merge is possible.public 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)
IBlockComponentBlock is placed in the World.getStateForPlacement 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 placerhand - the handpublic 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)
IBlockComponentBlock.getBoundingBox in interface IBlockComponentworld - the worldpos - the postype - the typepublic 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 java.lang.Boolean isFullCube(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
IBlockComponentIBlockComponent represents a full cube.isFullCube in interface IBlockComponentblock - the blockstate - the statepublic java.lang.Boolean isFullBlock(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
IBlockComponentIBlockComponent represents a full Block.isFullBlock in interface IBlockComponentblock - the blockstate - the statepublic java.lang.Boolean isOpaqueCube(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
IBlockComponentIBlockComponent represents an opaque cube.isOpaqueCube in interface IBlockComponentblock - the blockstate - the statepublic 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)
IBlockComponentBlock.getPackedLightmapCoords in interface IBlockComponentblock - the blockworld - the worldpos - the pospublic java.lang.Integer quantityDropped(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state,
int fortune,
java.util.Random random)
IBlockComponentBlock when broken.quantityDropped in interface IBlockComponentblock - the blockstate - the statefortune - the fortunerandom - the randompublic int damageDropped(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
IBlockComponentBlock is dropped.damageDropped in interface IBlockComponentblock - the blockstate - the statepublic 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)
IBlockComponentBlock.getLightOpacity in interface IBlockComponentblock - the blockworld - the worldpos - the pospublic static boolean isDoubleSlab(net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos)
public static boolean isDoubleSlab(net.minecraft.block.state.IBlockState state)
public static boolean isSlab(net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos)
public static boolean isSlab(net.minecraft.block.Block block)