public class ColorComponent extends java.lang.Object implements IBlockComponent, IRegisterComponent
| Modifier and Type | Class and Description |
|---|---|
class |
ColorComponent.ColorHandler |
| Modifier and Type | Field and Description |
|---|---|
static net.minecraft.block.properties.PropertyEnum<net.minecraft.item.EnumDyeColor> |
COLOR |
| Constructor and Description |
|---|
ColorComponent(boolean useColorMultiplier) |
| Modifier and Type | Method and Description |
|---|---|
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. |
static net.minecraft.item.EnumDyeColor |
getColor(net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos)
Gets the
color for the Block at world coords. |
static net.minecraft.item.EnumDyeColor |
getColor(net.minecraft.block.state.IBlockState state)
Gets the
color for the IBlockState. |
net.minecraft.item.Item |
getItem(net.minecraft.block.Block block) |
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. |
int |
getMetaFromState(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
Get the metadata from the
IBlockState |
net.minecraft.block.properties.PropertyEnum<net.minecraft.item.EnumDyeColor> |
getProperty()
Gets the
IProperty used by this IBlockComponent. |
int |
getRenderColor(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
Gets the render color for this
Block. |
net.minecraft.block.state.IBlockState |
getStateFromMeta(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state,
int meta)
Get the
IBlockState from the metadata |
void |
getSubBlocks(net.minecraft.block.Block block,
net.minecraft.item.Item item,
net.minecraft.creativetab.CreativeTabs tab,
java.util.List<net.minecraft.item.ItemStack> list)
Fills the list with the sub-blocks associated with this
Block. |
java.lang.String |
getUnlocalizedName(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
Gets the unlocalized name for the specific
IBlockState. |
void |
register(IComponentProvider block)
Extra registration process for
IComponent. |
net.minecraft.block.state.IBlockState |
setDefaultState(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
Sets the default values for the
IBlockState. |
boolean |
useColorMultiplier() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbreakBlock, canPlaceBlockAt, canPlaceBlockOnSide, getBoundingBox, getBoundingBoxes, getItemDropped, getLightOpacity, getPackedLightmapCoords, getProperties, isFullBlock, isFullCube, isOpaqueCube, onBlockActivated, onBlockAdded, onBlockPlaced, onBlockPlacedBy, onNeighborBlockChange, quantityDropped, shouldSideBeRenderedgetComponent, getDependencies, isClientComponentpublic static net.minecraft.block.properties.PropertyEnum<net.minecraft.item.EnumDyeColor> COLOR
public boolean useColorMultiplier()
public net.minecraft.block.properties.PropertyEnum<net.minecraft.item.EnumDyeColor> 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 void register(IComponentProvider block)
IRegisterComponentIComponent.register in interface IRegisterComponentblock - the providerpublic java.lang.String getUnlocalizedName(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
IBlockComponentIBlockState.getUnlocalizedName in interface IBlockComponentblock - the blockstate - the statepublic net.minecraft.item.Item getItem(net.minecraft.block.Block block)
getItem in interface IBlockComponentpublic int damageDropped(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
IBlockComponentBlock is dropped.damageDropped in interface IBlockComponentblock - the blockstate - the statepublic void getSubBlocks(net.minecraft.block.Block block,
net.minecraft.item.Item item,
net.minecraft.creativetab.CreativeTabs tab,
java.util.List<net.minecraft.item.ItemStack> list)
IBlockComponentBlock.getSubBlocks in interface IBlockComponentblock - the blockitem - the itemtab - the tablist - the listpublic int getRenderColor(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
Block.block - the blockstate - the statepublic 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.getMapColor in interface IBlockComponentblock - the blockstate - the statepublic net.minecraft.block.state.IBlockState getStateFromMeta(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state,
int meta)
IBlockState from the metadatagetStateFromMeta in interface IBlockComponentblock - the blockstate - the statemeta - the metapublic int getMetaFromState(net.minecraft.block.Block block,
net.minecraft.block.state.IBlockState state)
IBlockStategetMetaFromState in interface IBlockComponentblock - the blockstate - the statepublic static net.minecraft.item.EnumDyeColor getColor(net.minecraft.world.IBlockAccess world,
net.minecraft.util.math.BlockPos pos)
color for the Block at world coords.world - the worldpos - the posColorComponentpublic static net.minecraft.item.EnumDyeColor getColor(net.minecraft.block.state.IBlockState state)
color for the IBlockState.state - the stateColorComponent