-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'bedrock-crustaceans:proto_rework' into proto_rework
- Loading branch information
Showing
70 changed files
with
158 additions
and
553 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
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
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,4 +1 @@ | ||
pub use vec::vec2::Vec2; | ||
pub use vec::vec3::Vec3; | ||
|
||
pub mod vec; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.