@@ -31,8 +31,8 @@ pub struct EntityStateSyncModule;
3131fn track_previous < T : ComponentId + Copy + Debug + PartialEq > ( world : & World ) {
3232 let post_store = world
3333 . entity_named ( "post_store" )
34- . add :: < flecs:: pipeline:: Phase > ( )
35- . depends_on :: < flecs:: pipeline:: OnStore > ( ) ;
34+ . add ( id :: < flecs:: pipeline:: Phase > ( ) )
35+ . depends_on ( id :: < flecs:: pipeline:: OnStore > ( ) ) ;
3636
3737 // we include names so that if we call this multiple times, we don't get multiple observers/systems
3838 let component_name = std:: any:: type_name :: < T > ( ) ;
@@ -46,14 +46,14 @@ fn track_previous<T: ComponentId + Copy + Debug + PartialEq>(world: &World) {
4646
4747 world
4848 . observer_named :: < flecs:: OnSet , & T > ( & observer_name)
49- . without :: < ( Prev , T ) > ( ) // we have not set Prev yet
49+ . without ( ( id :: < Prev > ( ) , id :: < T > ( ) ) ) // we have not set Prev yet
5050 . each_entity ( |entity, value| {
5151 entity. set_pair :: < Prev , T > ( * value) ;
5252 } ) ;
5353
5454 world
5555 . system_named :: < ( & mut ( Prev , T ) , & T ) > ( system_name. as_str ( ) )
56- . kind_id ( post_store)
56+ . kind ( post_store)
5757 . each ( |( prev, value) | {
5858 * prev = * value;
5959 } ) ;
@@ -70,7 +70,7 @@ impl Module for EntityStateSyncModule {
7070 ) > ( "entity_xp_sync" )
7171 . term_at ( 0u32 )
7272 . singleton ( )
73- . kind :: < flecs:: pipeline:: OnStore > ( )
73+ . kind ( id :: < flecs:: pipeline:: OnStore > ( ) )
7474 . each_iter ( |table, idx, ( compose, net, prev_xp, current) | {
7575 const {
7676 assert ! ( size_of:: <Xp >( ) == size_of:: <u16 >( ) ) ;
@@ -87,8 +87,8 @@ impl Module for EntityStateSyncModule {
8787 total_xp : VarInt :: default ( ) ,
8888 } ;
8989
90- let entity = table. entity ( idx) ;
91- entity. modified :: < Xp > ( ) ;
90+ let entity = table. entity ( idx) . expect ( "idx must be in bounds" ) ;
91+ entity. modified ( id :: < Xp > ( ) ) ;
9292
9393 compose. unicast ( & packet, * net, system) . unwrap ( ) ;
9494 }
@@ -97,10 +97,10 @@ impl Module for EntityStateSyncModule {
9797 } ) ;
9898
9999 system ! ( "entity_metadata_sync" , world, & Compose ( $) , & mut MetadataChanges )
100- . kind :: < flecs:: pipeline:: OnStore > ( )
100+ . kind ( id :: < flecs:: pipeline:: OnStore > ( ) )
101101 . each_iter ( move |it, row, ( compose, metadata_changes) | {
102102 let system = it. system ( ) ;
103- let entity = it. entity ( row) ;
103+ let entity = it. entity ( row) . expect ( "row must be in bounds" ) ;
104104 let entity_id = VarInt ( entity. minecraft_id ( ) ) ;
105105
106106 let metadata = get_and_clear_metadata ( metadata_changes) ;
@@ -110,7 +110,7 @@ impl Module for EntityStateSyncModule {
110110 entity_id,
111111 tracked_values : RawBytes ( & view) ,
112112 } ;
113- if entity. has :: < Position > ( ) {
113+ if entity. has ( id :: < Position > ( ) ) {
114114 entity. get :: < & Position > ( |position| {
115115 compose
116116 . broadcast_local ( & pkt, position. to_chunk ( ) , system)
@@ -132,12 +132,12 @@ impl Module for EntityStateSyncModule {
132132 ?& ConnectionId ,
133133 & mut ActiveAnimation ,
134134 )
135- . kind :: < flecs:: pipeline:: OnStore > ( )
135+ . kind ( id :: < flecs:: pipeline:: OnStore > ( ) )
136136 . each_iter (
137137 move |it, row, ( position, compose, connection_id, animation) | {
138138 let io = connection_id. copied ( ) ;
139139
140- let entity = it. entity ( row) ;
140+ let entity = it. entity ( row) . expect ( "row must be in bounds" ) ;
141141 let system = it. system ( ) ;
142142
143143 let entity_id = VarInt ( entity. minecraft_id ( ) ) ;
@@ -173,7 +173,7 @@ impl Module for EntityStateSyncModule {
173173 & mut MovementTracking ,
174174 & Flight ,
175175 )
176- . kind :: < flecs:: pipeline:: PreStore > ( )
176+ . kind ( id :: < flecs:: pipeline:: PreStore > ( ) )
177177 . each_iter (
178178 |it,
179179 row,
@@ -192,7 +192,7 @@ impl Module for EntityStateSyncModule {
192192 ) | {
193193 let world = it. system ( ) . world ( ) ;
194194 let system = it. system ( ) ;
195- let entity = it. entity ( row) ;
195+ let entity = it. entity ( row) . expect ( "row must be in bounds" ) ;
196196 let entity_id = VarInt ( entity. minecraft_id ( ) ) ;
197197
198198 if let Some ( pending_teleport) = pending_teleport {
@@ -363,7 +363,7 @@ impl Module for EntityStateSyncModule {
363363 & Owner ,
364364 ?& ConnectionId
365365 )
366- . kind :: < flecs:: pipeline:: OnUpdate > ( )
366+ . kind ( id :: < flecs:: pipeline:: OnUpdate > ( ) )
367367 . with_enum_wildcard :: < EntityKind > ( )
368368 . each_iter ( |it, row, ( position, velocity, owner, connection_id) | {
369369 if let Some ( _connection_id) = connection_id {
@@ -372,7 +372,7 @@ impl Module for EntityStateSyncModule {
372372
373373 let system = it. system ( ) ;
374374 let world = system. world ( ) ;
375- let arrow_entity = it. entity ( row) ;
375+ let arrow_entity = it. entity ( row) . expect ( "row must be in bounds" ) ;
376376
377377 if velocity. 0 != Vec3 :: ZERO {
378378 let center = * * position;
0 commit comments