Commit graph

9 commits

Author SHA1 Message Date
Ryan Johnson 420f2d1b7c
Move protocol code to valence_protocol + redesigns (#153)
Closes #83 

This PR aims to move all of Valence's networking code to the new
`valence_protocol` crate. Anything not specific to valence is going in
the new crate. It also redesigns the way packets are defined and makes a
huge number of small additions and improvements. It should be much
easier to see where code is supposed to go from now on.

`valence_protocol` is a new library which enables interactions with
Minecraft's protocol. It is completely decoupled from valence and can be
used to build new clients, servers, tools, etc.

There are two additions that will help with #5 especially:
- It is now easy to define new packets or modifications of existing
packets. Not all packets need to be bidirectional.
- The `CachedEncode` type has been created. This is used to safely cache
redundant calls to `Encode::encode`.
2022-11-13 06:10:42 -08:00
EmperialDev 1f996f7549
Add Items (#92)
Adding all the items, just like the blocks are. This will adress 1. and 2. bullet from issue #53
This will also make it easier to convert between block <-> item.
2022-10-05 09:28:08 -07:00
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 d61c3f1f6f Fix change detection bug in build script 2022-08-09 17:35:49 -07:00
Ryan 49d63a39c0 Clean up client and fix names 2022-08-05 12:36:34 -07:00
Ryan 2e22946ffc Rewrite the entity generator 2022-07-27 07:10:35 -07:00
Ryan 732183dd62 Rip out the ECS. 2022-04-29 00:48:41 -07:00
Ryan 6be10bba5a Specify rerun-if-changed files manually 2022-04-19 23:45:34 -07:00
Ryan a997820b7a Add block state generator 2022-04-17 17:04:39 -07:00