@@ -93,7 +93,7 @@ impl Handler<Player> {
9393 let old_center_chunk = player. center_chunk . clone ( ) ;
9494 let new_center_chunk = player. get_entity ( ) . position . chunk ( ) ;
9595 player. center_chunk = new_center_chunk. clone ( ) ;
96- ( ( old_center_chunk, new_center_chunk, player. render_distance ) , EntityChanges :: other ( ) )
96+ ( old_center_chunk, new_center_chunk, player. render_distance )
9797 } ) . await else { return } ;
9898
9999 // Tell the client which chunk he is in
@@ -113,7 +113,7 @@ impl Handler<Player> {
113113
114114 // Select chunks to load (max 50) and unload
115115 let Some ( ( loaded_chunks_after, newly_loaded_chunks, unloaded_chunks, uuid) ) = self . mutate ( |player| {
116- if loaded_chunks_after == player. loaded_chunks { return ( None , EntityChanges :: nothing ( ) ) } ;
116+ if loaded_chunks_after == player. loaded_chunks { return None } ;
117117 let mut newly_loaded_chunks: Vec < _ > = loaded_chunks_after. difference ( & player. loaded_chunks ) . cloned ( ) . collect ( ) ;
118118 let unloaded_chunks: Vec < _ > = player. loaded_chunks . difference ( & loaded_chunks_after) . cloned ( ) . collect ( ) ;
119119 for skipped in newly_loaded_chunks. iter ( ) . skip ( 50 ) {
@@ -122,7 +122,7 @@ impl Handler<Player> {
122122 newly_loaded_chunks. truncate ( 50 ) ;
123123 let uuid = player. info . uuid ;
124124 player. loaded_chunks = loaded_chunks_after. clone ( ) ;
125- ( Some ( ( loaded_chunks_after, newly_loaded_chunks, unloaded_chunks, uuid) ) , EntityChanges :: other ( ) )
125+ Some ( ( loaded_chunks_after, newly_loaded_chunks, unloaded_chunks, uuid) )
126126 } ) . await . flatten ( ) else { return } ;
127127
128128 // Tell the world about the changes
@@ -177,7 +177,7 @@ impl Handler<Player> {
177177 let packet = packet. serialize_minecraft_packet ( ) . unwrap ( ) ;
178178 let packets_sent = self . mutate ( |player| {
179179 player. packets_sent += 1 ;
180- ( player. packets_sent , EntityChanges :: other ( ) )
180+ player. packets_sent
181181 } ) . await . unwrap_or ( 0 ) ;
182182 if packets_sent > 500 {
183183 warn ! ( "Many packets sent ({packets_sent})" ) ;
@@ -234,7 +234,7 @@ impl Handler<Player> {
234234 } ,
235235 WorldChange :: EntityMetadata { eid, metadata } => todo ! ( ) ,
236236 WorldChange :: EntityPosition { eid, position } => {
237- let Some ( prev_position) = self . mutate ( |player| ( ( player. entity_prev_positions . insert ( eid, position. clone ( ) ) ) , EntityChanges :: other ( ) ) ) . await else { return } ;
237+ let Some ( prev_position) = self . mutate ( |player| player. entity_prev_positions . insert ( eid, position. clone ( ) ) ) . await else { return } ;
238238 match prev_position {
239239 Some ( prev_position) => {
240240 self . send_packet ( PlayClientbound :: UpdateEntityPosition {
0 commit comments