Buggy code:
private void checkMinecraftFiles ( ) { } private void setChunkRange ( int n ) { } private void setHighlightRange ( int n ) { } private void updateExploredBlocks ( ) { } private void setMinecraftWorld ( WorldInfo world ) { } private void setMinecraftWorld ( WorldInfo world , FirstPersonCameraController camera ) { } private void moveCameraToPosition ( CameraPreset playerPos ) { } private void launchJumpDialog ( ) { } private void launchKeyHelpDialog ( ) { } private void reloadFromDisk ( ) { } private void moveCameraToArbitraryPosition ( ) { } private void moveCameraToSpawnPoint ( ) { } private void moveCameraToPlayerPos ( ) { } private void moveCameraToNextPlayer ( ) { } private void moveCameraToPreviousPlayer ( ) { } private void triggerChunkLoads ( ) { } private void handleInput ( float timeDelta ) { } private void switchDimension ( ) { } private void switchDimension ( int count ) { } private void invalidateSelectedChunks ( ) { } private void invalidateSelectedChunks ( boolean main_dirty ) { } private void setLightMode ( boolean lightMode ) { } private void switchFullScreenMode ( ) { } private void drawSpawnMarkerToMinimap ( ) { } private void drawPlayerposMarkerToMinimap ( ) { } private boolean render ( float timeDelta ) { GL11 . glLoadIdentity ( ) ; GL11 . glClear ( ( ( GL11 . GL_COLOR_BUFFER_BIT ) | ( GL11 . GL_DEPTH_BUFFER_BIT ) ) ) ; if ( ! ( map_load_started ) ) { map_load_started = true ; setLightMode ( lightMode ) ; } GL11 . glPushMatrix ( ) ; camera . applyCameraTransformation ( ) ; currentCameraPosX = - ( camera . getPosition ( ) . x ) ; currentCameraPosZ = - ( camera . getPosition ( ) . z ) ; int tempX = ( ( int ) ( ( currentCameraPosX ) - 0.5F ) ) ; int tempZ = ( ( int ) ( ( currentCameraPosZ ) - 0.5F ) ) ; if ( ( ( tempX != ( levelBlockX ) ) || ( tempZ != ( levelBlockZ ) ) ) || ( needToReloadWorld ) ) { levelBlockX = tempX ; levelBlockZ = tempZ ; currentLevelX = level . getChunkX ( levelBlockX ) ; currentLevelZ = level . getChunkZ ( levelBlockZ ) ; } int chunk_range = visible_chunk_range ; if ( ( XRay . HIGHLIGHT_RANGES [ currentHighlightDistance ] ) < chunk_range ) { chunk_range = XRay . HIGHLIGHT_RANGES [ currentHighlightDistance ] ; } ArrayList < Chunk > chunkList = new ArrayList < Chunk > ( ) ; Chunk curChunk = null ; for ( int lx = ( currentLevelX ) - ( visible_chunk_range ) ; lx < ( ( currentLevelX ) + ( visible_chunk_range ) ) ; lx ++ ) { for ( int lz = ( currentLevelZ ) - ( visible_chunk_range ) ; lz < ( ( currentLevelZ ) + ( visible_chunk_range ) ) ; lz ++ ) { Chunk k = level . getChunk ( lx , lz ) ; if ( k != null ) { chunkList . add ( k ) ; if ( ( lx == ( currentLevelX ) ) && ( lz == ( currentLevelZ ) ) ) { curChunk = k ; } } } } GL11 . glEnable ( GL_TEXTURE_2D ) ; GL11 . glColor3f ( 1.0F , 1.0F , 1.0F ) ; int last_tex = - 1 ; int i ; for ( Chunk k : chunkList ) { if ( k . hasPaintings ( ) ) { if ( last_tex != ( - 2 ) ) { paintingTexture . bind ( ) ; } k . renderPaintings ( ) ; last_tex = - 2 ; } } for ( i = 0 ; i < ( this . minecraftTextures . size ( ) ) ; i ++ ) { for ( Chunk k : chunkList ) { if ( k . usesSheet ( i ) ) { if ( last_tex != i ) { minecraftTextures . get ( i ) . bind ( ) ; last_tex = i ; } k . renderSolid ( i ) ; <START_BUG> if ( ( XRay . toggle . highlightOres ) != ( XRay . HIGHLIGHT_TYPE . OFF ) ) { <END_BUG> k . renderSelected ( i , this . mineralToggle ) ; } } } } for ( i = 0 ; i < ( this . minecraftTextures . size ( ) ) ; i ++ ) { for ( Chunk k : chunkList ) { if ( k . usesSheet ( i ) ) { if ( last_tex != i ) { minecraftTextures . get ( i ) . bind ( ) ; last_tex = i ; } k . renderNonstandard ( i ) ; } } } for ( i = 0 ; i < ( this . minecraftTextures . size ( ) ) ; i ++ ) { for ( Chunk k : chunkList ) { if ( k . usesSheet ( i ) ) { if ( last_tex != i ) { minecraftTextures . get ( i ) . bind ( ) ; last_tex = i ; } k . renderGlass ( i ) ; } } } if ( renderSlimeChunks ) { for ( Chunk k : chunkList ) { if ( k . willSpawnSlimes ) { slimeChunkTexture . bind ( ) ; k . renderSlimeBox ( ) ; last_tex = - 1 ; } } } if ( ( renderChunkBorders ) && ( curChunk != null ) ) { chunkBorderTexture . bind ( ) ; curChunk . renderBorder ( ) ; last_tex = - 1 ; } if ( ( XRay . toggle . highlightOres ) != ( XRay . HIGHLIGHT_TYPE . OFF ) ) { GL11 . glDisable ( GL_DEPTH_TEST ) ; switch ( XRay . toggle . highlightOres ) { case WHITE : long time = System . currentTimeMillis ( ) ; float alpha = ( time % 1000 ) // 1000.0F ; if ( ( time % 2000 ) > 1000 ) { alpha = 1.0F - alpha ;

Fix:
if ( ( XRay . toggle . highlightOres ) == ( XRay . HIGHLIGHT_TYPE . OFF ) ) {