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>
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
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>
* Add methods to Config to use a custom session server
Added new methods to the Config trait, that enables
implementors to use a custom session server host
or even a fully custom URL.
* Fix error in documentation
* Make format_session_server_url return a String
Implements custom resource pack support.
Adds a `Client` method to set resource pack, and a `ClientEvent` for listening to resource pack status updates from clients.
* Added `SetExperience` and `SetHealth` packets
Packets were tested
* Rename packets in accordance with `packets.json`
Renamed `SetExperience` to
`ExperienceBarUpdate` and `SetHealth` to `HealthUpdate`
* `set_level` and `set_health_and_food` functions
* Adding basic test for entities container
* Entities test written
* Fixes: #11
* Update src/entity.rs
Co-authored-by: Ryan Johnson <ryanj00a@gmail.com>
* Removing unused imports
Co-authored-by: Ryan Johnson <ryanj00a@gmail.com>
* Impl Seek for reader in Decode Trait
* Add support for Slot data type
* Update tests and rust fmt
* Add tests for Slot
Also fixed bugs I found while testing
* Update slot signature
* Resolved requested changes
Updated decode trait signature and removed unnecessary getters/setters in `Slot`