use of crazypants.enderio.base.machine.base.block.AbstractMachineBlock in project EnderIO by SleepyTrousers.
the class MachineRenderMapper method mapOverlayLayer.
@Override
@SideOnly(Side.CLIENT)
public EnumMap<EnumFacing, EnumIOMode> mapOverlayLayer(@Nonnull IBlockStateWrapper state, @Nonnull IBlockAccess world, @Nonnull BlockPos pos, boolean isPainted) {
TileEntity tileEntity = state.getTileEntity();
Block block = state.getBlock();
if ((tileEntity instanceof AbstractMachineEntity) && (block instanceof AbstractMachineBlock)) {
if (isPainted) {
return renderPaintIO((AbstractMachineEntity) tileEntity, (AbstractMachineBlock<?>) block);
} else {
return renderIO((AbstractMachineEntity) tileEntity, (AbstractMachineBlock<?>) block);
}
}
return null;
}
use of crazypants.enderio.base.machine.base.block.AbstractMachineBlock in project EnderIO by SleepyTrousers.
the class MachineRenderMapper method mapBlockRender.
@Override
@SideOnly(Side.CLIENT)
public List<IBlockState> mapBlockRender(@Nonnull IBlockStateWrapper state, @Nonnull IBlockAccess world, @Nonnull BlockPos pos, BlockRenderLayer blockLayer, @Nonnull QuadCollector quadCollector) {
TileEntity tileEntity = getTileEntity(state, pos);
Block block = state.getBlock();
if ((tileEntity instanceof AbstractMachineEntity) && (block instanceof AbstractMachineBlock)) {
return render(state.getState(), world, pos, blockLayer, (AbstractMachineEntity) tileEntity, (AbstractMachineBlock<?>) block);
}
return null;
}
Aggregations