mirror of
https://github.com/italicsjenga/valence.git
synced 2024-12-23 22:41:30 +11:00
adc8a4faae
This change was made to make it easier for invariants to be upheld. When the spatial partition is added, we can ensure that changes to entities are immediately reflected in the partition. Additionally, chunks being shared between worlds was a leaky abstraction to begin with and is now removed. A method in `Config` is now necessary to determine what world a client should join. Along with this, most mutable references have been wrapped in a newtype to ensure that `mem::swap` cannot be used on them, which would break invariants. This is analogous to `Pin<&mut T>`. The reason we can't use Pin directly is because it would require unnecessary unsafe code within the library. |
||
---|---|---|
.. | ||
block.rs | ||
entity.rs | ||
main.rs |