File tree 2 files changed +4
-10
lines changed
2 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -207,6 +207,9 @@ impl HyperionCore {
207
207
208
208
world. component :: < Prev > ( ) ;
209
209
210
+ // Minecraft tick rate is 20 ticks per second
211
+ world. set_target_fps ( 20.0 ) ;
212
+
210
213
// todo: sadly this requires u32
211
214
// .bit("on_fire", *EntityFlags::ON_FIRE)
212
215
// .bit("crouching", *EntityFlags::CROUCHING)
@@ -342,14 +345,6 @@ impl HyperionCore {
342
345
world. set ( StreamLookup :: default ( ) ) ;
343
346
344
347
world. set_threads ( i32:: try_from ( rayon:: current_num_threads ( ) ) ?) ;
345
-
346
- let mut app = world. app ( ) ;
347
-
348
- app. enable_rest ( 0 )
349
- . enable_stats ( true )
350
- . set_threads ( i32:: try_from ( rayon:: current_num_threads ( ) ) ?)
351
- . set_target_fps ( 20.0 ) ;
352
-
353
348
world. import :: < SimModule > ( ) ;
354
349
world. import :: < EgressModule > ( ) ;
355
350
world. import :: < IngressModule > ( ) ;
Original file line number Diff line number Diff line change @@ -173,8 +173,7 @@ pub fn init_game(address: SocketAddr) -> anyhow::Result<()> {
173
173
174
174
app. enable_rest ( 0 )
175
175
. enable_stats ( true )
176
- . set_threads ( i32:: try_from ( rayon:: current_num_threads ( ) ) ?)
177
- . set_target_fps ( 20.0 ) ;
176
+ . set_threads ( i32:: try_from ( rayon:: current_num_threads ( ) ) ?) ;
178
177
179
178
world. app ( ) . run ( ) ;
180
179
You can’t perform that action at this time.
0 commit comments