Fix: Resource pack

This commit is contained in:
Snowiiii committed 2024-08-19 15:05:16 +02:00
1 parent 77b205ada0
commit 43fbb6a68d
3 files changed
+18 -16

No files matched your search

+6 -4
View File
@@ -1,4 +1,3 @@
use std::str::FromStr;
use num_traits::FromPrimitive;
use pumpkin_protocol::{
@@ -203,9 +202,12 @@ impl Client {
Some(TextComponent::from(resource_config.prompt_message.clone()))
};
self.send_packet(&CConfigAddResourcePack::new(
uuid::Uuid::from_str(&resource_config.resource_pack_url).unwrap(),
resource_config.resource_pack_url.clone(),
resource_config.resource_pack_sha1.clone(),
pumpkin_protocol::uuid::UUID(uuid::Uuid::new_v3(
&uuid::Uuid::NAMESPACE_DNS,
resource_config.resource_pack_url.as_bytes(),
)),
&resource_config.resource_pack_url,
&resource_config.resource_pack_sha1,
resource_config.force,
prompt_message,
));
+2 -4
View File
@@ -116,7 +116,7 @@ impl Client {
entity.x = Self::clamp_horizontal(position_rotation.x);
entity.y = Self::clamp_vertical(position_rotation.feet_y);
entity.z = Self::clamp_horizontal(position_rotation.z);
entity.yaw = wrap_degrees(position_rotation.yaw) % 360.0;
entity.yaw = wrap_degrees(position_rotation.yaw) % 360.0;
entity.pitch = wrap_degrees(position_rotation.pitch).clamp(-90.0, 90.0) % 360.0;
// send new position to all other players
@@ -314,9 +314,7 @@ impl Client {
&CHurtAnimation::new(&entity_id, 10.0),
)
}
if config.swing {
}
if config.swing {}
} else {
self.kick("Interacted with invalid entitiy id")
}