public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderblocks) {
int meta = ((BlockRailBase) block).getBasicRailMetadata(world, null, x, y, z);
IIcon icon;
TileEntity tile = world.getTileEntity(x, y, z);
ITrackInstance track = null;
if (tile instanceof TileTrack) {
track = ((TileTrack) tile).getTrackInstance();
icon = renderblocks.getIconSafe(track.getIcon());
} else {
icon = Blocks.rail.getIcon(0, 0);
}
if (renderblocks.hasOverrideBlockTexture()) {