Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-D warnings"

permissions:
checks: write
Expand All @@ -28,9 +29,15 @@ jobs:
with:
toolchain: nightly
components: clippy, miri, rustfmt
- name: Build
run: cargo build --verbose
- name: Clippy
uses: auguwu/clippy-action@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
run: cargo clippy --verbose --tests
- name: Miri Setup
run: cargo miri setup
- name: Miri Test
run: cargo miri test
- name: Rustfmt
run: cargo fmt --all -- --check
- name: Spell Check Repo
uses: crate-ci/typos@master
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ repository = "https://github.com/hayanesuru/minecraft"
edition = "2024"

[workspace.dependencies]
mser = { path = "haya_ser", version = "2.2", default-features = false }
mser_macro = { path = "haya_ser_macro", version = "2.2", default-features = false }
minecraft_data = { path = "haya_data", version = "2.2", default-features = false }
mser = { path = "haya_ser", version = "3.0", default-features = false }
mser_macro = { path = "haya_ser_macro", version = "3.0", default-features = false }
minecraft_data = { path = "haya_data", version = "3.0", default-features = false }
haya_nbt = { path = "haya_nbt", version = "0.1" }
haya_str = { path = "haya_str", version = "0.1" }
haya_ident = { path = "haya_ident", version = "0.1" }
Expand Down
2 changes: 1 addition & 1 deletion haya_data/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "minecraft_data"
version = "2.2.0+1.21.11"
version = "3.0.0+1.21.11"
description = "minecraft data"
edition.workspace = true
authors.workspace = true
Expand Down
4 changes: 4 additions & 0 deletions haya_protocol/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ impl<L: Write, R: Write> Write for Either<L, R> {

#[derive(Clone, Copy, Serialize, Deserialize)]
#[repr(u8)]
#[mser(varint)]
pub enum KnownLinkType {
ReportBug,
CommunityGuidelines,
Expand Down Expand Up @@ -292,6 +293,7 @@ pub struct ClientInformation<'a> {

#[derive(Clone, Copy, Serialize, Deserialize)]
#[repr(u8)]
#[mser(varint)]
pub enum ChatVisibility {
Full,
System,
Expand All @@ -310,6 +312,7 @@ impl ChatVisibility {

#[derive(Clone, Copy, Serialize, Deserialize)]
#[repr(u8)]
#[mser(varint)]
pub enum HumanoidArm {
Left,
Right,
Expand All @@ -333,6 +336,7 @@ impl HumanoidArm {

#[derive(Clone, Copy, Serialize, Deserialize)]
#[repr(u8)]
#[mser(varint)]
pub enum ParticleStatus {
All,
Decreased,
Expand Down
2 changes: 1 addition & 1 deletion haya_protocol/src/serverbound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@ packets! {
pong = common::Pong,
resource_pack = common::ResourcePack,
select_known_packs = configuration::SelectKnownPacks<'_>,
custom_click_action = configuration::CustomClickAction<'_>,
custom_click_action = common::CustomClickAction<'_>,
accept_code_of_conduct = configuration::AcceptCodeOfConduct,
}
8 changes: 8 additions & 0 deletions haya_protocol/src/serverbound/common.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use crate::{ClientInformation, Rest};
use haya_ident::Ident;
use haya_nbt::Tag;
use uuid::Uuid;

#[derive(Clone, Serialize, Deserialize)]
Expand Down Expand Up @@ -29,6 +30,7 @@ pub struct ResourcePack {

#[derive(Clone, Copy, Serialize, Deserialize)]
#[repr(u8)]
#[mser(varint)]
pub enum ResourcePackAction {
SuccessfullyLoaded,
Declined,
Expand All @@ -45,3 +47,9 @@ impl ResourcePackAction {
!matches!(self, Self::Accepted | Self::Downloaded)
}
}

#[derive(Clone, Serialize, Deserialize)]
pub struct CustomClickAction<'a> {
pub id: Ident<'a>,
pub payload: Option<Tag>,
}
8 changes: 0 additions & 8 deletions haya_protocol/src/serverbound/configuration.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
use crate::{KnownPack, List};
use haya_ident::Ident;
use haya_nbt::Tag;

#[derive(Clone, Serialize, Deserialize)]
pub struct FinishConfiguration {}
Expand All @@ -10,11 +8,5 @@ pub struct SelectKnownPacks<'a> {
pub known_packs: List<'a, KnownPack<'a>, 64>,
}

#[derive(Clone, Serialize, Deserialize)]
pub struct CustomClickAction<'a> {
pub id: Ident<'a>,
pub payload: Option<Tag>,
}

#[derive(Clone, Serialize, Deserialize)]
pub struct AcceptCodeOfConduct {}
2 changes: 1 addition & 1 deletion haya_ser/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mser"
version = "2.2.0"
version = "3.0.0"
description = "mser"
edition.workspace = true
authors.workspace = true
Expand Down
Loading