use of crazypants.enderio.powertools.machine.capbank.InfoDisplayType in project EnderIO by SleepyTrousers.
the class CapBankBlockRenderMapper method renderBody.
@Override
@SideOnly(Side.CLIENT)
protected List<IBlockState> renderBody(@Nonnull IBlockStateWrapper state, @Nonnull IBlockAccess world, @Nonnull BlockPos pos, BlockRenderLayer blockLayer, @Nonnull QuadCollector quadCollector) {
List<IBlockState> states = new ArrayList<IBlockState>();
TileEntity tileEntity = state.getTileEntity();
if (tileEntity instanceof TileCapBank && state.getBlock() instanceof BlockCapBank) {
NNList.FACING.apply(new Callback<EnumFacing>() {
@Override
public void apply(@Nonnull EnumFacing face) {
IoMode ioMode = ((TileCapBank) tileEntity).getIoMode(face);
InfoDisplayType displayType = ((TileCapBank) tileEntity).getDisplayType(face);
EnumIOMode iOMode = ((BlockCapBank) state.getBlock()).mapIOMode(displayType, ioMode);
states.add(ModObject.block_machine_io.getBlockNN().getDefaultState().withProperty(IOMode.IO, IOMode.get(face, iOMode)));
}
});
} else {
states.add(state.getState().withProperty(RENDER, EnumMergingBlockRenderMode.sides).withProperty(CapBankType.KIND, CapBankType.NONE));
}
return states;
}
Aggregations