Commit graph

68 commits

Author SHA1 Message Date
Ryan adc8a4faae Give World ownership over entities, clients, and chunks.
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.
2022-05-16 02:36:14 -07:00
Ryan a9005d7a59 Make slotmap keys unique
This lets us use slotmap keys between different instances of the slotmap
without unspecified behavior happening. Also, we no longer have to worry
about version overflow. The downside is that the keys are now 12 bytes
instead of 8, but this is an acceptable trade if it means fewer bugs.
2022-05-07 01:05:23 -07:00
Ryan 72fe8395cb Use the block state API in chunk.rs. 2022-04-30 19:05:38 -07:00
Ryan 27e818d6cd Change update_duration to tick_rate and tweak favicon_png. 2022-04-30 18:01:59 -07:00
Ryan a0892faa72 Put all config options in a single trait 2022-04-30 05:06:20 -07:00
Ryan 732183dd62 Rip out the ECS. 2022-04-29 00:48:41 -07:00
Ryan 5f2389f0e7 Add entity metadata to build script 2022-04-26 19:48:35 -07:00
Ryan 6be10bba5a Specify rerun-if-changed files manually 2022-04-19 23:45:34 -07:00
Ryan f5f8264a70 Add Debug impl to BlockState 2022-04-19 23:41:15 -07:00
Ryan 1a27cb92ce Expand block state API 2022-04-19 23:40:33 -07:00
Ryan 064dcfbc0b Get the block state generator to match what the client expects 2022-04-18 00:43:34 -07:00
Ryan b5a88be024 cargo fmt 2022-04-17 17:06:13 -07:00
Ryan f35d8e7b13 Tweak text.rs 2022-04-17 17:05:13 -07:00
Ryan a997820b7a Add block state generator 2022-04-17 17:04:39 -07:00
Ryan 5bbbb258d1 move from private repo 2022-04-14 14:55:45 -07:00
Ryan db0eae3a6c fix broken link 2022-01-20 06:41:24 -08:00
Ryan 8b29a04af8 prepare for crates.io 2022-01-20 06:39:49 -08:00
Ryan Johnson 30fa1b175c
Initial commit 2022-01-20 05:47:28 -08:00