Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryntet authored Sep 6, 2024
2 parents 3b93892 + b40c2fa commit e8ebe7d
Show file tree
Hide file tree
Showing 52 changed files with 655 additions and 468 deletions.
536 changes: 254 additions & 282 deletions Cargo.lock

Large diffs are not rendered by default.

22 changes: 20 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
[workspace]
resolver = "2"
members = [ "pumpkin-config", "pumpkin-core", "pumpkin-entity", "pumpkin-inventory", "pumpkin-macros/", "pumpkin-plugin", "pumpkin-protocol/", "pumpkin-registry/", "pumpkin-world", "pumpkin/"]
members = [
"pumpkin-config",
"pumpkin-core",
"pumpkin-entity",
"pumpkin-inventory",
"pumpkin-macros/",
"pumpkin-plugin",
"pumpkin-protocol/",
"pumpkin-registry/",
"pumpkin-world",
"pumpkin/",
]

[workspace.package]
version = "0.1.0"
Expand All @@ -13,7 +24,14 @@ codegen-units = 1

[workspace.dependencies]
log = "0.4"
tokio = { version = "1.39.2", features = ["net", "macros", "rt-multi-thread", "fs", "io-util", "sync"] }
tokio = { version = "1.40", features = [
"net",
"macros",
"rt-multi-thread",
"fs",
"io-util",
"sync",
] }
rayon = "1.10.0"
uuid = { version = "1.10.0", features = ["serde", "v3"] }
derive_more = { version = "1.0.0", features = ["full"] }
Expand Down
4 changes: 2 additions & 2 deletions pumpkin-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ edition.workspace = true

[dependencies]
pumpkin-core = { path = "../pumpkin-core" }
serde.workspace = true
log.workspace = true

serde = "1.0"
toml = "0.8"

log.workspace = true
2 changes: 1 addition & 1 deletion pumpkin-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ edition.workspace = true

[dependencies]
serde.workspace = true
fastnbt = { git = "https://github.com/owengage/fastnbt.git" }
uuid.workspace = true
fastnbt = { git = "https://github.com/owengage/fastnbt.git" }
colored = "2"
md5 = "0.7.0"

Expand Down
1 change: 0 additions & 1 deletion pumpkin-core/src/text/hover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use super::Text;

#[derive(Clone, Debug, Serialize, Deserialize)]
#[serde(tag = "action", content = "contents", rename_all = "snake_case")]
#[allow(clippy::enum_variant_names)]
pub enum HoverEvent<'a> {
/// Displays a tooltip with the given text.
ShowText(Text<'a>),
Expand Down
5 changes: 1 addition & 4 deletions pumpkin-entity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,4 @@ version.workspace = true
edition.workspace = true

[dependencies]
pumpkin-core = { path = "../pumpkin-core"}

num-traits = "0.2"
num-derive = "0.4"
pumpkin-core = { path = "../pumpkin-core"}
5 changes: 4 additions & 1 deletion pumpkin-inventory/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ version.workspace = true
edition.workspace = true

[dependencies]
# For items
pumpkin-world = { path = "../pumpkin-world"}

num-traits = "0.2"
num-derive = "0.4"
thiserror = "1.0.63"
itertools = "0.13.0"
# For items
pumpkin-world = { path = "../pumpkin-world"}
pumpkin-world = { path = "../pumpkin-world"}
2 changes: 0 additions & 2 deletions pumpkin-inventory/src/player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ use crate::container_click::MouseClick;
use crate::{handle_item_change, Container, InventoryError, WindowType};
use pumpkin_world::item::ItemStack;

#[allow(dead_code)]
#[derive(Debug)]
pub struct PlayerInventory {
// Main Inventory + Hotbar
crafting: [Option<ItemStack>; 4],
Expand Down
6 changes: 3 additions & 3 deletions pumpkin-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ edition.workspace = true
proc-macro = true

[dependencies]
proc-macro2 = "1.0.86"
quote = "1.0.37"
syn = "2.0.76"
proc-macro2 = "1.0"
quote = "1.0"
syn = "2.0"
4 changes: 2 additions & 2 deletions pumpkin-plugin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ version.workspace = true
edition.workspace = true

[dependencies]
extism = "1.5.0"
log.workspace = true
serde.workspace = true
log.workspace = true
extism = "1.6.0"
6 changes: 2 additions & 4 deletions pumpkin-protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,17 @@ bytes = "1.7"
uuid.workspace = true

serde.workspace = true
# to parse strings to json responses
serde_json = "1.0"

flate2 = "1.0.33"

thiserror = "1.0.63"
thiserror = "1.0"
log.workspace = true
num-traits = "0.2"
num-derive = "0.4"

# encryption
aes = "0.8.4"
cfb8 = "0.8.1"
take_mut = "0.2.2"

itertools = "0.13.0"
fastnbt = { git = "https://github.com/owengage/fastnbt.git" }
26 changes: 13 additions & 13 deletions pumpkin-protocol/src/bytebuf/deserializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,77 +45,77 @@ impl<'a, 'de> de::Deserializer<'de> for Deserializer<'a> {
where
V: de::Visitor<'de>,
{
visitor.visit_bool(self.inner.get_bool())
visitor.visit_bool(self.inner.get_bool()?)
}

fn deserialize_i8<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where
V: de::Visitor<'de>,
{
visitor.visit_i8(self.inner.get_i8())
visitor.visit_i8(self.inner.get_i8()?)
}

fn deserialize_i16<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where
V: de::Visitor<'de>,
{
visitor.visit_i16(self.inner.get_i16())
visitor.visit_i16(self.inner.get_i16()?)
}

fn deserialize_i32<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where
V: de::Visitor<'de>,
{
visitor.visit_i32(self.inner.get_i32())
visitor.visit_i32(self.inner.get_i32()?)
}

fn deserialize_i64<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where
V: de::Visitor<'de>,
{
visitor.visit_i64(self.inner.get_i64())
visitor.visit_i64(self.inner.get_i64()?)
}

fn deserialize_u8<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where
V: de::Visitor<'de>,
{
visitor.visit_u8(self.inner.get_u8())
visitor.visit_u8(self.inner.get_u8()?)
}

fn deserialize_u16<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where
V: de::Visitor<'de>,
{
visitor.visit_u16(self.inner.get_u16())
visitor.visit_u16(self.inner.get_u16()?)
}

fn deserialize_u32<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where
V: de::Visitor<'de>,
{
visitor.visit_u32(self.inner.get_u32())
visitor.visit_u32(self.inner.get_u32()?)
}

fn deserialize_u64<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where
V: de::Visitor<'de>,
{
visitor.visit_u64(self.inner.get_u64())
visitor.visit_u64(self.inner.get_u64()?)
}

fn deserialize_f32<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where
V: de::Visitor<'de>,
{
visitor.visit_f32(self.inner.get_f32())
visitor.visit_f32(self.inner.get_f32()?)
}

fn deserialize_f64<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where
V: de::Visitor<'de>,
{
visitor.visit_f64(self.inner.get_f64())
visitor.visit_f64(self.inner.get_f64()?)
}

fn deserialize_char<V>(self, _visitor: V) -> Result<V::Value, Self::Error>
Expand All @@ -129,15 +129,15 @@ impl<'a, 'de> de::Deserializer<'de> for Deserializer<'a> {
where
V: de::Visitor<'de>,
{
let string = self.inner.get_string().map_err(DeserializerError::Stdio)?;
let string = self.inner.get_string()?;
visitor.visit_str(&string)
}

fn deserialize_string<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where
V: de::Visitor<'de>,
{
let string = self.inner.get_string().map_err(DeserializerError::Stdio)?;
let string = self.inner.get_string()?;
visitor.visit_str(&string)
}

Expand Down
Loading

0 comments on commit e8ebe7d

Please sign in to comment.