@Environment(value=CLIENT) public class BlockColors extends Object
Modifier and Type | Field and Description |
---|---|
private Map<Block,Set<Property<?>>> |
properties |
private IdList<BlockColorProvider> |
providers |
Constructor and Description |
---|
BlockColors() |
Modifier and Type | Method and Description |
---|---|
static BlockColors |
create() |
int |
getColor(BlockState state,
BlockRenderView world,
BlockPos pos,
int tint) |
int |
getColor(BlockState state,
World world,
BlockPos pos) |
Set<Property<?>> |
getProperties(Block block) |
private void |
registerColorProperties(Set<Property<?>> properties,
Block[] blocks) |
private void |
registerColorProperty(Property<?> property,
Block[] blocks) |
void |
registerColorProvider(BlockColorProvider provider,
Block[] blocks) |
private final IdList<BlockColorProvider> providers
public static BlockColors create()
public int getColor(BlockState state, World world, BlockPos pos)
public int getColor(BlockState state, @Nullable BlockRenderView world, @Nullable BlockPos pos, int tint)
public void registerColorProvider(BlockColorProvider provider, Block[] blocks)
private void registerColorProperties(Set<Property<?>> properties, Block[] blocks)