use of mod.chiselsandbits.api.IMultiStateBlock in project TUMAT by canitzp.
the class ChiselsAndBits method renderBlock.
@Override
public TooltipComponent renderBlock(WorldClient world, EntityPlayerSP player, BlockPos pos, EnumFacing side, TooltipComponent component, boolean shouldCalculate) {
IBlockState state = world.getBlockState(pos);
if (state.getBlock() instanceof IMultiStateBlock) {
component.setName(new TextComponent(InfoUtil.getBlockName(state)));
component.add(new TextComponent(L10n.getChiselAndBitsBaseBlock(InfoUtil.getBlockName(((IMultiStateBlock) state.getBlock()).getPrimaryState(world, pos)))), TooltipComponent.Priority.HIGH);
}
return component;
}
Aggregations