Adds the performance_tests/ directory.
In the future we could use our own fake client software instead of
rust-mc-bot. This would make it easier to run the tests.
* `RespawnRequest` client event
* `CombatDeath` packet
* `kill` client method
* `death.rs` example
* clippy lint fix
* Clean up examples
* Fix formatting
* `win_game`, `set_respawn_screen` client methods
* respawn screen no longer deferred
This means that death example does not have respawn screen now.
Co-authored-by: Ryan <ryanj00a@gmail.com>
The current approach to managing chunk data is misconceived. This new approach uses genuine paletted containers and does not suffer from complexities caused by caching. As a result, memory usage (according to htop) in the terrain example with render distance = 32 has gone from 785 megs to 137 megs. That's 17.4% of the memory it used to use. Terrain generation speed was not affected.
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.
* 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>
* Replace HashMap with BTreeMap in valence_nbt
Turns out that `BTreeMap`s are a bit faster when the element count is low.
This change also makes debugging compounds a bit easier since the elements are displayed in sorted order.
* Simplify read_list function slightly
This adds the `prevent-proxy-connections` server property and implements it into valence.
Note that if the server is in offline mode, this changes nothing.
By default, proxy connections are allowed.
Fixes#95
* Add basic enchantment extraction
* Change source format to individual fields rather than a list
Co-authored-by: Terminator <terminator@nonexistent.com>
valence_nbt has a much nicer API and avoids the complications brought by integrating with serde. valence_nbt also fixes some bugs and is 3x faster according to benchmarks.
* Set time of day #55
* fix typo
* Update src/client.rs
Co-authored-by: Ryan Johnson <ryanj00a@gmail.com>
* format file
Co-authored-by: Ryan Johnson <ryanj00a@gmail.com>