valence/crates
Ryan Johnson 0960ad7ead
Refactor valence_protocol (#253)
## Description

- Remove duplicate packet definitions by using `Cow`.
- Rename packets to match yarn mappings.
- Remove some top-level re-exports.
- Move every packet into its own module for consistency.
- Move packet-specific types from the `types` module into the
appropriate packet module.
- Remove internal use of `EncodePacket`/`DecodePacket` derives and move
packet identification to `packet_group`. This can be done because there
are no duplicate packets anymore.
- Simplify some events.

In a future PR I plan to clean things up further by properly bounding
packet data (to prevent DoS exploits) and fixing any remaining
inconsistencies with the game's packet definitions.

## Test Plan

Behavior of `valence_protocol` should be the same.

Steps:
1. Use the packet inspector against the vanilla server to ensure packet
behavior has not changed.
2. Run the examples.
3. Run `valence_stresser`.
2023-02-23 22:16:22 -08:00
..
packet_inspector Refactor valence_protocol (#253) 2023-02-23 22:16:22 -08:00
playground Implement Drop Item Events (#252) 2023-02-20 15:37:09 -08:00
valence Refactor valence_protocol (#253) 2023-02-23 22:16:22 -08:00
valence_anvil Refactor valence_protocol (#253) 2023-02-23 22:16:22 -08:00
valence_nbt Refactor valence_protocol (#253) 2023-02-23 22:16:22 -08:00
valence_protocol Refactor valence_protocol (#253) 2023-02-23 22:16:22 -08:00
valence_protocol_macros Add block entities (#32) 2023-02-18 10:16:01 -08:00
valence_spatial_index Reorganize Packages (#180) 2022-12-29 16:51:05 -08:00
valence_stresser Refactor valence_protocol (#253) 2023-02-23 22:16:22 -08:00