Buggy code:
public final class PlayerUpdating { private PlayerUpdating ( ) { } public static void update ( Player player ) throws Exception { } private static void appendChat ( Player player , DataBuffer out ) { } private static void appendAppearance ( Player player , DataBuffer out ) { } private static void addPlayer ( DataBuffer out , Player player , Player other ) { } private static void updateLocalPlayerMovement ( Player player , DataBuffer out ) { } private static void updateOtherPlayerMovement ( Player player , DataBuffer out ) { } private static void updateState ( Player player , Player thisPlayer , DataBuffer block , boolean forceAppearance , boolean noChat ) throws Exception { if ( ( ! ( player . getFlags ( ) . needsUpdate ( ) ) ) && ( ! forceAppearance ) ) return ; if ( ( ( ( ( player . getCachedUpdateBlock ( ) ) != null ) && ( ! ( player . equals ( thisPlayer ) ) ) ) && ( ! forceAppearance ) ) && ( ! noChat ) ) { <START_BUG> block . buffer ( ) . put ( player . getCachedUpdateBlock ( ) . array ( ) ) ; <END_BUG> return ; } DataBuffer cachedBuffer = DataBuffer . create ( 300 ) ; int mask = 0 ; if ( player . getFlags ( ) . get ( FORCED_MOVEMENT ) ) { mask |= 1024 ; } if ( player . getFlags ( ) . get ( GRAPHICS ) ) { mask |= 256 ; } if ( player . getFlags ( ) . get ( ANIMATION ) ) { mask |= 8 ; } if ( player . getFlags ( ) . get ( FORCED_CHAT ) ) { mask |= 4 ; } if ( ( player . getFlags ( ) . get ( CHAT ) ) && ( ! noChat ) ) { mask |= 128 ; } if ( ( player . getFlags ( ) . get ( APPEARANCE ) ) || forceAppearance ) { mask |= 16 ; } if ( player . getFlags ( ) . get ( FACE_CHARACTER ) ) { mask |= 1 ; } if ( player . getFlags ( ) . get ( FACE_COORDINATE ) ) { mask |= 2 ; } if ( player . getFlags ( ) . get ( HIT ) ) { mask |= 32 ; } if ( player . getFlags ( ) . get ( HIT_2 ) ) { mask |= 512 ; } if ( mask >= 256 ) { mask |= 64 ; cachedBuffer . putShort ( mask , LITTLE ) ; } else { cachedBuffer . put ( mask ) ; } if ( player . getFlags ( ) . get ( FORCED_MOVEMENT ) ) { PlayerUpdating . appendForcedMovement ( player , cachedBuffer ) ; } if ( player . getFlags ( ) . get ( GRAPHICS ) ) { PlayerUpdating . appendGraphic ( player , cachedBuffer ) ; } if ( player . getFlags ( ) . get ( ANIMATION ) ) { PlayerUpdating . appendAnimation ( player , cachedBuffer ) ; } if ( player . getFlags ( ) . get ( FORCED_CHAT ) ) { PlayerUpdating . appendForcedChat ( player , cachedBuffer ) ; } if ( ( player . getFlags ( ) . get ( CHAT ) ) && ( ! noChat ) ) { PlayerUpdating . appendChat ( player , cachedBuffer ) ; } if ( player . getFlags ( ) . get ( FACE_CHARACTER ) ) { PlayerUpdating . appendFaceCharacter ( player , cachedBuffer ) ; } if ( ( player . getFlags ( ) . get ( APPEARANCE ) ) || forceAppearance ) { PlayerUpdating . appendAppearance ( player , cachedBuffer ) ; } if ( player . getFlags ( ) . get ( FACE_COORDINATE ) ) { PlayerUpdating . appendFaceCoordinates ( player , cachedBuffer ) ; } if ( player . getFlags ( ) . get ( HIT ) ) { PlayerUpdating . appendPrimaryHit ( player , cachedBuffer ) ; } if ( player . getFlags ( ) . get ( HIT_2 ) ) { PlayerUpdating . appendSecondaryHit ( player , cachedBuffer ) ; } if ( ( ( ! ( player . equals ( thisPlayer ) ) ) && ( ! forceAppearance ) ) && ( ! noChat ) ) { player . setCachedUpdateBlock ( cachedBuffer . buffer ( ) ) ; } block . putBytes ( cachedBuffer . buffer ( ) ) ; } private static void appendForcedMovement ( Player player , DataBuffer out ) { } private static void appendForcedChat ( Player player , DataBuffer out ) { } private static void appendFaceCharacter ( Player player , DataBuffer out ) { } private static void appendFaceCoordinates ( Player player , DataBuffer out ) { } private static void appendAnimation ( Player player , DataBuffer out ) { } private static void appendPrimaryHit ( Player player , DataBuffer out ) throws Exception { } private static void appendSecondaryHit ( Player player , DataBuffer out ) throws Exception { } private static void appendGraphic ( Player player , DataBuffer out ) { } private static void appendStand ( DataBuffer out ) { } private static void appendWalk ( DataBuffer out , int direction , boolean attributesUpdate ) { } private static void appendRun ( DataBuffer out , int direction , int direction2 , boolean attributesUpdate ) { } private static void appendPlacement ( DataBuffer out , int localX , int localY , int z , boolean discardMovementQueue , boolean attributesUpdate ) { } }

Fix:
block . putBytes ( player . getCachedUpdateBlock ( ) ) ;