Commit graph

398 commits

Author SHA1 Message Date
Ryan 0fcedd3656 Improve packet debug output 2022-07-01 16:03:15 -07:00
Ryan a259bdf840 Add the packet inspector proxy 2022-07-01 15:29:31 -07:00
Ryan 9a87fda211 Rename packets 2022-06-30 14:18:29 -07:00
Ryan 6ef634ca2c Use Rust 1.62.0 features 2022-06-30 13:22:08 -07:00
Ryan 560163fd2e Expose the protocol API behind a feature flag
This could be useful for building proxies or clients in the future.
2022-06-30 11:53:57 -07:00
Ryan fa2241c038 Basic chat message support 2022-06-29 21:34:20 -07:00
Ryan a182f17c78 Don't forget to clear modifications. 2022-06-29 13:16:45 -07:00
Ryan 1aa4ca878e Add player metadata to client 2022-06-29 13:00:41 -07:00
Ryan 806ffa4f42 Remove &mut wrappers
The mutable reference wappers were causing more problems than they were
solving. We will document the dangers of mem::swap later.
2022-06-29 11:09:00 -07:00
Ryan e97df76a75 Don't tamper with the texture payload
The texture payload (skin + cape URL) that we get from the auth server
needs to stay intact so the signature is not invalidated. However, skins
still aren't loading. Not sure what's up with that.
2022-06-28 18:29:29 -07:00
Ryan 055dd03ffc Implement the player list 2022-06-27 17:52:23 -07:00
Ryan d7d922399a Add more client events 2022-06-24 16:11:15 -07:00
Ryan a58258e8d3 Update packets 2022-06-23 04:50:27 -07:00
Ryan a9cdff3dca Get authentication working again 2022-06-22 23:33:38 -07:00
Ryan 69ba704352 Implement the block change packets 2022-06-22 08:06:54 -07:00
Ryan 09b434f298 Add sequence to PlayerDigging 2022-06-21 15:08:45 -07:00
Ryan f75debdd50 Tweaks to terrain.rs 2022-06-21 15:07:02 -07:00
Ryan 16b9b4ca9e Support the last death location for the recovery compass 2022-06-21 14:14:16 -07:00
Ryan 10fc2af7a2 Send is_flat in JoinGame 2022-06-21 12:26:28 -07:00
Ryan c86b8286ce Update to 1.19
Authentication is currently broken. Looks like the EncryptionResponse
packet changed.
2022-06-21 04:55:32 -07:00
Ryan 8ad9c8587a Upgrade the chunk example 2022-06-19 08:40:37 -07:00
Ryan 004f84370d Use the spatial index in client updates 2022-06-19 01:01:48 -07:00
Ryan d709eb5ec8 Add spatial index 2022-06-19 00:25:25 -07:00
Ryan a61f5b1990 replace R-Tree with BVH 2022-06-13 02:34:03 -07:00
Ryan efc2873908 Reorganize modules 2022-06-09 20:26:21 -07:00
Ryan 34d831f5fd Add R-Tree 2022-06-06 23:20:34 -07:00
Ryan f875ed07ce Complete the cow sphere™ 2022-05-18 03:05:10 -07:00
Ryan 1570c95ac8 Get entity movement working 2022-05-17 02:58:43 -07:00
Ryan 8da32d0b8b Fix bug in chunk encoder 2022-05-16 11:53:21 -07:00
Ryan 620c0bf287 Replace nalgebra-glm with vek
Vek has been pleasant to use in practice. nalgebra is slow to compile
and its documentation is difficult to traverse. Vek also comes with its
own AABB impl, so we use that instead.
2022-05-16 04:09:51 -07:00
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