@@ -93,7 +93,7 @@ impl Handler<Player> {
93
93
let old_center_chunk = player. center_chunk . clone ( ) ;
94
94
let new_center_chunk = player. get_entity ( ) . position . chunk ( ) ;
95
95
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 )
97
97
} ) . await else { return } ;
98
98
99
99
// Tell the client which chunk he is in
@@ -113,7 +113,7 @@ impl Handler<Player> {
113
113
114
114
// Select chunks to load (max 50) and unload
115
115
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 } ;
117
117
let mut newly_loaded_chunks: Vec < _ > = loaded_chunks_after. difference ( & player. loaded_chunks ) . cloned ( ) . collect ( ) ;
118
118
let unloaded_chunks: Vec < _ > = player. loaded_chunks . difference ( & loaded_chunks_after) . cloned ( ) . collect ( ) ;
119
119
for skipped in newly_loaded_chunks. iter ( ) . skip ( 50 ) {
@@ -122,7 +122,7 @@ impl Handler<Player> {
122
122
newly_loaded_chunks. truncate ( 50 ) ;
123
123
let uuid = player. info . uuid ;
124
124
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) )
126
126
} ) . await . flatten ( ) else { return } ;
127
127
128
128
// Tell the world about the changes
@@ -177,7 +177,7 @@ impl Handler<Player> {
177
177
let packet = packet. serialize_minecraft_packet ( ) . unwrap ( ) ;
178
178
let packets_sent = self . mutate ( |player| {
179
179
player. packets_sent += 1 ;
180
- ( player. packets_sent , EntityChanges :: other ( ) )
180
+ player. packets_sent
181
181
} ) . await . unwrap_or ( 0 ) ;
182
182
if packets_sent > 500 {
183
183
warn ! ( "Many packets sent ({packets_sent})" ) ;
@@ -234,7 +234,7 @@ impl Handler<Player> {
234
234
} ,
235
235
WorldChange :: EntityMetadata { eid, metadata } => todo ! ( ) ,
236
236
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 } ;
238
238
match prev_position {
239
239
Some ( prev_position) => {
240
240
self . send_packet ( PlayClientbound :: UpdateEntityPosition {
0 commit comments