azalea-rs / azalea

A collection of Rust crates for making Minecraft bots, clients, and tools.
https://azalea.matdoes.dev
MIT License
361 stars 48 forks source link

Replace Bevy's FixedUpdate with Azalea's GameTick #119

Closed mat-1 closed 8 months ago

mat-1 commented 8 months ago

The FixedUpdate schedule can run multiple times in a row without Update running, which can cause weird bugs under high CPU usage. This change replaces FixedUpdate with our own schedule that we fully control, which I chose to put in azalea_core::tick::GameTick (and re-export in the azalea prelude). This will likely break some plugins, but it was probably going to have to happen at some point anyways so might as well rip the band-aid off now.

I implemented the change mostly with find-and-replace, so I may have overlooked things.