-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #97 from bedrock-crustaceans/dev
Stabilize Dev
- Loading branch information
Showing
796 changed files
with
20,867 additions
and
5,630 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,101 @@ | ||
# bedrock-rs | ||
|
||
_Universal toolkit for MCBE in Rust_ | ||
**_Universal Toolkit for Minecraft Bedrock Edition in Rust_** | ||
|
||
An easy-to-use universal library for Minecraft Bedrock written in Rust, that aims to provide: | ||
**bedrock-rs** is a comprehensive and user-friendly library written in Rust, designed to provide a universal solution for working with Minecraft Bedrock Edition. This project offers: | ||
|
||
- [X] Standards | ||
- [X] Common implementations | ||
- [X] An easy-to-use api | ||
- **Standards:** Adhering to best practices and conventions. | ||
- **Common Implementations:** Reusable components for various Minecraft Bedrock needs. | ||
- **Easy-to-Use API:** Streamlined interfaces to make development efficient and enjoyable. | ||
|
||
We also have a community discord, feel free to join it to learn more about our future and get help when needed: https://discord.com/invite/VCVcrvt3JC | ||
Join our growing community on Discord to learn more about the project’s future, seek support, or collaborate with others: | ||
**[Join our Discord](https://discord.com/invite/VCVcrvt3JC)** | ||
|
||
## Crates: | ||
--- | ||
|
||
- [Core](https://github.com/Adrian8115/bedrock-rs/tree/main/crates/core): | ||
- Provides common base datatypes. | ||
## Crates | ||
|
||
- [Shared](https://github.com/Adrian8115/bedrock-rs/tree/main/crates/shared): | ||
- Shared datatypes that can use derive macros defined in other crates. | ||
To maintain modularity and scalability, **bedrock-rs** is divided into multiple crates. Each crate focuses on a specific functionality, making it easier to use and manage. All crates are accessible through the primary `bedrockrs` crate. Additionally, the library offers a variety of optional features you can enable to suit your needs. | ||
|
||
- [Proto](https://github.com/Adrian8115/bedrock-rs/tree/main/crates/proto): | ||
- Full implementation of the Bedrock protocol. | ||
- Support for both Server and Client side intended. | ||
- Built-in login procedure. | ||
### Crate Breakdown: | ||
|
||
- [World](https://github.com/Adrian8115/bedrock-rs/tree/main/crates/world): | ||
- Implementation of the Bedrock level format using our own `leveldb` bindings for mojangs leveldb fork. | ||
- [`bedrockrs::shared`](crates/shared) | ||
- [X] Shared data types used across other crates. | ||
- [X] Support for deriving macros defined in other modules. | ||
|
||
- [Addons](https://github.com/Adrian8115/bedrock-rs/tree/main/crates/addon): | ||
- Datatypes defining the structure of Addons. | ||
- Serialization and Deserialization of addons. | ||
- [`bedrockrs::form`](crates/form) | ||
- [X] Implementation of the JSON form format used by Minecraft Bedrock Edition. | ||
|
||
- [Form](https://github.com/Adrian8115/bedrock-rs/tree/main/crates/form): | ||
- Implementation of the JSON form format used in Minecraft Bedrock. | ||
- [`bedrockrs::addon`](crates/addon) | ||
- [X] Datatypes for defining Minecraft Addon structures. | ||
- [X] Serialization and deserialization support for Addons. | ||
- [X] A programmatic approach to creating Addons easily. | ||
|
||
## Contributing: | ||
- [`bedrockrs::proto`](crates/proto) | ||
- [X] Complete implementation of the Minecraft Bedrock protocol. | ||
- [X] Support for both server-side and client-side operations. | ||
- [X] Multi-protocol compatibility for handling multiple versions seamlessly. | ||
|
||
Feel free to join in at any time. Your contributions are highly valued, and a big thank you to all who participate. We | ||
recommend getting acquainted with the bedrock-rs codebase. Whether it's tackling existing issues, adding new features, | ||
or even introducing entirely fresh modules, your creativity is welcome. | ||
- [`bedrockrs::level`](crates/level) | ||
- [X] Data structures for managing Minecraft Bedrock levels. | ||
- [X] Implementation of Bedrock’s level format using Rust’s LevelDB. | ||
|
||
(If you like this library, remember to give bedrockrs a Star!) | ||
- [`bedrockrs::server`](/crates/server) | ||
- [X] A lightweight foundation for Minecraft Bedrock server software. | ||
- [X] Built-in support for multi-protocol handling. | ||
- [X] Asynchronous architecture powered by Tokio. | ||
|
||
--- | ||
|
||
## Features | ||
|
||
- **Modular Architecture:** Enable only the features you need for your project. | ||
- **Multi-Protocol Support:** Work with different protocol versions effortlessly. | ||
- **Cross-Platform Compatibility:** Designed to work seamlessly across platforms. | ||
- **Lightweight and Efficient:** Built with Rust’s performance and safety features. | ||
|
||
--- | ||
|
||
## Getting Started | ||
|
||
To use **bedrock-rs** in your Rust project, add the following to your `Cargo.toml`: | ||
```toml | ||
[dependencies] | ||
bedrockrs = { git = "https://github.com/bedrock-crustaceans/bedrock-rs.git", features = ["full"] } | ||
``` | ||
|
||
Refer to the individual crate documentation for details on specific modules and features. | ||
|
||
We also plan to release bedrock-rs on [crates.io](https://crates.io) in the future. | ||
|
||
--- | ||
|
||
## Contributors | ||
|
||
A huge thank you to all the amazing individuals who have contributed to **bedrock-rs**! Your time, effort, and expertise are what make this project possible. | ||
|
||
[![Contributors](https://contrib.rocks/image?repo=bedrock-crustaceans/bedrock-rs)](https://github.com/bedrock-crustaceans/bedrock-rs/graphs/contributors) | ||
|
||
Whether it’s fixing bugs, implementing features, or providing feedback, every contribution helps shape the future of this library. We appreciate each and every one of you! | ||
|
||
Want to join this incredible group? Check out our Contributing Guide and make your mark on the project. | ||
|
||
--- | ||
|
||
## Contributing | ||
|
||
We welcome contributions of all kinds! Whether you're fixing bugs, adding new features, or proposing entirely new modules, your efforts are highly appreciated. Here’s how you can get involved: | ||
|
||
1. **Get Familiar with the Codebase:** Explore the existing modules and documentation. | ||
2. **Pick an Issue:** Check out the repository’s issue tracker for tasks you can work on. | ||
3. **Add Your Touch:** Feel free to innovate and bring new ideas to the table. | ||
|
||
For guidance or collaboration, feel free to connect with the community on Discord. | ||
|
||
If you find **bedrock-rs** helpful, don’t forget to give the repository a ⭐ on GitHub. | ||
|
||
--- | ||
|
||
## License | ||
|
||
**bedrock-rs** is open-source software licensed under the [Apache-2.0 License](LICENSE). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,10 @@ | ||
use std::fmt::{Debug, Formatter}; | ||
use std::fmt::Debug; | ||
|
||
use bedrockrs_core::Vec2; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
#[derive(Serialize, Deserialize, Clone)] | ||
#[derive(Serialize, Deserialize, Debug, Clone)] | ||
#[serde(untagged)] | ||
pub enum LanguageCode { | ||
VanillaCode(String), | ||
CustomCode(Vec2<String>), | ||
} | ||
|
||
impl Debug for LanguageCode { | ||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { | ||
match self { | ||
LanguageCode::VanillaCode(v) => { | ||
write!(f, "VanillaCode({v})") | ||
} | ||
LanguageCode::CustomCode(v) => { | ||
write!(f, "CustomCode([{}, {}])", v.x, v.y) | ||
} | ||
} | ||
} | ||
CustomCode((String, String)), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,11 @@ | ||
use std::fmt::{Debug, Formatter}; | ||
use std::fmt::Debug; | ||
|
||
use bedrockrs_core::Vec3; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
/// A version used in Addons that is either a Vector [a, b, c] or SemVer String. | ||
#[derive(Serialize, Deserialize, Clone)] | ||
#[derive(Serialize, Deserialize, Clone, Debug)] | ||
#[serde(untagged)] | ||
pub enum AddonSemanticVersion { | ||
Vector(Vec3<u32>), | ||
Vector([u32; 3]), | ||
SemVer(semver::Version), | ||
} | ||
|
||
impl Debug for AddonSemanticVersion { | ||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { | ||
match self { | ||
AddonSemanticVersion::Vector(v) => f.debug_list().entries([v.x, v.y, v.z]).finish(), | ||
AddonSemanticVersion::SemVer(v) => v.fmt(f), | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.