public class SlabComponent extends java.lang.Object implements IBlockComponent, IMergedBlock, ISmartCull
| Constructor and Description |
|---|
SlabComponent(MalisisBlock singleSlab,
MalisisBlock doubleSlab) |
| 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. |
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. |
net.minecraft.item.Item |
getItem(net.minecraft.block.Block block) |
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. |
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.PropertyEnum<net.minecraft.block.BlockSlab.EnumBlockHalf> |
getProperty()
Gets the
IProperty used by this IBlockComponent. |
net.minecraft.block.state.IBlockState |
getStateFromMeta(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state,
int meta)
Gets the
IBlockState from meta. |
boolean |
isDouble(net.minecraft.block.Block block) |
static boolean |
isDoubleSlab(net.minecraft.block.Block block) |
static boolean |
isDoubleSlab(net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos) |
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) |
static boolean |
isTop(net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos) |
static boolean |
isTop(net.minecraft.block.state.IBlockState state) |
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. |
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. |
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. |
void |
register() |
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, damageDropped, getBoundingBoxes, getMapColor, getProperties, getSubBlocks, getUnlocalizedName, onBlockActivated, onBlockAdded, onBlockPlacedBy, onNeighborBlockChange, shouldSideBeRenderedgetComponent, getDependencies, isClientComponentmergeSelfOnlyshouldSmartCull, shouldSmartCullpublic SlabComponent(MalisisBlock singleSlab, MalisisBlock doubleSlab)
public boolean isDouble(net.minecraft.block.Block block)
public void register()
public net.minecraft.block.properties.PropertyEnum<net.minecraft.block.BlockSlab.EnumBlockHalf> 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 net.minecraft.item.Item getItem(net.minecraft.block.Block block)
getItem in interface IBlockComponentpublic 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 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 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 net.minecraft.item.Item getItemDropped(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state,
java.util.Random rand,
int fortune)
IBlockComponentBlock when broken.getItemDropped in interface IBlockComponentstate - the staterand - the randfortune - the fortunepublic 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 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 isTop(net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos)
public static boolean isTop(net.minecraft.block.state.IBlockState state)
public static boolean isDoubleSlab(net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos)
public static boolean isDoubleSlab(net.minecraft.block.Block block)
public static boolean isSlab(net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos)
public static boolean isSlab(net.minecraft.block.Block block)