Crates.io | golden_apple |
lib.rs | golden_apple |
version | |
source | src |
created_at | 2021-06-20 03:10:50.152178 |
updated_at | 2024-11-09 08:15:07.691573 |
description | A Rust library for decoding and sharing Minecraft data types |
homepage | |
repository | https://github.com/thisjaiden/golden_apple |
max_upload_size | |
id | 412274 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
golden_apple
is a library for decoding, encoding, and using common types found in Minecraft: Java Edition.
let mut nbt_file_reader = std::fs::File::open("test.nbt")
.expect("Unable to open file!");
match golden_apple::nbt::from_reader(&mut nbt_file_reader) {
Ok(named_tag) => {
println!("NBT Data: {:#?}", named_tag);
}
Err(e) => {
panic!("Unable to parse NBT! ({:?})", e);
}
}
Proprietary Minecraft types like VarInt
, VarLong
, and Position
are a part of the top level crate.
Types that can be fully represented in Rust have encoders/decoders under golden_apple::generalized
for reading and writing from both byte arrays and Rust's Read/Write traits.
Communicating with existing servers and clients can be done using the packet format and tools found in the netty
module.
This crate is unfinished and some features aren't yet present. Here's an overview of what's still in progress:
There is one Cargo feature flag for this crate, encryption
. It is not complete at this time and currently does nothing. Eventually, this will enable methods for handling packets when encryption is enabled between the server and client.
Crate version | Minecraft version | Minecraft Protocol ID |
---|---|---|
0.20.0 | 1.21.2 - 1.21.3 | 768 |
0.18.0 - 0.19.0 | 1.21.0 - 1.21.1 | 767 |
0.17.0 - 0.17.2 | 1.19.2 | 762 |