From 1cf6d92f1a8be954f6885704c31f317b99b05972 Mon Sep 17 00:00:00 2001 From: mat Date: Tue, 7 Oct 2025 06:01:19 +0400 Subject: update ResolvableProfile data component to 1.21.9 --- azalea-entity/src/data.rs | 51 ++--------------------------------------------- 1 file changed, 2 insertions(+), 49 deletions(-) (limited to 'azalea-entity/src/data.rs') diff --git a/azalea-entity/src/data.rs b/azalea-entity/src/data.rs index 84a5b153..65267c4a 100644 --- a/azalea-entity/src/data.rs +++ b/azalea-entity/src/data.rs @@ -2,15 +2,13 @@ use std::io::{self, Cursor, Write}; -use azalea_auth::game_profile::{GameProfile, GameProfileProperties}; use azalea_buf::{AzBuf, AzaleaRead, AzaleaReadVar, AzaleaWrite, AzaleaWriteVar, BufReadError}; use azalea_chat::FormattedText; use azalea_core::{ direction::Direction, position::{BlockPos, GlobalPos, Vec3f32}, - resource_location::ResourceLocation, }; -use azalea_inventory::ItemStack; +use azalea_inventory::{ItemStack, components}; use bevy_ecs::component::Component; use derive_more::Deref; use enum_as_inner::EnumAsInner; @@ -97,7 +95,7 @@ pub enum EntityDataValue { WeatheringCopperState(WeatheringCopperStateKind), Vector3(Vec3f32), Quaternion(Quaternion), - ResolvableProfile(ResolvableProfile), + ResolvableProfile(components::Profile), } #[derive(Clone, Debug, PartialEq)] @@ -111,51 +109,6 @@ pub struct Quaternion { pub w: f32, } -#[derive(Clone, Debug, AzBuf, Default, PartialEq)] -pub struct ResolvableProfile { - pub unpack: Box, - pub skin_patch: Box, -} - -#[derive(Clone, Debug, AzBuf, PartialEq)] -pub enum PartialOrFullProfile { - Partial(PartialProfile), - Full(GameProfile), -} -impl Default for PartialOrFullProfile { - fn default() -> Self { - Self::Partial(PartialProfile::default()) - } -} - -#[derive(Clone, Debug, AzBuf, Default, PartialEq)] -pub struct PartialProfile { - #[limit(16)] - pub name: Option, - pub id: Option, - pub properties: GameProfileProperties, -} - -#[derive(Clone, Debug, AzBuf, Default, PartialEq)] -pub struct PlayerSkinPatch { - pub body: Option, - pub cape: Option, - pub elytra: Option, - pub model: Option, -} - -#[derive(Clone, Debug, Copy, AzBuf, Default, PartialEq)] -pub enum PlayerModelType { - #[default] - Wide, - Slim, -} - -#[derive(Clone, Debug, AzBuf, PartialEq)] -pub struct ResourceTexture { - pub id: ResourceLocation, -} - // mojang just calls this ArmadilloState but i added "Kind" since otherwise it // collides with a name in metadata.rs #[derive(Clone, Debug, Copy, Default, AzBuf, PartialEq)] -- cgit v1.2.3