Commit graph

30 commits

Author SHA1 Message Date
Terminator b83b9f76ed
Expose enchantments to Rust (#99)
* Expose extracted enchantments to Rust.

* Give enchantments a `level: i16` field.

* Update enchantment derive impls

* Restructure how enchants are exposed to Rust through C-like enums

* Update build/enchant.rs

Co-authored-by: Ryan Johnson <ryanj00a@gmail.com>

* Update build/enchant.rs

Co-authored-by: Ryan Johnson <ryanj00a@gmail.com>

* Move enchantment sources to their own struct.

* make id() function return it's discriminant instead of matching

Co-authored-by: Ryan Johnson <ryanj00a@gmail.com>
2022-10-03 13:19:42 -07:00
Ryan Johnson 94cfc41486 Fix formatting 2022-09-28 00:23:14 -07:00
Ryan Johnson 77df8b668d Fix nightly clippy lints in build/entity.rs 2022-09-28 00:17:43 -07:00
Ryan c8cc7a021c Add valence_nbt to valence 2022-08-29 19:28:19 -07:00
Ryan d61c3f1f6f Fix change detection bug in build script 2022-08-09 17:35:49 -07:00
Ryan cd110c3cbb Add translation keys to block kind 2022-08-06 16:50:50 -07:00
Ryan 9c67978e06 Add collision shapes to block states 2022-08-06 16:46:07 -07:00
Ryan 49d63a39c0 Clean up client and fix names 2022-08-05 12:36:34 -07:00
Ryan 6b5e795f81 Rename entity data 2022-08-02 19:02:05 -07:00
Ryan ffad0b4021 Use the extracted data in the block generator 2022-07-28 08:15:23 -07:00
Ryan 2e22946ffc Rewrite the entity generator 2022-07-27 07:10:35 -07:00
Ryan b604dafe73 Add combat example 2022-07-17 21:29:44 -07:00
Ryan 865ab76699 Add custom data 2022-07-15 20:40:39 -07:00
Ryan 4b83801066 Clean up docs and fix clippy issues 2022-07-14 23:18:20 -07:00
Ryan 4a12def900 Redesign the spatial index API and add raycast example 2022-07-14 03:40:26 -07:00
Ryan 3f150b4c8a Document most items 2022-07-11 05:08:02 -07:00
Ryan 3ac711ca74 Use idiomatic names
The Rust stdlib uses "Kind" instead of "Type".
2022-07-05 19:21:52 -07:00
Ryan fcda380f2a Improve entity event API 2022-07-05 18:08:40 -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 1aa4ca878e Add player metadata to client 2022-06-29 13:00:41 -07:00
Ryan 69ba704352 Implement the block change packets 2022-06-22 08:06:54 -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 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 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 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 a997820b7a Add block state generator 2022-04-17 17:04:39 -07:00