Crate golden_apple[−][src]
Expand description
Overview
golden_apple
is a library for decoding, encoding, and using common types found in Minecraft:
Java Edition.
Goals
- Provide a generalized format for sharing and using Minecraft’s data types
- Simplify the decoding and encoding of network data
- Abstract away enums usually passed as numbers
Usage
Proprietary Minecraft types like VarInt
, VarLong
, and Position
are a part of the top
level module. Types that can be fully represented in Rust have encoders/decoders under
golden_apple::generalized
, in case it isn’t striaghtforward to do so. All enums are under
the golden_apple::enums
module.
Modules
Provides tools for reading, writing, and managing the various enums that Minecraft uses. Many of these enums contain descriptions of their respective attributes in quotes. This indicates that the information is taken directly from https://wiki.vg/Protocol_FAQ
generalized
contains many repetetive and unnecisary functions for reading and writing data.
For sake of completion and inclusiveness, all standard types that may be written over the
stream, no matter how easy to parse, are included here.
Provides tools for reading, writing, and managing NBT types.
Structs
Represents an angle. Cannot be greater than one full rotation, does not have negative values.
Represents a chat message or other form of rich text.
Represents one component of a Chat object.
Describes details about a scoreboard.
Represents a namespaced selector.
Represents a position in the Minecraft world. Not the floating point values used for player movement, but the whole number values used for things like block positions.
Represents a Unique User ID. Used to track players and entities.
Represents a Java Int (i32) using between 1-5 bytes.
Represents a Java Long (i64) using between 1-10 bytes.
Enums
Represents an error that can occur while using one of the libraries functions.