diff --git a/README.md b/README.md index 753f4598b..11d292fc0 100755 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ A collection of Rust crates for making Minecraft bots, clients, and tools. -_Currently supported Minecraft version: `24w39a`._ +_Currently supported Minecraft version: `1.21.2`._ > [!WARNING] > Azalea is still very unfinished, though most crates are in a somewhat useable state diff --git a/azalea-client/src/packet_handling/game.rs b/azalea-client/src/packet_handling/game.rs index 011446aa7..4145a3a79 100644 --- a/azalea-client/src/packet_handling/game.rs +++ b/azalea-client/src/packet_handling/game.rs @@ -416,9 +416,6 @@ pub fn process_packet_events(ecs: &mut World) { ClientboundGamePacket::EntityEvent(_p) => { // debug!("Got entity event packet {p:?}"); } - ClientboundGamePacket::Recipe(_p) => { - debug!("Got recipe packet"); - } ClientboundGamePacket::PlayerPosition(p) => { debug!("Got player position packet {p:?}"); @@ -1483,6 +1480,11 @@ pub fn process_packet_events(ecs: &mut World) { ClientboundGamePacket::ProjectilePower(_) => {} ClientboundGamePacket::CustomReportDetails(_) => {} ClientboundGamePacket::ServerLinks(_) => {} + ClientboundGamePacket::EntityPositionSync(_) => {} + ClientboundGamePacket::PlayerRotation(_) => {} + ClientboundGamePacket::RecipeBookAdd(_) => {} + ClientboundGamePacket::RecipeBookRemove(_) => {} + ClientboundGamePacket::RecipeBookSettings(_) => {} } } } diff --git a/azalea-entity/src/metadata.rs b/azalea-entity/src/metadata.rs index 524d1b7f4..74bc571d5 100644 --- a/azalea-entity/src/metadata.rs +++ b/azalea-entity/src/metadata.rs @@ -605,6 +605,8 @@ pub struct ArrowNoPhysics(pub bool); #[derive(Component, Deref, DerefMut, Clone)] pub struct ArrowPierceLevel(pub u8); #[derive(Component, Deref, DerefMut, Clone)] +pub struct ArrowInGround(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] pub struct EffectColor(pub i32); #[derive(Component)] pub struct Arrow; @@ -624,6 +626,9 @@ impl Arrow { entity.insert(ArrowPierceLevel(d.value.into_byte()?)); } 10 => { + entity.insert(ArrowInGround(d.value.into_boolean()?)); + } + 11 => { entity.insert(EffectColor(d.value.into_int()?)); } _ => {} @@ -639,6 +644,7 @@ pub struct ArrowMetadataBundle { arrow_crit_arrow: ArrowCritArrow, arrow_no_physics: ArrowNoPhysics, arrow_pierce_level: ArrowPierceLevel, + arrow_in_ground: ArrowInGround, effect_color: EffectColor, } impl Default for ArrowMetadataBundle { @@ -665,6 +671,7 @@ impl Default for ArrowMetadataBundle { arrow_crit_arrow: ArrowCritArrow(false), arrow_no_physics: ArrowNoPhysics(false), arrow_pierce_level: ArrowPierceLevel(0), + arrow_in_ground: ArrowInGround(false), effect_color: EffectColor(-1), } } @@ -2553,6 +2560,161 @@ impl Default for CowMetadataBundle { } } +#[derive(Component, Deref, DerefMut, Clone)] +pub struct CanMove(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct IsActive(pub bool); +#[derive(Component)] +pub struct Creaking; +impl Creaking { + pub fn apply_metadata( + entity: &mut bevy_ecs::system::EntityCommands, + d: EntityDataItem, + ) -> Result<(), UpdateMetadataError> { + match d.index { + 0..=15 => AbstractMonster::apply_metadata(entity, d)?, + 16 => { + entity.insert(CanMove(d.value.into_boolean()?)); + } + 17 => { + entity.insert(IsActive(d.value.into_boolean()?)); + } + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct CreakingMetadataBundle { + _marker: Creaking, + parent: AbstractMonsterMetadataBundle, + can_move: CanMove, + is_active: IsActive, +} +impl Default for CreakingMetadataBundle { + fn default() -> Self { + Self { + _marker: Creaking, + parent: AbstractMonsterMetadataBundle { + _marker: AbstractMonster, + parent: AbstractCreatureMetadataBundle { + _marker: AbstractCreature, + parent: AbstractInsentientMetadataBundle { + _marker: AbstractInsentient, + parent: AbstractLivingMetadataBundle { + _marker: AbstractLiving, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + auto_spin_attack: AutoSpinAttack(false), + abstract_living_using_item: AbstractLivingUsingItem(false), + health: Health(1.0), + effect_particles: EffectParticles(Default::default()), + effect_ambience: EffectAmbience(false), + arrow_count: ArrowCount(0), + stinger_count: StingerCount(0), + sleeping_pos: SleepingPos(None), + }, + no_ai: NoAi(false), + left_handed: LeftHanded(false), + aggressive: Aggressive(false), + }, + }, + }, + can_move: CanMove(true), + is_active: IsActive(false), + } + } +} + +#[derive(Component)] +pub struct CreakingTransient; +impl CreakingTransient { + pub fn apply_metadata( + entity: &mut bevy_ecs::system::EntityCommands, + d: EntityDataItem, + ) -> Result<(), UpdateMetadataError> { + match d.index { + 0..=17 => Creaking::apply_metadata(entity, d)?, + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct CreakingTransientMetadataBundle { + _marker: CreakingTransient, + parent: CreakingMetadataBundle, +} +impl Default for CreakingTransientMetadataBundle { + fn default() -> Self { + Self { + _marker: CreakingTransient, + parent: CreakingMetadataBundle { + _marker: Creaking, + parent: AbstractMonsterMetadataBundle { + _marker: AbstractMonster, + parent: AbstractCreatureMetadataBundle { + _marker: AbstractCreature, + parent: AbstractInsentientMetadataBundle { + _marker: AbstractInsentient, + parent: AbstractLivingMetadataBundle { + _marker: AbstractLiving, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + auto_spin_attack: AutoSpinAttack(false), + abstract_living_using_item: AbstractLivingUsingItem(false), + health: Health(1.0), + effect_particles: EffectParticles(Default::default()), + effect_ambience: EffectAmbience(false), + arrow_count: ArrowCount(0), + stinger_count: StingerCount(0), + sleeping_pos: SleepingPos(None), + }, + no_ai: NoAi(false), + left_handed: LeftHanded(false), + aggressive: Aggressive(false), + }, + }, + }, + can_move: CanMove(true), + is_active: IsActive(false), + }, + } + } +} + #[derive(Component, Deref, DerefMut, Clone)] pub struct SwellDir(pub i32); #[derive(Component, Deref, DerefMut, Clone)] @@ -6974,6 +7136,180 @@ impl Default for PaintingMetadataBundle { } } +#[derive(Component, Deref, DerefMut, Clone)] +pub struct PaleOakBoatHurt(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct PaleOakBoatHurtdir(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct PaleOakBoatDamage(pub f32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct PaleOakBoatPaddleLeft(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct PaleOakBoatPaddleRight(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct PaleOakBoatBubbleTime(pub i32); +#[derive(Component)] +pub struct PaleOakBoat; +impl PaleOakBoat { + pub fn apply_metadata( + entity: &mut bevy_ecs::system::EntityCommands, + d: EntityDataItem, + ) -> Result<(), UpdateMetadataError> { + match d.index { + 0..=7 => AbstractEntity::apply_metadata(entity, d)?, + 8 => { + entity.insert(PaleOakBoatHurt(d.value.into_int()?)); + } + 9 => { + entity.insert(PaleOakBoatHurtdir(d.value.into_int()?)); + } + 10 => { + entity.insert(PaleOakBoatDamage(d.value.into_float()?)); + } + 11 => { + entity.insert(PaleOakBoatPaddleLeft(d.value.into_boolean()?)); + } + 12 => { + entity.insert(PaleOakBoatPaddleRight(d.value.into_boolean()?)); + } + 13 => { + entity.insert(PaleOakBoatBubbleTime(d.value.into_int()?)); + } + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct PaleOakBoatMetadataBundle { + _marker: PaleOakBoat, + parent: AbstractEntityMetadataBundle, + pale_oak_boat_hurt: PaleOakBoatHurt, + pale_oak_boat_hurtdir: PaleOakBoatHurtdir, + pale_oak_boat_damage: PaleOakBoatDamage, + pale_oak_boat_paddle_left: PaleOakBoatPaddleLeft, + pale_oak_boat_paddle_right: PaleOakBoatPaddleRight, + pale_oak_boat_bubble_time: PaleOakBoatBubbleTime, +} +impl Default for PaleOakBoatMetadataBundle { + fn default() -> Self { + Self { + _marker: PaleOakBoat, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + pale_oak_boat_hurt: PaleOakBoatHurt(0), + pale_oak_boat_hurtdir: PaleOakBoatHurtdir(1), + pale_oak_boat_damage: PaleOakBoatDamage(0.0), + pale_oak_boat_paddle_left: PaleOakBoatPaddleLeft(false), + pale_oak_boat_paddle_right: PaleOakBoatPaddleRight(false), + pale_oak_boat_bubble_time: PaleOakBoatBubbleTime(0), + } + } +} + +#[derive(Component, Deref, DerefMut, Clone)] +pub struct PaleOakChestBoatHurt(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct PaleOakChestBoatHurtdir(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct PaleOakChestBoatDamage(pub f32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct PaleOakChestBoatPaddleLeft(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct PaleOakChestBoatPaddleRight(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct PaleOakChestBoatBubbleTime(pub i32); +#[derive(Component)] +pub struct PaleOakChestBoat; +impl PaleOakChestBoat { + pub fn apply_metadata( + entity: &mut bevy_ecs::system::EntityCommands, + d: EntityDataItem, + ) -> Result<(), UpdateMetadataError> { + match d.index { + 0..=7 => AbstractEntity::apply_metadata(entity, d)?, + 8 => { + entity.insert(PaleOakChestBoatHurt(d.value.into_int()?)); + } + 9 => { + entity.insert(PaleOakChestBoatHurtdir(d.value.into_int()?)); + } + 10 => { + entity.insert(PaleOakChestBoatDamage(d.value.into_float()?)); + } + 11 => { + entity.insert(PaleOakChestBoatPaddleLeft(d.value.into_boolean()?)); + } + 12 => { + entity.insert(PaleOakChestBoatPaddleRight(d.value.into_boolean()?)); + } + 13 => { + entity.insert(PaleOakChestBoatBubbleTime(d.value.into_int()?)); + } + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct PaleOakChestBoatMetadataBundle { + _marker: PaleOakChestBoat, + parent: AbstractEntityMetadataBundle, + pale_oak_chest_boat_hurt: PaleOakChestBoatHurt, + pale_oak_chest_boat_hurtdir: PaleOakChestBoatHurtdir, + pale_oak_chest_boat_damage: PaleOakChestBoatDamage, + pale_oak_chest_boat_paddle_left: PaleOakChestBoatPaddleLeft, + pale_oak_chest_boat_paddle_right: PaleOakChestBoatPaddleRight, + pale_oak_chest_boat_bubble_time: PaleOakChestBoatBubbleTime, +} +impl Default for PaleOakChestBoatMetadataBundle { + fn default() -> Self { + Self { + _marker: PaleOakChestBoat, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + pale_oak_chest_boat_hurt: PaleOakChestBoatHurt(0), + pale_oak_chest_boat_hurtdir: PaleOakChestBoatHurtdir(1), + pale_oak_chest_boat_damage: PaleOakChestBoatDamage(0.0), + pale_oak_chest_boat_paddle_left: PaleOakChestBoatPaddleLeft(false), + pale_oak_chest_boat_paddle_right: PaleOakChestBoatPaddleRight(false), + pale_oak_chest_boat_bubble_time: PaleOakChestBoatBubbleTime(0), + } + } +} + #[derive(Component, Deref, DerefMut, Clone)] pub struct PandaUnhappyCounter(pub i32); #[derive(Component, Deref, DerefMut, Clone)] @@ -8982,6 +9318,8 @@ pub struct SpectralArrowCritArrow(pub bool); pub struct SpectralArrowNoPhysics(pub bool); #[derive(Component, Deref, DerefMut, Clone)] pub struct SpectralArrowPierceLevel(pub u8); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct SpectralArrowInGround(pub bool); #[derive(Component)] pub struct SpectralArrow; impl SpectralArrow { @@ -8999,6 +9337,9 @@ impl SpectralArrow { 9 => { entity.insert(SpectralArrowPierceLevel(d.value.into_byte()?)); } + 10 => { + entity.insert(SpectralArrowInGround(d.value.into_boolean()?)); + } _ => {} } Ok(()) @@ -9012,6 +9353,7 @@ pub struct SpectralArrowMetadataBundle { spectral_arrow_crit_arrow: SpectralArrowCritArrow, spectral_arrow_no_physics: SpectralArrowNoPhysics, spectral_arrow_pierce_level: SpectralArrowPierceLevel, + spectral_arrow_in_ground: SpectralArrowInGround, } impl Default for SpectralArrowMetadataBundle { fn default() -> Self { @@ -9037,6 +9379,7 @@ impl Default for SpectralArrowMetadataBundle { spectral_arrow_crit_arrow: SpectralArrowCritArrow(false), spectral_arrow_no_physics: SpectralArrowNoPhysics(false), spectral_arrow_pierce_level: SpectralArrowPierceLevel(0), + spectral_arrow_in_ground: SpectralArrowInGround(false), } } } @@ -10007,6 +10350,8 @@ pub struct TridentNoPhysics(pub bool); #[derive(Component, Deref, DerefMut, Clone)] pub struct TridentPierceLevel(pub u8); #[derive(Component, Deref, DerefMut, Clone)] +pub struct TridentInGround(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] pub struct Loyalty(pub u8); #[derive(Component, Deref, DerefMut, Clone)] pub struct Foil(pub bool); @@ -10028,9 +10373,12 @@ impl Trident { entity.insert(TridentPierceLevel(d.value.into_byte()?)); } 10 => { - entity.insert(Loyalty(d.value.into_byte()?)); + entity.insert(TridentInGround(d.value.into_boolean()?)); } 11 => { + entity.insert(Loyalty(d.value.into_byte()?)); + } + 12 => { entity.insert(Foil(d.value.into_boolean()?)); } _ => {} @@ -10046,6 +10394,7 @@ pub struct TridentMetadataBundle { trident_crit_arrow: TridentCritArrow, trident_no_physics: TridentNoPhysics, trident_pierce_level: TridentPierceLevel, + trident_in_ground: TridentInGround, loyalty: Loyalty, foil: Foil, } @@ -10073,6 +10422,7 @@ impl Default for TridentMetadataBundle { trident_crit_arrow: TridentCritArrow(false), trident_no_physics: TridentNoPhysics(false), trident_pierce_level: TridentPierceLevel(0), + trident_in_ground: TridentInGround(false), loyalty: Loyalty(0), foil: Foil(false), } @@ -12348,6 +12698,16 @@ pub fn apply_metadata( Cow::apply_metadata(entity, d)?; } } + azalea_registry::EntityKind::Creaking => { + for d in items { + Creaking::apply_metadata(entity, d)?; + } + } + azalea_registry::EntityKind::CreakingTransient => { + for d in items { + CreakingTransient::apply_metadata(entity, d)?; + } + } azalea_registry::EntityKind::Creeper => { for d in items { Creeper::apply_metadata(entity, d)?; @@ -12648,6 +13008,16 @@ pub fn apply_metadata( Painting::apply_metadata(entity, d)?; } } + azalea_registry::EntityKind::PaleOakBoat => { + for d in items { + PaleOakBoat::apply_metadata(entity, d)?; + } + } + azalea_registry::EntityKind::PaleOakChestBoat => { + for d in items { + PaleOakChestBoat::apply_metadata(entity, d)?; + } + } azalea_registry::EntityKind::Panda => { for d in items { Panda::apply_metadata(entity, d)?; @@ -13029,6 +13399,12 @@ pub fn apply_default_metadata( azalea_registry::EntityKind::Cow => { entity.insert(CowMetadataBundle::default()); } + azalea_registry::EntityKind::Creaking => { + entity.insert(CreakingMetadataBundle::default()); + } + azalea_registry::EntityKind::CreakingTransient => { + entity.insert(CreakingTransientMetadataBundle::default()); + } azalea_registry::EntityKind::Creeper => { entity.insert(CreeperMetadataBundle::default()); } @@ -13209,6 +13585,12 @@ pub fn apply_default_metadata( azalea_registry::EntityKind::Painting => { entity.insert(PaintingMetadataBundle::default()); } + azalea_registry::EntityKind::PaleOakBoat => { + entity.insert(PaleOakBoatMetadataBundle::default()); + } + azalea_registry::EntityKind::PaleOakChestBoat => { + entity.insert(PaleOakChestBoatMetadataBundle::default()); + } azalea_registry::EntityKind::Panda => { entity.insert(PandaMetadataBundle::default()); } diff --git a/azalea-entity/src/particle.rs b/azalea-entity/src/particle.rs index ab8ac5bbe..6484b28f5 100755 --- a/azalea-entity/src/particle.rs +++ b/azalea-entity/src/particle.rs @@ -56,6 +56,7 @@ pub enum Particle { InstantEffect, Item(ItemParticle), Vibration(VibrationParticle), + Trail, ItemSlime, ItemCobweb, ItemSnowball, @@ -119,6 +120,7 @@ pub enum Particle { OminousSpawning, RaidOmen, TrialOmen, + BlockCrumble, } impl From for Particle { @@ -239,6 +241,8 @@ impl From for Particle { ParticleKind::OminousSpawning => Self::OminousSpawning, ParticleKind::RaidOmen => Self::RaidOmen, ParticleKind::TrialOmen => Self::TrialOmen, + ParticleKind::Trail => Self::Trail, + ParticleKind::BlockCrumble => Self::BlockCrumble, } } } diff --git a/azalea-language/src/en_us.json b/azalea-language/src/en_us.json index 5aeba786f..e1819511a 100755 --- a/azalea-language/src/en_us.json +++ b/azalea-language/src/en_us.json @@ -521,6 +521,7 @@ "biome.minecraft.old_growth_birch_forest": "Old Growth Birch Forest", "biome.minecraft.old_growth_pine_taiga": "Old Growth Pine Taiga", "biome.minecraft.old_growth_spruce_taiga": "Old Growth Spruce Taiga", + "biome.minecraft.pale_garden": "Pale Garden", "biome.minecraft.plains": "Plains", "biome.minecraft.river": "River", "biome.minecraft.savanna": "Savanna", @@ -1466,6 +1467,7 @@ "block.minecraft.cracked_stone_bricks": "Cracked Stone Bricks", "block.minecraft.crafter": "Crafter", "block.minecraft.crafting_table": "Crafting Table", + "block.minecraft.creaking_heart": "Creaking Heart", "block.minecraft.creeper_head": "Creeper Head", "block.minecraft.creeper_wall_head": "Creeper Wall Head", "block.minecraft.crimson_button": "Crimson Button", @@ -1880,6 +1882,26 @@ "block.minecraft.oxidized_cut_copper_stairs": "Oxidized Cut Copper Stairs", "block.minecraft.packed_ice": "Packed Ice", "block.minecraft.packed_mud": "Packed Mud", + "block.minecraft.pale_hanging_moss": "Pale Hanging Moss", + "block.minecraft.pale_moss_block": "Pale Moss Block", + "block.minecraft.pale_moss_carpet": "Pale Moss Carpet", + "block.minecraft.pale_oak_button": "Pale Oak Button", + "block.minecraft.pale_oak_door": "Pale Oak Door", + "block.minecraft.pale_oak_fence": "Pale Oak Fence", + "block.minecraft.pale_oak_fence_gate": "Pale Oak Fence Gate", + "block.minecraft.pale_oak_hanging_sign": "Pale Oak Hanging Sign", + "block.minecraft.pale_oak_leaves": "Pale Oak Leaves", + "block.minecraft.pale_oak_log": "Pale Oak Log", + "block.minecraft.pale_oak_planks": "Pale Oak Planks", + "block.minecraft.pale_oak_pressure_plate": "Pale Oak Pressure Plate", + "block.minecraft.pale_oak_sapling": "Pale Oak Sapling", + "block.minecraft.pale_oak_sign": "Pale Oak Sign", + "block.minecraft.pale_oak_slab": "Pale Oak Slab", + "block.minecraft.pale_oak_stairs": "Pale Oak Stairs", + "block.minecraft.pale_oak_trapdoor": "Pale Oak Trapdoor", + "block.minecraft.pale_oak_wall_hanging_sign": "Pale Oak Wall Hanging Sign", + "block.minecraft.pale_oak_wall_sign": "Pale Oak Wall Sign", + "block.minecraft.pale_oak_wood": "Pale Oak Wood", "block.minecraft.pearlescent_froglight": "Pearlescent Froglight", "block.minecraft.peony": "Peony", "block.minecraft.petrified_oak_slab": "Petrified Oak Slab", @@ -1963,6 +1985,7 @@ "block.minecraft.potted_oak_sapling": "Potted Oak Sapling", "block.minecraft.potted_orange_tulip": "Potted Orange Tulip", "block.minecraft.potted_oxeye_daisy": "Potted Oxeye Daisy", + "block.minecraft.potted_pale_oak_sapling": "Potted Pale Oak Sapling", "block.minecraft.potted_pink_tulip": "Potted Pink Tulip", "block.minecraft.potted_poppy": "Potted Poppy", "block.minecraft.potted_red_mushroom": "Potted Red Mushroom", @@ -2146,6 +2169,8 @@ "block.minecraft.stripped_mangrove_wood": "Stripped Mangrove Wood", "block.minecraft.stripped_oak_log": "Stripped Oak Log", "block.minecraft.stripped_oak_wood": "Stripped Oak Wood", + "block.minecraft.stripped_pale_oak_log": "Stripped Pale Oak Log", + "block.minecraft.stripped_pale_oak_wood": "Stripped Pale Oak Wood", "block.minecraft.stripped_spruce_log": "Stripped Spruce Log", "block.minecraft.stripped_spruce_wood": "Stripped Spruce Wood", "block.minecraft.stripped_warped_hyphae": "Stripped Warped Hyphae", @@ -2675,6 +2700,7 @@ "commands.ride.mount.failure.wrong_dimension": "Can't mount entity in different dimension", "commands.ride.mount.success": "%s started riding %s", "commands.ride.not_riding": "%s is not riding any vehicle", + "commands.rotate.success": "Rotated %s", "commands.save.alreadyOff": "Saving is already turned off", "commands.save.alreadyOn": "Saving is already turned on", "commands.save.disabled": "Automatic saving is now disabled", @@ -2982,6 +3008,8 @@ "dataPack.validation.working": "Validating selected data packs...", "dataPack.vanilla.description": "The default data for Minecraft", "dataPack.vanilla.name": "Default", + "dataPack.winter_drop.description": "New features and content for the Winter Drop", + "dataPack.winter_drop.name": "Winter Drop", "datapackFailure.safeMode": "Safe Mode", "datapackFailure.safeMode.failed.description": "This world contains invalid or corrupted save data.", "datapackFailure.safeMode.failed.title": "Failed to load world in Safe Mode.", @@ -3273,21 +3301,22 @@ "enchantment.minecraft.vanishing_curse": "Curse of Vanishing", "enchantment.minecraft.wind_burst": "Wind Burst", "entity.minecraft.acacia_boat": "Acacia Boat", - "entity.minecraft.acacia_chest_boat": "Acacia Boat With Chest", + "entity.minecraft.acacia_chest_boat": "Acacia Boat with Chest", "entity.minecraft.allay": "Allay", "entity.minecraft.area_effect_cloud": "Area Effect Cloud", "entity.minecraft.armadillo": "Armadillo", "entity.minecraft.armor_stand": "Armor Stand", "entity.minecraft.arrow": "Arrow", "entity.minecraft.axolotl": "Axolotl", - "entity.minecraft.bamboo_chest_raft": "Bamboo Raft With Chest", + "entity.minecraft.bamboo_chest_raft": "Bamboo Raft with Chest", "entity.minecraft.bamboo_raft": "Bamboo Raft", "entity.minecraft.bat": "Bat", "entity.minecraft.bee": "Bee", "entity.minecraft.birch_boat": "Birch Boat", - "entity.minecraft.birch_chest_boat": "Birch Boat With Chest", + "entity.minecraft.birch_chest_boat": "Birch Boat with Chest", "entity.minecraft.blaze": "Blaze", "entity.minecraft.block_display": "Block Display", + "entity.minecraft.boat": "Boat", "entity.minecraft.bogged": "Bogged", "entity.minecraft.breeze": "Breeze", "entity.minecraft.breeze_wind_charge": "Wind Charge", @@ -3295,15 +3324,18 @@ "entity.minecraft.cat": "Cat", "entity.minecraft.cave_spider": "Cave Spider", "entity.minecraft.cherry_boat": "Cherry Boat", - "entity.minecraft.cherry_chest_boat": "Cherry Boat With Chest", + "entity.minecraft.cherry_chest_boat": "Cherry Boat with Chest", + "entity.minecraft.chest_boat": "Boat with Chest", "entity.minecraft.chest_minecart": "Minecart with Chest", "entity.minecraft.chicken": "Chicken", "entity.minecraft.cod": "Cod", "entity.minecraft.command_block_minecart": "Minecart with Command Block", "entity.minecraft.cow": "Cow", + "entity.minecraft.creaking": "Creaking", + "entity.minecraft.creaking_transient": "Creaking", "entity.minecraft.creeper": "Creeper", "entity.minecraft.dark_oak_boat": "Dark Oak Boat", - "entity.minecraft.dark_oak_chest_boat": "Dark Oak Boat With Chest", + "entity.minecraft.dark_oak_chest_boat": "Dark Oak Boat with Chest", "entity.minecraft.dolphin": "Dolphin", "entity.minecraft.donkey": "Donkey", "entity.minecraft.dragon_fireball": "Dragon Fireball", @@ -3345,7 +3377,7 @@ "entity.minecraft.item_display": "Item Display", "entity.minecraft.item_frame": "Item Frame", "entity.minecraft.jungle_boat": "Jungle Boat", - "entity.minecraft.jungle_chest_boat": "Jungle Boat With Chest", + "entity.minecraft.jungle_chest_boat": "Jungle Boat with Chest", "entity.minecraft.killer_bunny": "The Killer Bunny", "entity.minecraft.leash_knot": "Leash Knot", "entity.minecraft.lightning_bolt": "Lightning Bolt", @@ -3353,16 +3385,18 @@ "entity.minecraft.llama_spit": "Llama Spit", "entity.minecraft.magma_cube": "Magma Cube", "entity.minecraft.mangrove_boat": "Mangrove Boat", - "entity.minecraft.mangrove_chest_boat": "Mangrove Boat With Chest", + "entity.minecraft.mangrove_chest_boat": "Mangrove Boat with Chest", "entity.minecraft.marker": "Marker", "entity.minecraft.minecart": "Minecart", "entity.minecraft.mooshroom": "Mooshroom", "entity.minecraft.mule": "Mule", "entity.minecraft.oak_boat": "Oak Boat", - "entity.minecraft.oak_chest_boat": "Oak Boat With Chest", + "entity.minecraft.oak_chest_boat": "Oak Boat with Chest", "entity.minecraft.ocelot": "Ocelot", "entity.minecraft.ominous_item_spawner": "Ominous Item Spawner", "entity.minecraft.painting": "Painting", + "entity.minecraft.pale_oak_boat": "Pale Oak Boat", + "entity.minecraft.pale_oak_chest_boat": "Pale Oak Boat with Chest", "entity.minecraft.panda": "Panda", "entity.minecraft.parrot": "Parrot", "entity.minecraft.phantom": "Phantom", @@ -3392,7 +3426,7 @@ "entity.minecraft.spectral_arrow": "Spectral Arrow", "entity.minecraft.spider": "Spider", "entity.minecraft.spruce_boat": "Spruce Boat", - "entity.minecraft.spruce_chest_boat": "Spruce Boat With Chest", + "entity.minecraft.spruce_chest_boat": "Spruce Boat with Chest", "entity.minecraft.squid": "Squid", "entity.minecraft.stray": "Stray", "entity.minecraft.strider": "Strider", @@ -3522,6 +3556,7 @@ "gamerule.commandModificationBlockLimit": "Command modification block limit", "gamerule.commandModificationBlockLimit.description": "Number of blocks that can be changed at once by one command, such as fill or clone.", "gamerule.disableElytraMovementCheck": "Disable elytra movement check", + "gamerule.disablePlayerMovementCheck": "Disable player movement check", "gamerule.disableRaids": "Disable raids", "gamerule.doDaylightCycle": "Advance time of day", "gamerule.doEntityDrops": "Drop entity equipment", @@ -3929,6 +3964,7 @@ "item.minecraft.cookie": "Cookie", "item.minecraft.copper_ingot": "Copper Ingot", "item.minecraft.cow_spawn_egg": "Cow Spawn Egg", + "item.minecraft.creaking_spawn_egg": "Creaking Spawn Egg", "item.minecraft.creeper_banner_pattern": "Banner Pattern", "item.minecraft.creeper_banner_pattern.desc": "Creeper Charge", "item.minecraft.creeper_banner_pattern.new": "Creeper Charge Banner Pattern", @@ -4238,6 +4274,8 @@ "item.minecraft.orange_bundle": "Orange Bundle", "item.minecraft.orange_dye": "Orange Dye", "item.minecraft.painting": "Painting", + "item.minecraft.pale_oak_boat": "Pale Oak Boat", + "item.minecraft.pale_oak_chest_boat": "Pale Oak Boat with Chest", "item.minecraft.panda_spawn_egg": "Panda Spawn Egg", "item.minecraft.paper": "Paper", "item.minecraft.parrot_spawn_egg": "Parrot Spawn Egg", @@ -5255,6 +5293,8 @@ "optimizeWorld.title": "Optimizing World '%s'", "options.accessibility": "Accessibility Settings...", "options.accessibility.high_contrast": "High Contrast", + "options.accessibility.high_contrast_block_outline": "High Contrast Block Outlines", + "options.accessibility.high_contrast_block_outline.tooltip": "Enhances the block outline contrast of the targeted block.", "options.accessibility.high_contrast.error.tooltip": "High Contrast resource pack is not available.", "options.accessibility.high_contrast.tooltip": "Enhances the contrast of UI elements.", "options.accessibility.link": "Accessibility Guide", @@ -6010,6 +6050,9 @@ "subtitles.block.copper_trapdoor.open": "Trapdoor opens", "subtitles.block.crafter.craft": "Crafter crafts", "subtitles.block.crafter.fail": "Crafter fails crafting", + "subtitles.block.creaking_heart.hurt": "Creaking Heart screams", + "subtitles.block.creaking_heart.idle": "Eerie noise", + "subtitles.block.creaking_heart.spawn": "Creaking Heart awakens", "subtitles.block.decorated_pot.insert": "Decorated Pot fills", "subtitles.block.decorated_pot.insert_fail": "Decorated Pot wobbles", "subtitles.block.decorated_pot.shatter": "Decorated Pot shatters", @@ -6038,6 +6081,7 @@ "subtitles.block.lava.extinguish": "Lava hisses", "subtitles.block.lever.click": "Lever clicks", "subtitles.block.note_block.note": "Note Block plays", + "subtitles.block.pale_hanging_moss.idle": "Eerie noise", "subtitles.block.piston.move": "Piston moves", "subtitles.block.pointed_dripstone.drip_lava": "Lava drips", "subtitles.block.pointed_dripstone.drip_lava_into_cauldron": "Lava drips into Cauldron", @@ -6196,6 +6240,16 @@ "subtitles.entity.cow.death": "Cow dies", "subtitles.entity.cow.hurt": "Cow hurts", "subtitles.entity.cow.milk": "Cow gets milked", + "subtitles.entity.creaking.activate": "Creaking activates", + "subtitles.entity.creaking.ambient": "Creaking creaks", + "subtitles.entity.creaking.angry": "Creaking sees player", + "subtitles.entity.creaking.attack": "Creaking attacks", + "subtitles.entity.creaking.deactivate": "Creaking deactivates", + "subtitles.entity.creaking.death": "Creaking dies", + "subtitles.entity.creaking.freeze": "Creaking stops", + "subtitles.entity.creaking.spawn": "Creaking lives", + "subtitles.entity.creaking.sway": "Creaking is shielded", + "subtitles.entity.creaking.unfreeze": "Creaking moves", "subtitles.entity.creeper.death": "Creeper dies", "subtitles.entity.creeper.hurt": "Creeper hurts", "subtitles.entity.creeper.primed": "Creeper hisses", @@ -6413,6 +6467,7 @@ "subtitles.entity.parrot.imitate.blaze": "Parrot breathes", "subtitles.entity.parrot.imitate.bogged": "Parrot rattles", "subtitles.entity.parrot.imitate.breeze": "Parrot whirs", + "subtitles.entity.parrot.imitate.creaking": "Parrot creaks", "subtitles.entity.parrot.imitate.creeper": "Parrot hisses", "subtitles.entity.parrot.imitate.drowned": "Parrot gurgles", "subtitles.entity.parrot.imitate.elder_guardian": "Parrot moans", @@ -6778,6 +6833,7 @@ "subtitles.item.wolf_armor.repair": "Wolf Armor is repaired", "subtitles.particle.soul_escape": "Soul escapes", "subtitles.ui.cartography_table.take_result": "Map drawn", + "subtitles.ui.hud.bubble_pop": "Breath meter dropping", "subtitles.ui.loom.take_result": "Loom used", "subtitles.ui.stonecutter.take_result": "Stonecutter used", "subtitles.weather.rain": "Rain falls", diff --git a/azalea-physics/src/collision/blocks.rs b/azalea-physics/src/collision/blocks.rs index b0655b876..9394bbc70 100644 --- a/azalea-physics/src/collision/blocks.rs +++ b/azalea-physics/src/collision/blocks.rs @@ -1739,11 +1739,11 @@ impl BlockWithShape for BlockState { } fn is_shape_empty(&self) -> bool { - matches!(self.id, 0|25..=78|80..=111|1944..=1991|2004..=2010|2063..=2090|2355..=2872|2978..=4273|4278..=4285|4302..=4589|4662..=4681|4762..=5537|5626..=5651|5716..=5733|5738..=5772|5799..=5814|5858..=5862|5864..=5865|6813..=6998|7001..=7002|7005..=7006|7009..=7010|7013..=7014|7017..=7018|7021..=7022|7025..=7026|7385..=7388|7406|7521..=7664|7925|7928|8249|8252|8595..=8826|9143..=9174|9320..=9343|10367..=10398|10747..=11078|11310..=11311|11314..=11315|11318..=11319|11322..=11323|11326..=11327|11330..=11331|11334..=11335|11338..=11339|11342..=11343|11346..=11347|11350..=11351|11354..=11355|11358..=11359|11362..=11363|11366..=11367|11370..=11371|11374..=11375|11378..=11379|11382..=11383|11386..=11387|11390..=11391|11394..=11395|11398..=11399|11402..=11403|11406..=11407|11410..=11411|11414..=11415|11418..=11419|11422..=11423|11426..=11427|11430..=11431|11434..=11435|11438..=11439|11442..=11443|11446..=11447|11450..=11451|11454..=11455|11458..=11459|11462..=11463|11466..=11467|11470..=11471|11474..=11475|11478..=11479|11482..=11483|11486..=11487|11490..=11491|11494..=11495|11498..=11499|11502..=11503|11506..=11507|11510..=11511|11514..=11515|11518..=11519|11522..=11523|11526..=11527|11530..=11531|11534..=11535|11538..=11539|11542..=11543|11546..=11547|11550..=11551|11554..=11555|11558..=11559|11562..=11563|12495..=12496|12499|12501|12503|12505|12507..=12512|12514|12549|12760..=12786|12813..=12932|12944|12958..=12961|14166|14169|14490|14493|14814|14817|15138|15141|15462|15465|15786|15789|16110|16113|16434|16437|16758|16761|17082|17085|17406|17409|17730|17733|18054|18057|18575..=18578|18592|18594..=18595|18609|18611..=18665|18680..=18683|18876..=18877|18880..=18881|18884..=18885|18888..=18889|18892..=18893|18896..=18897|18900..=18901|18904..=18905|18908..=18909|18912..=18913|18916..=18917|18920..=18921|18924..=18925|18928..=18929|18932..=18933|18936..=18937|19100..=19147|19276..=19355|19547|19550|19967|19970|20372..=20397|20404|20407|21174|21177|21585|21588|21997|22000|22318|22800..=22927|24769..=24823|24827..=24842|24850..=24851|24858..=24859|24866..=24867|24874..=24901|25000|25003|25411|25414|25822|25825|26233|26236|26572) + matches!(self.id, 0|29..=42|45..=84|86..=117|1987..=2034|2047..=2053|2106..=2133|2398..=2915|3030..=4325|4330..=4337|4354..=4577|4610..=4673|4746..=4765|4846..=4901|4910..=5373|5438..=5693|5790..=5815|5880..=5893|5896..=5899|5904..=5938|5965..=5980|6024..=6028|6030..=6031|7043..=7228|7231..=7232|7235..=7236|7239..=7240|7243..=7244|7247..=7248|7251..=7252|7255..=7256|7615..=7618|7636|7751..=7894|8155|8158|8479|8482|8826..=9009|9034..=9081|9398..=9429|9575..=9598|10702..=10733|11082..=11413|11651..=11652|11655..=11656|11659..=11660|11663..=11664|11667..=11668|11671..=11672|11675..=11676|11679..=11680|11683..=11684|11687..=11688|11691..=11692|11695..=11696|11699..=11700|11703..=11704|11707..=11708|11711..=11712|11715..=11716|11719..=11720|11723..=11724|11727..=11728|11731..=11732|11735..=11736|11739..=11740|11743..=11744|11747..=11748|11751..=11752|11755..=11756|11759..=11760|11763..=11764|11767..=11768|11771..=11772|11775..=11776|11779..=11780|11783..=11784|11787..=11788|11791..=11792|11795..=11796|11799..=11800|11803..=11804|11807..=11808|11811..=11812|11815..=11816|11819..=11820|11823..=11824|11827..=11828|11831..=11832|11835..=11836|11839..=11840|11875..=11876|11879..=11880|11883..=11884|11887..=11888|11891..=11892|11895..=11896|11899..=11900|11903..=11904|11907..=11908|11911..=11912|11915..=11916|11919..=11920|11923..=11924|11927..=11928|11931..=11932|11935..=11936|12964..=12965|12968|12970|12972|12974|12976..=12981|12983|13018|13229..=13255|13282..=13401|13413|13427..=13430|14635|14638|14959|14962|15283|15286|15607|15610|15931|15934|16255|16258|16579|16582|16903|16906|17227|17230|17551|17554|17875|17878|18199|18202|18523|18526|19044..=19047|19061|19063..=19064|19078|19080..=19134|19149..=19152|19345..=19346|19349..=19350|19353..=19354|19357..=19358|19361..=19362|19365..=19366|19369..=19370|19373..=19374|19377..=19378|19381..=19382|19385..=19386|19389..=19390|19393..=19394|19397..=19398|19401..=19402|19405..=19406|19569..=19616|19745..=19824|20016|20019|20436|20439|20841..=20866|20873|20876|21643|21646|22054|22057|22466|22469|22787|23269..=23396|25238..=25292|25296..=25311|25319..=25320|25327..=25328|25335..=25336|25343..=25370|25469|25472|25880|25883|26291|26294|26702|26705|27041) } fn is_shape_full(&self) -> bool { - matches!(self.id, 1..=24|79|112..=1687|1998..=2003|2017..=2022|2047..=2062|2091..=2354|2873|4274..=4277|4294..=4301|5734..=5737|5780..=5781|5798|5815..=5816|5849|5851..=5857|5863|5866..=5873|5945..=5960|6537..=6740|6811..=6812|7269..=7270|7272|7415|7417..=7418|7511..=7512|7665|7906..=7918|9223..=9224|9235..=9239|9344..=9371|10364..=10366|10463..=10465|10710..=10711|10716..=10717|10722..=10727|10744..=10746|11079..=11081|11166..=11167|11172..=11173|11178..=11179|11184..=11185|11190..=11191|11196..=11197|11202..=11203|11208..=11209|11214..=11215|11220..=11221|11226..=11227|11232..=11233|11238..=11239|11244..=11245|11250..=11251|11256..=11257|11262..=11263|11268..=11269|11274..=11275|11280..=11281|11286..=11287|11292..=11293|11298..=11299|11304..=11309|12404..=12413|12494|12515..=12548|12550..=12759|12787|12803..=12812|12941|14086..=14087|14092..=14093|14098..=14099|14104..=14105|14110..=14111|14116..=14117|14122..=14123|14128..=14129|14134..=14135|14140..=14141|14146..=14147|14152..=14153|14158..=14159|18404..=18437|18466|18579..=18591|18593|18596..=18608|18610|18666..=18667|18672..=18673|18678..=18679|19356..=19371|19381..=19444|19446..=19454|19459..=19460|19869..=19874|19879..=19880|20285|20370..=20371|20722..=20724|21031..=21032|21081|21086..=21087|21492|21497..=21498|21903..=21904|21909..=21910|22315..=22317|22799|22928..=22929|22938..=22955|23280..=23281|23286..=23287|23292..=23293|23298..=23307|23632..=23633|23638..=23639|23644..=23645|23650..=23651|24676..=24723|24768|24843|24902|24904..=24907|24992..=24993|25318|25403..=25404|25729|25814..=25815|26140|26225..=26226|26551..=26560|26563..=26571|26573|26590..=26643) + matches!(self.id, 1..=21|26..=28|85|118..=156|160..=188|192..=245|249..=447|476..=1730|2041..=2046|2060..=2065|2090..=2105|2134..=2397|2916|4326..=4329|4346..=4353|5900..=5903|5946..=5947|5964|5981..=5982|6015|6017..=6023|6029|6032..=6039|6111..=6126|6767..=6970|7041..=7042|7499..=7500|7502|7645|7647..=7648|7741..=7742|7895|8136..=8148|9478..=9479|9490..=9494|9599..=9626|10699..=10701|10798..=10800|11045..=11046|11051..=11052|11057..=11062|11079..=11081|11414..=11416|11501..=11502|11507..=11508|11513..=11514|11519..=11520|11525..=11526|11531..=11532|11537..=11538|11549..=11550|11555..=11556|11561..=11562|11567..=11568|11573..=11574|11579..=11580|11585..=11586|11591..=11592|11597..=11598|11603..=11604|11609..=11610|11615..=11616|11621..=11622|11627..=11628|11633..=11634|11639..=11640|11645..=11650|12873..=12882|12963|12984..=13017|13019..=13228|13256|13272..=13281|13410|14555..=14556|14561..=14562|14567..=14568|14573..=14574|14579..=14580|14585..=14586|14591..=14592|14597..=14598|14603..=14604|14609..=14610|14615..=14616|14621..=14622|14627..=14628|18873..=18906|18935|19048..=19060|19062|19065..=19077|19079|19135..=19136|19141..=19142|19147..=19148|19825..=19840|19850..=19913|19915..=19923|19928..=19929|20338..=20343|20348..=20349|20754|20839..=20840|21191..=21193|21500..=21501|21550|21555..=21556|21961|21966..=21967|22372..=22373|22378..=22379|22784..=22786|23268|23397..=23398|23407..=23424|23749..=23750|23755..=23756|23761..=23762|23767..=23776|24101..=24102|24107..=24108|24113..=24114|24119..=24120|25145..=25192|25237|25312|25371|25373..=25376|25461..=25462|25787|25872..=25873|26198|26283..=26284|26609|26694..=26695|27020..=27029|27032..=27040|27042|27059..=27112) } } diff --git a/azalea-protocol/src/packets/game/clientbound_entity_position_sync_packet.rs b/azalea-protocol/src/packets/game/clientbound_entity_position_sync_packet.rs new file mode 100755 index 000000000..0125eeb46 --- /dev/null +++ b/azalea-protocol/src/packets/game/clientbound_entity_position_sync_packet.rs @@ -0,0 +1,19 @@ +use azalea_buf::McBuf; +use azalea_core::position::Vec3; +use azalea_protocol_macros::ClientboundGamePacket; + +#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +pub struct ClientboundEntityPositionSyncPacket { + #[var] + pub id: u32, + pub values: PositionMoveRotation, + pub on_ground: bool, +} + +#[derive(McBuf, Clone, Debug)] +pub struct PositionMoveRotation { + pub position: Vec3, + pub delta_movement: Vec3, + pub y_rot: f32, + pub x_rot: f32, +} diff --git a/azalea-protocol/src/packets/game/clientbound_player_position_packet.rs b/azalea-protocol/src/packets/game/clientbound_player_position_packet.rs index 5bc7f4fb6..2a9cebc60 100755 --- a/azalea-protocol/src/packets/game/clientbound_player_position_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_player_position_packet.rs @@ -26,8 +26,7 @@ pub struct RelativeMovements { impl McBufReadable for RelativeMovements { fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - // yes minecraft seriously wastes that many bits - // smh + // yes minecraft seriously wastes that many bits, smh let set = FixedBitSet::<32>::read_from(buf)?; Ok(RelativeMovements { x: set.index(0), diff --git a/azalea-protocol/src/packets/game/clientbound_player_rotation_packet.rs b/azalea-protocol/src/packets/game/clientbound_player_rotation_packet.rs new file mode 100755 index 000000000..a1ad9bbe8 --- /dev/null +++ b/azalea-protocol/src/packets/game/clientbound_player_rotation_packet.rs @@ -0,0 +1,8 @@ +use azalea_buf::McBuf; +use azalea_protocol_macros::ClientboundGamePacket; + +#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +pub struct ClientboundPlayerRotationPacket { + pub y_rot: f32, + pub x_rot: f32, +} diff --git a/azalea-protocol/src/packets/game/clientbound_recipe_book_add_packet.rs b/azalea-protocol/src/packets/game/clientbound_recipe_book_add_packet.rs new file mode 100755 index 000000000..e025da7dc --- /dev/null +++ b/azalea-protocol/src/packets/game/clientbound_recipe_book_add_packet.rs @@ -0,0 +1,79 @@ +use azalea_buf::McBuf; +use azalea_protocol_macros::ClientboundGamePacket; + +use super::clientbound_update_recipes_packet::{Ingredient, SlotDisplayData}; + +#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +pub struct ClientboundRecipeBookAddPacket { + pub entries: Vec, + pub replace: bool, +} + +#[derive(Clone, Debug, McBuf)] +pub struct Entry { + pub contents: RecipeDisplayEntry, + pub flags: u8, +} + +#[derive(Clone, Debug, McBuf)] +pub struct RecipeDisplayEntry { + #[var] + pub id: u32, + pub display: RecipeDisplayData, + // ByteBufCodecs.OPTIONAL_VAR_INT + #[var] + pub group: u32, + pub category: azalea_registry::RecipeBookCategory, + pub crafting_requirements: Option>, +} + +/// [`azalea_registry::RecipeDisplay`] +#[derive(Clone, Debug, McBuf)] +pub enum RecipeDisplayData { + Shapeless(ShapelessCraftingRecipeDisplay), + Shaped(ShapedCraftingRecipeDisplay), + Furnace(FurnaceRecipeDisplay), + Stonecutter(StonecutterRecipeDisplay), + Smithing(SmithingRecipeDisplay), +} + +#[derive(Clone, Debug, McBuf)] +pub struct ShapelessCraftingRecipeDisplay { + pub ingredients: Vec, + pub result: SlotDisplayData, + pub crafting_station: SlotDisplayData, +} +#[derive(Clone, Debug, McBuf)] +pub struct ShapedCraftingRecipeDisplay { + #[var] + pub width: u32, + #[var] + pub height: u32, + pub ingredients: Vec, + pub result: SlotDisplayData, + pub crafting_station: SlotDisplayData, +} +#[derive(Clone, Debug, McBuf)] +pub struct FurnaceRecipeDisplay { + pub ingredient: SlotDisplayData, + pub fuel: SlotDisplayData, + pub result: SlotDisplayData, + pub crafting_station: SlotDisplayData, + #[var] + pub duration: u32, + pub experience: f32, +} +#[derive(Clone, Debug, McBuf)] +pub struct StonecutterRecipeDisplay { + pub input: SlotDisplayData, + pub result: SlotDisplayData, + pub crafting_station: SlotDisplayData, +} +#[derive(Clone, Debug, McBuf)] +pub struct SmithingRecipeDisplay { + pub template: SlotDisplayData, + pub base: SlotDisplayData, + pub addition: SlotDisplayData, + pub result: SlotDisplayData, + pub crafting_station: SlotDisplayData, +} diff --git a/azalea-protocol/src/packets/game/clientbound_recipe_book_remove_packet.rs b/azalea-protocol/src/packets/game/clientbound_recipe_book_remove_packet.rs new file mode 100755 index 000000000..678537ca5 --- /dev/null +++ b/azalea-protocol/src/packets/game/clientbound_recipe_book_remove_packet.rs @@ -0,0 +1,15 @@ +use azalea_buf::McBuf; +use azalea_protocol_macros::ClientboundGamePacket; + +use super::{ + clientbound_entity_position_sync_packet::PositionMoveRotation, + clientbound_player_position_packet::RelativeMovements, +}; + +#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +pub struct ClientboundRecipeBookRemovePacket { + #[var] + pub id: u32, + pub change: PositionMoveRotation, + pub relatives: RelativeMovements, +} diff --git a/azalea-protocol/src/packets/game/clientbound_recipe_book_settings_packet.rs b/azalea-protocol/src/packets/game/clientbound_recipe_book_settings_packet.rs new file mode 100755 index 000000000..1180bd261 --- /dev/null +++ b/azalea-protocol/src/packets/game/clientbound_recipe_book_settings_packet.rs @@ -0,0 +1,22 @@ +use azalea_buf::McBuf; +use azalea_protocol_macros::ClientboundGamePacket; + +#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +pub struct ClientboundRecipeBookSettingsPacket { + pub book_settings: RecipeBookSettings, +} + +#[derive(Clone, Debug, McBuf)] +pub struct RecipeBookSettings { + pub gui_open: bool, + pub filtering_craftable: bool, + + pub furnace_gui_open: bool, + pub furnace_filtering_craftable: bool, + + pub blast_furnace_gui_open: bool, + pub blast_furnace_filtering_craftable: bool, + + pub smoker_gui_open: bool, + pub smoker_filtering_craftable: bool, +} diff --git a/azalea-protocol/src/packets/game/clientbound_recipe_packet.rs b/azalea-protocol/src/packets/game/clientbound_recipe_packet.rs deleted file mode 100755 index e948e53c1..000000000 --- a/azalea-protocol/src/packets/game/clientbound_recipe_packet.rs +++ /dev/null @@ -1,77 +0,0 @@ -use azalea_buf::{ - BufReadError, McBuf, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable, -}; -use azalea_core::resource_location::ResourceLocation; -use azalea_protocol_macros::ClientboundGamePacket; -use std::io::{Cursor, Write}; - -#[derive(Clone, Debug, ClientboundGamePacket)] -pub struct ClientboundRecipePacket { - pub action: State, - pub settings: RecipeBookSettings, - pub recipes: Vec, -} - -impl McBufWritable for ClientboundRecipePacket { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - match self.action { - State::Init { .. } => 0, - State::Add => 1, - State::Remove => 2, - } - .var_write_into(buf)?; - self.settings.write_into(buf)?; - self.recipes.write_into(buf)?; - if let State::Init { to_highlight } = &self.action { - to_highlight.write_into(buf)?; - } - Ok(()) - } -} -impl McBufReadable for ClientboundRecipePacket { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let action_id = u32::var_read_from(buf)?; - let settings = RecipeBookSettings::read_from(buf)?; - let recipes = Vec::::read_from(buf)?; - let action = match action_id { - 0 => State::Init { - to_highlight: Vec::::read_from(buf)?, - }, - 1 => State::Add, - 2 => State::Remove, - _ => { - return Err(BufReadError::UnexpectedEnumVariant { - id: action_id as i32, - }) - } - }; - - Ok(ClientboundRecipePacket { - action, - settings, - recipes, - }) - } -} - -#[derive(Clone, Debug, McBuf)] -pub struct RecipeBookSettings { - pub gui_open: bool, - pub filtering_craftable: bool, - - pub furnace_gui_open: bool, - pub furnace_filtering_craftable: bool, - - pub blast_furnace_gui_open: bool, - pub blast_furnace_filtering_craftable: bool, - - pub smoker_gui_open: bool, - pub smoker_filtering_craftable: bool, -} - -#[derive(Clone, Debug)] -pub enum State { - Init { to_highlight: Vec }, - Add, - Remove, -} diff --git a/azalea-protocol/src/packets/game/clientbound_update_recipes_packet.rs b/azalea-protocol/src/packets/game/clientbound_update_recipes_packet.rs index 2e5df731d..4c950f90a 100755 --- a/azalea-protocol/src/packets/game/clientbound_update_recipes_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_update_recipes_packet.rs @@ -1,277 +1,74 @@ -use std::io::{self, Cursor}; +use std::collections::HashMap; -use azalea_buf::{BufReadError, McBuf, McBufReadable, McBufVarReadable, McBufWritable}; +use azalea_buf::McBuf; use azalea_core::resource_location::ResourceLocation; use azalea_inventory::ItemSlot; use azalea_protocol_macros::ClientboundGamePacket; use azalea_registry::HolderSet; -#[derive(Clone, Debug, PartialEq, ClientboundGamePacket)] +#[derive(Clone, Debug, PartialEq, McBuf, ClientboundGamePacket)] pub struct ClientboundUpdateRecipesPacket { - pub recipes: Vec, -} - -#[derive(Clone, Debug, PartialEq)] -pub struct RecipeHolder { - pub id: ResourceLocation, - pub data: RecipeData, -} - -// custom reader for additional debug info - -impl McBufReadable for ClientboundUpdateRecipesPacket { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let length = u32::var_read_from(buf)? as usize; - // we limit the capacity to not get exploited into allocating a bunch - let mut recipes = Vec::with_capacity(usize::min(length, 65536)); - - #[cfg(debug_assertions)] - { - let mut last_id = None; - for _ in 0..length { - let recipe = RecipeHolder::read_from(buf).map_err(|e| { - BufReadError::Custom(format!( - "Failed to read RecipeHolder for recipe right after id {:?}: {e}", - last_id - )) - })?; - last_id = Some(recipe.id.clone()); - recipes.push(recipe); - } - } - #[cfg(not(debug_assertions))] - { - for _ in 0..length { - recipes.push(RecipeHolder::read_from(buf)?); - } - } - - Ok(ClientboundUpdateRecipesPacket { recipes }) - } -} -impl McBufWritable for ClientboundUpdateRecipesPacket { - fn write_into(&self, buf: &mut impl io::Write) -> Result<(), io::Error> { - self.recipes.write_into(buf) - } -} - -impl McBufReadable for RecipeHolder { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let id = ResourceLocation::read_from(buf)?; - let data = RecipeData::read_from(buf).map_err(|e| { - BufReadError::Custom(format!( - "Failed to read RecipeData for recipe with id {id}: {e}" - )) - })?; - Ok(RecipeHolder { id, data }) - } -} -impl McBufWritable for RecipeHolder { - fn write_into(&self, buf: &mut impl io::Write) -> Result<(), io::Error> { - self.id.write_into(buf)?; - self.data.write_into(buf) - } + pub item_sets: HashMap, + pub stonecutter_recipes: Vec, } #[derive(Clone, Debug, PartialEq, McBuf)] -pub struct ShapelessRecipe { - /// Used to group similar recipes together in the recipe book. - /// Nbt is present in recipe JSON - pub group: String, - pub category: CraftingBookCategory, - pub result: ItemSlot, - pub ingredients: Vec, +pub struct SingleInputEntry { + pub input: Ingredient, + pub recipe: SelectableRecipe, } #[derive(Clone, Debug, PartialEq, McBuf)] -pub struct ShapedRecipe { - pub group: String, - pub category: CraftingBookCategory, - pub pattern: ShapedRecipePattern, - pub result: ItemSlot, - pub show_notification: bool, +pub struct SelectableRecipe { + pub option_display: SlotDisplayData, } +/// [`azalea_registry::SlotDisplay`] #[derive(Clone, Debug, PartialEq, McBuf)] -pub struct ShapedRecipePattern { - #[var] - pub width: u32, - #[var] - pub height: u32, - pub ingredients: Vec, -} - -#[derive(Clone, Debug, Copy, PartialEq, McBuf)] -pub enum CraftingBookCategory { - Building = 0, - Redstone, - Equipment, - Misc, +pub enum SlotDisplayData { + Empty, + AnyFuel, + Item(ItemSlotDisplay), + ItemStack(ItemStackSlotDisplay), + Tag(ResourceLocation), + SmithingTrim(Box), + WithRemainder(Box), + Composite(CompositeSlotDisplay), } #[derive(Clone, Debug, PartialEq, McBuf)] -pub struct SimpleCookingRecipe { - pub group: String, - pub category: CraftingBookCategory, - pub ingredient: Ingredient, - pub result: ItemSlot, - pub experience: f32, - #[var] - pub cooking_time: u32, +pub struct ItemSlotDisplay { + pub item: azalea_registry::Item, } #[derive(Clone, Debug, PartialEq, McBuf)] -pub struct StoneCutterRecipe { - pub group: String, - pub ingredient: Ingredient, - pub result: ItemSlot, +pub struct ItemStackSlotDisplay { + pub stack: ItemSlot, } #[derive(Clone, Debug, PartialEq, McBuf)] -pub struct SmithingRecipe { - pub template: ItemSlot, - pub base: Ingredient, - pub addition: Ingredient, +pub struct TagSlotDisplay { + pub tag: azalea_registry::Item, } - #[derive(Clone, Debug, PartialEq, McBuf)] -pub struct SimpleCraftingRecipe { - pub category: CraftingBookCategory, +pub struct SmithingTrimDemoSlotDisplay { + pub base: SlotDisplayData, + pub material: SlotDisplayData, + pub pattern: SlotDisplayData, } - #[derive(Clone, Debug, PartialEq, McBuf)] -pub struct SmithingTransformRecipe { - pub template: Ingredient, - pub base: Ingredient, - pub addition: Ingredient, - pub result: ItemSlot, +pub struct WithRemainderSlotDisplay { + pub input: SlotDisplayData, + pub remainder: SlotDisplayData, } - #[derive(Clone, Debug, PartialEq, McBuf)] -pub struct SmithingTrimRecipe { - pub template: Ingredient, - pub base: Ingredient, - pub addition: Ingredient, +pub struct CompositeSlotDisplay { + pub contents: Vec, } #[derive(Clone, Debug, PartialEq, McBuf)] -pub struct TransmuteRecipe { - pub group: String, - pub category: CraftingBookCategory, - pub input: Ingredient, - pub material: Ingredient, - pub result: azalea_registry::Item, -} - -// see RecipeSerializer.java -#[derive(Clone, Debug, PartialEq, McBuf)] -pub enum RecipeData { - CraftingShaped(ShapedRecipe), - CraftingShapeless(ShapelessRecipe), - CraftingSpecialArmorDye(SimpleCraftingRecipe), - CraftingSpecialBookCloning(SimpleCraftingRecipe), - CraftingSpecialMapCloning(SimpleCraftingRecipe), - CraftingSpecialMapExtending(SimpleCraftingRecipe), - CraftingSpecialFireworkRocket(SimpleCraftingRecipe), - CraftingSpecialFireworkStar(SimpleCraftingRecipe), - CraftingSpecialFireworkStarFade(SimpleCraftingRecipe), - CraftingSpecialTippedArrow(SimpleCraftingRecipe), - CraftingSpecialBannerDuplicate(SimpleCraftingRecipe), - CraftingSpecialShieldDecoration(SimpleCraftingRecipe), - Transmute(TransmuteRecipe), - CraftingSpecialRepairItem(SimpleCraftingRecipe), - Smelting(SimpleCookingRecipe), - Blasting(SimpleCookingRecipe), - Smoking(SimpleCookingRecipe), - CampfireCooking(SimpleCookingRecipe), - Stonecutting(StoneCutterRecipe), - SmithingTransform(SmithingTransformRecipe), - SmithingTrim(SmithingTrimRecipe), - CraftingDecoratedPot(SimpleCraftingRecipe), +pub struct RecipePropertySet { + pub items: Vec, } #[derive(Clone, Debug, PartialEq, McBuf)] pub struct Ingredient { pub allowed: HolderSet, } - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn test_crafting_shaped() { - let mut buf = Vec::new(); - let recipe = RecipeHolder { - id: ResourceLocation::new("minecraft:crafting_shaped"), - data: RecipeData::CraftingShaped(ShapedRecipe { - group: String::new(), - category: CraftingBookCategory::Building, - pattern: ShapedRecipePattern { - width: 2, - height: 2, - ingredients: vec![ - Ingredient { - allowed: HolderSet::Direct { contents: vec![] }, - }, - Ingredient { - allowed: HolderSet::Direct { contents: vec![] }, - }, - Ingredient { - allowed: HolderSet::Direct { contents: vec![] }, - }, - Ingredient { - allowed: HolderSet::Direct { contents: vec![] }, - }, - ], - }, - result: ItemSlot::Empty, - show_notification: false, - }), - }; - recipe.write_into(&mut buf).unwrap(); - let decoded_recipe = RecipeHolder::read_from(&mut Cursor::new(&buf[..])).unwrap(); - assert_eq!(recipe, decoded_recipe); - } - - #[test] - fn test_crafting_shapeless() { - let mut buf = Vec::new(); - let recipe = RecipeHolder { - id: ResourceLocation::new("minecraft:crafting_shapeless"), - data: RecipeData::CraftingShapeless(ShapelessRecipe { - group: String::new(), - category: CraftingBookCategory::Building, - ingredients: vec![ - Ingredient { - allowed: HolderSet::Direct { contents: vec![] }, - }, - Ingredient { - allowed: HolderSet::Direct { contents: vec![] }, - }, - Ingredient { - allowed: HolderSet::Direct { contents: vec![] }, - }, - Ingredient { - allowed: HolderSet::Direct { contents: vec![] }, - }, - ], - result: ItemSlot::Empty, - }), - }; - recipe.write_into(&mut buf).unwrap(); - let decoded_recipe = RecipeHolder::read_from(&mut Cursor::new(&buf[..])).unwrap(); - assert_eq!(recipe, decoded_recipe); - } - - #[test] - fn test_crafting_special_armordye() { - let mut buf = Vec::new(); - let recipe = RecipeHolder { - id: ResourceLocation::new("minecraft:crafting_special_armordye"), - data: RecipeData::CraftingSpecialArmorDye(SimpleCraftingRecipe { - category: CraftingBookCategory::Building, - }), - }; - recipe.write_into(&mut buf).unwrap(); - let decoded_recipe = RecipeHolder::read_from(&mut Cursor::new(&buf[..])).unwrap(); - assert_eq!(recipe, decoded_recipe); - } -} diff --git a/azalea-protocol/src/packets/game/mod.rs b/azalea-protocol/src/packets/game/mod.rs index dd43809fc..55d6faaff 100755 --- a/azalea-protocol/src/packets/game/mod.rs +++ b/azalea-protocol/src/packets/game/mod.rs @@ -31,6 +31,7 @@ pub mod clientbound_delete_chat_packet; pub mod clientbound_disconnect_packet; pub mod clientbound_disguised_chat_packet; pub mod clientbound_entity_event_packet; +pub mod clientbound_entity_position_sync_packet; pub mod clientbound_explode_packet; pub mod clientbound_forget_level_chunk_packet; pub mod clientbound_game_event_packet; @@ -64,9 +65,12 @@ pub mod clientbound_player_info_remove_packet; pub mod clientbound_player_info_update_packet; pub mod clientbound_player_look_at_packet; pub mod clientbound_player_position_packet; +pub mod clientbound_player_rotation_packet; pub mod clientbound_pong_response_packet; pub mod clientbound_projectile_power_packet; -pub mod clientbound_recipe_packet; +pub mod clientbound_recipe_book_add_packet; +pub mod clientbound_recipe_book_remove_packet; +pub mod clientbound_recipe_book_settings_packet; pub mod clientbound_remove_entities_packet; pub mod clientbound_remove_mob_effect_packet; pub mod clientbound_reset_score_packet; @@ -287,100 +291,104 @@ declare_state_packets!( 0x1d: clientbound_disconnect_packet::ClientboundDisconnectPacket, 0x1e: clientbound_disguised_chat_packet::ClientboundDisguisedChatPacket, 0x1f: clientbound_entity_event_packet::ClientboundEntityEventPacket, - 0x20: clientbound_explode_packet::ClientboundExplodePacket, - 0x21: clientbound_forget_level_chunk_packet::ClientboundForgetLevelChunkPacket, - 0x22: clientbound_game_event_packet::ClientboundGameEventPacket, - 0x23: clientbound_horse_screen_open_packet::ClientboundHorseScreenOpenPacket, - 0x24: clientbound_hurt_animation_packet::ClientboundHurtAnimationPacket, - 0x25: clientbound_initialize_border_packet::ClientboundInitializeBorderPacket, - 0x26: clientbound_keep_alive_packet::ClientboundKeepAlivePacket, - 0x27: clientbound_level_chunk_with_light_packet::ClientboundLevelChunkWithLightPacket, - 0x28: clientbound_level_event_packet::ClientboundLevelEventPacket, - 0x29: clientbound_level_particles_packet::ClientboundLevelParticlesPacket, - 0x2a: clientbound_light_update_packet::ClientboundLightUpdatePacket, - 0x2b: clientbound_login_packet::ClientboundLoginPacket, - 0x2c: clientbound_map_item_data_packet::ClientboundMapItemDataPacket, - 0x2d: clientbound_merchant_offers_packet::ClientboundMerchantOffersPacket, - 0x2e: clientbound_move_entity_pos_packet::ClientboundMoveEntityPosPacket, - 0x2f: clientbound_move_entity_pos_rot_packet::ClientboundMoveEntityPosRotPacket, - 0x30: clientbound_move_minecart_packet::ClientboundMoveMinecartPacket, - 0x31: clientbound_move_entity_rot_packet::ClientboundMoveEntityRotPacket, - 0x32: clientbound_move_vehicle_packet::ClientboundMoveVehiclePacket, - 0x33: clientbound_open_book_packet::ClientboundOpenBookPacket, - 0x34: clientbound_open_screen_packet::ClientboundOpenScreenPacket, - 0x35: clientbound_open_sign_editor_packet::ClientboundOpenSignEditorPacket, - 0x36: clientbound_ping_packet::ClientboundPingPacket, - 0x37: clientbound_pong_response_packet::ClientboundPongResponsePacket, - 0x38: clientbound_place_ghost_recipe_packet::ClientboundPlaceGhostRecipePacket, - 0x39: clientbound_player_abilities_packet::ClientboundPlayerAbilitiesPacket, - 0x3a: clientbound_player_chat_packet::ClientboundPlayerChatPacket, - 0x3b: clientbound_player_combat_end_packet::ClientboundPlayerCombatEndPacket, - 0x3c: clientbound_player_combat_enter_packet::ClientboundPlayerCombatEnterPacket, - 0x3d: clientbound_player_combat_kill_packet::ClientboundPlayerCombatKillPacket, - 0x3e: clientbound_player_info_remove_packet::ClientboundPlayerInfoRemovePacket, - 0x3f: clientbound_player_info_update_packet::ClientboundPlayerInfoUpdatePacket, - 0x40: clientbound_player_look_at_packet::ClientboundPlayerLookAtPacket, - 0x41: clientbound_player_position_packet::ClientboundPlayerPositionPacket, - 0x42: clientbound_recipe_packet::ClientboundRecipePacket, - 0x43: clientbound_remove_entities_packet::ClientboundRemoveEntitiesPacket, - 0x44: clientbound_remove_mob_effect_packet::ClientboundRemoveMobEffectPacket, - 0x45: clientbound_reset_score_packet::ClientboundResetScorePacket, - 0x46: clientbound_resource_pack_pop_packet::ClientboundResourcePackPopPacket, - 0x47: clientbound_resource_pack_push_packet::ClientboundResourcePackPushPacket, - 0x48: clientbound_respawn_packet::ClientboundRespawnPacket, - 0x49: clientbound_rotate_head_packet::ClientboundRotateHeadPacket, - 0x4a: clientbound_section_blocks_update_packet::ClientboundSectionBlocksUpdatePacket, - 0x4b: clientbound_select_advancements_tab_packet::ClientboundSelectAdvancementsTabPacket, - 0x4c: clientbound_server_data_packet::ClientboundServerDataPacket, - 0x4d: clientbound_set_action_bar_text_packet::ClientboundSetActionBarTextPacket, - 0x4e: clientbound_set_border_center_packet::ClientboundSetBorderCenterPacket, - 0x4f: clientbound_set_border_lerp_size_packet::ClientboundSetBorderLerpSizePacket, - 0x50: clientbound_set_border_size_packet::ClientboundSetBorderSizePacket, - 0x51: clientbound_set_border_warning_delay_packet::ClientboundSetBorderWarningDelayPacket, - 0x52: clientbound_set_border_warning_distance_packet::ClientboundSetBorderWarningDistancePacket, - 0x53: clientbound_set_camera_packet::ClientboundSetCameraPacket, - 0x54: clientbound_set_chunk_cache_center_packet::ClientboundSetChunkCacheCenterPacket, - 0x55: clientbound_set_chunk_cache_radius_packet::ClientboundSetChunkCacheRadiusPacket, - 0x56: clientbound_set_cursor_item_packet::ClientboundSetCursorItemPacket, - 0x57: clientbound_set_default_spawn_position_packet::ClientboundSetDefaultSpawnPositionPacket, - 0x58: clientbound_set_display_objective_packet::ClientboundSetDisplayObjectivePacket, - 0x59: clientbound_set_entity_data_packet::ClientboundSetEntityDataPacket, - 0x5a: clientbound_set_entity_link_packet::ClientboundSetEntityLinkPacket, - 0x5b: clientbound_set_entity_motion_packet::ClientboundSetEntityMotionPacket, - 0x5c: clientbound_set_equipment_packet::ClientboundSetEquipmentPacket, - 0x5d: clientbound_set_experience_packet::ClientboundSetExperiencePacket, - 0x5e: clientbound_set_health_packet::ClientboundSetHealthPacket, - 0x5f: clientbound_set_held_slot_packet::ClientboundSetHeldSlotPacket, - 0x60: clientbound_set_objective_packet::ClientboundSetObjectivePacket, - 0x61: clientbound_set_passengers_packet::ClientboundSetPassengersPacket, - 0x62: clientbound_set_player_inventory_packet::ClientboundSetPlayerInventoryPacket, - 0x63: clientbound_set_player_team_packet::ClientboundSetPlayerTeamPacket, - 0x64: clientbound_set_score_packet::ClientboundSetScorePacket, - 0x65: clientbound_set_simulation_distance_packet::ClientboundSetSimulationDistancePacket, - 0x66: clientbound_set_subtitle_text_packet::ClientboundSetSubtitleTextPacket, - 0x67: clientbound_set_time_packet::ClientboundSetTimePacket, - 0x68: clientbound_set_title_text_packet::ClientboundSetTitleTextPacket, - 0x69: clientbound_set_titles_animation_packet::ClientboundSetTitlesAnimationPacket, - 0x6a: clientbound_sound_entity_packet::ClientboundSoundEntityPacket, - 0x6b: clientbound_sound_packet::ClientboundSoundPacket, - 0x6c: clientbound_start_configuration_packet::ClientboundStartConfigurationPacket, - 0x6d: clientbound_stop_sound_packet::ClientboundStopSoundPacket, - 0x6e: clientbound_store_cookie_packet::ClientboundStoreCookiePacket, - 0x6f: clientbound_system_chat_packet::ClientboundSystemChatPacket, - 0x70: clientbound_tab_list_packet::ClientboundTabListPacket, - 0x71: clientbound_tag_query_packet::ClientboundTagQueryPacket, - 0x72: clientbound_take_item_entity_packet::ClientboundTakeItemEntityPacket, - 0x73: clientbound_teleport_entity_packet::ClientboundTeleportEntityPacket, - 0x74: clientbound_ticking_state_packet::ClientboundTickingStatePacket, - 0x75: clientbound_ticking_step_packet::ClientboundTickingStepPacket, - 0x76: clientbound_transfer_packet::ClientboundTransferPacket, - 0x77: clientbound_update_advancements_packet::ClientboundUpdateAdvancementsPacket, - 0x78: clientbound_update_attributes_packet::ClientboundUpdateAttributesPacket, - 0x79: clientbound_update_mob_effect_packet::ClientboundUpdateMobEffectPacket, - 0x7a: clientbound_update_recipes_packet::ClientboundUpdateRecipesPacket, - 0x7b: clientbound_update_tags_packet::ClientboundUpdateTagsPacket, - 0x7c: clientbound_projectile_power_packet::ClientboundProjectilePowerPacket, - 0x7d: clientbound_custom_report_details_packet::ClientboundCustomReportDetailsPacket, - 0x7e: clientbound_server_links_packet::ClientboundServerLinksPacket + 0x20: clientbound_entity_position_sync_packet::ClientboundEntityPositionSyncPacket, + 0x21: clientbound_explode_packet::ClientboundExplodePacket, + 0x22: clientbound_forget_level_chunk_packet::ClientboundForgetLevelChunkPacket, + 0x23: clientbound_game_event_packet::ClientboundGameEventPacket, + 0x24: clientbound_horse_screen_open_packet::ClientboundHorseScreenOpenPacket, + 0x25: clientbound_hurt_animation_packet::ClientboundHurtAnimationPacket, + 0x26: clientbound_initialize_border_packet::ClientboundInitializeBorderPacket, + 0x27: clientbound_keep_alive_packet::ClientboundKeepAlivePacket, + 0x28: clientbound_level_chunk_with_light_packet::ClientboundLevelChunkWithLightPacket, + 0x29: clientbound_level_event_packet::ClientboundLevelEventPacket, + 0x2a: clientbound_level_particles_packet::ClientboundLevelParticlesPacket, + 0x2b: clientbound_light_update_packet::ClientboundLightUpdatePacket, + 0x2c: clientbound_login_packet::ClientboundLoginPacket, + 0x2d: clientbound_map_item_data_packet::ClientboundMapItemDataPacket, + 0x2e: clientbound_merchant_offers_packet::ClientboundMerchantOffersPacket, + 0x2f: clientbound_move_entity_pos_packet::ClientboundMoveEntityPosPacket, + 0x30: clientbound_move_entity_pos_rot_packet::ClientboundMoveEntityPosRotPacket, + 0x31: clientbound_move_minecart_packet::ClientboundMoveMinecartPacket, + 0x32: clientbound_move_entity_rot_packet::ClientboundMoveEntityRotPacket, + 0x33: clientbound_move_vehicle_packet::ClientboundMoveVehiclePacket, + 0x34: clientbound_open_book_packet::ClientboundOpenBookPacket, + 0x35: clientbound_open_screen_packet::ClientboundOpenScreenPacket, + 0x36: clientbound_open_sign_editor_packet::ClientboundOpenSignEditorPacket, + 0x37: clientbound_ping_packet::ClientboundPingPacket, + 0x38: clientbound_pong_response_packet::ClientboundPongResponsePacket, + 0x39: clientbound_place_ghost_recipe_packet::ClientboundPlaceGhostRecipePacket, + 0x3a: clientbound_player_abilities_packet::ClientboundPlayerAbilitiesPacket, + 0x3b: clientbound_player_chat_packet::ClientboundPlayerChatPacket, + 0x3c: clientbound_player_combat_end_packet::ClientboundPlayerCombatEndPacket, + 0x3d: clientbound_player_combat_enter_packet::ClientboundPlayerCombatEnterPacket, + 0x3e: clientbound_player_combat_kill_packet::ClientboundPlayerCombatKillPacket, + 0x3f: clientbound_player_info_remove_packet::ClientboundPlayerInfoRemovePacket, + 0x40: clientbound_player_info_update_packet::ClientboundPlayerInfoUpdatePacket, + 0x41: clientbound_player_look_at_packet::ClientboundPlayerLookAtPacket, + 0x42: clientbound_player_position_packet::ClientboundPlayerPositionPacket, + 0x43: clientbound_player_rotation_packet::ClientboundPlayerRotationPacket, + 0x44: clientbound_recipe_book_add_packet::ClientboundRecipeBookAddPacket, + 0x45: clientbound_recipe_book_remove_packet::ClientboundRecipeBookRemovePacket, + 0x46: clientbound_recipe_book_settings_packet::ClientboundRecipeBookSettingsPacket, + 0x47: clientbound_remove_entities_packet::ClientboundRemoveEntitiesPacket, + 0x48: clientbound_remove_mob_effect_packet::ClientboundRemoveMobEffectPacket, + 0x49: clientbound_reset_score_packet::ClientboundResetScorePacket, + 0x4a: clientbound_resource_pack_pop_packet::ClientboundResourcePackPopPacket, + 0x4b: clientbound_resource_pack_push_packet::ClientboundResourcePackPushPacket, + 0x4c: clientbound_respawn_packet::ClientboundRespawnPacket, + 0x4d: clientbound_rotate_head_packet::ClientboundRotateHeadPacket, + 0x4e: clientbound_section_blocks_update_packet::ClientboundSectionBlocksUpdatePacket, + 0x4f: clientbound_select_advancements_tab_packet::ClientboundSelectAdvancementsTabPacket, + 0x50: clientbound_server_data_packet::ClientboundServerDataPacket, + 0x51: clientbound_set_action_bar_text_packet::ClientboundSetActionBarTextPacket, + 0x52: clientbound_set_border_center_packet::ClientboundSetBorderCenterPacket, + 0x53: clientbound_set_border_lerp_size_packet::ClientboundSetBorderLerpSizePacket, + 0x54: clientbound_set_border_size_packet::ClientboundSetBorderSizePacket, + 0x55: clientbound_set_border_warning_delay_packet::ClientboundSetBorderWarningDelayPacket, + 0x56: clientbound_set_border_warning_distance_packet::ClientboundSetBorderWarningDistancePacket, + 0x57: clientbound_set_camera_packet::ClientboundSetCameraPacket, + 0x58: clientbound_set_chunk_cache_center_packet::ClientboundSetChunkCacheCenterPacket, + 0x59: clientbound_set_chunk_cache_radius_packet::ClientboundSetChunkCacheRadiusPacket, + 0x5a: clientbound_set_cursor_item_packet::ClientboundSetCursorItemPacket, + 0x5b: clientbound_set_default_spawn_position_packet::ClientboundSetDefaultSpawnPositionPacket, + 0x5c: clientbound_set_display_objective_packet::ClientboundSetDisplayObjectivePacket, + 0x5d: clientbound_set_entity_data_packet::ClientboundSetEntityDataPacket, + 0x5e: clientbound_set_entity_link_packet::ClientboundSetEntityLinkPacket, + 0x5f: clientbound_set_entity_motion_packet::ClientboundSetEntityMotionPacket, + 0x60: clientbound_set_equipment_packet::ClientboundSetEquipmentPacket, + 0x61: clientbound_set_experience_packet::ClientboundSetExperiencePacket, + 0x62: clientbound_set_health_packet::ClientboundSetHealthPacket, + 0x63: clientbound_set_held_slot_packet::ClientboundSetHeldSlotPacket, + 0x64: clientbound_set_objective_packet::ClientboundSetObjectivePacket, + 0x65: clientbound_set_passengers_packet::ClientboundSetPassengersPacket, + 0x66: clientbound_set_player_inventory_packet::ClientboundSetPlayerInventoryPacket, + 0x67: clientbound_set_player_team_packet::ClientboundSetPlayerTeamPacket, + 0x68: clientbound_set_score_packet::ClientboundSetScorePacket, + 0x69: clientbound_set_simulation_distance_packet::ClientboundSetSimulationDistancePacket, + 0x6a: clientbound_set_subtitle_text_packet::ClientboundSetSubtitleTextPacket, + 0x6b: clientbound_set_time_packet::ClientboundSetTimePacket, + 0x6c: clientbound_set_title_text_packet::ClientboundSetTitleTextPacket, + 0x6d: clientbound_set_titles_animation_packet::ClientboundSetTitlesAnimationPacket, + 0x6e: clientbound_sound_entity_packet::ClientboundSoundEntityPacket, + 0x6f: clientbound_sound_packet::ClientboundSoundPacket, + 0x70: clientbound_start_configuration_packet::ClientboundStartConfigurationPacket, + 0x71: clientbound_stop_sound_packet::ClientboundStopSoundPacket, + 0x72: clientbound_store_cookie_packet::ClientboundStoreCookiePacket, + 0x73: clientbound_system_chat_packet::ClientboundSystemChatPacket, + 0x74: clientbound_tab_list_packet::ClientboundTabListPacket, + 0x75: clientbound_tag_query_packet::ClientboundTagQueryPacket, + 0x76: clientbound_take_item_entity_packet::ClientboundTakeItemEntityPacket, + 0x77: clientbound_teleport_entity_packet::ClientboundTeleportEntityPacket, + 0x78: clientbound_ticking_state_packet::ClientboundTickingStatePacket, + 0x79: clientbound_ticking_step_packet::ClientboundTickingStepPacket, + 0x7a: clientbound_transfer_packet::ClientboundTransferPacket, + 0x7b: clientbound_update_advancements_packet::ClientboundUpdateAdvancementsPacket, + 0x7c: clientbound_update_attributes_packet::ClientboundUpdateAttributesPacket, + 0x7d: clientbound_update_mob_effect_packet::ClientboundUpdateMobEffectPacket, + 0x7e: clientbound_update_recipes_packet::ClientboundUpdateRecipesPacket, + 0x7f: clientbound_update_tags_packet::ClientboundUpdateTagsPacket, + 0x80: clientbound_projectile_power_packet::ClientboundProjectilePowerPacket, + 0x81: clientbound_custom_report_details_packet::ClientboundCustomReportDetailsPacket, + 0x82: clientbound_server_links_packet::ClientboundServerLinksPacket } ); diff --git a/azalea-protocol/src/packets/mod.rs b/azalea-protocol/src/packets/mod.rs index 75c18457c..6cec015fe 100755 --- a/azalea-protocol/src/packets/mod.rs +++ b/azalea-protocol/src/packets/mod.rs @@ -12,7 +12,7 @@ use std::io::{Cursor, Write}; // TODO: rename the packet files to just like clientbound_add_entity instead of // clientbound_add_entity_packet -pub const PROTOCOL_VERSION: i32 = 1073742035; +pub const PROTOCOL_VERSION: i32 = 768; #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub enum ConnectionProtocol { diff --git a/azalea-registry/src/lib.rs b/azalea-registry/src/lib.rs index 816ae9621..e66ccabc1 100755 --- a/azalea-registry/src/lib.rs +++ b/azalea-registry/src/lib.rs @@ -288,6 +288,8 @@ enum Block { AcaciaPlanks => "minecraft:acacia_planks", CherryPlanks => "minecraft:cherry_planks", DarkOakPlanks => "minecraft:dark_oak_planks", + PaleOakWood => "minecraft:pale_oak_wood", + PaleOakPlanks => "minecraft:pale_oak_planks", MangrovePlanks => "minecraft:mangrove_planks", BambooPlanks => "minecraft:bamboo_planks", BambooMosaic => "minecraft:bamboo_mosaic", @@ -298,6 +300,7 @@ enum Block { AcaciaSapling => "minecraft:acacia_sapling", CherrySapling => "minecraft:cherry_sapling", DarkOakSapling => "minecraft:dark_oak_sapling", + PaleOakSapling => "minecraft:pale_oak_sapling", MangrovePropagule => "minecraft:mangrove_propagule", Bedrock => "minecraft:bedrock", Water => "minecraft:water", @@ -321,6 +324,7 @@ enum Block { AcaciaLog => "minecraft:acacia_log", CherryLog => "minecraft:cherry_log", DarkOakLog => "minecraft:dark_oak_log", + PaleOakLog => "minecraft:pale_oak_log", MangroveLog => "minecraft:mangrove_log", MangroveRoots => "minecraft:mangrove_roots", MuddyMangroveRoots => "minecraft:muddy_mangrove_roots", @@ -331,6 +335,7 @@ enum Block { StrippedAcaciaLog => "minecraft:stripped_acacia_log", StrippedCherryLog => "minecraft:stripped_cherry_log", StrippedDarkOakLog => "minecraft:stripped_dark_oak_log", + StrippedPaleOakLog => "minecraft:stripped_pale_oak_log", StrippedOakLog => "minecraft:stripped_oak_log", StrippedMangroveLog => "minecraft:stripped_mangrove_log", StrippedBambooBlock => "minecraft:stripped_bamboo_block", @@ -349,6 +354,7 @@ enum Block { StrippedAcaciaWood => "minecraft:stripped_acacia_wood", StrippedCherryWood => "minecraft:stripped_cherry_wood", StrippedDarkOakWood => "minecraft:stripped_dark_oak_wood", + StrippedPaleOakWood => "minecraft:stripped_pale_oak_wood", StrippedMangroveWood => "minecraft:stripped_mangrove_wood", OakLeaves => "minecraft:oak_leaves", SpruceLeaves => "minecraft:spruce_leaves", @@ -357,6 +363,7 @@ enum Block { AcaciaLeaves => "minecraft:acacia_leaves", CherryLeaves => "minecraft:cherry_leaves", DarkOakLeaves => "minecraft:dark_oak_leaves", + PaleOakLeaves => "minecraft:pale_oak_leaves", MangroveLeaves => "minecraft:mangrove_leaves", AzaleaLeaves => "minecraft:azalea_leaves", FloweringAzaleaLeaves => "minecraft:flowering_azalea_leaves", @@ -444,6 +451,7 @@ enum Block { Fire => "minecraft:fire", SoulFire => "minecraft:soul_fire", Spawner => "minecraft:spawner", + CreakingHeart => "minecraft:creaking_heart", OakStairs => "minecraft:oak_stairs", Chest => "minecraft:chest", RedstoneWire => "minecraft:redstone_wire", @@ -461,6 +469,7 @@ enum Block { CherrySign => "minecraft:cherry_sign", JungleSign => "minecraft:jungle_sign", DarkOakSign => "minecraft:dark_oak_sign", + PaleOakSign => "minecraft:pale_oak_sign", MangroveSign => "minecraft:mangrove_sign", BambooSign => "minecraft:bamboo_sign", OakDoor => "minecraft:oak_door", @@ -474,6 +483,7 @@ enum Block { CherryWallSign => "minecraft:cherry_wall_sign", JungleWallSign => "minecraft:jungle_wall_sign", DarkOakWallSign => "minecraft:dark_oak_wall_sign", + PaleOakWallSign => "minecraft:pale_oak_wall_sign", MangroveWallSign => "minecraft:mangrove_wall_sign", BambooWallSign => "minecraft:bamboo_wall_sign", OakHangingSign => "minecraft:oak_hanging_sign", @@ -483,6 +493,7 @@ enum Block { CherryHangingSign => "minecraft:cherry_hanging_sign", JungleHangingSign => "minecraft:jungle_hanging_sign", DarkOakHangingSign => "minecraft:dark_oak_hanging_sign", + PaleOakHangingSign => "minecraft:pale_oak_hanging_sign", CrimsonHangingSign => "minecraft:crimson_hanging_sign", WarpedHangingSign => "minecraft:warped_hanging_sign", MangroveHangingSign => "minecraft:mangrove_hanging_sign", @@ -494,6 +505,7 @@ enum Block { CherryWallHangingSign => "minecraft:cherry_wall_hanging_sign", JungleWallHangingSign => "minecraft:jungle_wall_hanging_sign", DarkOakWallHangingSign => "minecraft:dark_oak_wall_hanging_sign", + PaleOakWallHangingSign => "minecraft:pale_oak_wall_hanging_sign", MangroveWallHangingSign => "minecraft:mangrove_wall_hanging_sign", CrimsonWallHangingSign => "minecraft:crimson_wall_hanging_sign", WarpedWallHangingSign => "minecraft:warped_wall_hanging_sign", @@ -508,6 +520,7 @@ enum Block { AcaciaPressurePlate => "minecraft:acacia_pressure_plate", CherryPressurePlate => "minecraft:cherry_pressure_plate", DarkOakPressurePlate => "minecraft:dark_oak_pressure_plate", + PaleOakPressurePlate => "minecraft:pale_oak_pressure_plate", MangrovePressurePlate => "minecraft:mangrove_pressure_plate", BambooPressurePlate => "minecraft:bamboo_pressure_plate", RedstoneOre => "minecraft:redstone_ore", @@ -559,6 +572,7 @@ enum Block { AcaciaTrapdoor => "minecraft:acacia_trapdoor", CherryTrapdoor => "minecraft:cherry_trapdoor", DarkOakTrapdoor => "minecraft:dark_oak_trapdoor", + PaleOakTrapdoor => "minecraft:pale_oak_trapdoor", MangroveTrapdoor => "minecraft:mangrove_trapdoor", BambooTrapdoor => "minecraft:bamboo_trapdoor", StoneBricks => "minecraft:stone_bricks", @@ -632,6 +646,7 @@ enum Block { PottedAcaciaSapling => "minecraft:potted_acacia_sapling", PottedCherrySapling => "minecraft:potted_cherry_sapling", PottedDarkOakSapling => "minecraft:potted_dark_oak_sapling", + PottedPaleOakSapling => "minecraft:potted_pale_oak_sapling", PottedMangrovePropagule => "minecraft:potted_mangrove_propagule", PottedFern => "minecraft:potted_fern", PottedDandelion => "minecraft:potted_dandelion", @@ -660,6 +675,7 @@ enum Block { AcaciaButton => "minecraft:acacia_button", CherryButton => "minecraft:cherry_button", DarkOakButton => "minecraft:dark_oak_button", + PaleOakButton => "minecraft:pale_oak_button", MangroveButton => "minecraft:mangrove_button", BambooButton => "minecraft:bamboo_button", SkeletonSkull => "minecraft:skeleton_skull", @@ -728,6 +744,7 @@ enum Block { AcaciaStairs => "minecraft:acacia_stairs", CherryStairs => "minecraft:cherry_stairs", DarkOakStairs => "minecraft:dark_oak_stairs", + PaleOakStairs => "minecraft:pale_oak_stairs", MangroveStairs => "minecraft:mangrove_stairs", BambooStairs => "minecraft:bamboo_stairs", BambooMosaicStairs => "minecraft:bamboo_mosaic_stairs", @@ -814,6 +831,7 @@ enum Block { AcaciaSlab => "minecraft:acacia_slab", CherrySlab => "minecraft:cherry_slab", DarkOakSlab => "minecraft:dark_oak_slab", + PaleOakSlab => "minecraft:pale_oak_slab", MangroveSlab => "minecraft:mangrove_slab", BambooSlab => "minecraft:bamboo_slab", BambooMosaicSlab => "minecraft:bamboo_mosaic_slab", @@ -841,6 +859,7 @@ enum Block { AcaciaFenceGate => "minecraft:acacia_fence_gate", CherryFenceGate => "minecraft:cherry_fence_gate", DarkOakFenceGate => "minecraft:dark_oak_fence_gate", + PaleOakFenceGate => "minecraft:pale_oak_fence_gate", MangroveFenceGate => "minecraft:mangrove_fence_gate", BambooFenceGate => "minecraft:bamboo_fence_gate", SpruceFence => "minecraft:spruce_fence", @@ -849,6 +868,7 @@ enum Block { AcaciaFence => "minecraft:acacia_fence", CherryFence => "minecraft:cherry_fence", DarkOakFence => "minecraft:dark_oak_fence", + PaleOakFence => "minecraft:pale_oak_fence", MangroveFence => "minecraft:mangrove_fence", BambooFence => "minecraft:bamboo_fence", SpruceDoor => "minecraft:spruce_door", @@ -857,6 +877,7 @@ enum Block { AcaciaDoor => "minecraft:acacia_door", CherryDoor => "minecraft:cherry_door", DarkOakDoor => "minecraft:dark_oak_door", + PaleOakDoor => "minecraft:pale_oak_door", MangroveDoor => "minecraft:mangrove_door", BambooDoor => "minecraft:bamboo_door", EndRod => "minecraft:end_rod", @@ -1328,6 +1349,9 @@ enum Block { TrialSpawner => "minecraft:trial_spawner", Vault => "minecraft:vault", HeavyCore => "minecraft:heavy_core", + PaleMossBlock => "minecraft:pale_moss_block", + PaleMossCarpet => "minecraft:pale_moss_carpet", + PaleHangingMoss => "minecraft:pale_hanging_moss", } } @@ -1346,6 +1370,7 @@ enum BlockEntityKind { Sign => "minecraft:sign", HangingSign => "minecraft:hanging_sign", MobSpawner => "minecraft:mob_spawner", + CreakingHeart => "minecraft:creaking_heart", Piston => "minecraft:piston", BrewingStand => "minecraft:brewing_stand", EnchantingTable => "minecraft:enchanting_table", @@ -1652,6 +1677,8 @@ enum EntityKind { Cod => "minecraft:cod", CommandBlockMinecart => "minecraft:command_block_minecart", Cow => "minecraft:cow", + Creaking => "minecraft:creaking", + CreakingTransient => "minecraft:creaking_transient", Creeper => "minecraft:creeper", DarkOakBoat => "minecraft:dark_oak_boat", DarkOakChestBoat => "minecraft:dark_oak_chest_boat", @@ -1711,6 +1738,8 @@ enum EntityKind { Ocelot => "minecraft:ocelot", OminousItemSpawner => "minecraft:ominous_item_spawner", Painting => "minecraft:painting", + PaleOakBoat => "minecraft:pale_oak_boat", + PaleOakChestBoat => "minecraft:pale_oak_chest_boat", Panda => "minecraft:panda", Parrot => "minecraft:parrot", Phantom => "minecraft:phantom", @@ -1944,6 +1973,7 @@ enum Item { AcaciaPlanks => "minecraft:acacia_planks", CherryPlanks => "minecraft:cherry_planks", DarkOakPlanks => "minecraft:dark_oak_planks", + PaleOakPlanks => "minecraft:pale_oak_planks", MangrovePlanks => "minecraft:mangrove_planks", BambooPlanks => "minecraft:bamboo_planks", CrimsonPlanks => "minecraft:crimson_planks", @@ -1956,6 +1986,7 @@ enum Item { AcaciaSapling => "minecraft:acacia_sapling", CherrySapling => "minecraft:cherry_sapling", DarkOakSapling => "minecraft:dark_oak_sapling", + PaleOakSapling => "minecraft:pale_oak_sapling", MangrovePropagule => "minecraft:mangrove_propagule", Bedrock => "minecraft:bedrock", Sand => "minecraft:sand", @@ -2039,6 +2070,7 @@ enum Item { JungleLog => "minecraft:jungle_log", AcaciaLog => "minecraft:acacia_log", CherryLog => "minecraft:cherry_log", + PaleOakLog => "minecraft:pale_oak_log", DarkOakLog => "minecraft:dark_oak_log", MangroveLog => "minecraft:mangrove_log", MangroveRoots => "minecraft:mangrove_roots", @@ -2053,6 +2085,7 @@ enum Item { StrippedAcaciaLog => "minecraft:stripped_acacia_log", StrippedCherryLog => "minecraft:stripped_cherry_log", StrippedDarkOakLog => "minecraft:stripped_dark_oak_log", + StrippedPaleOakLog => "minecraft:stripped_pale_oak_log", StrippedMangroveLog => "minecraft:stripped_mangrove_log", StrippedCrimsonStem => "minecraft:stripped_crimson_stem", StrippedWarpedStem => "minecraft:stripped_warped_stem", @@ -2063,6 +2096,7 @@ enum Item { StrippedAcaciaWood => "minecraft:stripped_acacia_wood", StrippedCherryWood => "minecraft:stripped_cherry_wood", StrippedDarkOakWood => "minecraft:stripped_dark_oak_wood", + StrippedPaleOakWood => "minecraft:stripped_pale_oak_wood", StrippedMangroveWood => "minecraft:stripped_mangrove_wood", StrippedCrimsonHyphae => "minecraft:stripped_crimson_hyphae", StrippedWarpedHyphae => "minecraft:stripped_warped_hyphae", @@ -2073,6 +2107,7 @@ enum Item { JungleWood => "minecraft:jungle_wood", AcaciaWood => "minecraft:acacia_wood", CherryWood => "minecraft:cherry_wood", + PaleOakWood => "minecraft:pale_oak_wood", DarkOakWood => "minecraft:dark_oak_wood", MangroveWood => "minecraft:mangrove_wood", CrimsonHyphae => "minecraft:crimson_hyphae", @@ -2084,6 +2119,7 @@ enum Item { AcaciaLeaves => "minecraft:acacia_leaves", CherryLeaves => "minecraft:cherry_leaves", DarkOakLeaves => "minecraft:dark_oak_leaves", + PaleOakLeaves => "minecraft:pale_oak_leaves", MangroveLeaves => "minecraft:mangrove_leaves", AzaleaLeaves => "minecraft:azalea_leaves", FloweringAzaleaLeaves => "minecraft:flowering_azalea_leaves", @@ -2146,9 +2182,12 @@ enum Item { TwistingVines => "minecraft:twisting_vines", SugarCane => "minecraft:sugar_cane", Kelp => "minecraft:kelp", - MossCarpet => "minecraft:moss_carpet", PinkPetals => "minecraft:pink_petals", + MossCarpet => "minecraft:moss_carpet", MossBlock => "minecraft:moss_block", + PaleMossCarpet => "minecraft:pale_moss_carpet", + PaleHangingMoss => "minecraft:pale_hanging_moss", + PaleMossBlock => "minecraft:pale_moss_block", HangingRoots => "minecraft:hanging_roots", BigDripleaf => "minecraft:big_dripleaf", SmallDripleaf => "minecraft:small_dripleaf", @@ -2160,6 +2199,7 @@ enum Item { AcaciaSlab => "minecraft:acacia_slab", CherrySlab => "minecraft:cherry_slab", DarkOakSlab => "minecraft:dark_oak_slab", + PaleOakSlab => "minecraft:pale_oak_slab", MangroveSlab => "minecraft:mangrove_slab", BambooSlab => "minecraft:bamboo_slab", BambooMosaicSlab => "minecraft:bamboo_mosaic_slab", @@ -2200,6 +2240,7 @@ enum Item { PurpurPillar => "minecraft:purpur_pillar", PurpurStairs => "minecraft:purpur_stairs", Spawner => "minecraft:spawner", + CreakingHeart => "minecraft:creaking_heart", Chest => "minecraft:chest", CraftingTable => "minecraft:crafting_table", Farmland => "minecraft:farmland", @@ -2219,6 +2260,7 @@ enum Item { AcaciaFence => "minecraft:acacia_fence", CherryFence => "minecraft:cherry_fence", DarkOakFence => "minecraft:dark_oak_fence", + PaleOakFence => "minecraft:pale_oak_fence", MangroveFence => "minecraft:mangrove_fence", BambooFence => "minecraft:bamboo_fence", CrimsonFence => "minecraft:crimson_fence", @@ -2291,6 +2333,7 @@ enum Item { AcaciaStairs => "minecraft:acacia_stairs", CherryStairs => "minecraft:cherry_stairs", DarkOakStairs => "minecraft:dark_oak_stairs", + PaleOakStairs => "minecraft:pale_oak_stairs", MangroveStairs => "minecraft:mangrove_stairs", BambooStairs => "minecraft:bamboo_stairs", BambooMosaicStairs => "minecraft:bamboo_mosaic_stairs", @@ -2592,6 +2635,7 @@ enum Item { AcaciaButton => "minecraft:acacia_button", CherryButton => "minecraft:cherry_button", DarkOakButton => "minecraft:dark_oak_button", + PaleOakButton => "minecraft:pale_oak_button", MangroveButton => "minecraft:mangrove_button", BambooButton => "minecraft:bamboo_button", CrimsonButton => "minecraft:crimson_button", @@ -2607,6 +2651,7 @@ enum Item { AcaciaPressurePlate => "minecraft:acacia_pressure_plate", CherryPressurePlate => "minecraft:cherry_pressure_plate", DarkOakPressurePlate => "minecraft:dark_oak_pressure_plate", + PaleOakPressurePlate => "minecraft:pale_oak_pressure_plate", MangrovePressurePlate => "minecraft:mangrove_pressure_plate", BambooPressurePlate => "minecraft:bamboo_pressure_plate", CrimsonPressurePlate => "minecraft:crimson_pressure_plate", @@ -2619,6 +2664,7 @@ enum Item { AcaciaDoor => "minecraft:acacia_door", CherryDoor => "minecraft:cherry_door", DarkOakDoor => "minecraft:dark_oak_door", + PaleOakDoor => "minecraft:pale_oak_door", MangroveDoor => "minecraft:mangrove_door", BambooDoor => "minecraft:bamboo_door", CrimsonDoor => "minecraft:crimson_door", @@ -2639,6 +2685,7 @@ enum Item { AcaciaTrapdoor => "minecraft:acacia_trapdoor", CherryTrapdoor => "minecraft:cherry_trapdoor", DarkOakTrapdoor => "minecraft:dark_oak_trapdoor", + PaleOakTrapdoor => "minecraft:pale_oak_trapdoor", MangroveTrapdoor => "minecraft:mangrove_trapdoor", BambooTrapdoor => "minecraft:bamboo_trapdoor", CrimsonTrapdoor => "minecraft:crimson_trapdoor", @@ -2658,6 +2705,7 @@ enum Item { AcaciaFenceGate => "minecraft:acacia_fence_gate", CherryFenceGate => "minecraft:cherry_fence_gate", DarkOakFenceGate => "minecraft:dark_oak_fence_gate", + PaleOakFenceGate => "minecraft:pale_oak_fence_gate", MangroveFenceGate => "minecraft:mangrove_fence_gate", BambooFenceGate => "minecraft:bamboo_fence_gate", CrimsonFenceGate => "minecraft:crimson_fence_gate", @@ -2690,6 +2738,8 @@ enum Item { CherryChestBoat => "minecraft:cherry_chest_boat", DarkOakBoat => "minecraft:dark_oak_boat", DarkOakChestBoat => "minecraft:dark_oak_chest_boat", + PaleOakBoat => "minecraft:pale_oak_boat", + PaleOakChestBoat => "minecraft:pale_oak_chest_boat", MangroveBoat => "minecraft:mangrove_boat", MangroveChestBoat => "minecraft:mangrove_chest_boat", BambooRaft => "minecraft:bamboo_raft", @@ -2795,6 +2845,7 @@ enum Item { AcaciaSign => "minecraft:acacia_sign", CherrySign => "minecraft:cherry_sign", DarkOakSign => "minecraft:dark_oak_sign", + PaleOakSign => "minecraft:pale_oak_sign", MangroveSign => "minecraft:mangrove_sign", BambooSign => "minecraft:bamboo_sign", CrimsonSign => "minecraft:crimson_sign", @@ -2806,6 +2857,7 @@ enum Item { AcaciaHangingSign => "minecraft:acacia_hanging_sign", CherryHangingSign => "minecraft:cherry_hanging_sign", DarkOakHangingSign => "minecraft:dark_oak_hanging_sign", + PaleOakHangingSign => "minecraft:pale_oak_hanging_sign", MangroveHangingSign => "minecraft:mangrove_hanging_sign", BambooHangingSign => "minecraft:bamboo_hanging_sign", CrimsonHangingSign => "minecraft:crimson_hanging_sign", @@ -3002,6 +3054,7 @@ enum Item { WitherSkeletonSpawnEgg => "minecraft:wither_skeleton_spawn_egg", WolfSpawnEgg => "minecraft:wolf_spawn_egg", ZoglinSpawnEgg => "minecraft:zoglin_spawn_egg", + CreakingSpawnEgg => "minecraft:creaking_spawn_egg", ZombieSpawnEgg => "minecraft:zombie_spawn_egg", ZombieHorseSpawnEgg => "minecraft:zombie_horse_spawn_egg", ZombieVillagerSpawnEgg => "minecraft:zombie_villager_spawn_egg", @@ -3629,6 +3682,7 @@ enum ParticleKind { InstantEffect => "minecraft:instant_effect", Item => "minecraft:item", Vibration => "minecraft:vibration", + Trail => "minecraft:trail", ItemSlime => "minecraft:item_slime", ItemCobweb => "minecraft:item_cobweb", ItemSnowball => "minecraft:item_snowball", @@ -3692,6 +3746,7 @@ enum ParticleKind { OminousSpawning => "minecraft:ominous_spawning", RaidOmen => "minecraft:raid_omen", TrialOmen => "minecraft:trial_omen", + BlockCrumble => "minecraft:block_crumble", } } @@ -4088,6 +4143,7 @@ enum SoundEvent { BlockBubbleColumnUpwardsInside => "minecraft:block.bubble_column.upwards_inside", BlockBubbleColumnWhirlpoolAmbient => "minecraft:block.bubble_column.whirlpool_ambient", BlockBubbleColumnWhirlpoolInside => "minecraft:block.bubble_column.whirlpool_inside", + UiHudBubblePop => "minecraft:ui.hud.bubble_pop", ItemBucketEmpty => "minecraft:item.bucket.empty", ItemBucketEmptyAxolotl => "minecraft:item.bucket.empty_axolotl", ItemBucketEmptyFish => "minecraft:item.bucket.empty_fish", @@ -4251,6 +4307,24 @@ enum SoundEvent { EntityCowStep => "minecraft:entity.cow.step", BlockCrafterCraft => "minecraft:block.crafter.craft", BlockCrafterFail => "minecraft:block.crafter.fail", + EntityCreakingAmbient => "minecraft:entity.creaking.ambient", + EntityCreakingActivate => "minecraft:entity.creaking.activate", + EntityCreakingDeactivate => "minecraft:entity.creaking.deactivate", + EntityCreakingAttack => "minecraft:entity.creaking.attack", + EntityCreakingDeath => "minecraft:entity.creaking.death", + EntityCreakingStep => "minecraft:entity.creaking.step", + EntityCreakingFreeze => "minecraft:entity.creaking.freeze", + EntityCreakingUnfreeze => "minecraft:entity.creaking.unfreeze", + EntityCreakingSpawn => "minecraft:entity.creaking.spawn", + EntityCreakingSway => "minecraft:entity.creaking.sway", + BlockCreakingHeartBreak => "minecraft:block.creaking_heart.break", + BlockCreakingHeartFall => "minecraft:block.creaking_heart.fall", + BlockCreakingHeartHit => "minecraft:block.creaking_heart.hit", + BlockCreakingHeartHurt => "minecraft:block.creaking_heart.hurt", + BlockCreakingHeartPlace => "minecraft:block.creaking_heart.place", + BlockCreakingHeartStep => "minecraft:block.creaking_heart.step", + BlockCreakingHeartIdle => "minecraft:block.creaking_heart.idle", + BlockCreakingHeartSpawn => "minecraft:block.creaking_heart.spawn", EntityCreeperDeath => "minecraft:entity.creeper.death", EntityCreeperHurt => "minecraft:entity.creeper.hurt", EntityCreeperPrimed => "minecraft:entity.creeper.primed", @@ -4891,6 +4965,7 @@ enum SoundEvent { ItemOminousBottleDispose => "minecraft:item.ominous_bottle.dispose", EntityPaintingBreak => "minecraft:entity.painting.break", EntityPaintingPlace => "minecraft:entity.painting.place", + BlockPaleHangingMossIdle => "minecraft:block.pale_hanging_moss.idle", EntityPandaPreSneeze => "minecraft:entity.panda.pre_sneeze", EntityPandaSneeze => "minecraft:entity.panda.sneeze", EntityPandaAmbient => "minecraft:entity.panda.ambient", @@ -4910,6 +4985,7 @@ enum SoundEvent { EntityParrotImitateBlaze => "minecraft:entity.parrot.imitate.blaze", EntityParrotImitateBogged => "minecraft:entity.parrot.imitate.bogged", EntityParrotImitateBreeze => "minecraft:entity.parrot.imitate.breeze", + EntityParrotImitateCreaking => "minecraft:entity.parrot.imitate.creaking", EntityParrotImitateCreeper => "minecraft:entity.parrot.imitate.creeper", EntityParrotImitateDrowned => "minecraft:entity.parrot.imitate.drowned", EntityParrotImitateElderGuardian => "minecraft:entity.parrot.imitate.elder_guardian", @@ -5876,6 +5952,8 @@ registry! { enum WorldgenTreeDecoratorKind { TrunkVine => "minecraft:trunk_vine", LeaveVine => "minecraft:leave_vine", + PaleMoss => "minecraft:pale_moss", + CreakingHeart => "minecraft:creaking_heart", Cocoa => "minecraft:cocoa", Beehive => "minecraft:beehive", AlterGround => "minecraft:alter_ground", @@ -6068,6 +6146,7 @@ enum BlockKind { EndPortalFrame => "minecraft:end_portal_frame", EndRod => "minecraft:end_rod", Farm => "minecraft:farm", + BonemealableFeaturePlacer => "minecraft:bonemealable_feature_placer", Fence => "minecraft:fence", FenceGate => "minecraft:fence_gate", Fire => "minecraft:fire", @@ -6083,6 +6162,7 @@ enum BlockKind { Grass => "minecraft:grass", Grindstone => "minecraft:grindstone", HalfTransparent => "minecraft:half_transparent", + HangingMoss => "minecraft:hanging_moss", HangingRoots => "minecraft:hanging_roots", Hay => "minecraft:hay", HeavyCore => "minecraft:heavy_core", @@ -6113,7 +6193,7 @@ enum BlockKind { MangroveLeaves => "minecraft:mangrove_leaves", MangrovePropagule => "minecraft:mangrove_propagule", MangroveRoots => "minecraft:mangrove_roots", - Moss => "minecraft:moss", + MossyCarpet => "minecraft:mossy_carpet", MovingPiston => "minecraft:moving_piston", Mud => "minecraft:mud", Mushroom => "minecraft:mushroom", @@ -6172,6 +6252,7 @@ enum BlockKind { SoulFire => "minecraft:soul_fire", SoulSand => "minecraft:soul_sand", Spawner => "minecraft:spawner", + CreakingHeart => "minecraft:creaking_heart", Sponge => "minecraft:sponge", SporeBlossom => "minecraft:spore_blossom", StainedGlassPane => "minecraft:stained_glass_pane", @@ -6515,8 +6596,8 @@ registry! { enum EnchantmentEntityEffectKind { AllOf => "minecraft:all_of", ApplyMobEffect => "minecraft:apply_mob_effect", + ChangeItemDamage => "minecraft:change_item_damage", DamageEntity => "minecraft:damage_entity", - DamageItem => "minecraft:damage_item", Explode => "minecraft:explode", Ignite => "minecraft:ignite", PlaySound => "minecraft:play_sound", @@ -6544,8 +6625,8 @@ enum EnchantmentLocationBasedEffectKind { AllOf => "minecraft:all_of", ApplyMobEffect => "minecraft:apply_mob_effect", Attribute => "minecraft:attribute", + ChangeItemDamage => "minecraft:change_item_damage", DamageEntity => "minecraft:damage_entity", - DamageItem => "minecraft:damage_item", Explode => "minecraft:explode", Ignite => "minecraft:ignite", PlaySound => "minecraft:play_sound", @@ -6614,3 +6695,44 @@ enum ConsumeEffectKind { PlaySound => "minecraft:play_sound", } } + +registry! { +enum RecipeBookCategory { + CraftingBuildingBlocks => "minecraft:crafting_building_blocks", + CraftingRedstone => "minecraft:crafting_redstone", + CraftingEquipment => "minecraft:crafting_equipment", + CraftingMisc => "minecraft:crafting_misc", + FurnaceFood => "minecraft:furnace_food", + FurnaceBlocks => "minecraft:furnace_blocks", + FurnaceMisc => "minecraft:furnace_misc", + BlastFurnaceBlocks => "minecraft:blast_furnace_blocks", + BlastFurnaceMisc => "minecraft:blast_furnace_misc", + SmokerFood => "minecraft:smoker_food", + Stonecutter => "minecraft:stonecutter", + Smithing => "minecraft:smithing", + Campfire => "minecraft:campfire", +} +} + +registry! { +enum RecipeDisplay { + CraftingShapeless => "minecraft:crafting_shapeless", + CraftingShaped => "minecraft:crafting_shaped", + Furnace => "minecraft:furnace", + Stonecutter => "minecraft:stonecutter", + Smithing => "minecraft:smithing", +} +} + +registry! { +enum SlotDisplay { + Empty => "minecraft:empty", + AnyFuel => "minecraft:any_fuel", + Item => "minecraft:item", + ItemStack => "minecraft:item_stack", + Tag => "minecraft:tag", + SmithingTrim => "minecraft:smithing_trim", + WithRemainder => "minecraft:with_remainder", + Composite => "minecraft:composite", +} +} diff --git a/azalea-registry/src/tags/items.rs b/azalea-registry/src/tags/items.rs index 0b3b233a5..e8c31ddf3 100644 --- a/azalea-registry/src/tags/items.rs +++ b/azalea-registry/src/tags/items.rs @@ -1022,6 +1022,8 @@ pub static FREEZE_IMMUNE_WEARABLES: Lazy> = Lazy::new(|| { pub static FROG_FOOD: Lazy> = Lazy::new(|| HashSet::from_iter(vec![Item::SlimeBall])); pub static FURNACE_MINECART_FUEL: Lazy> = Lazy::new(|| HashSet::from_iter(vec![Item::Coal, Item::Charcoal])); +pub static GAZE_DISGUISE_EQUIPMENT: Lazy> = + Lazy::new(|| HashSet::from_iter(vec![Item::CarvedPumpkin])); pub static GOAT_FOOD: Lazy> = Lazy::new(|| HashSet::from_iter(vec![Item::Wheat])); pub static GOLD_ORES: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ diff --git a/codegen/migrate.py b/codegen/migrate.py index b390ce405..3dcb854a4 100755 --- a/codegen/migrate.py +++ b/codegen/migrate.py @@ -111,24 +111,24 @@ # print('Updated protocol!') -old_ordered_blocks = lib.extract.get_ordered_blocks_burger(old_version_id) -new_ordered_blocks = lib.extract.get_ordered_blocks_burger(new_version_id) -if old_ordered_blocks != new_ordered_blocks: - print('Blocks changed, updating...') - - block_states_burger = lib.extract.get_block_states_burger(new_version_id) - block_states_report = lib.extract.get_block_states_report(new_version_id) - - # TODO: pixlyzer is currently broken so uhhhh - shape_datas = lib.extract.get_pixlyzer_data( - '1.20.3-pre4', 'shapes') - pixlyzer_block_datas = lib.extract.get_pixlyzer_data( - '1.20.3-pre4', 'blocks') - - lib.code.blocks.generate_blocks( - block_states_burger, block_states_report, pixlyzer_block_datas, new_ordered_blocks, new_mappings) - lib.code.shapes.generate_block_shapes( - pixlyzer_block_datas, shape_datas['shapes'], shape_datas['aabbs'], block_states_report, block_states_burger, new_mappings) +# old_ordered_blocks = lib.extract.get_ordered_blocks_burger(old_version_id) +# new_ordered_blocks = lib.extract.get_ordered_blocks_burger(new_version_id) +# if old_ordered_blocks != new_ordered_blocks: +# print('Blocks changed, updating...') + +# block_states_burger = lib.extract.get_block_states_burger(new_version_id) +# block_states_report = lib.extract.get_block_states_report(new_version_id) + +# # TODO: pixlyzer is currently broken so uhhhh +# shape_datas = lib.extract.get_pixlyzer_data( +# '1.20.3-pre4', 'shapes') +# pixlyzer_block_datas = lib.extract.get_pixlyzer_data( +# '1.20.3-pre4', 'blocks') + +# lib.code.blocks.generate_blocks( +# block_states_burger, block_states_report, pixlyzer_block_datas, new_ordered_blocks, new_mappings) +# lib.code.shapes.generate_block_shapes( +# pixlyzer_block_datas, shape_datas['shapes'], shape_datas['aabbs'], block_states_report, block_states_burger, new_mappings) print('Getting en_us.json...') language = lib.extract.get_en_us_lang(new_version_id)