From 40e4096d2435533eacb817ad5a5e12c7ced8fa5c Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Wed, 23 Oct 2024 00:08:13 -0500 Subject: [PATCH] 1.21.2 (#171) * partially implement 24w35a * start updating to 24w39a + itemcomponent codegen * fix codegen and broken packets to finish updating to 24w39a :D * update to 1.21.2 except for blocks * update ServerboundPlayerInputPacket impl --- README.md | 2 +- azalea-client/src/client.rs | 2 +- azalea-client/src/packet_handling/game.rs | 42 +- azalea-entity/src/metadata.rs | 3215 +++++++++++++---- azalea-entity/src/particle.rs | 4 + azalea-inventory/src/components.rs | 132 +- azalea-language/src/en_us.json | 317 +- azalea-physics/src/collision/blocks.rs | 4 +- azalea-protocol/src/packets/common.rs | 2 + .../serverbound_client_information_packet.rs | 11 + ...lientbound_custom_report_details_packet.rs | 14 + ...clientbound_entity_position_sync_packet.rs | 19 + .../game/clientbound_move_minecart_packet.rs | 19 + .../clientbound_player_info_update_packet.rs | 13 + .../clientbound_player_position_packet.rs | 14 +- .../clientbound_player_rotation_packet.rs | 8 + .../clientbound_projectile_power_packet.rs | 8 + .../clientbound_recipe_book_add_packet.rs | 79 + .../clientbound_recipe_book_remove_packet.rs | 15 + ...clientbound_recipe_book_settings_packet.rs | 22 + .../packets/game/clientbound_recipe_packet.rs | 77 - .../game/clientbound_server_links_packet.rs | 34 + .../clientbound_set_cursor_item_packet.rs | 8 + ...rs => clientbound_set_held_slot_packet.rs} | 3 +- ...clientbound_set_player_inventory_packet.rs | 10 + .../game/clientbound_set_time_packet.rs | 1 + .../game/clientbound_update_recipes_packet.rs | 247 +- azalea-protocol/src/packets/game/mod.rs | 320 +- .../serverbound_client_tick_end_packet.rs | 5 + .../game/serverbound_player_input_packet.rs | 49 +- .../serverbound_select_bundle_item_packet.rs | 10 + ...s => clientbound_login_finished_packet.rs} | 3 +- azalea-protocol/src/packets/login/mod.rs | 4 +- azalea-protocol/src/packets/mod.rs | 2 +- azalea-registry/src/lib.rs | 305 +- azalea-registry/src/tags/blocks.rs | 10 + azalea-registry/src/tags/items.rs | 121 + azalea/src/nearest_entity.rs | 4 +- codegen/genitemcomponents.py | 165 + codegen/lib/code/registry.py | 28 +- codegen/migrate.py | 36 +- 41 files changed, 4051 insertions(+), 1333 deletions(-) create mode 100644 azalea-protocol/src/packets/game/clientbound_custom_report_details_packet.rs create mode 100755 azalea-protocol/src/packets/game/clientbound_entity_position_sync_packet.rs create mode 100644 azalea-protocol/src/packets/game/clientbound_move_minecart_packet.rs create mode 100755 azalea-protocol/src/packets/game/clientbound_player_rotation_packet.rs create mode 100644 azalea-protocol/src/packets/game/clientbound_projectile_power_packet.rs create mode 100755 azalea-protocol/src/packets/game/clientbound_recipe_book_add_packet.rs create mode 100755 azalea-protocol/src/packets/game/clientbound_recipe_book_remove_packet.rs create mode 100755 azalea-protocol/src/packets/game/clientbound_recipe_book_settings_packet.rs delete mode 100755 azalea-protocol/src/packets/game/clientbound_recipe_packet.rs create mode 100644 azalea-protocol/src/packets/game/clientbound_server_links_packet.rs create mode 100644 azalea-protocol/src/packets/game/clientbound_set_cursor_item_packet.rs rename azalea-protocol/src/packets/game/{clientbound_set_carried_item_packet.rs => clientbound_set_held_slot_packet.rs} (61%) mode change 100755 => 100644 create mode 100644 azalea-protocol/src/packets/game/clientbound_set_player_inventory_packet.rs create mode 100644 azalea-protocol/src/packets/game/serverbound_client_tick_end_packet.rs create mode 100644 azalea-protocol/src/packets/game/serverbound_select_bundle_item_packet.rs rename azalea-protocol/src/packets/login/{clientbound_game_profile_packet.rs => clientbound_login_finished_packet.rs} (72%) create mode 100644 codegen/genitemcomponents.py diff --git a/README.md b/README.md index b84a61652..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: `1.21.1`._ +_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/client.rs b/azalea-client/src/client.rs index 0d0b18f09..7551aa9fc 100644 --- a/azalea-client/src/client.rs +++ b/azalea-client/src/client.rs @@ -457,7 +457,7 @@ impl Client { debug!("Got compression request {:?}", p.compression_threshold); conn.set_compression_threshold(p.compression_threshold); } - ClientboundLoginPacket::GameProfile(p) => { + ClientboundLoginPacket::LoginFinished(p) => { debug!( "Got profile {:?}. handshake is finished and we're now switching to the configuration state", p.game_profile diff --git a/azalea-client/src/packet_handling/game.rs b/azalea-client/src/packet_handling/game.rs index 13183e7ae..3c6ad6b57 100644 --- a/azalea-client/src/packet_handling/game.rs +++ b/azalea-client/src/packet_handling/game.rs @@ -393,8 +393,8 @@ pub fn process_packet_events(ecs: &mut World) { *player_abilities = PlayerAbilities::from(p); } - ClientboundGamePacket::SetCarriedItem(p) => { - debug!("Got set carried item packet {p:?}"); + ClientboundGamePacket::SetCursorItem(p) => { + debug!("Got set cursor item packet {p:?}"); } ClientboundGamePacket::UpdateTags(_p) => { debug!("Got update tags packet"); @@ -415,9 +415,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:?}"); @@ -445,25 +442,25 @@ pub fn process_packet_events(ecs: &mut World) { let is_z_relative = p.relative_arguments.z; let (delta_x, new_pos_x) = if is_x_relative { - last_sent_position.x += p.x; - (delta_movement.x, position.x + p.x) + last_sent_position.x += p.pos.x; + (delta_movement.x, position.x + p.pos.x) } else { - last_sent_position.x = p.x; - (0.0, p.x) + last_sent_position.x = p.pos.x; + (0.0, p.pos.x) }; let (delta_y, new_pos_y) = if is_y_relative { - last_sent_position.y += p.y; - (delta_movement.y, position.y + p.y) + last_sent_position.y += p.pos.y; + (delta_movement.y, position.y + p.pos.y) } else { - last_sent_position.y = p.y; - (0.0, p.y) + last_sent_position.y = p.pos.y; + (0.0, p.pos.y) }; let (delta_z, new_pos_z) = if is_z_relative { - last_sent_position.z += p.z; - (delta_movement.z, position.z + p.z) + last_sent_position.z += p.pos.z; + (delta_movement.z, position.z + p.pos.z) } else { - last_sent_position.z = p.z; - (0.0, p.z) + last_sent_position.z = p.pos.z; + (0.0, p.pos.z) }; let mut y_rot = p.y_rot; @@ -1475,6 +1472,17 @@ pub fn process_packet_events(ecs: &mut World) { ClientboundGamePacket::PongResponse(_) => {} ClientboundGamePacket::StoreCookie(_) => {} ClientboundGamePacket::Transfer(_) => {} + ClientboundGamePacket::MoveMinecart(_) => {} + ClientboundGamePacket::SetHeldSlot(_) => {} + ClientboundGamePacket::SetPlayerInventory(_) => {} + 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 f2a886702..74bc571d5 100644 --- a/azalea-entity/src/metadata.rs +++ b/azalea-entity/src/metadata.rs @@ -57,6 +57,180 @@ pub struct Silent(pub bool); pub struct NoGravity(pub bool); #[derive(Component, Deref, DerefMut, Clone)] pub struct TicksFrozen(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct AcaciaBoatHurt(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct AcaciaBoatHurtdir(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct AcaciaBoatDamage(pub f32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct AcaciaBoatPaddleLeft(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct AcaciaBoatPaddleRight(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct AcaciaBoatBubbleTime(pub i32); +#[derive(Component)] +pub struct AcaciaBoat; +impl AcaciaBoat { + 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(AcaciaBoatHurt(d.value.into_int()?)); + } + 9 => { + entity.insert(AcaciaBoatHurtdir(d.value.into_int()?)); + } + 10 => { + entity.insert(AcaciaBoatDamage(d.value.into_float()?)); + } + 11 => { + entity.insert(AcaciaBoatPaddleLeft(d.value.into_boolean()?)); + } + 12 => { + entity.insert(AcaciaBoatPaddleRight(d.value.into_boolean()?)); + } + 13 => { + entity.insert(AcaciaBoatBubbleTime(d.value.into_int()?)); + } + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct AcaciaBoatMetadataBundle { + _marker: AcaciaBoat, + parent: AbstractEntityMetadataBundle, + acacia_boat_hurt: AcaciaBoatHurt, + acacia_boat_hurtdir: AcaciaBoatHurtdir, + acacia_boat_damage: AcaciaBoatDamage, + acacia_boat_paddle_left: AcaciaBoatPaddleLeft, + acacia_boat_paddle_right: AcaciaBoatPaddleRight, + acacia_boat_bubble_time: AcaciaBoatBubbleTime, +} +impl Default for AcaciaBoatMetadataBundle { + fn default() -> Self { + Self { + _marker: AcaciaBoat, + 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()), + }, + acacia_boat_hurt: AcaciaBoatHurt(0), + acacia_boat_hurtdir: AcaciaBoatHurtdir(1), + acacia_boat_damage: AcaciaBoatDamage(0.0), + acacia_boat_paddle_left: AcaciaBoatPaddleLeft(false), + acacia_boat_paddle_right: AcaciaBoatPaddleRight(false), + acacia_boat_bubble_time: AcaciaBoatBubbleTime(0), + } + } +} + +#[derive(Component, Deref, DerefMut, Clone)] +pub struct AcaciaChestBoatHurt(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct AcaciaChestBoatHurtdir(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct AcaciaChestBoatDamage(pub f32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct AcaciaChestBoatPaddleLeft(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct AcaciaChestBoatPaddleRight(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct AcaciaChestBoatBubbleTime(pub i32); +#[derive(Component)] +pub struct AcaciaChestBoat; +impl AcaciaChestBoat { + 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(AcaciaChestBoatHurt(d.value.into_int()?)); + } + 9 => { + entity.insert(AcaciaChestBoatHurtdir(d.value.into_int()?)); + } + 10 => { + entity.insert(AcaciaChestBoatDamage(d.value.into_float()?)); + } + 11 => { + entity.insert(AcaciaChestBoatPaddleLeft(d.value.into_boolean()?)); + } + 12 => { + entity.insert(AcaciaChestBoatPaddleRight(d.value.into_boolean()?)); + } + 13 => { + entity.insert(AcaciaChestBoatBubbleTime(d.value.into_int()?)); + } + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct AcaciaChestBoatMetadataBundle { + _marker: AcaciaChestBoat, + parent: AbstractEntityMetadataBundle, + acacia_chest_boat_hurt: AcaciaChestBoatHurt, + acacia_chest_boat_hurtdir: AcaciaChestBoatHurtdir, + acacia_chest_boat_damage: AcaciaChestBoatDamage, + acacia_chest_boat_paddle_left: AcaciaChestBoatPaddleLeft, + acacia_chest_boat_paddle_right: AcaciaChestBoatPaddleRight, + acacia_chest_boat_bubble_time: AcaciaChestBoatBubbleTime, +} +impl Default for AcaciaChestBoatMetadataBundle { + fn default() -> Self { + Self { + _marker: AcaciaChestBoat, + 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()), + }, + acacia_chest_boat_hurt: AcaciaChestBoatHurt(0), + acacia_chest_boat_hurtdir: AcaciaChestBoatHurtdir(1), + acacia_chest_boat_damage: AcaciaChestBoatDamage(0.0), + acacia_chest_boat_paddle_left: AcaciaChestBoatPaddleLeft(false), + acacia_chest_boat_paddle_right: AcaciaChestBoatPaddleRight(false), + acacia_chest_boat_bubble_time: AcaciaChestBoatBubbleTime(0), + } + } +} + #[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct AutoSpinAttack(pub bool); #[derive(Component, Deref, DerefMut, Clone, Copy)] @@ -308,7 +482,7 @@ pub struct Small(pub bool); #[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct ShowArms(pub bool); #[derive(Component, Deref, DerefMut, Clone, Copy)] -pub struct NoBasePlate(pub bool); +pub struct ShowBasePlate(pub bool); #[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct ArmorStandMarker(pub bool); #[derive(Component, Deref, DerefMut, Clone)] @@ -336,7 +510,7 @@ impl ArmorStand { let bitfield = d.value.into_byte()?; entity.insert(Small(bitfield & 0x1 != 0)); entity.insert(ShowArms(bitfield & 0x4 != 0)); - entity.insert(NoBasePlate(bitfield & 0x8 != 0)); + entity.insert(ShowBasePlate(bitfield & 0x8 != 0)); entity.insert(ArmorStandMarker(bitfield & 0x10 != 0)); } 16 => { @@ -369,7 +543,7 @@ pub struct ArmorStandMetadataBundle { parent: AbstractLivingMetadataBundle, small: Small, show_arms: ShowArms, - no_base_plate: NoBasePlate, + show_base_plate: ShowBasePlate, armor_stand_marker: ArmorStandMarker, head_pose: HeadPose, body_pose: BodyPose, @@ -412,7 +586,7 @@ impl Default for ArmorStandMetadataBundle { }, small: Small(false), show_arms: ShowArms(false), - no_base_plate: NoBasePlate(false), + show_base_plate: ShowBasePlate(false), armor_stand_marker: ArmorStandMarker(false), head_pose: HeadPose(Default::default()), body_pose: BodyPose(Default::default()), @@ -427,12 +601,12 @@ impl Default for ArmorStandMetadataBundle { #[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct ArrowCritArrow(pub bool); #[derive(Component, Deref, DerefMut, Clone, Copy)] -pub struct ArrowShotFromCrossbow(pub bool); -#[derive(Component, Deref, DerefMut, Clone, Copy)] 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; @@ -446,13 +620,15 @@ impl Arrow { 8 => { let bitfield = d.value.into_byte()?; entity.insert(ArrowCritArrow(bitfield & 0x1 != 0)); - entity.insert(ArrowShotFromCrossbow(bitfield & 0x4 != 0)); entity.insert(ArrowNoPhysics(bitfield & 0x2 != 0)); } 9 => { entity.insert(ArrowPierceLevel(d.value.into_byte()?)); } 10 => { + entity.insert(ArrowInGround(d.value.into_boolean()?)); + } + 11 => { entity.insert(EffectColor(d.value.into_int()?)); } _ => {} @@ -466,9 +642,9 @@ pub struct ArrowMetadataBundle { _marker: Arrow, parent: AbstractEntityMetadataBundle, arrow_crit_arrow: ArrowCritArrow, - arrow_shot_from_crossbow: ArrowShotFromCrossbow, arrow_no_physics: ArrowNoPhysics, arrow_pierce_level: ArrowPierceLevel, + arrow_in_ground: ArrowInGround, effect_color: EffectColor, } impl Default for ArrowMetadataBundle { @@ -493,9 +669,9 @@ impl Default for ArrowMetadataBundle { ticks_frozen: TicksFrozen(Default::default()), }, arrow_crit_arrow: ArrowCritArrow(false), - arrow_shot_from_crossbow: ArrowShotFromCrossbow(false), arrow_no_physics: ArrowNoPhysics(false), arrow_pierce_level: ArrowPierceLevel(0), + arrow_in_ground: ArrowInGround(false), effect_color: EffectColor(-1), } } @@ -594,6 +770,180 @@ impl Default for AxolotlMetadataBundle { } } +#[derive(Component, Deref, DerefMut, Clone)] +pub struct BambooChestRaftHurt(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct BambooChestRaftHurtdir(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct BambooChestRaftDamage(pub f32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct BambooChestRaftPaddleLeft(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct BambooChestRaftPaddleRight(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct BambooChestRaftBubbleTime(pub i32); +#[derive(Component)] +pub struct BambooChestRaft; +impl BambooChestRaft { + 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(BambooChestRaftHurt(d.value.into_int()?)); + } + 9 => { + entity.insert(BambooChestRaftHurtdir(d.value.into_int()?)); + } + 10 => { + entity.insert(BambooChestRaftDamage(d.value.into_float()?)); + } + 11 => { + entity.insert(BambooChestRaftPaddleLeft(d.value.into_boolean()?)); + } + 12 => { + entity.insert(BambooChestRaftPaddleRight(d.value.into_boolean()?)); + } + 13 => { + entity.insert(BambooChestRaftBubbleTime(d.value.into_int()?)); + } + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct BambooChestRaftMetadataBundle { + _marker: BambooChestRaft, + parent: AbstractEntityMetadataBundle, + bamboo_chest_raft_hurt: BambooChestRaftHurt, + bamboo_chest_raft_hurtdir: BambooChestRaftHurtdir, + bamboo_chest_raft_damage: BambooChestRaftDamage, + bamboo_chest_raft_paddle_left: BambooChestRaftPaddleLeft, + bamboo_chest_raft_paddle_right: BambooChestRaftPaddleRight, + bamboo_chest_raft_bubble_time: BambooChestRaftBubbleTime, +} +impl Default for BambooChestRaftMetadataBundle { + fn default() -> Self { + Self { + _marker: BambooChestRaft, + 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()), + }, + bamboo_chest_raft_hurt: BambooChestRaftHurt(0), + bamboo_chest_raft_hurtdir: BambooChestRaftHurtdir(1), + bamboo_chest_raft_damage: BambooChestRaftDamage(0.0), + bamboo_chest_raft_paddle_left: BambooChestRaftPaddleLeft(false), + bamboo_chest_raft_paddle_right: BambooChestRaftPaddleRight(false), + bamboo_chest_raft_bubble_time: BambooChestRaftBubbleTime(0), + } + } +} + +#[derive(Component, Deref, DerefMut, Clone)] +pub struct BambooRaftHurt(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct BambooRaftHurtdir(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct BambooRaftDamage(pub f32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct BambooRaftPaddleLeft(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct BambooRaftPaddleRight(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct BambooRaftBubbleTime(pub i32); +#[derive(Component)] +pub struct BambooRaft; +impl BambooRaft { + 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(BambooRaftHurt(d.value.into_int()?)); + } + 9 => { + entity.insert(BambooRaftHurtdir(d.value.into_int()?)); + } + 10 => { + entity.insert(BambooRaftDamage(d.value.into_float()?)); + } + 11 => { + entity.insert(BambooRaftPaddleLeft(d.value.into_boolean()?)); + } + 12 => { + entity.insert(BambooRaftPaddleRight(d.value.into_boolean()?)); + } + 13 => { + entity.insert(BambooRaftBubbleTime(d.value.into_int()?)); + } + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct BambooRaftMetadataBundle { + _marker: BambooRaft, + parent: AbstractEntityMetadataBundle, + bamboo_raft_hurt: BambooRaftHurt, + bamboo_raft_hurtdir: BambooRaftHurtdir, + bamboo_raft_damage: BambooRaftDamage, + bamboo_raft_paddle_left: BambooRaftPaddleLeft, + bamboo_raft_paddle_right: BambooRaftPaddleRight, + bamboo_raft_bubble_time: BambooRaftBubbleTime, +} +impl Default for BambooRaftMetadataBundle { + fn default() -> Self { + Self { + _marker: BambooRaft, + 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()), + }, + bamboo_raft_hurt: BambooRaftHurt(0), + bamboo_raft_hurtdir: BambooRaftHurtdir(1), + bamboo_raft_damage: BambooRaftDamage(0.0), + bamboo_raft_paddle_left: BambooRaftPaddleLeft(false), + bamboo_raft_paddle_right: BambooRaftPaddleRight(false), + bamboo_raft_bubble_time: BambooRaftBubbleTime(0), + } + } +} + #[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct Resting(pub bool); #[derive(Component)] @@ -761,29 +1111,203 @@ impl Default for BeeMetadataBundle { } } -#[derive(Component, Deref, DerefMut, Clone, Copy)] -pub struct Charged(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct BirchBoatHurt(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct BirchBoatHurtdir(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct BirchBoatDamage(pub f32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct BirchBoatPaddleLeft(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct BirchBoatPaddleRight(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct BirchBoatBubbleTime(pub i32); #[derive(Component)] -pub struct Blaze; -impl Blaze { +pub struct BirchBoat; +impl BirchBoat { 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 => { - let bitfield = d.value.into_byte()?; - entity.insert(Charged(bitfield & 0x1 != 0)); + 0..=7 => AbstractEntity::apply_metadata(entity, d)?, + 8 => { + entity.insert(BirchBoatHurt(d.value.into_int()?)); } - _ => {} - } - Ok(()) - } -} - -#[derive(Bundle)] -pub struct BlazeMetadataBundle { + 9 => { + entity.insert(BirchBoatHurtdir(d.value.into_int()?)); + } + 10 => { + entity.insert(BirchBoatDamage(d.value.into_float()?)); + } + 11 => { + entity.insert(BirchBoatPaddleLeft(d.value.into_boolean()?)); + } + 12 => { + entity.insert(BirchBoatPaddleRight(d.value.into_boolean()?)); + } + 13 => { + entity.insert(BirchBoatBubbleTime(d.value.into_int()?)); + } + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct BirchBoatMetadataBundle { + _marker: BirchBoat, + parent: AbstractEntityMetadataBundle, + birch_boat_hurt: BirchBoatHurt, + birch_boat_hurtdir: BirchBoatHurtdir, + birch_boat_damage: BirchBoatDamage, + birch_boat_paddle_left: BirchBoatPaddleLeft, + birch_boat_paddle_right: BirchBoatPaddleRight, + birch_boat_bubble_time: BirchBoatBubbleTime, +} +impl Default for BirchBoatMetadataBundle { + fn default() -> Self { + Self { + _marker: BirchBoat, + 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()), + }, + birch_boat_hurt: BirchBoatHurt(0), + birch_boat_hurtdir: BirchBoatHurtdir(1), + birch_boat_damage: BirchBoatDamage(0.0), + birch_boat_paddle_left: BirchBoatPaddleLeft(false), + birch_boat_paddle_right: BirchBoatPaddleRight(false), + birch_boat_bubble_time: BirchBoatBubbleTime(0), + } + } +} + +#[derive(Component, Deref, DerefMut, Clone)] +pub struct BirchChestBoatHurt(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct BirchChestBoatHurtdir(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct BirchChestBoatDamage(pub f32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct BirchChestBoatPaddleLeft(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct BirchChestBoatPaddleRight(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct BirchChestBoatBubbleTime(pub i32); +#[derive(Component)] +pub struct BirchChestBoat; +impl BirchChestBoat { + 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(BirchChestBoatHurt(d.value.into_int()?)); + } + 9 => { + entity.insert(BirchChestBoatHurtdir(d.value.into_int()?)); + } + 10 => { + entity.insert(BirchChestBoatDamage(d.value.into_float()?)); + } + 11 => { + entity.insert(BirchChestBoatPaddleLeft(d.value.into_boolean()?)); + } + 12 => { + entity.insert(BirchChestBoatPaddleRight(d.value.into_boolean()?)); + } + 13 => { + entity.insert(BirchChestBoatBubbleTime(d.value.into_int()?)); + } + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct BirchChestBoatMetadataBundle { + _marker: BirchChestBoat, + parent: AbstractEntityMetadataBundle, + birch_chest_boat_hurt: BirchChestBoatHurt, + birch_chest_boat_hurtdir: BirchChestBoatHurtdir, + birch_chest_boat_damage: BirchChestBoatDamage, + birch_chest_boat_paddle_left: BirchChestBoatPaddleLeft, + birch_chest_boat_paddle_right: BirchChestBoatPaddleRight, + birch_chest_boat_bubble_time: BirchChestBoatBubbleTime, +} +impl Default for BirchChestBoatMetadataBundle { + fn default() -> Self { + Self { + _marker: BirchChestBoat, + 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()), + }, + birch_chest_boat_hurt: BirchChestBoatHurt(0), + birch_chest_boat_hurtdir: BirchChestBoatHurtdir(1), + birch_chest_boat_damage: BirchChestBoatDamage(0.0), + birch_chest_boat_paddle_left: BirchChestBoatPaddleLeft(false), + birch_chest_boat_paddle_right: BirchChestBoatPaddleRight(false), + birch_chest_boat_bubble_time: BirchChestBoatBubbleTime(0), + } + } +} + +#[derive(Component, Deref, DerefMut, Clone, Copy)] +pub struct Charged(pub bool); +#[derive(Component)] +pub struct Blaze; +impl Blaze { + 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 => { + let bitfield = d.value.into_byte()?; + entity.insert(Charged(bitfield & 0x1 != 0)); + } + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct BlazeMetadataBundle { _marker: Blaze, parent: AbstractMonsterMetadataBundle, charged: Charged, @@ -1024,100 +1548,6 @@ impl Default for BlockDisplayMetadataBundle { } } -#[derive(Component, Deref, DerefMut, Clone)] -pub struct BoatHurt(pub i32); -#[derive(Component, Deref, DerefMut, Clone)] -pub struct BoatHurtdir(pub i32); -#[derive(Component, Deref, DerefMut, Clone)] -pub struct BoatDamage(pub f32); -#[derive(Component, Deref, DerefMut, Clone)] -pub struct BoatKind(pub i32); -#[derive(Component, Deref, DerefMut, Clone)] -pub struct PaddleLeft(pub bool); -#[derive(Component, Deref, DerefMut, Clone)] -pub struct PaddleRight(pub bool); -#[derive(Component, Deref, DerefMut, Clone)] -pub struct BubbleTime(pub i32); -#[derive(Component)] -pub struct Boat; -impl Boat { - 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(BoatHurt(d.value.into_int()?)); - } - 9 => { - entity.insert(BoatHurtdir(d.value.into_int()?)); - } - 10 => { - entity.insert(BoatDamage(d.value.into_float()?)); - } - 11 => { - entity.insert(BoatKind(d.value.into_int()?)); - } - 12 => { - entity.insert(PaddleLeft(d.value.into_boolean()?)); - } - 13 => { - entity.insert(PaddleRight(d.value.into_boolean()?)); - } - 14 => { - entity.insert(BubbleTime(d.value.into_int()?)); - } - _ => {} - } - Ok(()) - } -} - -#[derive(Bundle)] -pub struct BoatMetadataBundle { - _marker: Boat, - parent: AbstractEntityMetadataBundle, - boat_hurt: BoatHurt, - boat_hurtdir: BoatHurtdir, - boat_damage: BoatDamage, - boat_kind: BoatKind, - paddle_left: PaddleLeft, - paddle_right: PaddleRight, - bubble_time: BubbleTime, -} -impl Default for BoatMetadataBundle { - fn default() -> Self { - Self { - _marker: Boat, - 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()), - }, - boat_hurt: BoatHurt(0), - boat_hurtdir: BoatHurtdir(1), - boat_damage: BoatDamage(0.0), - boat_kind: BoatKind(Default::default()), - paddle_left: PaddleLeft(false), - paddle_right: PaddleRight(false), - bubble_time: BubbleTime(0), - } - } -} - #[derive(Component, Deref, DerefMut, Clone)] pub struct BoggedSheared(pub bool); #[derive(Component)] @@ -1606,15 +2036,45 @@ impl Default for CaveSpiderMetadataBundle { } } +#[derive(Component, Deref, DerefMut, Clone)] +pub struct CherryBoatHurt(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct CherryBoatHurtdir(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct CherryBoatDamage(pub f32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct CherryBoatPaddleLeft(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct CherryBoatPaddleRight(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct CherryBoatBubbleTime(pub i32); #[derive(Component)] -pub struct ChestBoat; -impl ChestBoat { +pub struct CherryBoat; +impl CherryBoat { pub fn apply_metadata( entity: &mut bevy_ecs::system::EntityCommands, d: EntityDataItem, ) -> Result<(), UpdateMetadataError> { match d.index { - 0..=14 => Boat::apply_metadata(entity, d)?, + 0..=7 => AbstractEntity::apply_metadata(entity, d)?, + 8 => { + entity.insert(CherryBoatHurt(d.value.into_int()?)); + } + 9 => { + entity.insert(CherryBoatHurtdir(d.value.into_int()?)); + } + 10 => { + entity.insert(CherryBoatDamage(d.value.into_float()?)); + } + 11 => { + entity.insert(CherryBoatPaddleLeft(d.value.into_boolean()?)); + } + 12 => { + entity.insert(CherryBoatPaddleRight(d.value.into_boolean()?)); + } + 13 => { + entity.insert(CherryBoatBubbleTime(d.value.into_int()?)); + } _ => {} } Ok(()) @@ -1622,78 +2082,167 @@ impl ChestBoat { } #[derive(Bundle)] -pub struct ChestBoatMetadataBundle { - _marker: ChestBoat, - parent: BoatMetadataBundle, +pub struct CherryBoatMetadataBundle { + _marker: CherryBoat, + parent: AbstractEntityMetadataBundle, + cherry_boat_hurt: CherryBoatHurt, + cherry_boat_hurtdir: CherryBoatHurtdir, + cherry_boat_damage: CherryBoatDamage, + cherry_boat_paddle_left: CherryBoatPaddleLeft, + cherry_boat_paddle_right: CherryBoatPaddleRight, + cherry_boat_bubble_time: CherryBoatBubbleTime, } -impl Default for ChestBoatMetadataBundle { +impl Default for CherryBoatMetadataBundle { fn default() -> Self { Self { - _marker: ChestBoat, - parent: BoatMetadataBundle { - _marker: Boat, - 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()), - }, - boat_hurt: BoatHurt(0), - boat_hurtdir: BoatHurtdir(1), - boat_damage: BoatDamage(0.0), - boat_kind: BoatKind(Default::default()), - paddle_left: PaddleLeft(false), - paddle_right: PaddleRight(false), - bubble_time: BubbleTime(0), + _marker: CherryBoat, + 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()), }, + cherry_boat_hurt: CherryBoatHurt(0), + cherry_boat_hurtdir: CherryBoatHurtdir(1), + cherry_boat_damage: CherryBoatDamage(0.0), + cherry_boat_paddle_left: CherryBoatPaddleLeft(false), + cherry_boat_paddle_right: CherryBoatPaddleRight(false), + cherry_boat_bubble_time: CherryBoatBubbleTime(0), } } } #[derive(Component, Deref, DerefMut, Clone)] -pub struct AbstractMinecartHurt(pub i32); +pub struct CherryChestBoatHurt(pub i32); #[derive(Component, Deref, DerefMut, Clone)] -pub struct AbstractMinecartHurtdir(pub i32); +pub struct CherryChestBoatHurtdir(pub i32); #[derive(Component, Deref, DerefMut, Clone)] -pub struct AbstractMinecartDamage(pub f32); +pub struct CherryChestBoatDamage(pub f32); #[derive(Component, Deref, DerefMut, Clone)] -pub struct DisplayBlock(pub i32); +pub struct CherryChestBoatPaddleLeft(pub bool); #[derive(Component, Deref, DerefMut, Clone)] -pub struct DisplayOffset(pub i32); +pub struct CherryChestBoatPaddleRight(pub bool); #[derive(Component, Deref, DerefMut, Clone)] -pub struct CustomDisplay(pub bool); +pub struct CherryChestBoatBubbleTime(pub i32); #[derive(Component)] -pub struct ChestMinecart; -impl ChestMinecart { +pub struct CherryChestBoat; +impl CherryChestBoat { pub fn apply_metadata( entity: &mut bevy_ecs::system::EntityCommands, d: EntityDataItem, ) -> Result<(), UpdateMetadataError> { match d.index { - 0..=13 => AbstractMinecart::apply_metadata(entity, d)?, - _ => {} - } - Ok(()) - } -} - -#[derive(Bundle)] -pub struct ChestMinecartMetadataBundle { - _marker: ChestMinecart, - parent: AbstractMinecartMetadataBundle, -} -impl Default for ChestMinecartMetadataBundle { + 0..=7 => AbstractEntity::apply_metadata(entity, d)?, + 8 => { + entity.insert(CherryChestBoatHurt(d.value.into_int()?)); + } + 9 => { + entity.insert(CherryChestBoatHurtdir(d.value.into_int()?)); + } + 10 => { + entity.insert(CherryChestBoatDamage(d.value.into_float()?)); + } + 11 => { + entity.insert(CherryChestBoatPaddleLeft(d.value.into_boolean()?)); + } + 12 => { + entity.insert(CherryChestBoatPaddleRight(d.value.into_boolean()?)); + } + 13 => { + entity.insert(CherryChestBoatBubbleTime(d.value.into_int()?)); + } + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct CherryChestBoatMetadataBundle { + _marker: CherryChestBoat, + parent: AbstractEntityMetadataBundle, + cherry_chest_boat_hurt: CherryChestBoatHurt, + cherry_chest_boat_hurtdir: CherryChestBoatHurtdir, + cherry_chest_boat_damage: CherryChestBoatDamage, + cherry_chest_boat_paddle_left: CherryChestBoatPaddleLeft, + cherry_chest_boat_paddle_right: CherryChestBoatPaddleRight, + cherry_chest_boat_bubble_time: CherryChestBoatBubbleTime, +} +impl Default for CherryChestBoatMetadataBundle { + fn default() -> Self { + Self { + _marker: CherryChestBoat, + 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()), + }, + cherry_chest_boat_hurt: CherryChestBoatHurt(0), + cherry_chest_boat_hurtdir: CherryChestBoatHurtdir(1), + cherry_chest_boat_damage: CherryChestBoatDamage(0.0), + cherry_chest_boat_paddle_left: CherryChestBoatPaddleLeft(false), + cherry_chest_boat_paddle_right: CherryChestBoatPaddleRight(false), + cherry_chest_boat_bubble_time: CherryChestBoatBubbleTime(0), + } + } +} + +#[derive(Component, Deref, DerefMut, Clone)] +pub struct AbstractMinecartHurt(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct AbstractMinecartHurtdir(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct AbstractMinecartDamage(pub f32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct DisplayBlock(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct DisplayOffset(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct CustomDisplay(pub bool); +#[derive(Component)] +pub struct ChestMinecart; +impl ChestMinecart { + pub fn apply_metadata( + entity: &mut bevy_ecs::system::EntityCommands, + d: EntityDataItem, + ) -> Result<(), UpdateMetadataError> { + match d.index { + 0..=13 => AbstractMinecart::apply_metadata(entity, d)?, + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct ChestMinecartMetadataBundle { + _marker: ChestMinecart, + parent: AbstractMinecartMetadataBundle, +} +impl Default for ChestMinecartMetadataBundle { fn default() -> Self { Self { _marker: ChestMinecart, @@ -2012,14 +2561,12 @@ impl Default for CowMetadataBundle { } #[derive(Component, Deref, DerefMut, Clone)] -pub struct SwellDir(pub i32); -#[derive(Component, Deref, DerefMut, Clone)] -pub struct IsPowered(pub bool); +pub struct CanMove(pub bool); #[derive(Component, Deref, DerefMut, Clone)] -pub struct IsIgnited(pub bool); +pub struct IsActive(pub bool); #[derive(Component)] -pub struct Creeper; -impl Creeper { +pub struct Creaking; +impl Creaking { pub fn apply_metadata( entity: &mut bevy_ecs::system::EntityCommands, d: EntityDataItem, @@ -2027,13 +2574,10 @@ impl Creeper { match d.index { 0..=15 => AbstractMonster::apply_metadata(entity, d)?, 16 => { - entity.insert(SwellDir(d.value.into_int()?)); + entity.insert(CanMove(d.value.into_boolean()?)); } 17 => { - entity.insert(IsPowered(d.value.into_boolean()?)); - } - 18 => { - entity.insert(IsIgnited(d.value.into_boolean()?)); + entity.insert(IsActive(d.value.into_boolean()?)); } _ => {} } @@ -2042,17 +2586,16 @@ impl Creeper { } #[derive(Bundle)] -pub struct CreeperMetadataBundle { - _marker: Creeper, +pub struct CreakingMetadataBundle { + _marker: Creaking, parent: AbstractMonsterMetadataBundle, - swell_dir: SwellDir, - is_powered: IsPowered, - is_ignited: IsIgnited, + can_move: CanMove, + is_active: IsActive, } -impl Default for CreeperMetadataBundle { +impl Default for CreakingMetadataBundle { fn default() -> Self { Self { - _marker: Creeper, + _marker: Creaking, parent: AbstractMonsterMetadataBundle { _marker: AbstractMonster, parent: AbstractCreatureMetadataBundle { @@ -2093,131 +2636,21 @@ impl Default for CreeperMetadataBundle { }, }, }, - swell_dir: SwellDir(-1), - is_powered: IsPowered(false), - is_ignited: IsIgnited(false), - } - } -} - -#[derive(Component, Deref, DerefMut, Clone)] -pub struct TreasurePos(pub BlockPos); -#[derive(Component, Deref, DerefMut, Clone)] -pub struct GotFish(pub bool); -#[derive(Component, Deref, DerefMut, Clone)] -pub struct MoistnessLevel(pub i32); -#[derive(Component)] -pub struct Dolphin; -impl Dolphin { - pub fn apply_metadata( - entity: &mut bevy_ecs::system::EntityCommands, - d: EntityDataItem, - ) -> Result<(), UpdateMetadataError> { - match d.index { - 0..=15 => AbstractCreature::apply_metadata(entity, d)?, - 16 => { - entity.insert(TreasurePos(d.value.into_block_pos()?)); - } - 17 => { - entity.insert(GotFish(d.value.into_boolean()?)); - } - 18 => { - entity.insert(MoistnessLevel(d.value.into_int()?)); - } - _ => {} - } - Ok(()) - } -} - -#[derive(Bundle)] -pub struct DolphinMetadataBundle { - _marker: Dolphin, - parent: AbstractCreatureMetadataBundle, - treasure_pos: TreasurePos, - got_fish: GotFish, - moistness_level: MoistnessLevel, -} -impl Default for DolphinMetadataBundle { - fn default() -> Self { - Self { - _marker: Dolphin, - 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), - }, - }, - treasure_pos: TreasurePos(Default::default()), - got_fish: GotFish(false), - moistness_level: MoistnessLevel(2400), + can_move: CanMove(true), + is_active: IsActive(false), } } } -#[derive(Component, Deref, DerefMut, Clone, Copy)] -pub struct DonkeyTamed(pub bool); -#[derive(Component, Deref, DerefMut, Clone, Copy)] -pub struct DonkeyEating(pub bool); -#[derive(Component, Deref, DerefMut, Clone, Copy)] -pub struct DonkeyStanding(pub bool); -#[derive(Component, Deref, DerefMut, Clone, Copy)] -pub struct DonkeyBred(pub bool); -#[derive(Component, Deref, DerefMut, Clone, Copy)] -pub struct DonkeySaddled(pub bool); -#[derive(Component, Deref, DerefMut, Clone)] -pub struct DonkeyChest(pub bool); #[derive(Component)] -pub struct Donkey; -impl Donkey { +pub struct CreakingTransient; +impl CreakingTransient { pub fn apply_metadata( entity: &mut bevy_ecs::system::EntityCommands, d: EntityDataItem, ) -> Result<(), UpdateMetadataError> { match d.index { - 0..=16 => AbstractAnimal::apply_metadata(entity, d)?, - 17 => { - let bitfield = d.value.into_byte()?; - entity.insert(DonkeyTamed(bitfield & 0x2 != 0)); - entity.insert(DonkeyEating(bitfield & 0x10 != 0)); - entity.insert(DonkeyStanding(bitfield & 0x20 != 0)); - entity.insert(DonkeyBred(bitfield & 0x8 != 0)); - entity.insert(DonkeySaddled(bitfield & 0x4 != 0)); - } - 18 => { - entity.insert(DonkeyChest(d.value.into_boolean()?)); - } + 0..=17 => Creaking::apply_metadata(entity, d)?, _ => {} } Ok(()) @@ -2225,24 +2658,18 @@ impl Donkey { } #[derive(Bundle)] -pub struct DonkeyMetadataBundle { - _marker: Donkey, - parent: AbstractAnimalMetadataBundle, - donkey_tamed: DonkeyTamed, - donkey_eating: DonkeyEating, - donkey_standing: DonkeyStanding, - donkey_bred: DonkeyBred, - donkey_saddled: DonkeySaddled, - donkey_chest: DonkeyChest, +pub struct CreakingTransientMetadataBundle { + _marker: CreakingTransient, + parent: CreakingMetadataBundle, } -impl Default for DonkeyMetadataBundle { +impl Default for CreakingTransientMetadataBundle { fn default() -> Self { Self { - _marker: Donkey, - parent: AbstractAnimalMetadataBundle { - _marker: AbstractAnimal, - parent: AbstractAgeableMetadataBundle { - _marker: AbstractAgeable, + _marker: CreakingTransient, + parent: CreakingMetadataBundle { + _marker: Creaking, + parent: AbstractMonsterMetadataBundle { + _marker: AbstractMonster, parent: AbstractCreatureMetadataBundle { _marker: AbstractCreature, parent: AbstractInsentientMetadataBundle { @@ -2280,28 +2707,38 @@ impl Default for DonkeyMetadataBundle { aggressive: Aggressive(false), }, }, - abstract_ageable_baby: AbstractAgeableBaby(false), }, + can_move: CanMove(true), + is_active: IsActive(false), }, - donkey_tamed: DonkeyTamed(false), - donkey_eating: DonkeyEating(false), - donkey_standing: DonkeyStanding(false), - donkey_bred: DonkeyBred(false), - donkey_saddled: DonkeySaddled(false), - donkey_chest: DonkeyChest(false), } } } +#[derive(Component, Deref, DerefMut, Clone)] +pub struct SwellDir(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct IsPowered(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct IsIgnited(pub bool); #[derive(Component)] -pub struct DragonFireball; -impl DragonFireball { +pub struct Creeper; +impl Creeper { pub fn apply_metadata( entity: &mut bevy_ecs::system::EntityCommands, d: EntityDataItem, ) -> Result<(), UpdateMetadataError> { match d.index { - 0..=7 => AbstractEntity::apply_metadata(entity, d)?, + 0..=15 => AbstractMonster::apply_metadata(entity, d)?, + 16 => { + entity.insert(SwellDir(d.value.into_int()?)); + } + 17 => { + entity.insert(IsPowered(d.value.into_boolean()?)); + } + 18 => { + entity.insert(IsIgnited(d.value.into_boolean()?)); + } _ => {} } Ok(()) @@ -2309,7 +2746,452 @@ impl DragonFireball { } #[derive(Bundle)] -pub struct DragonFireballMetadataBundle { +pub struct CreeperMetadataBundle { + _marker: Creeper, + parent: AbstractMonsterMetadataBundle, + swell_dir: SwellDir, + is_powered: IsPowered, + is_ignited: IsIgnited, +} +impl Default for CreeperMetadataBundle { + fn default() -> Self { + Self { + _marker: Creeper, + 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), + }, + }, + }, + swell_dir: SwellDir(-1), + is_powered: IsPowered(false), + is_ignited: IsIgnited(false), + } + } +} + +#[derive(Component, Deref, DerefMut, Clone)] +pub struct DarkOakBoatHurt(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct DarkOakBoatHurtdir(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct DarkOakBoatDamage(pub f32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct DarkOakBoatPaddleLeft(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct DarkOakBoatPaddleRight(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct DarkOakBoatBubbleTime(pub i32); +#[derive(Component)] +pub struct DarkOakBoat; +impl DarkOakBoat { + 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(DarkOakBoatHurt(d.value.into_int()?)); + } + 9 => { + entity.insert(DarkOakBoatHurtdir(d.value.into_int()?)); + } + 10 => { + entity.insert(DarkOakBoatDamage(d.value.into_float()?)); + } + 11 => { + entity.insert(DarkOakBoatPaddleLeft(d.value.into_boolean()?)); + } + 12 => { + entity.insert(DarkOakBoatPaddleRight(d.value.into_boolean()?)); + } + 13 => { + entity.insert(DarkOakBoatBubbleTime(d.value.into_int()?)); + } + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct DarkOakBoatMetadataBundle { + _marker: DarkOakBoat, + parent: AbstractEntityMetadataBundle, + dark_oak_boat_hurt: DarkOakBoatHurt, + dark_oak_boat_hurtdir: DarkOakBoatHurtdir, + dark_oak_boat_damage: DarkOakBoatDamage, + dark_oak_boat_paddle_left: DarkOakBoatPaddleLeft, + dark_oak_boat_paddle_right: DarkOakBoatPaddleRight, + dark_oak_boat_bubble_time: DarkOakBoatBubbleTime, +} +impl Default for DarkOakBoatMetadataBundle { + fn default() -> Self { + Self { + _marker: DarkOakBoat, + 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()), + }, + dark_oak_boat_hurt: DarkOakBoatHurt(0), + dark_oak_boat_hurtdir: DarkOakBoatHurtdir(1), + dark_oak_boat_damage: DarkOakBoatDamage(0.0), + dark_oak_boat_paddle_left: DarkOakBoatPaddleLeft(false), + dark_oak_boat_paddle_right: DarkOakBoatPaddleRight(false), + dark_oak_boat_bubble_time: DarkOakBoatBubbleTime(0), + } + } +} + +#[derive(Component, Deref, DerefMut, Clone)] +pub struct DarkOakChestBoatHurt(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct DarkOakChestBoatHurtdir(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct DarkOakChestBoatDamage(pub f32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct DarkOakChestBoatPaddleLeft(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct DarkOakChestBoatPaddleRight(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct DarkOakChestBoatBubbleTime(pub i32); +#[derive(Component)] +pub struct DarkOakChestBoat; +impl DarkOakChestBoat { + 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(DarkOakChestBoatHurt(d.value.into_int()?)); + } + 9 => { + entity.insert(DarkOakChestBoatHurtdir(d.value.into_int()?)); + } + 10 => { + entity.insert(DarkOakChestBoatDamage(d.value.into_float()?)); + } + 11 => { + entity.insert(DarkOakChestBoatPaddleLeft(d.value.into_boolean()?)); + } + 12 => { + entity.insert(DarkOakChestBoatPaddleRight(d.value.into_boolean()?)); + } + 13 => { + entity.insert(DarkOakChestBoatBubbleTime(d.value.into_int()?)); + } + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct DarkOakChestBoatMetadataBundle { + _marker: DarkOakChestBoat, + parent: AbstractEntityMetadataBundle, + dark_oak_chest_boat_hurt: DarkOakChestBoatHurt, + dark_oak_chest_boat_hurtdir: DarkOakChestBoatHurtdir, + dark_oak_chest_boat_damage: DarkOakChestBoatDamage, + dark_oak_chest_boat_paddle_left: DarkOakChestBoatPaddleLeft, + dark_oak_chest_boat_paddle_right: DarkOakChestBoatPaddleRight, + dark_oak_chest_boat_bubble_time: DarkOakChestBoatBubbleTime, +} +impl Default for DarkOakChestBoatMetadataBundle { + fn default() -> Self { + Self { + _marker: DarkOakChestBoat, + 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()), + }, + dark_oak_chest_boat_hurt: DarkOakChestBoatHurt(0), + dark_oak_chest_boat_hurtdir: DarkOakChestBoatHurtdir(1), + dark_oak_chest_boat_damage: DarkOakChestBoatDamage(0.0), + dark_oak_chest_boat_paddle_left: DarkOakChestBoatPaddleLeft(false), + dark_oak_chest_boat_paddle_right: DarkOakChestBoatPaddleRight(false), + dark_oak_chest_boat_bubble_time: DarkOakChestBoatBubbleTime(0), + } + } +} + +#[derive(Component, Deref, DerefMut, Clone)] +pub struct TreasurePos(pub BlockPos); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct GotFish(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct MoistnessLevel(pub i32); +#[derive(Component)] +pub struct Dolphin; +impl Dolphin { + pub fn apply_metadata( + entity: &mut bevy_ecs::system::EntityCommands, + d: EntityDataItem, + ) -> Result<(), UpdateMetadataError> { + match d.index { + 0..=16 => AbstractAgeable::apply_metadata(entity, d)?, + 17 => { + entity.insert(TreasurePos(d.value.into_block_pos()?)); + } + 18 => { + entity.insert(GotFish(d.value.into_boolean()?)); + } + 19 => { + entity.insert(MoistnessLevel(d.value.into_int()?)); + } + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct DolphinMetadataBundle { + _marker: Dolphin, + parent: AbstractAgeableMetadataBundle, + treasure_pos: TreasurePos, + got_fish: GotFish, + moistness_level: MoistnessLevel, +} +impl Default for DolphinMetadataBundle { + fn default() -> Self { + Self { + _marker: Dolphin, + parent: AbstractAgeableMetadataBundle { + _marker: AbstractAgeable, + 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), + }, + }, + abstract_ageable_baby: AbstractAgeableBaby(false), + }, + treasure_pos: TreasurePos(BlockPos::new(0, 0, 0)), + got_fish: GotFish(false), + moistness_level: MoistnessLevel(2400), + } + } +} + +#[derive(Component, Deref, DerefMut, Clone, Copy)] +pub struct DonkeyTamed(pub bool); +#[derive(Component, Deref, DerefMut, Clone, Copy)] +pub struct DonkeyEating(pub bool); +#[derive(Component, Deref, DerefMut, Clone, Copy)] +pub struct DonkeyStanding(pub bool); +#[derive(Component, Deref, DerefMut, Clone, Copy)] +pub struct DonkeyBred(pub bool); +#[derive(Component, Deref, DerefMut, Clone, Copy)] +pub struct DonkeySaddled(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct DonkeyChest(pub bool); +#[derive(Component)] +pub struct Donkey; +impl Donkey { + pub fn apply_metadata( + entity: &mut bevy_ecs::system::EntityCommands, + d: EntityDataItem, + ) -> Result<(), UpdateMetadataError> { + match d.index { + 0..=16 => AbstractAnimal::apply_metadata(entity, d)?, + 17 => { + let bitfield = d.value.into_byte()?; + entity.insert(DonkeyTamed(bitfield & 0x2 != 0)); + entity.insert(DonkeyEating(bitfield & 0x10 != 0)); + entity.insert(DonkeyStanding(bitfield & 0x20 != 0)); + entity.insert(DonkeyBred(bitfield & 0x8 != 0)); + entity.insert(DonkeySaddled(bitfield & 0x4 != 0)); + } + 18 => { + entity.insert(DonkeyChest(d.value.into_boolean()?)); + } + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct DonkeyMetadataBundle { + _marker: Donkey, + parent: AbstractAnimalMetadataBundle, + donkey_tamed: DonkeyTamed, + donkey_eating: DonkeyEating, + donkey_standing: DonkeyStanding, + donkey_bred: DonkeyBred, + donkey_saddled: DonkeySaddled, + donkey_chest: DonkeyChest, +} +impl Default for DonkeyMetadataBundle { + fn default() -> Self { + Self { + _marker: Donkey, + parent: AbstractAnimalMetadataBundle { + _marker: AbstractAnimal, + parent: AbstractAgeableMetadataBundle { + _marker: AbstractAgeable, + 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), + }, + }, + abstract_ageable_baby: AbstractAgeableBaby(false), + }, + }, + donkey_tamed: DonkeyTamed(false), + donkey_eating: DonkeyEating(false), + donkey_standing: DonkeyStanding(false), + donkey_bred: DonkeyBred(false), + donkey_saddled: DonkeySaddled(false), + donkey_chest: DonkeyChest(false), + } + } +} + +#[derive(Component)] +pub struct DragonFireball; +impl DragonFireball { + pub fn apply_metadata( + entity: &mut bevy_ecs::system::EntityCommands, + d: EntityDataItem, + ) -> Result<(), UpdateMetadataError> { + match d.index { + 0..=7 => AbstractEntity::apply_metadata(entity, d)?, + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct DragonFireballMetadataBundle { _marker: DragonFireball, parent: AbstractEntityMetadataBundle, } @@ -3207,7 +4089,7 @@ impl Default for FallingBlockMetadataBundle { pose: Pose::default(), ticks_frozen: TicksFrozen(Default::default()), }, - start_pos: StartPos(Default::default()), + start_pos: StartPos(BlockPos::new(0, 0, 0)), } } } @@ -3863,8 +4745,8 @@ impl GlowSquid { d: EntityDataItem, ) -> Result<(), UpdateMetadataError> { match d.index { - 0..=15 => Squid::apply_metadata(entity, d)?, - 16 => { + 0..=16 => Squid::apply_metadata(entity, d)?, + 17 => { entity.insert(DarkTicksRemaining(d.value.into_int()?)); } _ => {} @@ -3885,42 +4767,46 @@ impl Default for GlowSquidMetadataBundle { _marker: GlowSquid, parent: SquidMetadataBundle { _marker: Squid, - 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()), + parent: AbstractAgeableMetadataBundle { + _marker: AbstractAgeable, + 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), }, - 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), }, - no_ai: NoAi(false), - left_handed: LeftHanded(false), - aggressive: Aggressive(false), }, + abstract_ageable_baby: AbstractAgeableBaby(false), }, }, dark_ticks_remaining: DarkTicksRemaining(0), @@ -4814,10 +5700,185 @@ pub struct ItemDisplayMetadataBundle { item_display_item_stack: ItemDisplayItemStack, item_display_item_display: ItemDisplayItemDisplay, } -impl Default for ItemDisplayMetadataBundle { +impl Default for ItemDisplayMetadataBundle { + fn default() -> Self { + Self { + _marker: ItemDisplay, + 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()), + }, + item_display_transformation_interpolation_start_delta_ticks: + ItemDisplayTransformationInterpolationStartDeltaTicks(0), + item_display_transformation_interpolation_duration: + ItemDisplayTransformationInterpolationDuration(0), + item_display_pos_rot_interpolation_duration: ItemDisplayPosRotInterpolationDuration(0), + item_display_translation: ItemDisplayTranslation(Vec3 { + x: 0.0, + y: 0.0, + z: 0.0, + }), + item_display_scale: ItemDisplayScale(Vec3 { + x: 1.0, + y: 1.0, + z: 1.0, + }), + item_display_left_rotation: ItemDisplayLeftRotation(Quaternion { + x: 0.0, + y: 0.0, + z: 0.0, + w: 1.0, + }), + item_display_right_rotation: ItemDisplayRightRotation(Quaternion { + x: 0.0, + y: 0.0, + z: 0.0, + w: 1.0, + }), + item_display_billboard_render_constraints: ItemDisplayBillboardRenderConstraints( + Default::default(), + ), + item_display_brightness_override: ItemDisplayBrightnessOverride(-1), + item_display_view_range: ItemDisplayViewRange(1.0), + item_display_shadow_radius: ItemDisplayShadowRadius(0.0), + item_display_shadow_strength: ItemDisplayShadowStrength(1.0), + item_display_width: ItemDisplayWidth(0.0), + item_display_height: ItemDisplayHeight(0.0), + item_display_glow_color_override: ItemDisplayGlowColorOverride(-1), + item_display_item_stack: ItemDisplayItemStack(ItemSlot::Empty), + item_display_item_display: ItemDisplayItemDisplay(Default::default()), + } + } +} + +#[derive(Component)] +pub struct ItemFrame; +impl ItemFrame { + 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(ItemFrameItem(d.value.into_item_stack()?)); + } + 9 => { + entity.insert(Rotation(d.value.into_int()?)); + } + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct ItemFrameMetadataBundle { + _marker: ItemFrame, + parent: AbstractEntityMetadataBundle, + item_frame_item: ItemFrameItem, + rotation: Rotation, +} +impl Default for ItemFrameMetadataBundle { + fn default() -> Self { + Self { + _marker: ItemFrame, + 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()), + }, + item_frame_item: ItemFrameItem(ItemSlot::Empty), + rotation: Rotation(0), + } + } +} + +#[derive(Component, Deref, DerefMut, Clone)] +pub struct JungleBoatHurt(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct JungleBoatHurtdir(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct JungleBoatDamage(pub f32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct JungleBoatPaddleLeft(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct JungleBoatPaddleRight(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct JungleBoatBubbleTime(pub i32); +#[derive(Component)] +pub struct JungleBoat; +impl JungleBoat { + 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(JungleBoatHurt(d.value.into_int()?)); + } + 9 => { + entity.insert(JungleBoatHurtdir(d.value.into_int()?)); + } + 10 => { + entity.insert(JungleBoatDamage(d.value.into_float()?)); + } + 11 => { + entity.insert(JungleBoatPaddleLeft(d.value.into_boolean()?)); + } + 12 => { + entity.insert(JungleBoatPaddleRight(d.value.into_boolean()?)); + } + 13 => { + entity.insert(JungleBoatBubbleTime(d.value.into_int()?)); + } + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct JungleBoatMetadataBundle { + _marker: JungleBoat, + parent: AbstractEntityMetadataBundle, + jungle_boat_hurt: JungleBoatHurt, + jungle_boat_hurtdir: JungleBoatHurtdir, + jungle_boat_damage: JungleBoatDamage, + jungle_boat_paddle_left: JungleBoatPaddleLeft, + jungle_boat_paddle_right: JungleBoatPaddleRight, + jungle_boat_bubble_time: JungleBoatBubbleTime, +} +impl Default for JungleBoatMetadataBundle { fn default() -> Self { Self { - _marker: ItemDisplay, + _marker: JungleBoat, parent: AbstractEntityMetadataBundle { _marker: AbstractEntity, on_fire: OnFire(false), @@ -4835,52 +5896,31 @@ impl Default for ItemDisplayMetadataBundle { pose: Pose::default(), ticks_frozen: TicksFrozen(Default::default()), }, - item_display_transformation_interpolation_start_delta_ticks: - ItemDisplayTransformationInterpolationStartDeltaTicks(0), - item_display_transformation_interpolation_duration: - ItemDisplayTransformationInterpolationDuration(0), - item_display_pos_rot_interpolation_duration: ItemDisplayPosRotInterpolationDuration(0), - item_display_translation: ItemDisplayTranslation(Vec3 { - x: 0.0, - y: 0.0, - z: 0.0, - }), - item_display_scale: ItemDisplayScale(Vec3 { - x: 1.0, - y: 1.0, - z: 1.0, - }), - item_display_left_rotation: ItemDisplayLeftRotation(Quaternion { - x: 0.0, - y: 0.0, - z: 0.0, - w: 1.0, - }), - item_display_right_rotation: ItemDisplayRightRotation(Quaternion { - x: 0.0, - y: 0.0, - z: 0.0, - w: 1.0, - }), - item_display_billboard_render_constraints: ItemDisplayBillboardRenderConstraints( - Default::default(), - ), - item_display_brightness_override: ItemDisplayBrightnessOverride(-1), - item_display_view_range: ItemDisplayViewRange(1.0), - item_display_shadow_radius: ItemDisplayShadowRadius(0.0), - item_display_shadow_strength: ItemDisplayShadowStrength(1.0), - item_display_width: ItemDisplayWidth(0.0), - item_display_height: ItemDisplayHeight(0.0), - item_display_glow_color_override: ItemDisplayGlowColorOverride(-1), - item_display_item_stack: ItemDisplayItemStack(ItemSlot::Empty), - item_display_item_display: ItemDisplayItemDisplay(Default::default()), + jungle_boat_hurt: JungleBoatHurt(0), + jungle_boat_hurtdir: JungleBoatHurtdir(1), + jungle_boat_damage: JungleBoatDamage(0.0), + jungle_boat_paddle_left: JungleBoatPaddleLeft(false), + jungle_boat_paddle_right: JungleBoatPaddleRight(false), + jungle_boat_bubble_time: JungleBoatBubbleTime(0), } } } +#[derive(Component, Deref, DerefMut, Clone)] +pub struct JungleChestBoatHurt(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct JungleChestBoatHurtdir(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct JungleChestBoatDamage(pub f32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct JungleChestBoatPaddleLeft(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct JungleChestBoatPaddleRight(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct JungleChestBoatBubbleTime(pub i32); #[derive(Component)] -pub struct ItemFrame; -impl ItemFrame { +pub struct JungleChestBoat; +impl JungleChestBoat { pub fn apply_metadata( entity: &mut bevy_ecs::system::EntityCommands, d: EntityDataItem, @@ -4888,10 +5928,22 @@ impl ItemFrame { match d.index { 0..=7 => AbstractEntity::apply_metadata(entity, d)?, 8 => { - entity.insert(ItemFrameItem(d.value.into_item_stack()?)); + entity.insert(JungleChestBoatHurt(d.value.into_int()?)); } 9 => { - entity.insert(Rotation(d.value.into_int()?)); + entity.insert(JungleChestBoatHurtdir(d.value.into_int()?)); + } + 10 => { + entity.insert(JungleChestBoatDamage(d.value.into_float()?)); + } + 11 => { + entity.insert(JungleChestBoatPaddleLeft(d.value.into_boolean()?)); + } + 12 => { + entity.insert(JungleChestBoatPaddleRight(d.value.into_boolean()?)); + } + 13 => { + entity.insert(JungleChestBoatBubbleTime(d.value.into_int()?)); } _ => {} } @@ -4900,16 +5952,20 @@ impl ItemFrame { } #[derive(Bundle)] -pub struct ItemFrameMetadataBundle { - _marker: ItemFrame, +pub struct JungleChestBoatMetadataBundle { + _marker: JungleChestBoat, parent: AbstractEntityMetadataBundle, - item_frame_item: ItemFrameItem, - rotation: Rotation, + jungle_chest_boat_hurt: JungleChestBoatHurt, + jungle_chest_boat_hurtdir: JungleChestBoatHurtdir, + jungle_chest_boat_damage: JungleChestBoatDamage, + jungle_chest_boat_paddle_left: JungleChestBoatPaddleLeft, + jungle_chest_boat_paddle_right: JungleChestBoatPaddleRight, + jungle_chest_boat_bubble_time: JungleChestBoatBubbleTime, } -impl Default for ItemFrameMetadataBundle { +impl Default for JungleChestBoatMetadataBundle { fn default() -> Self { Self { - _marker: ItemFrame, + _marker: JungleChestBoat, parent: AbstractEntityMetadataBundle { _marker: AbstractEntity, on_fire: OnFire(false), @@ -4927,8 +5983,12 @@ impl Default for ItemFrameMetadataBundle { pose: Pose::default(), ticks_frozen: TicksFrozen(Default::default()), }, - item_frame_item: ItemFrameItem(ItemSlot::Empty), - rotation: Rotation(0), + jungle_chest_boat_hurt: JungleChestBoatHurt(0), + jungle_chest_boat_hurtdir: JungleChestBoatHurtdir(1), + jungle_chest_boat_damage: JungleChestBoatDamage(0.0), + jungle_chest_boat_paddle_left: JungleChestBoatPaddleLeft(false), + jungle_chest_boat_paddle_right: JungleChestBoatPaddleRight(false), + jungle_chest_boat_bubble_time: JungleChestBoatBubbleTime(0), } } } @@ -5160,14 +6220,250 @@ impl LlamaSpit { } #[derive(Bundle)] -pub struct LlamaSpitMetadataBundle { - _marker: LlamaSpit, +pub struct LlamaSpitMetadataBundle { + _marker: LlamaSpit, + parent: AbstractEntityMetadataBundle, +} +impl Default for LlamaSpitMetadataBundle { + fn default() -> Self { + Self { + _marker: LlamaSpit, + 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()), + }, + } + } +} + +#[derive(Component, Deref, DerefMut, Clone)] +pub struct SlimeSize(pub i32); +#[derive(Component)] +pub struct MagmaCube; +impl MagmaCube { + pub fn apply_metadata( + entity: &mut bevy_ecs::system::EntityCommands, + d: EntityDataItem, + ) -> Result<(), UpdateMetadataError> { + match d.index { + 0..=16 => Slime::apply_metadata(entity, d)?, + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct MagmaCubeMetadataBundle { + _marker: MagmaCube, + parent: SlimeMetadataBundle, +} +impl Default for MagmaCubeMetadataBundle { + fn default() -> Self { + Self { + _marker: MagmaCube, + parent: SlimeMetadataBundle { + _marker: Slime, + 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), + }, + slime_size: SlimeSize(1), + }, + } + } +} + +#[derive(Component, Deref, DerefMut, Clone)] +pub struct MangroveBoatHurt(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct MangroveBoatHurtdir(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct MangroveBoatDamage(pub f32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct MangroveBoatPaddleLeft(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct MangroveBoatPaddleRight(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct MangroveBoatBubbleTime(pub i32); +#[derive(Component)] +pub struct MangroveBoat; +impl MangroveBoat { + 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(MangroveBoatHurt(d.value.into_int()?)); + } + 9 => { + entity.insert(MangroveBoatHurtdir(d.value.into_int()?)); + } + 10 => { + entity.insert(MangroveBoatDamage(d.value.into_float()?)); + } + 11 => { + entity.insert(MangroveBoatPaddleLeft(d.value.into_boolean()?)); + } + 12 => { + entity.insert(MangroveBoatPaddleRight(d.value.into_boolean()?)); + } + 13 => { + entity.insert(MangroveBoatBubbleTime(d.value.into_int()?)); + } + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct MangroveBoatMetadataBundle { + _marker: MangroveBoat, + parent: AbstractEntityMetadataBundle, + mangrove_boat_hurt: MangroveBoatHurt, + mangrove_boat_hurtdir: MangroveBoatHurtdir, + mangrove_boat_damage: MangroveBoatDamage, + mangrove_boat_paddle_left: MangroveBoatPaddleLeft, + mangrove_boat_paddle_right: MangroveBoatPaddleRight, + mangrove_boat_bubble_time: MangroveBoatBubbleTime, +} +impl Default for MangroveBoatMetadataBundle { + fn default() -> Self { + Self { + _marker: MangroveBoat, + 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()), + }, + mangrove_boat_hurt: MangroveBoatHurt(0), + mangrove_boat_hurtdir: MangroveBoatHurtdir(1), + mangrove_boat_damage: MangroveBoatDamage(0.0), + mangrove_boat_paddle_left: MangroveBoatPaddleLeft(false), + mangrove_boat_paddle_right: MangroveBoatPaddleRight(false), + mangrove_boat_bubble_time: MangroveBoatBubbleTime(0), + } + } +} + +#[derive(Component, Deref, DerefMut, Clone)] +pub struct MangroveChestBoatHurt(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct MangroveChestBoatHurtdir(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct MangroveChestBoatDamage(pub f32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct MangroveChestBoatPaddleLeft(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct MangroveChestBoatPaddleRight(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct MangroveChestBoatBubbleTime(pub i32); +#[derive(Component)] +pub struct MangroveChestBoat; +impl MangroveChestBoat { + 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(MangroveChestBoatHurt(d.value.into_int()?)); + } + 9 => { + entity.insert(MangroveChestBoatHurtdir(d.value.into_int()?)); + } + 10 => { + entity.insert(MangroveChestBoatDamage(d.value.into_float()?)); + } + 11 => { + entity.insert(MangroveChestBoatPaddleLeft(d.value.into_boolean()?)); + } + 12 => { + entity.insert(MangroveChestBoatPaddleRight(d.value.into_boolean()?)); + } + 13 => { + entity.insert(MangroveChestBoatBubbleTime(d.value.into_int()?)); + } + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct MangroveChestBoatMetadataBundle { + _marker: MangroveChestBoat, parent: AbstractEntityMetadataBundle, + mangrove_chest_boat_hurt: MangroveChestBoatHurt, + mangrove_chest_boat_hurtdir: MangroveChestBoatHurtdir, + mangrove_chest_boat_damage: MangroveChestBoatDamage, + mangrove_chest_boat_paddle_left: MangroveChestBoatPaddleLeft, + mangrove_chest_boat_paddle_right: MangroveChestBoatPaddleRight, + mangrove_chest_boat_bubble_time: MangroveChestBoatBubbleTime, } -impl Default for LlamaSpitMetadataBundle { +impl Default for MangroveChestBoatMetadataBundle { fn default() -> Self { Self { - _marker: LlamaSpit, + _marker: MangroveChestBoat, parent: AbstractEntityMetadataBundle { _marker: AbstractEntity, on_fire: OnFire(false), @@ -5185,74 +6481,12 @@ impl Default for LlamaSpitMetadataBundle { pose: Pose::default(), ticks_frozen: TicksFrozen(Default::default()), }, - } - } -} - -#[derive(Component, Deref, DerefMut, Clone)] -pub struct SlimeSize(pub i32); -#[derive(Component)] -pub struct MagmaCube; -impl MagmaCube { - pub fn apply_metadata( - entity: &mut bevy_ecs::system::EntityCommands, - d: EntityDataItem, - ) -> Result<(), UpdateMetadataError> { - match d.index { - 0..=16 => Slime::apply_metadata(entity, d)?, - _ => {} - } - Ok(()) - } -} - -#[derive(Bundle)] -pub struct MagmaCubeMetadataBundle { - _marker: MagmaCube, - parent: SlimeMetadataBundle, -} -impl Default for MagmaCubeMetadataBundle { - fn default() -> Self { - Self { - _marker: MagmaCube, - parent: SlimeMetadataBundle { - _marker: Slime, - 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), - }, - slime_size: SlimeSize(1), - }, + mangrove_chest_boat_hurt: MangroveChestBoatHurt(0), + mangrove_chest_boat_hurtdir: MangroveChestBoatHurtdir(1), + mangrove_chest_boat_damage: MangroveChestBoatDamage(0.0), + mangrove_chest_boat_paddle_left: MangroveChestBoatPaddleLeft(false), + mangrove_chest_boat_paddle_right: MangroveChestBoatPaddleRight(false), + mangrove_chest_boat_bubble_time: MangroveChestBoatBubbleTime(0), } } } @@ -5545,6 +6779,180 @@ impl Default for MuleMetadataBundle { } } +#[derive(Component, Deref, DerefMut, Clone)] +pub struct OakBoatHurt(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct OakBoatHurtdir(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct OakBoatDamage(pub f32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct OakBoatPaddleLeft(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct OakBoatPaddleRight(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct OakBoatBubbleTime(pub i32); +#[derive(Component)] +pub struct OakBoat; +impl OakBoat { + 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(OakBoatHurt(d.value.into_int()?)); + } + 9 => { + entity.insert(OakBoatHurtdir(d.value.into_int()?)); + } + 10 => { + entity.insert(OakBoatDamage(d.value.into_float()?)); + } + 11 => { + entity.insert(OakBoatPaddleLeft(d.value.into_boolean()?)); + } + 12 => { + entity.insert(OakBoatPaddleRight(d.value.into_boolean()?)); + } + 13 => { + entity.insert(OakBoatBubbleTime(d.value.into_int()?)); + } + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct OakBoatMetadataBundle { + _marker: OakBoat, + parent: AbstractEntityMetadataBundle, + oak_boat_hurt: OakBoatHurt, + oak_boat_hurtdir: OakBoatHurtdir, + oak_boat_damage: OakBoatDamage, + oak_boat_paddle_left: OakBoatPaddleLeft, + oak_boat_paddle_right: OakBoatPaddleRight, + oak_boat_bubble_time: OakBoatBubbleTime, +} +impl Default for OakBoatMetadataBundle { + fn default() -> Self { + Self { + _marker: OakBoat, + 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()), + }, + oak_boat_hurt: OakBoatHurt(0), + oak_boat_hurtdir: OakBoatHurtdir(1), + oak_boat_damage: OakBoatDamage(0.0), + oak_boat_paddle_left: OakBoatPaddleLeft(false), + oak_boat_paddle_right: OakBoatPaddleRight(false), + oak_boat_bubble_time: OakBoatBubbleTime(0), + } + } +} + +#[derive(Component, Deref, DerefMut, Clone)] +pub struct OakChestBoatHurt(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct OakChestBoatHurtdir(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct OakChestBoatDamage(pub f32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct OakChestBoatPaddleLeft(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct OakChestBoatPaddleRight(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct OakChestBoatBubbleTime(pub i32); +#[derive(Component)] +pub struct OakChestBoat; +impl OakChestBoat { + 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(OakChestBoatHurt(d.value.into_int()?)); + } + 9 => { + entity.insert(OakChestBoatHurtdir(d.value.into_int()?)); + } + 10 => { + entity.insert(OakChestBoatDamage(d.value.into_float()?)); + } + 11 => { + entity.insert(OakChestBoatPaddleLeft(d.value.into_boolean()?)); + } + 12 => { + entity.insert(OakChestBoatPaddleRight(d.value.into_boolean()?)); + } + 13 => { + entity.insert(OakChestBoatBubbleTime(d.value.into_int()?)); + } + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct OakChestBoatMetadataBundle { + _marker: OakChestBoat, + parent: AbstractEntityMetadataBundle, + oak_chest_boat_hurt: OakChestBoatHurt, + oak_chest_boat_hurtdir: OakChestBoatHurtdir, + oak_chest_boat_damage: OakChestBoatDamage, + oak_chest_boat_paddle_left: OakChestBoatPaddleLeft, + oak_chest_boat_paddle_right: OakChestBoatPaddleRight, + oak_chest_boat_bubble_time: OakChestBoatBubbleTime, +} +impl Default for OakChestBoatMetadataBundle { + fn default() -> Self { + Self { + _marker: OakChestBoat, + 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()), + }, + oak_chest_boat_hurt: OakChestBoatHurt(0), + oak_chest_boat_hurtdir: OakChestBoatHurtdir(1), + oak_chest_boat_damage: OakChestBoatDamage(0.0), + oak_chest_boat_paddle_left: OakChestBoatPaddleLeft(false), + oak_chest_boat_paddle_right: OakChestBoatPaddleRight(false), + oak_chest_boat_bubble_time: OakChestBoatBubbleTime(0), + } + } +} + #[derive(Component, Deref, DerefMut, Clone)] pub struct Trusting(pub bool); #[derive(Component)] @@ -5619,16 +7027,130 @@ impl Default for OcelotMetadataBundle { abstract_ageable_baby: AbstractAgeableBaby(false), }, }, - trusting: Trusting(false), + trusting: Trusting(false), + } + } +} + +#[derive(Component, Deref, DerefMut, Clone)] +pub struct OminousItemSpawnerItem(pub ItemSlot); +#[derive(Component)] +pub struct OminousItemSpawner; +impl OminousItemSpawner { + 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(OminousItemSpawnerItem(d.value.into_item_stack()?)); + } + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct OminousItemSpawnerMetadataBundle { + _marker: OminousItemSpawner, + parent: AbstractEntityMetadataBundle, + ominous_item_spawner_item: OminousItemSpawnerItem, +} +impl Default for OminousItemSpawnerMetadataBundle { + fn default() -> Self { + Self { + _marker: OminousItemSpawner, + 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()), + }, + ominous_item_spawner_item: OminousItemSpawnerItem(ItemSlot::Empty), + } + } +} + +#[derive(Component, Deref, DerefMut, Clone)] +pub struct PaintingVariant(pub azalea_registry::PaintingVariant); +#[derive(Component)] +pub struct Painting; +impl Painting { + 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(PaintingVariant(d.value.into_painting_variant()?)); + } + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct PaintingMetadataBundle { + _marker: Painting, + parent: AbstractEntityMetadataBundle, + painting_variant: PaintingVariant, +} +impl Default for PaintingMetadataBundle { + fn default() -> Self { + Self { + _marker: Painting, + 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()), + }, + painting_variant: PaintingVariant(azalea_registry::PaintingVariant::Kebab), } } } #[derive(Component, Deref, DerefMut, Clone)] -pub struct OminousItemSpawnerItem(pub ItemSlot); +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 OminousItemSpawner; -impl OminousItemSpawner { +pub struct PaleOakBoat; +impl PaleOakBoat { pub fn apply_metadata( entity: &mut bevy_ecs::system::EntityCommands, d: EntityDataItem, @@ -5636,7 +7158,22 @@ impl OminousItemSpawner { match d.index { 0..=7 => AbstractEntity::apply_metadata(entity, d)?, 8 => { - entity.insert(OminousItemSpawnerItem(d.value.into_item_stack()?)); + 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()?)); } _ => {} } @@ -5645,15 +7182,20 @@ impl OminousItemSpawner { } #[derive(Bundle)] -pub struct OminousItemSpawnerMetadataBundle { - _marker: OminousItemSpawner, +pub struct PaleOakBoatMetadataBundle { + _marker: PaleOakBoat, parent: AbstractEntityMetadataBundle, - ominous_item_spawner_item: OminousItemSpawnerItem, + 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 OminousItemSpawnerMetadataBundle { +impl Default for PaleOakBoatMetadataBundle { fn default() -> Self { Self { - _marker: OminousItemSpawner, + _marker: PaleOakBoat, parent: AbstractEntityMetadataBundle { _marker: AbstractEntity, on_fire: OnFire(false), @@ -5671,16 +7213,31 @@ impl Default for OminousItemSpawnerMetadataBundle { pose: Pose::default(), ticks_frozen: TicksFrozen(Default::default()), }, - ominous_item_spawner_item: OminousItemSpawnerItem(ItemSlot::Empty), + 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 PaintingVariant(pub azalea_registry::PaintingVariant); +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 Painting; -impl Painting { +pub struct PaleOakChestBoat; +impl PaleOakChestBoat { pub fn apply_metadata( entity: &mut bevy_ecs::system::EntityCommands, d: EntityDataItem, @@ -5688,7 +7245,22 @@ impl Painting { match d.index { 0..=7 => AbstractEntity::apply_metadata(entity, d)?, 8 => { - entity.insert(PaintingVariant(d.value.into_painting_variant()?)); + 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()?)); } _ => {} } @@ -5697,15 +7269,20 @@ impl Painting { } #[derive(Bundle)] -pub struct PaintingMetadataBundle { - _marker: Painting, +pub struct PaleOakChestBoatMetadataBundle { + _marker: PaleOakChestBoat, parent: AbstractEntityMetadataBundle, - painting_variant: PaintingVariant, + 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 PaintingMetadataBundle { +impl Default for PaleOakChestBoatMetadataBundle { fn default() -> Self { Self { - _marker: Painting, + _marker: PaleOakChestBoat, parent: AbstractEntityMetadataBundle { _marker: AbstractEntity, on_fire: OnFire(false), @@ -5723,7 +7300,12 @@ impl Default for PaintingMetadataBundle { pose: Pose::default(), ticks_frozen: TicksFrozen(Default::default()), }, - painting_variant: PaintingVariant(azalea_registry::PaintingVariant::Kebab), + 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), } } } @@ -6815,6 +8397,8 @@ impl Default for RavagerMetadataBundle { #[derive(Component, Deref, DerefMut, Clone)] pub struct SalmonFromBucket(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct SalmonKind(pub String); #[derive(Component)] pub struct Salmon; impl Salmon { @@ -6827,6 +8411,9 @@ impl Salmon { 16 => { entity.insert(SalmonFromBucket(d.value.into_boolean()?)); } + 17 => { + entity.insert(SalmonKind(d.value.into_string()?)); + } _ => {} } Ok(()) @@ -6838,6 +8425,7 @@ pub struct SalmonMetadataBundle { _marker: Salmon, parent: AbstractCreatureMetadataBundle, salmon_from_bucket: SalmonFromBucket, + salmon_kind: SalmonKind, } impl Default for SalmonMetadataBundle { fn default() -> Self { @@ -6881,6 +8469,7 @@ impl Default for SalmonMetadataBundle { }, }, salmon_from_bucket: SalmonFromBucket(false), + salmon_kind: SalmonKind(Default::default()), } } } @@ -7723,17 +9312,254 @@ impl Default for SpawnerMinecartMetadataBundle { } } -#[derive(Component, Deref, DerefMut, Clone, Copy)] -pub struct SpectralArrowCritArrow(pub bool); -#[derive(Component, Deref, DerefMut, Clone, Copy)] -pub struct SpectralArrowShotFromCrossbow(pub bool); -#[derive(Component, Deref, DerefMut, Clone, Copy)] -pub struct SpectralArrowNoPhysics(pub bool); +#[derive(Component, Deref, DerefMut, Clone, Copy)] +pub struct SpectralArrowCritArrow(pub bool); +#[derive(Component, Deref, DerefMut, Clone, Copy)] +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 { + 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 => { + let bitfield = d.value.into_byte()?; + entity.insert(SpectralArrowCritArrow(bitfield & 0x1 != 0)); + entity.insert(SpectralArrowNoPhysics(bitfield & 0x2 != 0)); + } + 9 => { + entity.insert(SpectralArrowPierceLevel(d.value.into_byte()?)); + } + 10 => { + entity.insert(SpectralArrowInGround(d.value.into_boolean()?)); + } + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct SpectralArrowMetadataBundle { + _marker: SpectralArrow, + parent: AbstractEntityMetadataBundle, + 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 { + Self { + _marker: SpectralArrow, + 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()), + }, + spectral_arrow_crit_arrow: SpectralArrowCritArrow(false), + spectral_arrow_no_physics: SpectralArrowNoPhysics(false), + spectral_arrow_pierce_level: SpectralArrowPierceLevel(0), + spectral_arrow_in_ground: SpectralArrowInGround(false), + } + } +} + +#[derive(Component)] +pub struct Spider; +impl Spider { + 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 => { + let bitfield = d.value.into_byte()?; + entity.insert(Climbing(bitfield & 0x1 != 0)); + } + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct SpiderMetadataBundle { + _marker: Spider, + parent: AbstractMonsterMetadataBundle, + climbing: Climbing, +} +impl Default for SpiderMetadataBundle { + fn default() -> Self { + Self { + _marker: Spider, + 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), + }, + }, + }, + climbing: Climbing(false), + } + } +} + +#[derive(Component, Deref, DerefMut, Clone)] +pub struct SpruceBoatHurt(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct SpruceBoatHurtdir(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct SpruceBoatDamage(pub f32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct SpruceBoatPaddleLeft(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct SpruceBoatPaddleRight(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct SpruceBoatBubbleTime(pub i32); +#[derive(Component)] +pub struct SpruceBoat; +impl SpruceBoat { + 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(SpruceBoatHurt(d.value.into_int()?)); + } + 9 => { + entity.insert(SpruceBoatHurtdir(d.value.into_int()?)); + } + 10 => { + entity.insert(SpruceBoatDamage(d.value.into_float()?)); + } + 11 => { + entity.insert(SpruceBoatPaddleLeft(d.value.into_boolean()?)); + } + 12 => { + entity.insert(SpruceBoatPaddleRight(d.value.into_boolean()?)); + } + 13 => { + entity.insert(SpruceBoatBubbleTime(d.value.into_int()?)); + } + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct SpruceBoatMetadataBundle { + _marker: SpruceBoat, + parent: AbstractEntityMetadataBundle, + spruce_boat_hurt: SpruceBoatHurt, + spruce_boat_hurtdir: SpruceBoatHurtdir, + spruce_boat_damage: SpruceBoatDamage, + spruce_boat_paddle_left: SpruceBoatPaddleLeft, + spruce_boat_paddle_right: SpruceBoatPaddleRight, + spruce_boat_bubble_time: SpruceBoatBubbleTime, +} +impl Default for SpruceBoatMetadataBundle { + fn default() -> Self { + Self { + _marker: SpruceBoat, + 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()), + }, + spruce_boat_hurt: SpruceBoatHurt(0), + spruce_boat_hurtdir: SpruceBoatHurtdir(1), + spruce_boat_damage: SpruceBoatDamage(0.0), + spruce_boat_paddle_left: SpruceBoatPaddleLeft(false), + spruce_boat_paddle_right: SpruceBoatPaddleRight(false), + spruce_boat_bubble_time: SpruceBoatBubbleTime(0), + } + } +} + #[derive(Component, Deref, DerefMut, Clone)] -pub struct SpectralArrowPierceLevel(pub u8); +pub struct SpruceChestBoatHurt(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct SpruceChestBoatHurtdir(pub i32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct SpruceChestBoatDamage(pub f32); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct SpruceChestBoatPaddleLeft(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct SpruceChestBoatPaddleRight(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct SpruceChestBoatBubbleTime(pub i32); #[derive(Component)] -pub struct SpectralArrow; -impl SpectralArrow { +pub struct SpruceChestBoat; +impl SpruceChestBoat { pub fn apply_metadata( entity: &mut bevy_ecs::system::EntityCommands, d: EntityDataItem, @@ -7741,13 +9567,22 @@ impl SpectralArrow { match d.index { 0..=7 => AbstractEntity::apply_metadata(entity, d)?, 8 => { - let bitfield = d.value.into_byte()?; - entity.insert(SpectralArrowCritArrow(bitfield & 0x1 != 0)); - entity.insert(SpectralArrowShotFromCrossbow(bitfield & 0x4 != 0)); - entity.insert(SpectralArrowNoPhysics(bitfield & 0x2 != 0)); + entity.insert(SpruceChestBoatHurt(d.value.into_int()?)); } 9 => { - entity.insert(SpectralArrowPierceLevel(d.value.into_byte()?)); + entity.insert(SpruceChestBoatHurtdir(d.value.into_int()?)); + } + 10 => { + entity.insert(SpruceChestBoatDamage(d.value.into_float()?)); + } + 11 => { + entity.insert(SpruceChestBoatPaddleLeft(d.value.into_boolean()?)); + } + 12 => { + entity.insert(SpruceChestBoatPaddleRight(d.value.into_boolean()?)); + } + 13 => { + entity.insert(SpruceChestBoatBubbleTime(d.value.into_int()?)); } _ => {} } @@ -7756,18 +9591,20 @@ impl SpectralArrow { } #[derive(Bundle)] -pub struct SpectralArrowMetadataBundle { - _marker: SpectralArrow, +pub struct SpruceChestBoatMetadataBundle { + _marker: SpruceChestBoat, parent: AbstractEntityMetadataBundle, - spectral_arrow_crit_arrow: SpectralArrowCritArrow, - spectral_arrow_shot_from_crossbow: SpectralArrowShotFromCrossbow, - spectral_arrow_no_physics: SpectralArrowNoPhysics, - spectral_arrow_pierce_level: SpectralArrowPierceLevel, + spruce_chest_boat_hurt: SpruceChestBoatHurt, + spruce_chest_boat_hurtdir: SpruceChestBoatHurtdir, + spruce_chest_boat_damage: SpruceChestBoatDamage, + spruce_chest_boat_paddle_left: SpruceChestBoatPaddleLeft, + spruce_chest_boat_paddle_right: SpruceChestBoatPaddleRight, + spruce_chest_boat_bubble_time: SpruceChestBoatBubbleTime, } -impl Default for SpectralArrowMetadataBundle { +impl Default for SpruceChestBoatMetadataBundle { fn default() -> Self { Self { - _marker: SpectralArrow, + _marker: SpruceChestBoat, parent: AbstractEntityMetadataBundle { _marker: AbstractEntity, on_fire: OnFire(false), @@ -7785,27 +9622,25 @@ impl Default for SpectralArrowMetadataBundle { pose: Pose::default(), ticks_frozen: TicksFrozen(Default::default()), }, - spectral_arrow_crit_arrow: SpectralArrowCritArrow(false), - spectral_arrow_shot_from_crossbow: SpectralArrowShotFromCrossbow(false), - spectral_arrow_no_physics: SpectralArrowNoPhysics(false), - spectral_arrow_pierce_level: SpectralArrowPierceLevel(0), + spruce_chest_boat_hurt: SpruceChestBoatHurt(0), + spruce_chest_boat_hurtdir: SpruceChestBoatHurtdir(1), + spruce_chest_boat_damage: SpruceChestBoatDamage(0.0), + spruce_chest_boat_paddle_left: SpruceChestBoatPaddleLeft(false), + spruce_chest_boat_paddle_right: SpruceChestBoatPaddleRight(false), + spruce_chest_boat_bubble_time: SpruceChestBoatBubbleTime(0), } } } #[derive(Component)] -pub struct Spider; -impl Spider { +pub struct Squid; +impl Squid { 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 => { - let bitfield = d.value.into_byte()?; - entity.insert(Climbing(bitfield & 0x1 != 0)); - } + 0..=16 => AbstractAgeable::apply_metadata(entity, d)?, _ => {} } Ok(()) @@ -7813,17 +9648,16 @@ impl Spider { } #[derive(Bundle)] -pub struct SpiderMetadataBundle { - _marker: Spider, - parent: AbstractMonsterMetadataBundle, - climbing: Climbing, +pub struct SquidMetadataBundle { + _marker: Squid, + parent: AbstractAgeableMetadataBundle, } -impl Default for SpiderMetadataBundle { +impl Default for SquidMetadataBundle { fn default() -> Self { Self { - _marker: Spider, - parent: AbstractMonsterMetadataBundle { - _marker: AbstractMonster, + _marker: Squid, + parent: AbstractAgeableMetadataBundle { + _marker: AbstractAgeable, parent: AbstractCreatureMetadataBundle { _marker: AbstractCreature, parent: AbstractInsentientMetadataBundle { @@ -7861,72 +9695,7 @@ impl Default for SpiderMetadataBundle { aggressive: Aggressive(false), }, }, - }, - climbing: Climbing(false), - } - } -} - -#[derive(Component)] -pub struct Squid; -impl Squid { - pub fn apply_metadata( - entity: &mut bevy_ecs::system::EntityCommands, - d: EntityDataItem, - ) -> Result<(), UpdateMetadataError> { - match d.index { - 0..=15 => AbstractCreature::apply_metadata(entity, d)?, - _ => {} - } - Ok(()) - } -} - -#[derive(Bundle)] -pub struct SquidMetadataBundle { - _marker: Squid, - parent: AbstractCreatureMetadataBundle, -} -impl Default for SquidMetadataBundle { - fn default() -> Self { - Self { - _marker: Squid, - 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), - }, + abstract_ageable_baby: AbstractAgeableBaby(false), }, } } @@ -8577,12 +10346,12 @@ impl Default for TraderLlamaMetadataBundle { #[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct TridentCritArrow(pub bool); #[derive(Component, Deref, DerefMut, Clone, Copy)] -pub struct TridentShotFromCrossbow(pub bool); -#[derive(Component, Deref, DerefMut, Clone, Copy)] 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); @@ -8598,16 +10367,18 @@ impl Trident { 8 => { let bitfield = d.value.into_byte()?; entity.insert(TridentCritArrow(bitfield & 0x1 != 0)); - entity.insert(TridentShotFromCrossbow(bitfield & 0x4 != 0)); entity.insert(TridentNoPhysics(bitfield & 0x2 != 0)); } 9 => { 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()?)); } _ => {} @@ -8621,9 +10392,9 @@ pub struct TridentMetadataBundle { _marker: Trident, parent: AbstractEntityMetadataBundle, trident_crit_arrow: TridentCritArrow, - trident_shot_from_crossbow: TridentShotFromCrossbow, trident_no_physics: TridentNoPhysics, trident_pierce_level: TridentPierceLevel, + trident_in_ground: TridentInGround, loyalty: Loyalty, foil: Foil, } @@ -8649,9 +10420,9 @@ impl Default for TridentMetadataBundle { ticks_frozen: TicksFrozen(Default::default()), }, trident_crit_arrow: TridentCritArrow(false), - trident_shot_from_crossbow: TridentShotFromCrossbow(false), trident_no_physics: TridentNoPhysics(false), trident_pierce_level: TridentPierceLevel(0), + trident_in_ground: TridentInGround(false), loyalty: Loyalty(0), foil: Foil(false), } @@ -8841,10 +10612,10 @@ impl Default for TurtleMetadataBundle { abstract_ageable_baby: AbstractAgeableBaby(false), }, }, - home_pos: HomePos(Default::default()), + home_pos: HomePos(BlockPos::new(0, 0, 0)), has_egg: HasEgg(false), laying_egg: LayingEgg(false), - travel_pos: TravelPos(Default::default()), + travel_pos: TravelPos(BlockPos::new(0, 0, 0)), going_home: GoingHome(false), travelling: Travelling(false), } @@ -10782,6 +12553,16 @@ pub fn apply_metadata( items: Vec, ) -> Result<(), UpdateMetadataError> { match entity_kind { + azalea_registry::EntityKind::AcaciaBoat => { + for d in items { + AcaciaBoat::apply_metadata(entity, d)?; + } + } + azalea_registry::EntityKind::AcaciaChestBoat => { + for d in items { + AcaciaChestBoat::apply_metadata(entity, d)?; + } + } azalea_registry::EntityKind::Allay => { for d in items { Allay::apply_metadata(entity, d)?; @@ -10812,6 +12593,16 @@ pub fn apply_metadata( Axolotl::apply_metadata(entity, d)?; } } + azalea_registry::EntityKind::BambooChestRaft => { + for d in items { + BambooChestRaft::apply_metadata(entity, d)?; + } + } + azalea_registry::EntityKind::BambooRaft => { + for d in items { + BambooRaft::apply_metadata(entity, d)?; + } + } azalea_registry::EntityKind::Bat => { for d in items { Bat::apply_metadata(entity, d)?; @@ -10822,6 +12613,16 @@ pub fn apply_metadata( Bee::apply_metadata(entity, d)?; } } + azalea_registry::EntityKind::BirchBoat => { + for d in items { + BirchBoat::apply_metadata(entity, d)?; + } + } + azalea_registry::EntityKind::BirchChestBoat => { + for d in items { + BirchChestBoat::apply_metadata(entity, d)?; + } + } azalea_registry::EntityKind::Blaze => { for d in items { Blaze::apply_metadata(entity, d)?; @@ -10832,11 +12633,6 @@ pub fn apply_metadata( BlockDisplay::apply_metadata(entity, d)?; } } - azalea_registry::EntityKind::Boat => { - for d in items { - Boat::apply_metadata(entity, d)?; - } - } azalea_registry::EntityKind::Bogged => { for d in items { Bogged::apply_metadata(entity, d)?; @@ -10867,9 +12663,14 @@ pub fn apply_metadata( CaveSpider::apply_metadata(entity, d)?; } } - azalea_registry::EntityKind::ChestBoat => { + azalea_registry::EntityKind::CherryBoat => { + for d in items { + CherryBoat::apply_metadata(entity, d)?; + } + } + azalea_registry::EntityKind::CherryChestBoat => { for d in items { - ChestBoat::apply_metadata(entity, d)?; + CherryChestBoat::apply_metadata(entity, d)?; } } azalea_registry::EntityKind::ChestMinecart => { @@ -10897,11 +12698,31 @@ 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)?; } } + azalea_registry::EntityKind::DarkOakBoat => { + for d in items { + DarkOakBoat::apply_metadata(entity, d)?; + } + } + azalea_registry::EntityKind::DarkOakChestBoat => { + for d in items { + DarkOakChestBoat::apply_metadata(entity, d)?; + } + } azalea_registry::EntityKind::Dolphin => { for d in items { Dolphin::apply_metadata(entity, d)?; @@ -11097,6 +12918,16 @@ pub fn apply_metadata( ItemFrame::apply_metadata(entity, d)?; } } + azalea_registry::EntityKind::JungleBoat => { + for d in items { + JungleBoat::apply_metadata(entity, d)?; + } + } + azalea_registry::EntityKind::JungleChestBoat => { + for d in items { + JungleChestBoat::apply_metadata(entity, d)?; + } + } azalea_registry::EntityKind::LeashKnot => { for d in items { LeashKnot::apply_metadata(entity, d)?; @@ -11122,6 +12953,16 @@ pub fn apply_metadata( MagmaCube::apply_metadata(entity, d)?; } } + azalea_registry::EntityKind::MangroveBoat => { + for d in items { + MangroveBoat::apply_metadata(entity, d)?; + } + } + azalea_registry::EntityKind::MangroveChestBoat => { + for d in items { + MangroveChestBoat::apply_metadata(entity, d)?; + } + } azalea_registry::EntityKind::Marker => { for d in items { Marker::apply_metadata(entity, d)?; @@ -11142,6 +12983,16 @@ pub fn apply_metadata( Mule::apply_metadata(entity, d)?; } } + azalea_registry::EntityKind::OakBoat => { + for d in items { + OakBoat::apply_metadata(entity, d)?; + } + } + azalea_registry::EntityKind::OakChestBoat => { + for d in items { + OakChestBoat::apply_metadata(entity, d)?; + } + } azalea_registry::EntityKind::Ocelot => { for d in items { Ocelot::apply_metadata(entity, d)?; @@ -11157,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)?; @@ -11297,6 +13158,16 @@ pub fn apply_metadata( Spider::apply_metadata(entity, d)?; } } + azalea_registry::EntityKind::SpruceBoat => { + for d in items { + SpruceBoat::apply_metadata(entity, d)?; + } + } + azalea_registry::EntityKind::SpruceChestBoat => { + for d in items { + SpruceChestBoat::apply_metadata(entity, d)?; + } + } azalea_registry::EntityKind::Squid => { for d in items { Squid::apply_metadata(entity, d)?; @@ -11441,6 +13312,12 @@ pub fn apply_default_metadata( kind: azalea_registry::EntityKind, ) { match kind { + azalea_registry::EntityKind::AcaciaBoat => { + entity.insert(AcaciaBoatMetadataBundle::default()); + } + azalea_registry::EntityKind::AcaciaChestBoat => { + entity.insert(AcaciaChestBoatMetadataBundle::default()); + } azalea_registry::EntityKind::Allay => { entity.insert(AllayMetadataBundle::default()); } @@ -11459,21 +13336,30 @@ pub fn apply_default_metadata( azalea_registry::EntityKind::Axolotl => { entity.insert(AxolotlMetadataBundle::default()); } + azalea_registry::EntityKind::BambooChestRaft => { + entity.insert(BambooChestRaftMetadataBundle::default()); + } + azalea_registry::EntityKind::BambooRaft => { + entity.insert(BambooRaftMetadataBundle::default()); + } azalea_registry::EntityKind::Bat => { entity.insert(BatMetadataBundle::default()); } azalea_registry::EntityKind::Bee => { entity.insert(BeeMetadataBundle::default()); } + azalea_registry::EntityKind::BirchBoat => { + entity.insert(BirchBoatMetadataBundle::default()); + } + azalea_registry::EntityKind::BirchChestBoat => { + entity.insert(BirchChestBoatMetadataBundle::default()); + } azalea_registry::EntityKind::Blaze => { entity.insert(BlazeMetadataBundle::default()); } azalea_registry::EntityKind::BlockDisplay => { entity.insert(BlockDisplayMetadataBundle::default()); } - azalea_registry::EntityKind::Boat => { - entity.insert(BoatMetadataBundle::default()); - } azalea_registry::EntityKind::Bogged => { entity.insert(BoggedMetadataBundle::default()); } @@ -11492,8 +13378,11 @@ pub fn apply_default_metadata( azalea_registry::EntityKind::CaveSpider => { entity.insert(CaveSpiderMetadataBundle::default()); } - azalea_registry::EntityKind::ChestBoat => { - entity.insert(ChestBoatMetadataBundle::default()); + azalea_registry::EntityKind::CherryBoat => { + entity.insert(CherryBoatMetadataBundle::default()); + } + azalea_registry::EntityKind::CherryChestBoat => { + entity.insert(CherryChestBoatMetadataBundle::default()); } azalea_registry::EntityKind::ChestMinecart => { entity.insert(ChestMinecartMetadataBundle::default()); @@ -11510,9 +13399,21 @@ 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()); } + azalea_registry::EntityKind::DarkOakBoat => { + entity.insert(DarkOakBoatMetadataBundle::default()); + } + azalea_registry::EntityKind::DarkOakChestBoat => { + entity.insert(DarkOakChestBoatMetadataBundle::default()); + } azalea_registry::EntityKind::Dolphin => { entity.insert(DolphinMetadataBundle::default()); } @@ -11630,6 +13531,12 @@ pub fn apply_default_metadata( azalea_registry::EntityKind::ItemFrame => { entity.insert(ItemFrameMetadataBundle::default()); } + azalea_registry::EntityKind::JungleBoat => { + entity.insert(JungleBoatMetadataBundle::default()); + } + azalea_registry::EntityKind::JungleChestBoat => { + entity.insert(JungleChestBoatMetadataBundle::default()); + } azalea_registry::EntityKind::LeashKnot => { entity.insert(LeashKnotMetadataBundle::default()); } @@ -11645,6 +13552,12 @@ pub fn apply_default_metadata( azalea_registry::EntityKind::MagmaCube => { entity.insert(MagmaCubeMetadataBundle::default()); } + azalea_registry::EntityKind::MangroveBoat => { + entity.insert(MangroveBoatMetadataBundle::default()); + } + azalea_registry::EntityKind::MangroveChestBoat => { + entity.insert(MangroveChestBoatMetadataBundle::default()); + } azalea_registry::EntityKind::Marker => { entity.insert(MarkerMetadataBundle::default()); } @@ -11657,6 +13570,12 @@ pub fn apply_default_metadata( azalea_registry::EntityKind::Mule => { entity.insert(MuleMetadataBundle::default()); } + azalea_registry::EntityKind::OakBoat => { + entity.insert(OakBoatMetadataBundle::default()); + } + azalea_registry::EntityKind::OakChestBoat => { + entity.insert(OakChestBoatMetadataBundle::default()); + } azalea_registry::EntityKind::Ocelot => { entity.insert(OcelotMetadataBundle::default()); } @@ -11666,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()); } @@ -11750,6 +13675,12 @@ pub fn apply_default_metadata( azalea_registry::EntityKind::Spider => { entity.insert(SpiderMetadataBundle::default()); } + azalea_registry::EntityKind::SpruceBoat => { + entity.insert(SpruceBoatMetadataBundle::default()); + } + azalea_registry::EntityKind::SpruceChestBoat => { + entity.insert(SpruceChestBoatMetadataBundle::default()); + } azalea_registry::EntityKind::Squid => { entity.insert(SquidMetadataBundle::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-inventory/src/components.rs b/azalea-inventory/src/components.rs index 9c9b90ade..d7adf2c90 100644 --- a/azalea-inventory/src/components.rs +++ b/azalea-inventory/src/components.rs @@ -5,8 +5,8 @@ use azalea_buf::{BufReadError, McBuf, McBufReadable, McBufWritable}; use azalea_chat::FormattedText; use azalea_core::{position::GlobalPos, resource_location::ResourceLocation}; use azalea_registry::{ - Attribute, Block, DataComponentKind, Enchantment, HolderSet, Item, MobEffect, Potion, - TrimMaterial, TrimPattern, + Attribute, Block, ConsumeEffectKind, DataComponentKind, Enchantment, EntityKind, HolderSet, + Item, MobEffect, Potion, SoundEvent, TrimMaterial, TrimPattern, }; use simdnbt::owned::{Nbt, NbtCompound}; use uuid::Uuid; @@ -51,6 +51,8 @@ pub fn from_kind( ) -> Result, BufReadError> { // if this is causing a compile-time error, look at DataComponents.java in the // decompiled vanilla code to see how to implement new components + + // note that this match statement is updated by genitemcomponents.py Ok(match kind { DataComponentKind::CustomData => Box::new(CustomData::read_from(buf)?), DataComponentKind::MaxStackSize => Box::new(MaxStackSize::read_from(buf)?), @@ -77,7 +79,6 @@ pub fn from_kind( } DataComponentKind::IntangibleProjectile => Box::new(IntangibleProjectile::read_from(buf)?), DataComponentKind::Food => Box::new(Food::read_from(buf)?), - DataComponentKind::FireResistant => Box::new(FireResistant::read_from(buf)?), DataComponentKind::Tool => Box::new(Tool::read_from(buf)?), DataComponentKind::StoredEnchantments => Box::new(StoredEnchantments::read_from(buf)?), DataComponentKind::DyedColor => Box::new(DyedColor::read_from(buf)?), @@ -116,7 +117,18 @@ pub fn from_kind( DataComponentKind::Bees => Box::new(Bees::read_from(buf)?), DataComponentKind::Lock => Box::new(Lock::read_from(buf)?), DataComponentKind::ContainerLoot => Box::new(ContainerLoot::read_from(buf)?), - DataComponentKind::JukeboxPlayable => todo!(), + DataComponentKind::JukeboxPlayable => Box::new(JukeboxPlayable::read_from(buf)?), + DataComponentKind::Consumable => Box::new(Consumable::read_from(buf)?), + DataComponentKind::UseRemainder => Box::new(UseRemainder::read_from(buf)?), + DataComponentKind::UseCooldown => Box::new(UseCooldown::read_from(buf)?), + DataComponentKind::Enchantable => Box::new(Enchantable::read_from(buf)?), + DataComponentKind::Repairable => Box::new(Repairable::read_from(buf)?), + DataComponentKind::ItemModel => Box::new(ItemModel::read_from(buf)?), + DataComponentKind::DamageResistant => Box::new(DamageResistant::read_from(buf)?), + DataComponentKind::Equippable => Box::new(Equippable::read_from(buf)?), + DataComponentKind::Glider => Box::new(Glider::read_from(buf)?), + DataComponentKind::TooltipStyle => Box::new(TooltipStyle::read_from(buf)?), + DataComponentKind::DeathProtection => Box::new(DeathProtection::read_from(buf)?), }) } @@ -356,10 +368,6 @@ pub struct Food { } impl DataComponent for Food {} -#[derive(Clone, PartialEq, McBuf)] -pub struct FireResistant; -impl DataComponent for FireResistant {} - #[derive(Clone, PartialEq, McBuf)] pub struct ToolRule { pub blocks: HolderSet, @@ -664,3 +672,111 @@ pub struct JukeboxPlayable { pub show_in_tooltip: bool, } impl DataComponent for JukeboxPlayable {} + +#[derive(Clone, PartialEq, McBuf)] +pub struct Consumable { + pub consume_seconds: f32, + pub animation: ItemUseAnimation, + pub sound: SoundEvent, + pub has_consume_particles: bool, + pub on_consuime_effects: Vec, +} +impl DataComponent for Consumable {} + +#[derive(Clone, Copy, PartialEq, McBuf)] +pub enum ItemUseAnimation { + None, + Eat, + Drink, + Block, + Bow, + Spear, + Crossbow, + Spyglass, + TootHorn, + Brush, +} + +#[derive(Clone, PartialEq, McBuf)] +pub struct UseRemainder { + pub convert_into: ItemSlot, +} +impl DataComponent for UseRemainder {} + +#[derive(Clone, PartialEq, McBuf)] +pub struct UseCooldown { + pub seconds: f32, + pub cooldown_group: Option, +} +impl DataComponent for UseCooldown {} + +#[derive(Clone, PartialEq, McBuf)] +pub struct Enchantable { + #[var] + pub value: u32, +} +impl DataComponent for Enchantable {} + +#[derive(Clone, PartialEq, McBuf)] +pub struct Repairable { + pub items: HolderSet, +} +impl DataComponent for Repairable {} + +#[derive(Clone, PartialEq, McBuf)] +pub struct ItemModel { + pub resource_location: ResourceLocation, +} +impl DataComponent for ItemModel {} + +#[derive(Clone, PartialEq, McBuf)] +pub struct DamageResistant { + // in the vanilla code this is + // ``` + // StreamCodec.composite( + // TagKey.streamCodec(Registries.DAMAGE_TYPE), DamageResistant::types, DamageResistant::new + // ); + // ``` + // i'm not entirely sure if this is meant to be a vec or something, i just made it a + // resourcelocation for now + pub types: ResourceLocation, +} +impl DataComponent for DamageResistant {} + +#[derive(Clone, PartialEq, McBuf)] +pub struct Equippable { + pub slot: EquipmentSlot, + pub equip_sound: SoundEvent, + pub model: Option, + pub allowed_entities: HolderSet, +} +impl DataComponent for Equippable {} + +#[derive(Clone, Copy, Debug, PartialEq, McBuf)] +pub enum EquipmentSlot { + Mainhand, + Offhand, + Hand, + Feet, + Legs, + Chest, + Head, + Armor, + Body, +} + +#[derive(Clone, PartialEq, McBuf)] +pub struct Glider; +impl DataComponent for Glider {} + +#[derive(Clone, PartialEq, McBuf)] +pub struct TooltipStyle { + pub resource_location: ResourceLocation, +} +impl DataComponent for TooltipStyle {} + +#[derive(Clone, PartialEq, McBuf)] +pub struct DeathProtection { + pub death_effects: Vec, +} +impl DataComponent for DeathProtection {} diff --git a/azalea-language/src/en_us.json b/azalea-language/src/en_us.json index 79e09dfd3..e1819511a 100755 --- a/azalea-language/src/en_us.json +++ b/azalea-language/src/en_us.json @@ -5,7 +5,6 @@ "addServer.add": "Done", "addServer.enterIp": "Server Address", "addServer.enterName": "Server Name", - "addServer.hideAddress": "Hide Address", "addServer.resourcePack": "Server Resource Packs", "addServer.resourcePack.disabled": "Disabled", "addServer.resourcePack.enabled": "Enabled", @@ -84,7 +83,7 @@ "advancements.adventure.trade.title": "What a Deal!", "advancements.adventure.trim_with_all_exclusive_armor_patterns.description": "Apply these smithing templates at least once: Spire, Snout, Rib, Ward, Silence, Vex, Tide, Wayfinder", "advancements.adventure.trim_with_all_exclusive_armor_patterns.title": "Smithing with Style", - "advancements.adventure.trim_with_any_armor_pattern.description": "Craft a trimmed armor at a Smithing Table", + "advancements.adventure.trim_with_any_armor_pattern.description": "Craft trimmed armor at a Smithing Table", "advancements.adventure.trim_with_any_armor_pattern.title": "Crafting a New Look", "advancements.adventure.two_birds_one_arrow.description": "Kill two Phantoms with a piercing Arrow", "advancements.adventure.two_birds_one_arrow.title": "Two Birds, One Arrow", @@ -155,7 +154,7 @@ "advancements.husbandry.plant_seed.title": "A Seedy Place", "advancements.husbandry.remove_wolf_armor.description": "Remove Wolf Armor from a Wolf using Shears", "advancements.husbandry.remove_wolf_armor.title": "Shear Brilliance", - "advancements.husbandry.repair_wolf_armor.description": "Repair a damaged Wolf Armor using Armadillo Scutes", + "advancements.husbandry.repair_wolf_armor.description": "Fully repair damaged Wolf Armor using Armadillo Scutes", "advancements.husbandry.repair_wolf_armor.title": "Good as New", "advancements.husbandry.ride_a_boat_with_a_goat.description": "Get in a Boat and float with a Goat", "advancements.husbandry.ride_a_boat_with_a_goat.title": "Whatever Floats Your Goat!", @@ -163,7 +162,7 @@ "advancements.husbandry.root.title": "Husbandry", "advancements.husbandry.safely_harvest_honey.description": "Use a Campfire to collect Honey from a Beehive using a Glass Bottle without aggravating the Bees", "advancements.husbandry.safely_harvest_honey.title": "Bee Our Guest", - "advancements.husbandry.silk_touch_nest.description": "Move a Bee Nest, with 3 Bees inside, using Silk Touch", + "advancements.husbandry.silk_touch_nest.description": "Move a Bee Nest or Beehive, with 3 Bees inside, using Silk Touch", "advancements.husbandry.silk_touch_nest.title": "Total Beelocation", "advancements.husbandry.tactical_fishing.description": "Catch a Fish... without a Fishing Rod!", "advancements.husbandry.tactical_fishing.title": "Tactical Fishing", @@ -262,8 +261,6 @@ "advancements.toast.challenge": "Challenge Complete!", "advancements.toast.goal": "Goal Reached!", "advancements.toast.task": "Advancement Made!", - "advMode.allEntities": "Use \"@e\" to target all entities", - "advMode.allPlayers": "Use \"@a\" to target all players", "advMode.command": "Console Command", "advMode.mode": "Mode", "advMode.mode.auto": "Repeat", @@ -273,12 +270,9 @@ "advMode.mode.redstoneTriggered": "Needs Redstone", "advMode.mode.sequence": "Chain", "advMode.mode.unconditional": "Unconditional", - "advMode.nearestPlayer": "Use \"@p\" to target nearest player", "advMode.notAllowed": "Must be an opped player in creative mode", "advMode.notEnabled": "Command blocks are not enabled on this server", "advMode.previousOutput": "Previous Output", - "advMode.randomPlayer": "Use \"@r\" to target random player", - "advMode.self": "Use \"@s\" to target the executing entity", "advMode.setCommand": "Set Console Command for Block", "advMode.setCommand.success": "Command set: %s", "advMode.trackOutput": "Track output", @@ -422,6 +416,19 @@ "attribute.modifier.take.0": "-%s %s", "attribute.modifier.take.1": "-%s%% %s", "attribute.modifier.take.2": "-%s%% %s", + "attribute.name.armor": "Armor", + "attribute.name.armor_toughness": "Armor Toughness", + "attribute.name.attack_damage": "Attack Damage", + "attribute.name.attack_knockback": "Attack Knockback", + "attribute.name.attack_speed": "Attack Speed", + "attribute.name.block_break_speed": "Block Break Speed", + "attribute.name.block_interaction_range": "Block Interaction Range", + "attribute.name.burning_time": "Burning Time", + "attribute.name.entity_interaction_range": "Entity Interaction Range", + "attribute.name.explosion_knockback_resistance": "Explosion Knockback Resistance", + "attribute.name.fall_damage_multiplier": "Fall Damage Multiplier", + "attribute.name.flying_speed": "Flying Speed", + "attribute.name.follow_range": "Mob Follow Range", "attribute.name.generic.armor": "Armor", "attribute.name.generic.armor_toughness": "Armor Toughness", "attribute.name.generic.attack_damage": "Attack Damage", @@ -447,7 +454,17 @@ "attribute.name.generic.scale": "Scale", "attribute.name.generic.step_height": "Step Height", "attribute.name.generic.water_movement_efficiency": "Water Movement Efficiency", + "attribute.name.gravity": "Gravity", "attribute.name.horse.jump_strength": "Horse Jump Strength", + "attribute.name.jump_strength": "Jump Strength", + "attribute.name.knockback_resistance": "Knockback Resistance", + "attribute.name.luck": "Luck", + "attribute.name.max_absorption": "Max Absorption", + "attribute.name.max_health": "Max Health", + "attribute.name.mining_efficiency": "Mining Efficiency", + "attribute.name.movement_efficiency": "Movement Efficiency", + "attribute.name.movement_speed": "Speed", + "attribute.name.oxygen_bonus": "Oxygen Bonus", "attribute.name.player.block_break_speed": "Block Break Speed", "attribute.name.player.block_interaction_range": "Block Interaction Range", "attribute.name.player.entity_interaction_range": "Entity Interaction Range", @@ -455,6 +472,15 @@ "attribute.name.player.sneaking_speed": "Sneaking Speed", "attribute.name.player.submerged_mining_speed": "Submerged Mining Speed", "attribute.name.player.sweeping_damage_ratio": "Sweeping Damage Ratio", + "attribute.name.safe_fall_distance": "Safe Fall Distance", + "attribute.name.scale": "Scale", + "attribute.name.sneaking_speed": "Sneaking Speed", + "attribute.name.spawn_reinforcements": "Zombie Reinforcements", + "attribute.name.step_height": "Step Height", + "attribute.name.submerged_mining_speed": "Submerged Mining Speed", + "attribute.name.sweeping_damage_ratio": "Sweeping Damage Ratio", + "attribute.name.tempt_range": "Mob Tempt Range", + "attribute.name.water_movement_efficiency": "Water Movement Efficiency", "attribute.name.zombie.spawn_reinforcements": "Zombie Reinforcements", "biome.minecraft.badlands": "Badlands", "biome.minecraft.bamboo_jungle": "Bamboo Jungle", @@ -495,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", @@ -1440,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", @@ -1854,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", @@ -1937,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", @@ -2120,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", @@ -2304,7 +2355,7 @@ "chat.link.confirmTrusted": "Do you want to open this link or copy it to your clipboard?", "chat.link.open": "Open in Browser", "chat.link.warning": "Never open links from people that you don't trust!", - "chat.queue": "[+%s pending lines]", + "chat.queue": "[+%s pending line(s)]", "chat.square_brackets": "[%s]", "chat.tag.error": "Server sent invalid message.", "chat.tag.modified": "Message modified by the server. Original:", @@ -2354,7 +2405,6 @@ "command.forkLimit": "Maximum number of contexts (%s) reached", "command.unknown.argument": "Incorrect argument for command", "command.unknown.command": "Unknown or incomplete command, see below for error", - "commands.advancement.advancementNotFound": "No advancement was found by the name '%1$s'", "commands.advancement.criterionNotFound": "The advancement %1$s does not contain the criterion '%2$s'", "commands.advancement.grant.criterion.to.many.failure": "Couldn't grant criterion '%s' of advancement %s to %s players as they already have it", "commands.advancement.grant.criterion.to.many.success": "Granted criterion '%s' of advancement %s to %s players", @@ -2478,7 +2528,7 @@ "commands.debug.function.traceFailed": "Failed to trace function", "commands.debug.notRunning": "The tick profiler hasn't started", "commands.debug.started": "Started tick profiling", - "commands.debug.stopped": "Stopped tick profiling after %s seconds and %s ticks (%s ticks per second)", + "commands.debug.stopped": "Stopped tick profiling after %s second(s) and %s tick(s) (%s tick(s) per second)", "commands.defaultgamemode.success": "The default game mode is now %s", "commands.deop.failed": "Nothing changed. The player is not an operator", "commands.deop.success": "Made %s no longer a server operator", @@ -2487,6 +2537,7 @@ "commands.difficulty.success": "The difficulty has been set to %s", "commands.drop.no_held_items": "Entity can't hold any items", "commands.drop.no_loot_table": "Entity %s has no loot table", + "commands.drop.no_loot_table.block": "Block %s has no loot table", "commands.drop.success.multiple": "Dropped %s items", "commands.drop.success.multiple_with_table": "Dropped %s items from loot table %s", "commands.drop.success.single": "Dropped %s %s", @@ -2649,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", @@ -2659,7 +2711,8 @@ "commands.schedule.cleared.failure": "No schedules with id %s", "commands.schedule.cleared.success": "Removed %s schedule(s) with id %s", "commands.schedule.created.function": "Scheduled function '%s' in %s tick(s) at gametime %s", - "commands.schedule.created.tag": "Scheduled tag '%s' in %s ticks at gametime %s", + "commands.schedule.created.tag": "Scheduled tag '%s' in %s tick(s) at gametime %s", + "commands.schedule.macro": "Can't schedule a macro", "commands.schedule.same_tick": "Can't schedule for current tick", "commands.scoreboard.objectives.add.duplicate": "An objective already exists by that name", "commands.scoreboard.objectives.add.success": "Created new objective %s", @@ -2711,6 +2764,7 @@ "commands.setblock.failed": "Could not set the block", "commands.setblock.success": "Changed the block at %s, %s, %s", "commands.setidletimeout.success": "The player idle timeout is now %s minute(s)", + "commands.setidletimeout.success.disabled": "The player idle timeout is now disabled", "commands.setworldspawn.failure.not_overworld": "Can only set the world spawn for overworld", "commands.setworldspawn.success": "Set the world spawn point to %s, %s, %s [%s]", "commands.spawnpoint.success.multiple": "Set spawn point to %s, %s, %s [%s] in %s for %s players", @@ -2722,8 +2776,8 @@ "commands.spreadplayers.failed.entities": "Could not spread %s entity/entities around %s, %s (too many entities for space - try using spread of at most %s)", "commands.spreadplayers.failed.invalid.height": "Invalid maxHeight %s; expected higher than world minimum %s", "commands.spreadplayers.failed.teams": "Could not spread %s team(s) around %s, %s (too many entities for space - try using spread of at most %s)", - "commands.spreadplayers.success.entities": "Spread %s player(s) around %s, %s with an average distance of %s blocks apart", - "commands.spreadplayers.success.teams": "Spread %s team(s) around %s, %s with an average distance of %s blocks apart", + "commands.spreadplayers.success.entities": "Spread %s entity/entities around %s, %s with an average distance of %s block(s) apart", + "commands.spreadplayers.success.teams": "Spread %s team(s) around %s, %s with an average distance of %s block(s) apart", "commands.stop.stopping": "Stopping the server", "commands.stopsound.success.source.any": "Stopped all '%s' sounds", "commands.stopsound.success.source.sound": "Stopped sound '%s' on source '%s'", @@ -2867,6 +2921,8 @@ "connect.transferring": "Transferring to new server...", "container.barrel": "Barrel", "container.beacon": "Beacon", + "container.beehive.bees": "Bees: %s / %s", + "container.beehive.honey": "Honey: %s / %s", "container.blast_furnace": "Blast Furnace", "container.brewing": "Brewing Stand", "container.cartography_table": "Cartography Table", @@ -2913,68 +2969,6 @@ "controls.title": "Controls", "createWorld.customize.buffet.biome": "Please select a biome", "createWorld.customize.buffet.title": "Buffet world customization", - "createWorld.customize.custom.baseSize": "Depth Base Size", - "createWorld.customize.custom.biomeDepthOffset": "Biome Depth Offset", - "createWorld.customize.custom.biomeDepthWeight": "Biome Depth Weight", - "createWorld.customize.custom.biomeScaleOffset": "Biome Scale Offset", - "createWorld.customize.custom.biomeScaleWeight": "Biome Scale Weight", - "createWorld.customize.custom.biomeSize": "Biome Size", - "createWorld.customize.custom.center": "Center Height", - "createWorld.customize.custom.confirm1": "This will overwrite your current", - "createWorld.customize.custom.confirm2": "settings and cannot be undone.", - "createWorld.customize.custom.confirmTitle": "Warning!", - "createWorld.customize.custom.coordinateScale": "Coordinate Scale", - "createWorld.customize.custom.count": "Spawn Tries", - "createWorld.customize.custom.defaults": "Defaults", - "createWorld.customize.custom.depthNoiseScaleExponent": "Depth Noise Exponent", - "createWorld.customize.custom.depthNoiseScaleX": "Depth Noise Scale X", - "createWorld.customize.custom.depthNoiseScaleZ": "Depth Noise Scale Z", - "createWorld.customize.custom.dungeonChance": "Dungeon Count", - "createWorld.customize.custom.fixedBiome": "Biome", - "createWorld.customize.custom.heightScale": "Height Scale", - "createWorld.customize.custom.lavaLakeChance": "Lava Lake Rarity", - "createWorld.customize.custom.lowerLimitScale": "Lower Limit Scale", - "createWorld.customize.custom.mainNoiseScaleX": "Main Noise Scale X", - "createWorld.customize.custom.mainNoiseScaleY": "Main Noise Scale Y", - "createWorld.customize.custom.mainNoiseScaleZ": "Main Noise Scale Z", - "createWorld.customize.custom.maxHeight": "Max. Height", - "createWorld.customize.custom.minHeight": "Min. Height", - "createWorld.customize.custom.next": "Next Page", - "createWorld.customize.custom.page0": "Basic Settings", - "createWorld.customize.custom.page1": "Ore Settings", - "createWorld.customize.custom.page2": "Advanced Settings (Expert Users Only!)", - "createWorld.customize.custom.page3": "Extra Advanced Settings (Expert Users Only!)", - "createWorld.customize.custom.preset.caveChaos": "Caves of Chaos", - "createWorld.customize.custom.preset.caveDelight": "Caver's Delight", - "createWorld.customize.custom.preset.drought": "Drought", - "createWorld.customize.custom.preset.goodLuck": "Good Luck", - "createWorld.customize.custom.preset.isleLand": "Isle Land", - "createWorld.customize.custom.preset.mountains": "Mountain Madness", - "createWorld.customize.custom.preset.waterWorld": "Water World", - "createWorld.customize.custom.presets": "Presets", - "createWorld.customize.custom.presets.title": "Customize World Presets", - "createWorld.customize.custom.prev": "Previous Page", - "createWorld.customize.custom.randomize": "Randomize", - "createWorld.customize.custom.riverSize": "River Size", - "createWorld.customize.custom.seaLevel": "Sea Level", - "createWorld.customize.custom.size": "Spawn Size", - "createWorld.customize.custom.spread": "Spread Height", - "createWorld.customize.custom.stretchY": "Height Stretch", - "createWorld.customize.custom.upperLimitScale": "Upper Limit Scale", - "createWorld.customize.custom.useCaves": "Caves", - "createWorld.customize.custom.useDungeons": "Dungeons", - "createWorld.customize.custom.useLavaLakes": "Lava Lakes", - "createWorld.customize.custom.useLavaOceans": "Lava Oceans", - "createWorld.customize.custom.useMansions": "Woodland Mansions", - "createWorld.customize.custom.useMineShafts": "Mineshafts", - "createWorld.customize.custom.useMonuments": "Ocean Monuments", - "createWorld.customize.custom.useOceanRuins": "Ocean Ruins", - "createWorld.customize.custom.useRavines": "Ravines", - "createWorld.customize.custom.useStrongholds": "Strongholds", - "createWorld.customize.custom.useTemples": "Temples", - "createWorld.customize.custom.useVillages": "Villages", - "createWorld.customize.custom.useWaterLakes": "Water Lakes", - "createWorld.customize.custom.waterLakeChance": "Water Lake Rarity", "createWorld.customize.flat.height": "Height", "createWorld.customize.flat.layer": "%s", "createWorld.customize.flat.layer.bottom": "Bottom - %s", @@ -2997,6 +2991,10 @@ "credits_and_attribution.screen.title": "Credits and Attribution", "dataPack.bundle.description": "Enables experimental Bundle item", "dataPack.bundle.name": "Bundles", + "dataPack.minecart_improvements.description": "Improved movement for Minecarts", + "dataPack.minecart_improvements.name": "Minecart Improvements", + "dataPack.redstone_experiments.description": "Experimental Redstone changes", + "dataPack.redstone_experiments.name": "Redstone Experiments", "dataPack.title": "Select Data Packs", "dataPack.trade_rebalance.description": "Updated trades for Villagers", "dataPack.trade_rebalance.name": "Villager Trade Rebalance", @@ -3010,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.", @@ -3065,6 +3065,8 @@ "death.attack.lava.player": "%1$s tried to swim in lava to escape %2$s", "death.attack.lightningBolt": "%1$s was struck by lightning", "death.attack.lightningBolt.player": "%1$s was struck by lightning while fighting %2$s", + "death.attack.mace_smash": "%1$s was smashed by %2$s", + "death.attack.mace_smash.item": "%1$s was smashed by %2$s with %3$s", "death.attack.magic": "%1$s was killed by magic", "death.attack.magic.player": "%1$s was killed by magic while trying to escape %2$s", "death.attack.message_too_long": "Actually, the message was too long to deliver fully. Sorry! Here's a stripped version: %s", @@ -3183,23 +3185,17 @@ "demo.reminder": "The demo time has expired. Buy the game to continue or start a new world!", "difficulty.lock.question": "Are you sure you want to lock the difficulty of this world? This will set this world to always be %1$s, and you will never be able to change that again.", "difficulty.lock.title": "Lock World Difficulty", - "disconnect.closed": "Connection closed", - "disconnect.disconnected": "Disconnected by Server", "disconnect.endOfStream": "End of stream", "disconnect.exceeded_packet_rate": "Kicked for exceeding packet rate limit", "disconnect.genericReason": "%s", "disconnect.ignoring_status_request": "Ignoring status request", - "disconnect.kicked": "Was kicked from the game", - "disconnect.loginFailed": "Failed to log in", "disconnect.loginFailedInfo": "Failed to log in: %s", "disconnect.loginFailedInfo.insufficientPrivileges": "Multiplayer is disabled. Please check your Microsoft account settings.", "disconnect.loginFailedInfo.invalidSession": "Invalid session (Try restarting your game and the launcher)", "disconnect.loginFailedInfo.serversUnavailable": "The authentication servers are currently not reachable. Please try again.", "disconnect.loginFailedInfo.userBanned": "You are banned from playing online", "disconnect.lost": "Connection Lost", - "disconnect.overflow": "Buffer overflow", "disconnect.packetError": "Network Protocol Error", - "disconnect.quitting": "Quitting", "disconnect.spam": "Kicked for spamming", "disconnect.timeout": "Timed out", "disconnect.transfer": "Transferred to another server", @@ -3304,14 +3300,20 @@ "enchantment.minecraft.unbreaking": "Unbreaking", "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.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_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.blaze": "Blaze", "entity.minecraft.block_display": "Block Display", "entity.minecraft.boat": "Boat", @@ -3321,13 +3323,19 @@ "entity.minecraft.camel": "Camel", "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.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.dolphin": "Dolphin", "entity.minecraft.donkey": "Donkey", "entity.minecraft.dragon_fireball": "Dragon Fireball", @@ -3368,19 +3376,27 @@ "entity.minecraft.item": "Item", "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.killer_bunny": "The Killer Bunny", "entity.minecraft.leash_knot": "Leash Knot", "entity.minecraft.lightning_bolt": "Lightning Bolt", "entity.minecraft.llama": "Llama", "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.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.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", @@ -3409,6 +3425,8 @@ "entity.minecraft.spawner_minecart": "Minecart with Monster Spawner", "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.squid": "Squid", "entity.minecraft.stray": "Stray", "entity.minecraft.strider": "Strider", @@ -3538,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", @@ -3580,6 +3599,8 @@ "gamerule.maxCommandForkCount": "Command context limit", "gamerule.maxCommandForkCount.description": "Maximum number of contexts that can be used by commands like 'execute as'.", "gamerule.maxEntityCramming": "Entity cramming threshold", + "gamerule.minecartMaxSpeed": "Minecart max speed", + "gamerule.minecartMaxSpeed.description": "Maximum default speed of a moving Minecart on land.", "gamerule.mobExplosionDropDecay": "In mob explosions, some blocks won't drop their loot", "gamerule.mobExplosionDropDecay.description": "Some of the drops from blocks destroyed by explosions caused by mobs are lost in the explosion.", "gamerule.mobGriefing": "Allow destructive mob actions", @@ -3638,8 +3659,9 @@ "gui.abuseReport.error.title": "Problem sending your report", "gui.abuseReport.message": "Where did you observe the bad behavior?\nThis will help us in researching your case.", "gui.abuseReport.more_comments": "Please describe what happened:", + "gui.abuseReport.name.comment_box_label": "Please describe why you want to report this name:", "gui.abuseReport.name.reporting": "You are reporting \"%s\".", - "gui.abuseReport.name.title": "Report Player Name", + "gui.abuseReport.name.title": "Report Inappropriate Player Name", "gui.abuseReport.observed_what": "Why are you reporting this?", "gui.abuseReport.read_info": "Learn About Reporting", "gui.abuseReport.reason.alcohol_tobacco_drugs": "Drugs or alcohol", @@ -3663,10 +3685,12 @@ "gui.abuseReport.reason.non_consensual_intimate_imagery.description": "Someone is talking about, sharing, or otherwise promoting private and intimate images.", "gui.abuseReport.reason.self_harm_or_suicide": "Self-harm or suicide", "gui.abuseReport.reason.self_harm_or_suicide.description": "Someone is threatening to harm themselves in real life or talking about harming themselves in real life.", + "gui.abuseReport.reason.sexually_inappropriate": "Sexually inappropriate", + "gui.abuseReport.reason.sexually_inappropriate.description": "Skins that are graphic in nature relating to sexual acts, sexual organs, and sexual violence.", "gui.abuseReport.reason.terrorism_or_violent_extremism": "Terrorism or violent extremism", "gui.abuseReport.reason.terrorism_or_violent_extremism.description": "Someone is talking about, promoting, or threatening to commit acts of terrorism or violent extremism for political, religious, ideological, or other reasons.", "gui.abuseReport.reason.title": "Select Report Category", - "gui.abuseReport.report_sent_msg": "We\u2019ve successfully received your report. Thank you!\n\nOur team will review it as soon as possible.", + "gui.abuseReport.report_sent_msg": "We've successfully received your report. Thank you!\n\nOur team will review it as soon as possible.", "gui.abuseReport.select_reason": "Select Report Category", "gui.abuseReport.send": "Send Report", "gui.abuseReport.send.comment_too_long": "Please shorten the comment", @@ -3689,11 +3713,11 @@ "gui.all": "All", "gui.back": "Back", "gui.banned.description": "%s\n\n%s\n\nLearn more at the following link: %s", - "gui.banned.description.permanent": "Your account is permanently banned, which means you can\u2019t play online or join Realms.", + "gui.banned.description.permanent": "Your account is permanently banned, which means you can't play online or join Realms.", "gui.banned.description.reason": "We recently received a report for bad behavior by your account. Our moderators have now reviewed your case and identified it as %s, which goes against the Minecraft Community Standards.", "gui.banned.description.reason_id": "Code: %s", "gui.banned.description.reason_id_message": "Code: %s - %s", - "gui.banned.description.temporary": "%s Until then, you can\u2019t play online or join Realms.", + "gui.banned.description.temporary": "%s Until then, you can't play online or join Realms.", "gui.banned.description.temporary.duration": "Your account is temporarily suspended and will be reactivated in %s.", "gui.banned.description.unknownreason": "We recently received a report for bad behavior by your account. Our moderators have now reviewed your case and identified that it goes against the Minecraft Community Standards.", "gui.banned.name.description": "Your current name - \"%s\" - violates our Community Standards. You can play singleplayer, but will need to change your name to play online.\n\nLearn more or submit a case review at the following link: %s", @@ -3732,7 +3756,7 @@ "gui.chatReport.more_comments": "Please describe what happened:", "gui.chatReport.observed_what": "Why are you reporting this?", "gui.chatReport.read_info": "Learn About Reporting", - "gui.chatReport.report_sent_msg": "We\u2019ve successfully received your report. Thank you!\n\nOur team will review it as soon as possible.", + "gui.chatReport.report_sent_msg": "We've successfully received your report. Thank you!\n\nOur team will review it as soon as possible.", "gui.chatReport.select_chat": "Select Chat Messages to Report", "gui.chatReport.select_reason": "Select Report Category", "gui.chatReport.selected_chat": "%s Chat Message(s) Selected to Report", @@ -3755,7 +3779,7 @@ "gui.done": "Done", "gui.down": "Down", "gui.entity_tooltip.type": "Type: %s", - "gui.fileDropFailure.detail": "Rejected %d files", + "gui.fileDropFailure.detail": "Rejected %s files", "gui.fileDropFailure.title": "Failed to add files", "gui.hours": "%s hour(s)", "gui.loadingMinecraft": "Loading Minecraft", @@ -3866,18 +3890,22 @@ "item.minecraft.beetroot_soup": "Beetroot Soup", "item.minecraft.birch_boat": "Birch Boat", "item.minecraft.birch_chest_boat": "Birch Boat with Chest", + "item.minecraft.black_bundle": "Black Bundle", "item.minecraft.black_dye": "Black Dye", "item.minecraft.blade_pottery_shard": "Blade Pottery Shard", "item.minecraft.blade_pottery_sherd": "Blade Pottery Sherd", "item.minecraft.blaze_powder": "Blaze Powder", "item.minecraft.blaze_rod": "Blaze Rod", "item.minecraft.blaze_spawn_egg": "Blaze Spawn Egg", + "item.minecraft.blue_bundle": "Blue Bundle", "item.minecraft.blue_dye": "Blue Dye", "item.minecraft.bogged_spawn_egg": "Bogged Spawn Egg", "item.minecraft.bolt_armor_trim_smithing_template": "Smithing Template", + "item.minecraft.bolt_armor_trim_smithing_template.new": "Bolt Armor Trim", "item.minecraft.bone": "Bone", "item.minecraft.bone_meal": "Bone Meal", "item.minecraft.book": "Book", + "item.minecraft.bordure_indented_banner_pattern": "Bordure Indented Banner Pattern", "item.minecraft.bow": "Bow", "item.minecraft.bowl": "Bowl", "item.minecraft.bread": "Bread", @@ -3887,10 +3915,14 @@ "item.minecraft.brewer_pottery_sherd": "Brewer Pottery Sherd", "item.minecraft.brewing_stand": "Brewing Stand", "item.minecraft.brick": "Brick", + "item.minecraft.brown_bundle": "Brown Bundle", "item.minecraft.brown_dye": "Brown Dye", "item.minecraft.brush": "Brush", "item.minecraft.bucket": "Bucket", "item.minecraft.bundle": "Bundle", + "item.minecraft.bundle.empty": "Empty", + "item.minecraft.bundle.empty.description": "Can hold a mixed stack of items", + "item.minecraft.bundle.full": "Full", "item.minecraft.bundle.fullness": "%s/%s", "item.minecraft.burn_pottery_shard": "Burn Pottery Shard", "item.minecraft.burn_pottery_sherd": "Burn Pottery Sherd", @@ -3915,6 +3947,7 @@ "item.minecraft.clock": "Clock", "item.minecraft.coal": "Coal", "item.minecraft.coast_armor_trim_smithing_template": "Smithing Template", + "item.minecraft.coast_armor_trim_smithing_template.new": "Coast Armor Trim", "item.minecraft.cocoa_beans": "Cocoa Beans", "item.minecraft.cod": "Raw Cod", "item.minecraft.cod_bucket": "Bucket of Cod", @@ -3931,11 +3964,14 @@ "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", "item.minecraft.creeper_spawn_egg": "Creeper Spawn Egg", "item.minecraft.crossbow": "Crossbow", "item.minecraft.crossbow.projectile": "Projectile:", + "item.minecraft.cyan_bundle": "Cyan Bundle", "item.minecraft.cyan_dye": "Cyan Dye", "item.minecraft.danger_pottery_shard": "Danger Pottery Shard", "item.minecraft.danger_pottery_sherd": "Danger Pottery Sherd", @@ -3964,6 +4000,7 @@ "item.minecraft.dried_kelp": "Dried Kelp", "item.minecraft.drowned_spawn_egg": "Drowned Spawn Egg", "item.minecraft.dune_armor_trim_smithing_template": "Smithing Template", + "item.minecraft.dune_armor_trim_smithing_template.new": "Dune Armor Trim", "item.minecraft.echo_shard": "Echo Shard", "item.minecraft.egg": "Egg", "item.minecraft.elder_guardian_spawn_egg": "Elder Guardian Spawn Egg", @@ -3982,8 +4019,10 @@ "item.minecraft.explorer_pottery_shard": "Explorer Pottery Shard", "item.minecraft.explorer_pottery_sherd": "Explorer Pottery Sherd", "item.minecraft.eye_armor_trim_smithing_template": "Smithing Template", + "item.minecraft.eye_armor_trim_smithing_template.new": "Eye Armor Trim", "item.minecraft.feather": "Feather", "item.minecraft.fermented_spider_eye": "Fermented Spider Eye", + "item.minecraft.field_masoned_banner_pattern": "Field Masoned Banner Pattern", "item.minecraft.filled_map": "Map", "item.minecraft.fire_charge": "Fire Charge", "item.minecraft.firework_rocket": "Firework Rocket", @@ -4019,11 +4058,14 @@ "item.minecraft.flint": "Flint", "item.minecraft.flint_and_steel": "Flint and Steel", "item.minecraft.flow_armor_trim_smithing_template": "Smithing Template", + "item.minecraft.flow_armor_trim_smithing_template.new": "Flow Armor Trim", "item.minecraft.flow_banner_pattern": "Banner Pattern", "item.minecraft.flow_banner_pattern.desc": "Flow", + "item.minecraft.flow_banner_pattern.new": "Flow Banner Pattern", "item.minecraft.flow_pottery_sherd": "Flow Pottery Sherd", "item.minecraft.flower_banner_pattern": "Banner Pattern", "item.minecraft.flower_banner_pattern.desc": "Flower Charge", + "item.minecraft.flower_banner_pattern.new": "Flower Charge Banner Pattern", "item.minecraft.flower_pot": "Flower Pot", "item.minecraft.fox_spawn_egg": "Fox Spawn Egg", "item.minecraft.friend_pottery_shard": "Friend Pottery Shard", @@ -4036,6 +4078,7 @@ "item.minecraft.glistering_melon_slice": "Glistering Melon Slice", "item.minecraft.globe_banner_pattern": "Banner Pattern", "item.minecraft.globe_banner_pattern.desc": "Globe", + "item.minecraft.globe_banner_pattern.new": "Globe Banner Pattern", "item.minecraft.glow_berries": "Glow Berries", "item.minecraft.glow_ink_sac": "Glow Ink Sac", "item.minecraft.glow_item_frame": "Glow Item Frame", @@ -4057,12 +4100,15 @@ "item.minecraft.golden_pickaxe": "Golden Pickaxe", "item.minecraft.golden_shovel": "Golden Shovel", "item.minecraft.golden_sword": "Golden Sword", + "item.minecraft.gray_bundle": "Gray Bundle", "item.minecraft.gray_dye": "Gray Dye", + "item.minecraft.green_bundle": "Green Bundle", "item.minecraft.green_dye": "Green Dye", "item.minecraft.guardian_spawn_egg": "Guardian Spawn Egg", "item.minecraft.gunpowder": "Gunpowder", "item.minecraft.guster_banner_pattern": "Banner Pattern", "item.minecraft.guster_banner_pattern.desc": "Guster", + "item.minecraft.guster_banner_pattern.new": "Guster Banner Pattern", "item.minecraft.guster_pottery_sherd": "Guster Pottery Sherd", "item.minecraft.heart_of_the_sea": "Heart of the Sea", "item.minecraft.heart_pottery_shard": "Heart Pottery Shard", @@ -4075,6 +4121,7 @@ "item.minecraft.hopper_minecart": "Minecart with Hopper", "item.minecraft.horse_spawn_egg": "Horse Spawn Egg", "item.minecraft.host_armor_trim_smithing_template": "Smithing Template", + "item.minecraft.host_armor_trim_smithing_template.new": "Host Armor Trim", "item.minecraft.howl_pottery_shard": "Howl Pottery Shard", "item.minecraft.howl_pottery_sherd": "Howl Pottery Sherd", "item.minecraft.husk_spawn_egg": "Husk Spawn Egg", @@ -4105,8 +4152,11 @@ "item.minecraft.leather_helmet": "Leather Cap", "item.minecraft.leather_horse_armor": "Leather Horse Armor", "item.minecraft.leather_leggings": "Leather Pants", + "item.minecraft.light_blue_bundle": "Light Blue Bundle", "item.minecraft.light_blue_dye": "Light Blue Dye", + "item.minecraft.light_gray_bundle": "Light Gray Bundle", "item.minecraft.light_gray_dye": "Light Gray Dye", + "item.minecraft.lime_bundle": "Lime Bundle", "item.minecraft.lime_dye": "Lime Dye", "item.minecraft.lingering_potion": "Lingering Potion", "item.minecraft.lingering_potion.effect.awkward": "Awkward Lingering Potion", @@ -4138,6 +4188,7 @@ "item.minecraft.llama_spawn_egg": "Llama Spawn Egg", "item.minecraft.lodestone_compass": "Lodestone Compass", "item.minecraft.mace": "Mace", + "item.minecraft.magenta_bundle": "Magenta Bundle", "item.minecraft.magenta_dye": "Magenta Dye", "item.minecraft.magma_cream": "Magma Cream", "item.minecraft.magma_cube_spawn_egg": "Magma Cube Spawn Egg", @@ -4152,6 +4203,7 @@ "item.minecraft.miner_pottery_sherd": "Miner Pottery Sherd", "item.minecraft.mojang_banner_pattern": "Banner Pattern", "item.minecraft.mojang_banner_pattern.desc": "Thing", + "item.minecraft.mojang_banner_pattern.new": "Thing Banner Pattern", "item.minecraft.mooshroom_spawn_egg": "Mooshroom Spawn Egg", "item.minecraft.mourner_pottery_shard": "Mourner Pottery Shard", "item.minecraft.mourner_pottery_sherd": "Mourner Pottery Sherd", @@ -4213,13 +4265,17 @@ "item.minecraft.netherite_shovel": "Netherite Shovel", "item.minecraft.netherite_sword": "Netherite Sword", "item.minecraft.netherite_upgrade_smithing_template": "Smithing Template", + "item.minecraft.netherite_upgrade_smithing_template.new": "Netherite Upgrade", "item.minecraft.oak_boat": "Oak Boat", "item.minecraft.oak_chest_boat": "Oak Boat with Chest", "item.minecraft.ocelot_spawn_egg": "Ocelot Spawn Egg", "item.minecraft.ominous_bottle": "Ominous Bottle", "item.minecraft.ominous_trial_key": "Ominous Trial Key", + "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", @@ -4228,9 +4284,11 @@ "item.minecraft.pig_spawn_egg": "Pig Spawn Egg", "item.minecraft.piglin_banner_pattern": "Banner Pattern", "item.minecraft.piglin_banner_pattern.desc": "Snout", + "item.minecraft.piglin_banner_pattern.new": "Snout Banner Pattern", "item.minecraft.piglin_brute_spawn_egg": "Piglin Brute Spawn Egg", "item.minecraft.piglin_spawn_egg": "Piglin Spawn Egg", "item.minecraft.pillager_spawn_egg": "Pillager Spawn Egg", + "item.minecraft.pink_bundle": "Pink Bundle", "item.minecraft.pink_dye": "Pink Dye", "item.minecraft.pitcher_plant": "Pitcher Plant", "item.minecraft.pitcher_pod": "Pitcher Pod", @@ -4282,6 +4340,7 @@ "item.minecraft.pufferfish_spawn_egg": "Pufferfish Spawn Egg", "item.minecraft.pumpkin_pie": "Pumpkin Pie", "item.minecraft.pumpkin_seeds": "Pumpkin Seeds", + "item.minecraft.purple_bundle": "Purple Bundle", "item.minecraft.purple_dye": "Purple Dye", "item.minecraft.quartz": "Nether Quartz", "item.minecraft.rabbit": "Raw Rabbit", @@ -4290,14 +4349,17 @@ "item.minecraft.rabbit_spawn_egg": "Rabbit Spawn Egg", "item.minecraft.rabbit_stew": "Rabbit Stew", "item.minecraft.raiser_armor_trim_smithing_template": "Smithing Template", + "item.minecraft.raiser_armor_trim_smithing_template.new": "Raiser Armor Trim", "item.minecraft.ravager_spawn_egg": "Ravager Spawn Egg", "item.minecraft.raw_copper": "Raw Copper", "item.minecraft.raw_gold": "Raw Gold", "item.minecraft.raw_iron": "Raw Iron", "item.minecraft.recovery_compass": "Recovery Compass", + "item.minecraft.red_bundle": "Red Bundle", "item.minecraft.red_dye": "Red Dye", "item.minecraft.redstone": "Redstone Dust", "item.minecraft.rib_armor_trim_smithing_template": "Smithing Template", + "item.minecraft.rib_armor_trim_smithing_template.new": "Rib Armor Trim", "item.minecraft.rotten_flesh": "Rotten Flesh", "item.minecraft.saddle": "Saddle", "item.minecraft.salmon": "Raw Salmon", @@ -4306,7 +4368,9 @@ "item.minecraft.scrape_pottery_sherd": "Scrape Pottery Sherd", "item.minecraft.scute": "Scute", "item.minecraft.sentry_armor_trim_smithing_template": "Smithing Template", + "item.minecraft.sentry_armor_trim_smithing_template.new": "Sentry Armor Trim", "item.minecraft.shaper_armor_trim_smithing_template": "Smithing Template", + "item.minecraft.shaper_armor_trim_smithing_template.new": "Shaper Armor Trim", "item.minecraft.sheaf_pottery_shard": "Sheaf Pottery Shard", "item.minecraft.sheaf_pottery_sherd": "Sheaf Pottery Sherd", "item.minecraft.shears": "Shears", @@ -4334,11 +4398,13 @@ "item.minecraft.shulker_spawn_egg": "Shulker Spawn Egg", "item.minecraft.sign": "Sign", "item.minecraft.silence_armor_trim_smithing_template": "Smithing Template", + "item.minecraft.silence_armor_trim_smithing_template.new": "Silence Armor Trim", "item.minecraft.silverfish_spawn_egg": "Silverfish Spawn Egg", "item.minecraft.skeleton_horse_spawn_egg": "Skeleton Horse Spawn Egg", "item.minecraft.skeleton_spawn_egg": "Skeleton Spawn Egg", "item.minecraft.skull_banner_pattern": "Banner Pattern", "item.minecraft.skull_banner_pattern.desc": "Skull Charge", + "item.minecraft.skull_banner_pattern.new": "Skull Charge Banner Pattern", "item.minecraft.skull_pottery_shard": "Skull Pottery Shard", "item.minecraft.skull_pottery_sherd": "Skull Pottery Sherd", "item.minecraft.slime_ball": "Slimeball", @@ -4359,12 +4425,14 @@ "item.minecraft.snort_pottery_shard": "Snort Pottery Shard", "item.minecraft.snort_pottery_sherd": "Snort Pottery Sherd", "item.minecraft.snout_armor_trim_smithing_template": "Smithing Template", + "item.minecraft.snout_armor_trim_smithing_template.new": "Snout Armor Trim", "item.minecraft.snow_golem_spawn_egg": "Snow Golem Spawn Egg", "item.minecraft.snowball": "Snowball", "item.minecraft.spectral_arrow": "Spectral Arrow", "item.minecraft.spider_eye": "Spider Eye", "item.minecraft.spider_spawn_egg": "Spider Spawn Egg", "item.minecraft.spire_armor_trim_smithing_template": "Smithing Template", + "item.minecraft.spire_armor_trim_smithing_template.new": "Spire Armor Trim", "item.minecraft.splash_potion": "Splash Potion", "item.minecraft.splash_potion.effect.awkward": "Awkward Splash Potion", "item.minecraft.splash_potion.effect.empty": "Splash Uncraftable Potion", @@ -4411,6 +4479,7 @@ "item.minecraft.tadpole_bucket": "Bucket of Tadpole", "item.minecraft.tadpole_spawn_egg": "Tadpole Spawn Egg", "item.minecraft.tide_armor_trim_smithing_template": "Smithing Template", + "item.minecraft.tide_armor_trim_smithing_template.new": "Tide Armor Trim", "item.minecraft.tipped_arrow": "Tipped Arrow", "item.minecraft.tipped_arrow.effect.awkward": "Tipped Arrow", "item.minecraft.tipped_arrow.effect.empty": "Uncraftable Tipped Arrow", @@ -4451,19 +4520,24 @@ "item.minecraft.turtle_scute": "Turtle Scute", "item.minecraft.turtle_spawn_egg": "Turtle Spawn Egg", "item.minecraft.vex_armor_trim_smithing_template": "Smithing Template", + "item.minecraft.vex_armor_trim_smithing_template.new": "Vex Armor Trim", "item.minecraft.vex_spawn_egg": "Vex Spawn Egg", "item.minecraft.villager_spawn_egg": "Villager Spawn Egg", "item.minecraft.vindicator_spawn_egg": "Vindicator Spawn Egg", "item.minecraft.wandering_trader_spawn_egg": "Wandering Trader Spawn Egg", "item.minecraft.ward_armor_trim_smithing_template": "Smithing Template", + "item.minecraft.ward_armor_trim_smithing_template.new": "Ward Armor Trim", "item.minecraft.warden_spawn_egg": "Warden Spawn Egg", "item.minecraft.warped_fungus_on_a_stick": "Warped Fungus on a Stick", "item.minecraft.water_bucket": "Water Bucket", "item.minecraft.wayfinder_armor_trim_smithing_template": "Smithing Template", + "item.minecraft.wayfinder_armor_trim_smithing_template.new": "Wayfinder Armor Trim", "item.minecraft.wheat": "Wheat", "item.minecraft.wheat_seeds": "Wheat Seeds", + "item.minecraft.white_bundle": "White Bundle", "item.minecraft.white_dye": "White Dye", "item.minecraft.wild_armor_trim_smithing_template": "Smithing Template", + "item.minecraft.wild_armor_trim_smithing_template.new": "Wild Armor Trim", "item.minecraft.wind_charge": "Wind Charge", "item.minecraft.witch_spawn_egg": "Witch Spawn Egg", "item.minecraft.wither_skeleton_spawn_egg": "Wither Skeleton Spawn Egg", @@ -4477,6 +4551,7 @@ "item.minecraft.wooden_sword": "Wooden Sword", "item.minecraft.writable_book": "Book and Quill", "item.minecraft.written_book": "Written Book", + "item.minecraft.yellow_bundle": "Yellow Bundle", "item.minecraft.yellow_dye": "Yellow Dye", "item.minecraft.zoglin_spawn_egg": "Zoglin Spawn Egg", "item.minecraft.zombie_horse_spawn_egg": "Zombie Horse Spawn Egg", @@ -4546,7 +4621,7 @@ "jukebox_song.minecraft.ward": "C418 - ward", "key.advancements": "Advancements", "key.attack": "Attack/Destroy", - "key.back": "Walk Backwards", + "key.back": "Walk Backward", "key.categories.creative": "Creative Mode", "key.categories.gameplay": "Gameplay", "key.categories.inventory": "Inventory", @@ -4557,7 +4632,7 @@ "key.chat": "Open Chat", "key.command": "Open Command", "key.drop": "Drop Selected Item", - "key.forward": "Walk Forwards", + "key.forward": "Walk Forward", "key.fullscreen": "Toggle Fullscreen", "key.hotbar.1": "Hotbar Slot 1", "key.hotbar.2": "Hotbar Slot 2", @@ -4700,8 +4775,8 @@ "loading.progress": "%s%%", "mco.account.privacy.info": "Read more about Mojang and privacy laws", "mco.account.privacy.info.button": "Read more about GDPR", - "mco.account.privacy.information": "Mojang implements certain procedures to help protect children and their privacy including complying with the Children\u2019s Online Privacy Protection Act (COPPA) and General Data Protection Regulation (GDPR).\n\nYou may need to obtain parental consent before accessing your Realms account.", - "mco.account.privacyinfo": "Mojang implements certain procedures to help protect children and their privacy including complying with the Children\u2019s Online Privacy Protection Act (COPPA) and General Data Protection Regulation (GDPR).\n\nYou may need to obtain parental consent before accessing your Realms account.\n\nIf you have an older Minecraft account (you log in with your username), you need to migrate the account to a Mojang account in order to access Realms.", + "mco.account.privacy.information": "Mojang implements certain procedures to help protect children and their privacy including complying with the Children's Online Privacy Protection Act (COPPA) and General Data Protection Regulation (GDPR).\n\nYou may need to obtain parental consent before accessing your Realms account.", + "mco.account.privacyinfo": "Mojang implements certain procedures to help protect children and their privacy including complying with the Children's Online Privacy Protection Act (COPPA) and General Data Protection Regulation (GDPR).\n\nYou may need to obtain parental consent before accessing your Realms account.\n\nIf you have an older Minecraft account (you log in with your username), you need to migrate the account to a Mojang account in order to access Realms.", "mco.account.update": "Update account", "mco.activity.noactivity": "No activity for the past %s day(s)", "mco.activity.title": "Player activity", @@ -4855,6 +4930,7 @@ "mco.connect.success": "Done", "mco.create.world": "Create", "mco.create.world.error": "You must enter a name!", + "mco.create.world.failed": "Failed to create world!", "mco.create.world.reset.title": "Creating world...", "mco.create.world.skip": "Skip", "mco.create.world.subtitle": "Optionally, select what world to put on your new realm", @@ -4886,6 +4962,7 @@ "mco.errorMessage.6009": "Invalid Realm description", "mco.errorMessage.connectionFailure": "An error occurred, please try again later.", "mco.errorMessage.generic": "An error occurred: ", + "mco.errorMessage.initialize.failed": "Failed to initialize Realm", "mco.errorMessage.noDetails": "No error details provided", "mco.errorMessage.realmsService": "An error occurred (%s):", "mco.errorMessage.realmsService.connectivity": "Could not connect to Realms: %s", @@ -5014,6 +5091,8 @@ "mco.upload.entry.commands": "%1$s, %2$s", "mco.upload.entry.id": "%1$s (%2$s)", "mco.upload.failed": "Upload failed! (%s)", + "mco.upload.failed.too_big.description": "The selected world is too big. The maximum allowed size is %s.", + "mco.upload.failed.too_big.title": "World too big", "mco.upload.hardcore": "Hardcore worlds can't be uploaded!", "mco.upload.percent": "%s %%", "mco.upload.preparing": "Preparing your world", @@ -5027,15 +5106,10 @@ "mco.version": "Version: %s", "mco.warning": "Warning!", "mco.worldSlot.minigame": "Minigame", - "menu.convertingLevel": "Converting world", "menu.disconnect": "Disconnect", "menu.feedback": "Feedback...", "menu.feedback.title": "Feedback", "menu.game": "Game Menu", - "menu.generatingLevel": "Generating world", - "menu.generatingTerrain": "Building terrain", - "menu.loadingForcedChunks": "Loading forced chunks for dimension %s", - "menu.loadingLevel": "Loading world", "menu.modded": " (Modded)", "menu.multiplayer": "Multiplayer", "menu.online": "Minecraft Realms", @@ -5047,7 +5121,6 @@ "menu.quit": "Quit Game", "menu.reportBugs": "Report Bugs", "menu.resetdemo": "Reset Demo World", - "menu.respawning": "Respawning", "menu.returnToGame": "Back to Game", "menu.returnToMenu": "Save and Quit to Title", "menu.savingChunks": "Saving chunks", @@ -5058,14 +5131,12 @@ "menu.shareToLan": "Open to LAN", "menu.singleplayer": "Singleplayer", "menu.working": "Working...", - "merchant.current_level": "Trader's current level", "merchant.deprecated": "Villagers restock up to two times per day.", "merchant.level.1": "Novice", "merchant.level.2": "Apprentice", "merchant.level.3": "Journeyman", "merchant.level.4": "Expert", "merchant.level.5": "Master", - "merchant.next_level": "Trader's next level", "merchant.title": "%s - %s", "merchant.trades": "Trades", "mirror.front_back": "\u2191 \u2193", @@ -5171,8 +5242,8 @@ "narration.selection.usage": "Press up and down buttons to move to another entry", "narration.slider.usage.focused": "Press left or right keyboard buttons to change value", "narration.slider.usage.hovered": "Drag slider to change value", - "narration.suggestion": "Selected suggestion %d out of %d: %s", - "narration.suggestion.tooltip": "Selected suggestion %d out of %d: %s (%s)", + "narration.suggestion": "Selected suggestion %s out of %s: %s", + "narration.suggestion.tooltip": "Selected suggestion %s out of %s: %s (%s)", "narration.suggestion.usage.cycle.fixed": "Press Tab to cycle to the next suggestion", "narration.suggestion.usage.cycle.hidable": "Press Tab to cycle to the next suggestion, or Escape to leave suggestions", "narration.suggestion.usage.fill.fixed": "Press Tab to use suggestion", @@ -5202,6 +5273,7 @@ "narrator.toast.disabled": "Narrator Disabled", "narrator.toast.enabled": "Narrator Enabled", "optimizeWorld.confirm.description": "This will attempt to optimize your world by making sure all data is stored in the most recent game format. This can take a very long time, depending on your world. Once done, your world may play faster but will no longer be compatible with older versions of the game. Are you sure you wish to proceed?", + "optimizeWorld.confirm.proceed": "Create Backup and Optimize", "optimizeWorld.confirm.title": "Optimize World", "optimizeWorld.info.converted": "Upgraded chunks: %s", "optimizeWorld.info.skipped": "Skipped chunks: %s", @@ -5221,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", @@ -5260,7 +5334,7 @@ "options.biomeBlendRadius.15": "15x15 (Maximum)", "options.chat": "Chat Settings...", "options.chat.color": "Colors", - "options.chat.delay": "Chat Delay: %s seconds", + "options.chat.delay": "Chat Delay: %s second(s)", "options.chat.delay_none": "Chat Delay: None", "options.chat.height.focused": "Focused Height", "options.chat.height.unfocused": "Unfocused Height", @@ -5280,7 +5354,6 @@ "options.clouds.fast": "Fast", "options.controls": "Controls...", "options.credits_and_attribution": "Credits & Attribution...", - "options.customizeTitle": "Customize World Settings", "options.damageTiltStrength": "Damage Tilt", "options.damageTiltStrength.tooltip": "The amount of camera shake caused by being hurt.", "options.darkMojangStudiosBackgroundColor": "Monochrome Logo", @@ -5352,6 +5425,11 @@ "options.hideMatchedNames.tooltip": "3rd-party Servers may send chat messages in non-standard formats.\nWith this option on, hidden players will be matched based on chat sender names.", "options.hideSplashTexts": "Hide Splash Texts", "options.hideSplashTexts.tooltip": "Hides the yellow splash text in the main menu.", + "options.inactivityFpsLimit": "Reduce FPS when", + "options.inactivityFpsLimit.afk": "AFK", + "options.inactivityFpsLimit.afk.tooltip": "Limits framerate to 30 when the game is not getting any player input for more than a minute. Further limits it to 10 after 9 more minutes.", + "options.inactivityFpsLimit.minimized": "Minimized", + "options.inactivityFpsLimit.minimized.tooltip": "Limits framerate only when the game window is minimized.", "options.invertMouse": "Invert Mouse", "options.japaneseGlyphVariants": "Japanese Glyph Variants", "options.japaneseGlyphVariants.tooltip": "Uses Japanese variants of CJK characters in the default font.", @@ -5415,6 +5493,8 @@ "options.renderClouds": "Clouds", "options.renderDistance": "Render Distance", "options.resourcepack": "Resource Packs...", + "options.rotateWithMinecart": "Rotate with Minecarts", + "options.rotateWithMinecart.tooltip": "Whether the player's view should rotate with a turning Minecart. Only available in worlds with the 'Minecart Improvements' experimental setting turned on.", "options.screenEffectScale": "Distortion Effects", "options.screenEffectScale.tooltip": "Strength of nausea and Nether portal screen distortion effects.\nAt lower values, the nausea effect is replaced with a green overlay.", "options.sensitivity": "Sensitivity", @@ -5597,7 +5677,6 @@ "quickplay.error.realm_connect": "Could not connect to Realm", "quickplay.error.realm_permission": "Lacking permission to connect to this Realm", "quickplay.error.title": "Failed to Quick Play", - "realms.missing.module.error.text": "Realms could not be opened right now, please try again later", "realms.missing.snapshot.error.text": "Realms is currently not supported in snapshots", "recipe.notFound": "Unknown recipe: %s", "recipe.toast.description": "Check your recipe book", @@ -5625,6 +5704,7 @@ "resourcePack.programmer_art.name": "Programmer Art", "resourcepack.progress": "Downloading file (%s MB)...", "resourcepack.requesting": "Making Request...", + "resourcePack.runtime_failure": "Resource pack error detected", "resourcePack.server.name": "World Specific Resources", "resourcePack.title": "Select Resource Packs", "resourcePack.vanilla.description": "The default look and feel of Minecraft", @@ -5642,7 +5722,6 @@ "selectServer.hiddenAddress": "(Hidden)", "selectServer.refresh": "Refresh", "selectServer.select": "Join Server", - "selectServer.title": "Select Server", "selectWorld.access_failure": "Failed to access world", "selectWorld.allowCommands": "Allow Cheats", "selectWorld.allowCommands.info": "Commands like /gamemode, /experience", @@ -5664,7 +5743,6 @@ "selectWorld.conversion": "Must be converted!", "selectWorld.conversion.tooltip": "This world must be opened in an older version (like 1.6.4) to be safely converted", "selectWorld.create": "Create New World", - "selectWorld.createDemo": "Play New Demo World", "selectWorld.customizeType": "Customize", "selectWorld.data_read": "Reading world data...", "selectWorld.dataPacks": "Data Packs", @@ -5846,7 +5924,6 @@ "stat.minecraft.interact_with_smoker": "Interactions with Smoker", "stat.minecraft.interact_with_stonecutter": "Interactions with Stonecutter", "stat.minecraft.jump": "Jumps", - "stat.minecraft.junk_fished": "Junk Fished", "stat.minecraft.leave_game": "Games Quit", "stat.minecraft.minecart_one_cm": "Distance by Minecart", "stat.minecraft.mob_kills": "Mob Kills", @@ -5862,7 +5939,6 @@ "stat.minecraft.pot_flower": "Plants Potted", "stat.minecraft.raid_trigger": "Raids Triggered", "stat.minecraft.raid_win": "Raids Won", - "stat.minecraft.ring_bell": "Bells Rung", "stat.minecraft.sleep_in_bed": "Times Slept in a Bed", "stat.minecraft.sneak_time": "Sneak Time", "stat.minecraft.sprint_one_cm": "Distance Sprinted", @@ -5874,7 +5950,6 @@ "stat.minecraft.time_since_rest": "Time Since Last Rest", "stat.minecraft.total_world_time": "Time with World Open", "stat.minecraft.traded_with_villager": "Traded with Villagers", - "stat.minecraft.treasure_fished": "Treasure Fished", "stat.minecraft.trigger_trapped_chest": "Trapped Chests Triggered", "stat.minecraft.tune_noteblock": "Note Blocks Tuned", "stat.minecraft.use_cauldron": "Water Taken from Cauldron", @@ -5883,7 +5958,6 @@ "stat.minecraft.walk_under_water_one_cm": "Distance Walked under Water", "stat.mobsButton": "Mobs", "stats.none": "-", - "stats.tooltip.type.statistic": "Statistic", "structure_block.button.detect_size": "DETECT", "structure_block.button.load": "LOAD", "structure_block.button.save": "SAVE", @@ -5976,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", @@ -6004,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", @@ -6162,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", @@ -6379,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", @@ -6704,6 +6793,7 @@ "subtitles.item.bucket.fill_tadpole": "Tadpole captured", "subtitles.item.bundle.drop_contents": "Bundle empties", "subtitles.item.bundle.insert": "Item packed", + "subtitles.item.bundle.insert_fail": "Bundle full", "subtitles.item.bundle.remove_one": "Item unpacked", "subtitles.item.chorus_fruit.teleport": "Player teleports", "subtitles.item.crop.plant": "Crop planted", @@ -6743,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", @@ -6778,7 +6869,7 @@ "telemetry.event.performance_metrics.description": "Knowing the overall performance profile of Minecraft helps us tune and optimize the game for a wide range of machine specifications and operating systems. \nGame version is included to help us compare the performance profile for new versions of Minecraft.", "telemetry.event.performance_metrics.title": "Performance Metrics", "telemetry.event.required": "%s (Required)", - "telemetry.event.world_load_times.description": "It\u2019s important for us to understand how long it takes to join a world, and how that changes over time. For example, when we add new features or do larger technical changes, we need to see what impact that had on load times.", + "telemetry.event.world_load_times.description": "It's important for us to understand how long it takes to join a world, and how that changes over time. For example, when we add new features or do larger technical changes, we need to see what impact that had on load times.", "telemetry.event.world_load_times.title": "World Load Times", "telemetry.event.world_loaded.description": "Knowing how players play Minecraft (such as Game Mode, client or server modded, and game version) allows us to focus game updates to improve the areas that players care about most.\nThe World Loaded event is paired with the World Unloaded event to calculate how long the play session has lasted.", "telemetry.event.world_loaded.title": "World Loaded", 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/common.rs b/azalea-protocol/src/packets/common.rs index 82f6be70d..173e15fc0 100644 --- a/azalea-protocol/src/packets/common.rs +++ b/azalea-protocol/src/packets/common.rs @@ -17,4 +17,6 @@ pub struct CommonPlayerSpawnInfo { pub last_death_location: Option, #[var] pub portal_cooldown: u32, + #[var] + pub sea_level: i32, } diff --git a/azalea-protocol/src/packets/configuration/serverbound_client_information_packet.rs b/azalea-protocol/src/packets/configuration/serverbound_client_information_packet.rs index fb980a46e..d00c30ec4 100644 --- a/azalea-protocol/src/packets/configuration/serverbound_client_information_packet.rs +++ b/azalea-protocol/src/packets/configuration/serverbound_client_information_packet.rs @@ -30,6 +30,7 @@ pub struct ClientInformation { /// Whether the client should show up as "Anonymous Player" in the server /// list. pub allows_listing: bool, + pub particle_status: ParticleStatus, } impl Default for ClientInformation { @@ -43,6 +44,7 @@ impl Default for ClientInformation { main_hand: HumanoidArm::Right, text_filtering_enabled: false, allows_listing: false, + particle_status: ParticleStatus::default(), } } } @@ -77,6 +79,14 @@ pub struct ModelCustomization { pub hat: bool, } +#[derive(McBuf, Clone, Copy, Debug, PartialEq, Eq, Default)] +pub enum ParticleStatus { + #[default] + All, + Decreased, + Minimal, +} + impl Default for ModelCustomization { fn default() -> Self { Self { @@ -169,6 +179,7 @@ mod tests { main_hand: HumanoidArm::Left, text_filtering_enabled: true, allows_listing: true, + particle_status: ParticleStatus::Decreased, }; let mut buf = Vec::new(); data.write_into(&mut buf).unwrap(); diff --git a/azalea-protocol/src/packets/game/clientbound_custom_report_details_packet.rs b/azalea-protocol/src/packets/game/clientbound_custom_report_details_packet.rs new file mode 100644 index 000000000..a098f9150 --- /dev/null +++ b/azalea-protocol/src/packets/game/clientbound_custom_report_details_packet.rs @@ -0,0 +1,14 @@ +use std::collections::HashMap; + +use azalea_buf::McBuf; +use azalea_protocol_macros::ClientboundGamePacket; + +#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +pub struct ClientboundCustomReportDetailsPacket { + // azalea doesn't implement max lengths yet + + // max length = 32 + // key string is limited to 128 bytes + // value string is limited to 4096 bytes + pub details: HashMap, +} 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_move_minecart_packet.rs b/azalea-protocol/src/packets/game/clientbound_move_minecart_packet.rs new file mode 100644 index 000000000..014e2aaae --- /dev/null +++ b/azalea-protocol/src/packets/game/clientbound_move_minecart_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 ClientboundMoveMinecartPacket { + #[var] + pub entity_id: u32, + pub lerp_steps: Vec, +} + +#[derive(Clone, Debug, McBuf)] +pub struct MinecartStep { + pub position: Vec3, + pub movement: Vec3, + pub y_rot: u8, + pub x_rot: u8, + pub weight: f32, +} diff --git a/azalea-protocol/src/packets/game/clientbound_player_info_update_packet.rs b/azalea-protocol/src/packets/game/clientbound_player_info_update_packet.rs index 345c22f20..d334d783c 100644 --- a/azalea-protocol/src/packets/game/clientbound_player_info_update_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_player_info_update_packet.rs @@ -26,6 +26,7 @@ pub struct PlayerInfoEntry { pub latency: i32, pub game_mode: GameMode, pub display_name: Option, + pub list_order: i32, pub chat_session: Option, } @@ -55,6 +56,11 @@ pub struct UpdateLatencyAction { pub struct UpdateDisplayNameAction { pub display_name: Option, } +#[derive(Clone, Debug, McBuf)] +pub struct UpdateListOrderAction { + #[var] + pub list_order: i32, +} impl McBufReadable for ClientboundPlayerInfoUpdatePacket { fn read_from(buf: &mut Cursor<&[u8]>) -> Result { @@ -92,6 +98,10 @@ impl McBufReadable for ClientboundPlayerInfoUpdatePacket { let action = UpdateDisplayNameAction::read_from(buf)?; entry.display_name = action.display_name; } + if actions.update_list_order { + let action = UpdateListOrderAction::read_from(buf)?; + entry.list_order = action.list_order; + } entries.push(entry); } @@ -159,6 +169,7 @@ pub struct ActionEnumSet { pub update_listed: bool, pub update_latency: bool, pub update_display_name: bool, + pub update_list_order: bool, } impl McBufReadable for ActionEnumSet { @@ -171,6 +182,7 @@ impl McBufReadable for ActionEnumSet { update_listed: set.index(3), update_latency: set.index(4), update_display_name: set.index(5), + update_list_order: set.index(6), }) } } @@ -214,6 +226,7 @@ mod tests { update_listed: false, update_latency: true, update_display_name: false, + update_list_order: true, }; let mut buf = Vec::new(); data.write_into(&mut buf).unwrap(); 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 d63108da0..2a9cebc60 100755 --- a/azalea-protocol/src/packets/game/clientbound_player_position_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_player_position_packet.rs @@ -1,19 +1,18 @@ use std::io::{Cursor, Write}; use azalea_buf::{BufReadError, McBuf, McBufReadable, McBufWritable}; -use azalea_core::bitset::FixedBitSet; +use azalea_core::{bitset::FixedBitSet, position::Vec3}; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] pub struct ClientboundPlayerPositionPacket { - pub x: f64, - pub y: f64, - pub z: f64, + #[var] + pub id: u32, + pub pos: Vec3, + pub delta_movement: Vec3, pub y_rot: f32, pub x_rot: f32, pub relative_arguments: RelativeMovements, - #[var] - pub id: u32, } #[derive(Debug, Clone)] @@ -27,7 +26,8 @@ pub struct RelativeMovements { impl McBufReadable for RelativeMovements { fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let set = FixedBitSet::<5>::read_from(buf)?; + // yes minecraft seriously wastes that many bits, smh + let set = FixedBitSet::<32>::read_from(buf)?; Ok(RelativeMovements { x: set.index(0), y: set.index(1), 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_projectile_power_packet.rs b/azalea-protocol/src/packets/game/clientbound_projectile_power_packet.rs new file mode 100644 index 000000000..a665a2aa6 --- /dev/null +++ b/azalea-protocol/src/packets/game/clientbound_projectile_power_packet.rs @@ -0,0 +1,8 @@ +use azalea_buf::McBuf; +use azalea_protocol_macros::ClientboundGamePacket; + +#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +pub struct ClientboundProjectilePowerPacket { + pub id: u32, + pub acceleration_power: f64, +} 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_server_links_packet.rs b/azalea-protocol/src/packets/game/clientbound_server_links_packet.rs new file mode 100644 index 000000000..4b24a5196 --- /dev/null +++ b/azalea-protocol/src/packets/game/clientbound_server_links_packet.rs @@ -0,0 +1,34 @@ +use azalea_buf::McBuf; +use azalea_chat::FormattedText; +use azalea_protocol_macros::ClientboundGamePacket; + +#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +pub struct ClientboundServerLinksPacket { + pub links: Vec, +} + +#[derive(Clone, Debug, McBuf)] +pub struct ServerLinkEntry { + pub kind: ServerLinkKind, + pub link: String, +} + +#[derive(Clone, Debug, McBuf)] +pub enum ServerLinkKind { + Known(KnownLinkKind), + Component(FormattedText), +} + +#[derive(Clone, Copy, Debug, McBuf)] +pub enum KnownLinkKind { + BugReport, + CommunityGuidelines, + Support, + Status, + Feedback, + Community, + Website, + Forums, + News, + Announcements, +} diff --git a/azalea-protocol/src/packets/game/clientbound_set_cursor_item_packet.rs b/azalea-protocol/src/packets/game/clientbound_set_cursor_item_packet.rs new file mode 100644 index 000000000..6a67b71ce --- /dev/null +++ b/azalea-protocol/src/packets/game/clientbound_set_cursor_item_packet.rs @@ -0,0 +1,8 @@ +use azalea_buf::McBuf; +use azalea_inventory::ItemSlot; +use azalea_protocol_macros::ClientboundGamePacket; + +#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +pub struct ClientboundSetCursorItemPacket { + pub contents: Option, +} diff --git a/azalea-protocol/src/packets/game/clientbound_set_carried_item_packet.rs b/azalea-protocol/src/packets/game/clientbound_set_held_slot_packet.rs old mode 100755 new mode 100644 similarity index 61% rename from azalea-protocol/src/packets/game/clientbound_set_carried_item_packet.rs rename to azalea-protocol/src/packets/game/clientbound_set_held_slot_packet.rs index 0eff02a87..a83ae3cbe --- a/azalea-protocol/src/packets/game/clientbound_set_carried_item_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_set_held_slot_packet.rs @@ -1,8 +1,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; -/// Sent to change the player's slot selection. #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetCarriedItemPacket { +pub struct ClientboundSetHeldSlotPacket { pub slot: u8, } diff --git a/azalea-protocol/src/packets/game/clientbound_set_player_inventory_packet.rs b/azalea-protocol/src/packets/game/clientbound_set_player_inventory_packet.rs new file mode 100644 index 000000000..c17fd3105 --- /dev/null +++ b/azalea-protocol/src/packets/game/clientbound_set_player_inventory_packet.rs @@ -0,0 +1,10 @@ +use azalea_buf::McBuf; +use azalea_inventory::ItemSlot; +use azalea_protocol_macros::ClientboundGamePacket; + +#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +pub struct ClientboundSetPlayerInventoryPacket { + #[var] + pub slot: i32, + pub contents: Option, +} diff --git a/azalea-protocol/src/packets/game/clientbound_set_time_packet.rs b/azalea-protocol/src/packets/game/clientbound_set_time_packet.rs index dd8a0daa5..b73f082dd 100755 --- a/azalea-protocol/src/packets/game/clientbound_set_time_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_set_time_packet.rs @@ -5,4 +5,5 @@ use azalea_protocol_macros::ClientboundGamePacket; pub struct ClientboundSetTimePacket { pub game_time: u64, pub day_time: u64, + pub tick_day_time: bool, } 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 99f4ab05f..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,239 +1,74 @@ -use azalea_buf::{ - BufReadError, McBuf, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable, -}; +use std::collections::HashMap; + +use azalea_buf::McBuf; use azalea_core::resource_location::ResourceLocation; use azalea_inventory::ItemSlot; use azalea_protocol_macros::ClientboundGamePacket; +use azalea_registry::HolderSet; -use std::io::{Cursor, Write}; - -#[derive(Clone, Debug, McBuf, PartialEq, ClientboundGamePacket)] +#[derive(Clone, Debug, PartialEq, McBuf, ClientboundGamePacket)] pub struct ClientboundUpdateRecipesPacket { - pub recipes: Vec, -} - -#[derive(Clone, Debug, PartialEq, McBuf)] -pub struct RecipeHolder { - pub id: ResourceLocation, - pub data: RecipeData, + 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 ingredients: Vec, - pub result: ItemSlot, +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, -} - -#[derive(Clone, Debug, PartialEq)] -pub struct ShapedRecipePattern { - pub width: usize, - pub height: usize, - pub ingredients: Vec, -} - -impl McBufWritable for ShapedRecipePattern { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - (self.width as u32).var_write_into(buf)?; - (self.height as u32).var_write_into(buf)?; - debug_assert_eq!(self.width * self.height, self.ingredients.len()); - for ingredient in &self.ingredients { - ingredient.write_into(buf)?; - } - Ok(()) - } -} - -impl McBufReadable for ShapedRecipePattern { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let width = u32::var_read_from(buf)? as usize; - let height = u32::var_read_from(buf)? as usize; - let mut ingredients = Vec::with_capacity(width * height); - for _ in 0..width * height { - ingredients.push(Ingredient::read_from(buf)?); - } - Ok(ShapedRecipePattern { - width, - height, - ingredients, - }) - } +pub struct SelectableRecipe { + pub option_display: SlotDisplayData, } -#[derive(Clone, Debug, Copy, PartialEq, McBuf)] -pub enum CraftingBookCategory { - Building = 0, - Redstone, - Equipment, - Misc, +/// [`azalea_registry::SlotDisplay`] +#[derive(Clone, Debug, PartialEq, McBuf)] +pub enum SlotDisplayData { + Empty, + AnyFuel, + Item(ItemSlotDisplay), + ItemStack(ItemStackSlotDisplay), + Tag(ResourceLocation), + SmithingTrim(Box), + WithRemainder(Box), + Composite(CompositeSlotDisplay), } #[derive(Clone, Debug, PartialEq, McBuf)] -pub struct CookingRecipe { - 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 base: Ingredient, - pub addition: Ingredient, - pub result: ItemSlot, +pub struct TagSlotDisplay { + pub tag: azalea_registry::Item, } - #[derive(Clone, Debug, PartialEq, McBuf)] -pub struct SimpleRecipe { - 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 enum RecipeData { - CraftingShaped(ShapedRecipe), - CraftingShapeless(ShapelessRecipe), - CraftingSpecialArmorDye(SimpleRecipe), - CraftingSpecialBookCloning(SimpleRecipe), - CraftingSpecialMapCloning(SimpleRecipe), - CraftingSpecialMapExtending(SimpleRecipe), - CraftingSpecialFireworkRocket(SimpleRecipe), - CraftingSpecialFireworkStar(SimpleRecipe), - CraftingSpecialFireworkStarFade(SimpleRecipe), - CraftingSpecialRepairItem(SimpleRecipe), - CraftingSpecialTippedArrow(SimpleRecipe), - CraftingSpecialBannerDuplicate(SimpleRecipe), - CraftingSpecialShieldDecoration(SimpleRecipe), - CraftingSpecialShulkerBoxColoring(SimpleRecipe), - CraftingSpecialSuspiciousStew(SimpleRecipe), - Smelting(CookingRecipe), - Blasting(CookingRecipe), - Smoking(CookingRecipe), - CampfireCooking(CookingRecipe), - Stonecutting(StoneCutterRecipe), - SmithingTransform(SmithingTransformRecipe), - SmithingTrim(SmithingTrimRecipe), - CraftingDecoratedPot(SimpleRecipe), +pub struct RecipePropertySet { + pub items: Vec, } #[derive(Clone, Debug, PartialEq, McBuf)] pub struct Ingredient { - pub allowed: Vec, -} - -#[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: vec![ItemSlot::Empty], - }, - Ingredient { - allowed: vec![ItemSlot::Empty], - }, - Ingredient { - allowed: vec![ItemSlot::Empty], - }, - Ingredient { - allowed: vec![ItemSlot::Empty], - }, - ], - }, - 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: vec![ItemSlot::Empty], - }, - Ingredient { - allowed: vec![ItemSlot::Empty], - }, - Ingredient { - allowed: vec![ItemSlot::Empty], - }, - Ingredient { - allowed: vec![ItemSlot::Empty], - }, - ], - 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(SimpleRecipe { - 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); - } + pub allowed: HolderSet, } diff --git a/azalea-protocol/src/packets/game/mod.rs b/azalea-protocol/src/packets/game/mod.rs index 533dec8bb..55d6faaff 100755 --- a/azalea-protocol/src/packets/game/mod.rs +++ b/azalea-protocol/src/packets/game/mod.rs @@ -24,12 +24,14 @@ pub mod clientbound_cookie_request_packet; pub mod clientbound_cooldown_packet; pub mod clientbound_custom_chat_completions_packet; pub mod clientbound_custom_payload_packet; +pub mod clientbound_custom_report_details_packet; pub mod clientbound_damage_event_packet; pub mod clientbound_debug_sample_packet; 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; @@ -47,6 +49,7 @@ pub mod clientbound_merchant_offers_packet; pub mod clientbound_move_entity_pos_packet; pub mod clientbound_move_entity_pos_rot_packet; pub mod clientbound_move_entity_rot_packet; +pub mod clientbound_move_minecart_packet; pub mod clientbound_move_vehicle_packet; pub mod clientbound_open_book_packet; pub mod clientbound_open_screen_packet; @@ -62,8 +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_recipe_packet; +pub mod clientbound_projectile_power_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; @@ -74,6 +81,7 @@ pub mod clientbound_rotate_head_packet; pub mod clientbound_section_blocks_update_packet; pub mod clientbound_select_advancements_tab_packet; pub mod clientbound_server_data_packet; +pub mod clientbound_server_links_packet; pub mod clientbound_set_action_bar_text_packet; pub mod clientbound_set_border_center_packet; pub mod clientbound_set_border_lerp_size_packet; @@ -81,9 +89,9 @@ pub mod clientbound_set_border_size_packet; pub mod clientbound_set_border_warning_delay_packet; pub mod clientbound_set_border_warning_distance_packet; pub mod clientbound_set_camera_packet; -pub mod clientbound_set_carried_item_packet; pub mod clientbound_set_chunk_cache_center_packet; pub mod clientbound_set_chunk_cache_radius_packet; +pub mod clientbound_set_cursor_item_packet; pub mod clientbound_set_default_spawn_position_packet; pub mod clientbound_set_display_objective_packet; pub mod clientbound_set_entity_data_packet; @@ -92,8 +100,10 @@ pub mod clientbound_set_entity_motion_packet; pub mod clientbound_set_equipment_packet; pub mod clientbound_set_experience_packet; pub mod clientbound_set_health_packet; +pub mod clientbound_set_held_slot_packet; pub mod clientbound_set_objective_packet; pub mod clientbound_set_passengers_packet; +pub mod clientbound_set_player_inventory_packet; pub mod clientbound_set_player_team_packet; pub mod clientbound_set_score_packet; pub mod clientbound_set_simulation_distance_packet; @@ -130,6 +140,7 @@ pub mod serverbound_chat_session_update_packet; pub mod serverbound_chunk_batch_received_packet; pub mod serverbound_client_command_packet; pub mod serverbound_client_information_packet; +pub mod serverbound_client_tick_end_packet; pub mod serverbound_command_suggestion_packet; pub mod serverbound_configuration_acknowledged_packet; pub mod serverbound_container_button_click_packet; @@ -164,6 +175,7 @@ pub mod serverbound_recipe_book_seen_recipe_packet; pub mod serverbound_rename_item_packet; pub mod serverbound_resource_pack_packet; pub mod serverbound_seen_advancements_packet; +pub mod serverbound_select_bundle_item_packet; pub mod serverbound_select_trade_packet; pub mod serverbound_set_beacon_packet; pub mod serverbound_set_carried_item_packet; @@ -180,67 +192,71 @@ pub mod serverbound_use_item_packet; use azalea_protocol_macros::declare_state_packets; +// see GameProtocols.java in the decompiled vanilla source + declare_state_packets!( GamePacket, Serverbound => { 0x00: serverbound_accept_teleportation_packet::ServerboundAcceptTeleportationPacket, 0x01: serverbound_block_entity_tag_query_packet::ServerboundBlockEntityTagQueryPacket, - 0x02: serverbound_change_difficulty_packet::ServerboundChangeDifficultyPacket, - 0x03: serverbound_chat_ack_packet::ServerboundChatAckPacket, - 0x04: serverbound_chat_command_packet::ServerboundChatCommandPacket, - 0x05: serverbound_chat_command_signed_packet::ServerboundChatCommandSignedPacket, - 0x06: serverbound_chat_packet::ServerboundChatPacket, - 0x07: serverbound_chat_session_update_packet::ServerboundChatSessionUpdatePacket, - 0x08: serverbound_chunk_batch_received_packet::ServerboundChunkBatchReceivedPacket, - 0x09: serverbound_client_command_packet::ServerboundClientCommandPacket, - 0x0a: serverbound_client_information_packet::ServerboundClientInformationPacket, - 0x0b: serverbound_command_suggestion_packet::ServerboundCommandSuggestionPacket, - 0x0c: serverbound_configuration_acknowledged_packet::ServerboundConfigurationAcknowledgedPacket, - 0x0d: serverbound_container_button_click_packet::ServerboundContainerButtonClickPacket, - 0x0e: serverbound_container_click_packet::ServerboundContainerClickPacket, - 0x0f: serverbound_container_close_packet::ServerboundContainerClosePacket, - 0x10: serverbound_container_slot_state_changed_packet::ServerboundContainerSlotStateChangedPacket, - 0x11: serverbound_cookie_response_packet::ServerboundCookieResponsePacket, - 0x12: serverbound_custom_payload_packet::ServerboundCustomPayloadPacket, - 0x13: serverbound_debug_sample_subscription::ServerboundDebugSampleSubscription, - 0x14: serverbound_edit_book_packet::ServerboundEditBookPacket, - 0x15: serverbound_entity_tag_query_packet::ServerboundEntityTagQueryPacket, - 0x16: serverbound_interact_packet::ServerboundInteractPacket, - 0x17: serverbound_jigsaw_generate_packet::ServerboundJigsawGeneratePacket, - 0x18: serverbound_keep_alive_packet::ServerboundKeepAlivePacket, - 0x19: serverbound_lock_difficulty_packet::ServerboundLockDifficultyPacket, - 0x1a: serverbound_move_player_pos_packet::ServerboundMovePlayerPosPacket, - 0x1b: serverbound_move_player_pos_rot_packet::ServerboundMovePlayerPosRotPacket, - 0x1c: serverbound_move_player_rot_packet::ServerboundMovePlayerRotPacket, - 0x1d: serverbound_move_player_status_only_packet::ServerboundMovePlayerStatusOnlyPacket, - 0x1e: serverbound_move_vehicle_packet::ServerboundMoveVehiclePacket, - 0x1f: serverbound_paddle_boat_packet::ServerboundPaddleBoatPacket, - 0x20: serverbound_pick_item_packet::ServerboundPickItemPacket, - 0x21: serverbound_ping_request_packet::ServerboundPingRequestPacket, - 0x22: serverbound_place_recipe_packet::ServerboundPlaceRecipePacket, - 0x23: serverbound_player_abilities_packet::ServerboundPlayerAbilitiesPacket, - 0x24: serverbound_player_action_packet::ServerboundPlayerActionPacket, - 0x25: serverbound_player_command_packet::ServerboundPlayerCommandPacket, - 0x26: serverbound_player_input_packet::ServerboundPlayerInputPacket, - 0x27: serverbound_pong_packet::ServerboundPongPacket, - 0x28: serverbound_recipe_book_change_settings_packet::ServerboundRecipeBookChangeSettingsPacket, - 0x29: serverbound_recipe_book_seen_recipe_packet::ServerboundRecipeBookSeenRecipePacket, - 0x2a: serverbound_rename_item_packet::ServerboundRenameItemPacket, - 0x2b: serverbound_resource_pack_packet::ServerboundResourcePackPacket, - 0x2c: serverbound_seen_advancements_packet::ServerboundSeenAdvancementsPacket, - 0x2d: serverbound_select_trade_packet::ServerboundSelectTradePacket, - 0x2e: serverbound_set_beacon_packet::ServerboundSetBeaconPacket, - 0x2f: serverbound_set_carried_item_packet::ServerboundSetCarriedItemPacket, - 0x30: serverbound_set_command_block_packet::ServerboundSetCommandBlockPacket, - 0x31: serverbound_set_command_minecart_packet::ServerboundSetCommandMinecartPacket, - 0x32: serverbound_set_creative_mode_slot_packet::ServerboundSetCreativeModeSlotPacket, - 0x33: serverbound_set_jigsaw_block_packet::ServerboundSetJigsawBlockPacket, - 0x34: serverbound_set_structure_block_packet::ServerboundSetStructureBlockPacket, - 0x35: serverbound_sign_update_packet::ServerboundSignUpdatePacket, - 0x36: serverbound_swing_packet::ServerboundSwingPacket, - 0x37: serverbound_teleport_to_entity_packet::ServerboundTeleportToEntityPacket, - 0x38: serverbound_use_item_on_packet::ServerboundUseItemOnPacket, - 0x39: serverbound_use_item_packet::ServerboundUseItemPacket, + 0x02: serverbound_select_bundle_item_packet::ServerboundSelectBundleItemPacket, + 0x03: serverbound_change_difficulty_packet::ServerboundChangeDifficultyPacket, + 0x04: serverbound_chat_ack_packet::ServerboundChatAckPacket, + 0x05: serverbound_chat_command_packet::ServerboundChatCommandPacket, + 0x06: serverbound_chat_command_signed_packet::ServerboundChatCommandSignedPacket, + 0x07: serverbound_chat_packet::ServerboundChatPacket, + 0x08: serverbound_chat_session_update_packet::ServerboundChatSessionUpdatePacket, + 0x09: serverbound_chunk_batch_received_packet::ServerboundChunkBatchReceivedPacket, + 0x0a: serverbound_client_command_packet::ServerboundClientCommandPacket, + 0x0b: serverbound_client_tick_end_packet::ServerboundTickEndPacket, + 0x0c: serverbound_client_information_packet::ServerboundClientInformationPacket, + 0x0d: serverbound_command_suggestion_packet::ServerboundCommandSuggestionPacket, + 0x0e: serverbound_configuration_acknowledged_packet::ServerboundConfigurationAcknowledgedPacket, + 0x0f: serverbound_container_button_click_packet::ServerboundContainerButtonClickPacket, + 0x10: serverbound_container_click_packet::ServerboundContainerClickPacket, + 0x11: serverbound_container_close_packet::ServerboundContainerClosePacket, + 0x12: serverbound_container_slot_state_changed_packet::ServerboundContainerSlotStateChangedPacket, + 0x13: serverbound_cookie_response_packet::ServerboundCookieResponsePacket, + 0x14: serverbound_custom_payload_packet::ServerboundCustomPayloadPacket, + 0x15: serverbound_debug_sample_subscription::ServerboundDebugSampleSubscription, + 0x16: serverbound_edit_book_packet::ServerboundEditBookPacket, + 0x17: serverbound_entity_tag_query_packet::ServerboundEntityTagQueryPacket, + 0x18: serverbound_interact_packet::ServerboundInteractPacket, + 0x19: serverbound_jigsaw_generate_packet::ServerboundJigsawGeneratePacket, + 0x1a: serverbound_keep_alive_packet::ServerboundKeepAlivePacket, + 0x1b: serverbound_lock_difficulty_packet::ServerboundLockDifficultyPacket, + 0x1c: serverbound_move_player_pos_packet::ServerboundMovePlayerPosPacket, + 0x1d: serverbound_move_player_pos_rot_packet::ServerboundMovePlayerPosRotPacket, + 0x1e: serverbound_move_player_rot_packet::ServerboundMovePlayerRotPacket, + 0x1f: serverbound_move_player_status_only_packet::ServerboundMovePlayerStatusOnlyPacket, + 0x20: serverbound_move_vehicle_packet::ServerboundMoveVehiclePacket, + 0x21: serverbound_paddle_boat_packet::ServerboundPaddleBoatPacket, + 0x22: serverbound_pick_item_packet::ServerboundPickItemPacket, + 0x23: serverbound_ping_request_packet::ServerboundPingRequestPacket, + 0x24: serverbound_place_recipe_packet::ServerboundPlaceRecipePacket, + 0x25: serverbound_player_abilities_packet::ServerboundPlayerAbilitiesPacket, + 0x26: serverbound_player_action_packet::ServerboundPlayerActionPacket, + 0x27: serverbound_player_command_packet::ServerboundPlayerCommandPacket, + 0x28: serverbound_player_input_packet::ServerboundPlayerInputPacket, + 0x29: serverbound_pong_packet::ServerboundPongPacket, + 0x2a: serverbound_recipe_book_change_settings_packet::ServerboundRecipeBookChangeSettingsPacket, + 0x2b: serverbound_recipe_book_seen_recipe_packet::ServerboundRecipeBookSeenRecipePacket, + 0x2c: serverbound_rename_item_packet::ServerboundRenameItemPacket, + 0x2d: serverbound_resource_pack_packet::ServerboundResourcePackPacket, + 0x2e: serverbound_seen_advancements_packet::ServerboundSeenAdvancementsPacket, + 0x2f: serverbound_select_trade_packet::ServerboundSelectTradePacket, + 0x30: serverbound_set_beacon_packet::ServerboundSetBeaconPacket, + 0x31: serverbound_set_carried_item_packet::ServerboundSetCarriedItemPacket, + 0x32: serverbound_set_command_block_packet::ServerboundSetCommandBlockPacket, + 0x33: serverbound_set_command_minecart_packet::ServerboundSetCommandMinecartPacket, + 0x34: serverbound_set_creative_mode_slot_packet::ServerboundSetCreativeModeSlotPacket, + 0x35: serverbound_set_jigsaw_block_packet::ServerboundSetJigsawBlockPacket, + 0x36: serverbound_set_structure_block_packet::ServerboundSetStructureBlockPacket, + 0x37: serverbound_sign_update_packet::ServerboundSignUpdatePacket, + 0x38: serverbound_swing_packet::ServerboundSwingPacket, + 0x39: serverbound_teleport_to_entity_packet::ServerboundTeleportToEntityPacket, + 0x3a: serverbound_use_item_on_packet::ServerboundUseItemOnPacket, + 0x3b: serverbound_use_item_packet::ServerboundUseItemPacket, }, Clientbound => { 0x00: clientbound_bundle_packet::ClientboundBundlePacket, @@ -275,94 +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_entity_rot_packet::ClientboundMoveEntityRotPacket, - 0x31: clientbound_move_vehicle_packet::ClientboundMoveVehiclePacket, - 0x32: clientbound_open_book_packet::ClientboundOpenBookPacket, - 0x33: clientbound_open_screen_packet::ClientboundOpenScreenPacket, - 0x34: clientbound_open_sign_editor_packet::ClientboundOpenSignEditorPacket, - 0x35: clientbound_ping_packet::ClientboundPingPacket, - 0x36: clientbound_pong_response_packet::ClientboundPongResponsePacket, - 0x37: clientbound_place_ghost_recipe_packet::ClientboundPlaceGhostRecipePacket, - 0x38: clientbound_player_abilities_packet::ClientboundPlayerAbilitiesPacket, - 0x39: clientbound_player_chat_packet::ClientboundPlayerChatPacket, - 0x3a: clientbound_player_combat_end_packet::ClientboundPlayerCombatEndPacket, - 0x3b: clientbound_player_combat_enter_packet::ClientboundPlayerCombatEnterPacket, - 0x3c: clientbound_player_combat_kill_packet::ClientboundPlayerCombatKillPacket, - 0x3d: clientbound_player_info_remove_packet::ClientboundPlayerInfoRemovePacket, - 0x3e: clientbound_player_info_update_packet::ClientboundPlayerInfoUpdatePacket, - 0x3f: clientbound_player_look_at_packet::ClientboundPlayerLookAtPacket, - 0x40: clientbound_player_position_packet::ClientboundPlayerPositionPacket, - 0x41: clientbound_recipe_packet::ClientboundRecipePacket, - 0x42: clientbound_remove_entities_packet::ClientboundRemoveEntitiesPacket, - 0x43: clientbound_remove_mob_effect_packet::ClientboundRemoveMobEffectPacket, - 0x44: clientbound_reset_score_packet::ClientboundResetScorePacket, - 0x45: clientbound_resource_pack_pop_packet::ClientboundResourcePackPopPacket, - 0x46: clientbound_resource_pack_push_packet::ClientboundResourcePackPushPacket, - 0x47: clientbound_respawn_packet::ClientboundRespawnPacket, - 0x48: clientbound_rotate_head_packet::ClientboundRotateHeadPacket, - 0x49: clientbound_section_blocks_update_packet::ClientboundSectionBlocksUpdatePacket, - 0x4a: clientbound_select_advancements_tab_packet::ClientboundSelectAdvancementsTabPacket, - 0x4b: clientbound_server_data_packet::ClientboundServerDataPacket, - 0x4c: clientbound_set_action_bar_text_packet::ClientboundSetActionBarTextPacket, - 0x4d: clientbound_set_border_center_packet::ClientboundSetBorderCenterPacket, - 0x4e: clientbound_set_border_lerp_size_packet::ClientboundSetBorderLerpSizePacket, - 0x4f: clientbound_set_border_size_packet::ClientboundSetBorderSizePacket, - 0x50: clientbound_set_border_warning_delay_packet::ClientboundSetBorderWarningDelayPacket, - 0x51: clientbound_set_border_warning_distance_packet::ClientboundSetBorderWarningDistancePacket, - 0x52: clientbound_set_camera_packet::ClientboundSetCameraPacket, - 0x53: clientbound_set_carried_item_packet::ClientboundSetCarriedItemPacket, - 0x54: clientbound_set_chunk_cache_center_packet::ClientboundSetChunkCacheCenterPacket, - 0x55: clientbound_set_chunk_cache_radius_packet::ClientboundSetChunkCacheRadiusPacket, - 0x56: clientbound_set_default_spawn_position_packet::ClientboundSetDefaultSpawnPositionPacket, - 0x57: clientbound_set_display_objective_packet::ClientboundSetDisplayObjectivePacket, - 0x58: clientbound_set_entity_data_packet::ClientboundSetEntityDataPacket, - 0x59: clientbound_set_entity_link_packet::ClientboundSetEntityLinkPacket, - 0x5a: clientbound_set_entity_motion_packet::ClientboundSetEntityMotionPacket, - 0x5b: clientbound_set_equipment_packet::ClientboundSetEquipmentPacket, - 0x5c: clientbound_set_experience_packet::ClientboundSetExperiencePacket, - 0x5d: clientbound_set_health_packet::ClientboundSetHealthPacket, - 0x5e: clientbound_set_objective_packet::ClientboundSetObjectivePacket, - 0x5f: clientbound_set_passengers_packet::ClientboundSetPassengersPacket, - 0x60: clientbound_set_player_team_packet::ClientboundSetPlayerTeamPacket, - 0x61: clientbound_set_score_packet::ClientboundSetScorePacket, - 0x62: clientbound_set_simulation_distance_packet::ClientboundSetSimulationDistancePacket, - 0x63: clientbound_set_subtitle_text_packet::ClientboundSetSubtitleTextPacket, - 0x64: clientbound_set_time_packet::ClientboundSetTimePacket, - 0x65: clientbound_set_title_text_packet::ClientboundSetTitleTextPacket, - 0x66: clientbound_set_titles_animation_packet::ClientboundSetTitlesAnimationPacket, - 0x67: clientbound_sound_entity_packet::ClientboundSoundEntityPacket, - 0x68: clientbound_sound_packet::ClientboundSoundPacket, - 0x69: clientbound_start_configuration_packet::ClientboundStartConfigurationPacket, - 0x6a: clientbound_stop_sound_packet::ClientboundStopSoundPacket, - 0x6b: clientbound_store_cookie_packet::ClientboundStoreCookiePacket, - 0x6c: clientbound_system_chat_packet::ClientboundSystemChatPacket, - 0x6d: clientbound_tab_list_packet::ClientboundTabListPacket, - 0x6e: clientbound_tag_query_packet::ClientboundTagQueryPacket, - 0x6f: clientbound_take_item_entity_packet::ClientboundTakeItemEntityPacket, - 0x70: clientbound_teleport_entity_packet::ClientboundTeleportEntityPacket, - 0x71: clientbound_ticking_state_packet::ClientboundTickingStatePacket, - 0x72: clientbound_ticking_step_packet::ClientboundTickingStepPacket, - 0x73: clientbound_transfer_packet::ClientboundTransferPacket, - 0x74: clientbound_update_advancements_packet::ClientboundUpdateAdvancementsPacket, - 0x75: clientbound_update_attributes_packet::ClientboundUpdateAttributesPacket, - 0x76: clientbound_update_mob_effect_packet::ClientboundUpdateMobEffectPacket, - 0x77: clientbound_update_recipes_packet::ClientboundUpdateRecipesPacket, - 0x78: clientbound_update_tags_packet::ClientboundUpdateTagsPacket, + 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/game/serverbound_client_tick_end_packet.rs b/azalea-protocol/src/packets/game/serverbound_client_tick_end_packet.rs new file mode 100644 index 000000000..c843066ed --- /dev/null +++ b/azalea-protocol/src/packets/game/serverbound_client_tick_end_packet.rs @@ -0,0 +1,5 @@ +use azalea_buf::McBuf; +use azalea_protocol_macros::ServerboundGamePacket; + +#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +pub struct ServerboundTickEndPacket {} diff --git a/azalea-protocol/src/packets/game/serverbound_player_input_packet.rs b/azalea-protocol/src/packets/game/serverbound_player_input_packet.rs index db6e51a9a..a461ddf50 100755 --- a/azalea-protocol/src/packets/game/serverbound_player_input_packet.rs +++ b/azalea-protocol/src/packets/game/serverbound_player_input_packet.rs @@ -7,37 +7,54 @@ use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, ServerboundGamePacket)] pub struct ServerboundPlayerInputPacket { - pub xxa: f32, - pub zza: f32, - pub is_jumping: bool, - pub is_shift_key_down: bool, + pub forward: bool, + pub backward: bool, + pub left: bool, + pub right: bool, + pub jump: bool, + pub shift: bool, + pub sprint: bool, } impl McBufReadable for ServerboundPlayerInputPacket { fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let xxa = f32::read_from(buf)?; - let zza = f32::read_from(buf)?; - let set = FixedBitSet::<2>::read_from(buf)?; + let set = FixedBitSet::<7>::read_from(buf)?; Ok(Self { - xxa, - zza, - is_jumping: set.index(0), - is_shift_key_down: set.index(1), + forward: set.index(0), + backward: set.index(1), + left: set.index(2), + right: set.index(3), + jump: set.index(4), + shift: set.index(5), + sprint: set.index(6), }) } } impl McBufWritable for ServerboundPlayerInputPacket { fn write_into(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { - self.xxa.write_into(buf)?; - self.zza.write_into(buf)?; - let mut set = FixedBitSet::<2>::new(); - if self.is_jumping { + let mut set = FixedBitSet::<7>::new(); + if self.forward { set.set(0); } - if self.is_shift_key_down { + if self.backward { set.set(1); } + if self.left { + set.set(2); + } + if self.right { + set.set(3); + } + if self.jump { + set.set(4); + } + if self.shift { + set.set(5); + } + if self.sprint { + set.set(6); + } set.write_into(buf) } } diff --git a/azalea-protocol/src/packets/game/serverbound_select_bundle_item_packet.rs b/azalea-protocol/src/packets/game/serverbound_select_bundle_item_packet.rs new file mode 100644 index 000000000..3a315183a --- /dev/null +++ b/azalea-protocol/src/packets/game/serverbound_select_bundle_item_packet.rs @@ -0,0 +1,10 @@ +use azalea_buf::McBuf; +use azalea_protocol_macros::ServerboundGamePacket; + +#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +pub struct ServerboundSelectBundleItemPacket { + #[var] + pub slot_id: i32, + #[var] + pub selected_item_index: u32, +} diff --git a/azalea-protocol/src/packets/login/clientbound_game_profile_packet.rs b/azalea-protocol/src/packets/login/clientbound_login_finished_packet.rs similarity index 72% rename from azalea-protocol/src/packets/login/clientbound_game_profile_packet.rs rename to azalea-protocol/src/packets/login/clientbound_login_finished_packet.rs index 51f486d07..f885f67ff 100755 --- a/azalea-protocol/src/packets/login/clientbound_game_profile_packet.rs +++ b/azalea-protocol/src/packets/login/clientbound_login_finished_packet.rs @@ -3,7 +3,6 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundLoginPacket; #[derive(Clone, Debug, McBuf, ClientboundLoginPacket)] -pub struct ClientboundGameProfilePacket { +pub struct ClientboundLoginFinishedPacket { pub game_profile: GameProfile, - pub strict_error_handling: bool, } diff --git a/azalea-protocol/src/packets/login/mod.rs b/azalea-protocol/src/packets/login/mod.rs index 2037f2c1c..3d218cc12 100755 --- a/azalea-protocol/src/packets/login/mod.rs +++ b/azalea-protocol/src/packets/login/mod.rs @@ -1,9 +1,9 @@ pub mod clientbound_cookie_request_packet; pub mod clientbound_custom_query_packet; -pub mod clientbound_game_profile_packet; pub mod clientbound_hello_packet; pub mod clientbound_login_compression_packet; pub mod clientbound_login_disconnect_packet; +pub mod clientbound_login_finished_packet; pub mod serverbound_cookie_response_packet; pub mod serverbound_custom_query_answer_packet; pub mod serverbound_hello_packet; @@ -24,7 +24,7 @@ declare_state_packets!( Clientbound => { 0x00: clientbound_login_disconnect_packet::ClientboundLoginDisconnectPacket, 0x01: clientbound_hello_packet::ClientboundHelloPacket, - 0x02: clientbound_game_profile_packet::ClientboundGameProfilePacket, + 0x02: clientbound_login_finished_packet::ClientboundLoginFinishedPacket, 0x03: clientbound_login_compression_packet::ClientboundLoginCompressionPacket, 0x04: clientbound_custom_query_packet::ClientboundCustomQueryPacket, 0x05: clientbound_cookie_request_packet::ClientboundCookieRequestPacket, diff --git a/azalea-protocol/src/packets/mod.rs b/azalea-protocol/src/packets/mod.rs index 41d37c7bb..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 = 767; +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 ce61429d6..e66ccabc1 100755 --- a/azalea-registry/src/lib.rs +++ b/azalea-registry/src/lib.rs @@ -8,6 +8,7 @@ mod extra; pub mod tags; +use std::fmt::{self, Debug}; use std::io::{Cursor, Write}; use azalea_buf::{BufReadError, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable}; @@ -111,7 +112,6 @@ impl McBufReadable } } } - impl McBufWritable for HolderSet { @@ -131,6 +131,20 @@ impl McBufWritable Ok(()) } } +impl Debug + for HolderSet +{ + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + Self::Direct { contents } => f.debug_list().entries(contents).finish(), + Self::Named { key, contents } => f + .debug_struct("Named") + .field("key", key) + .field("contents", contents) + .finish(), + } + } +} registry! { /// The AI code that's currently being executed for the entity. @@ -166,37 +180,38 @@ enum Activity { registry! { enum Attribute { - GenericArmor => "minecraft:generic.armor", - GenericArmorToughness => "minecraft:generic.armor_toughness", - GenericAttackDamage => "minecraft:generic.attack_damage", - GenericAttackKnockback => "minecraft:generic.attack_knockback", - GenericAttackSpeed => "minecraft:generic.attack_speed", - PlayerBlockBreakSpeed => "minecraft:player.block_break_speed", - PlayerBlockInteractionRange => "minecraft:player.block_interaction_range", - GenericBurningTime => "minecraft:generic.burning_time", - GenericExplosionKnockbackResistance => "minecraft:generic.explosion_knockback_resistance", - PlayerEntityInteractionRange => "minecraft:player.entity_interaction_range", - GenericFallDamageMultiplier => "minecraft:generic.fall_damage_multiplier", - GenericFlyingSpeed => "minecraft:generic.flying_speed", - GenericFollowRange => "minecraft:generic.follow_range", - GenericGravity => "minecraft:generic.gravity", - GenericJumpStrength => "minecraft:generic.jump_strength", - GenericKnockbackResistance => "minecraft:generic.knockback_resistance", - GenericLuck => "minecraft:generic.luck", - GenericMaxAbsorption => "minecraft:generic.max_absorption", - GenericMaxHealth => "minecraft:generic.max_health", - PlayerMiningEfficiency => "minecraft:player.mining_efficiency", - GenericMovementEfficiency => "minecraft:generic.movement_efficiency", - GenericMovementSpeed => "minecraft:generic.movement_speed", - GenericOxygenBonus => "minecraft:generic.oxygen_bonus", - GenericSafeFallDistance => "minecraft:generic.safe_fall_distance", - GenericScale => "minecraft:generic.scale", - PlayerSneakingSpeed => "minecraft:player.sneaking_speed", - ZombieSpawnReinforcements => "minecraft:zombie.spawn_reinforcements", - GenericStepHeight => "minecraft:generic.step_height", - PlayerSubmergedMiningSpeed => "minecraft:player.submerged_mining_speed", - PlayerSweepingDamageRatio => "minecraft:player.sweeping_damage_ratio", - GenericWaterMovementEfficiency => "minecraft:generic.water_movement_efficiency", + Armor => "minecraft:armor", + ArmorToughness => "minecraft:armor_toughness", + AttackDamage => "minecraft:attack_damage", + AttackKnockback => "minecraft:attack_knockback", + AttackSpeed => "minecraft:attack_speed", + BlockBreakSpeed => "minecraft:block_break_speed", + BlockInteractionRange => "minecraft:block_interaction_range", + BurningTime => "minecraft:burning_time", + ExplosionKnockbackResistance => "minecraft:explosion_knockback_resistance", + EntityInteractionRange => "minecraft:entity_interaction_range", + FallDamageMultiplier => "minecraft:fall_damage_multiplier", + FlyingSpeed => "minecraft:flying_speed", + FollowRange => "minecraft:follow_range", + Gravity => "minecraft:gravity", + JumpStrength => "minecraft:jump_strength", + KnockbackResistance => "minecraft:knockback_resistance", + Luck => "minecraft:luck", + MaxAbsorption => "minecraft:max_absorption", + MaxHealth => "minecraft:max_health", + MiningEfficiency => "minecraft:mining_efficiency", + MovementEfficiency => "minecraft:movement_efficiency", + MovementSpeed => "minecraft:movement_speed", + OxygenBonus => "minecraft:oxygen_bonus", + SafeFallDistance => "minecraft:safe_fall_distance", + Scale => "minecraft:scale", + SneakingSpeed => "minecraft:sneaking_speed", + SpawnReinforcements => "minecraft:spawn_reinforcements", + StepHeight => "minecraft:step_height", + SubmergedMiningSpeed => "minecraft:submerged_mining_speed", + SweepingDamageRatio => "minecraft:sweeping_damage_ratio", + TemptRange => "minecraft:tempt_range", + WaterMovementEfficiency => "minecraft:water_movement_efficiency", } } @@ -273,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", @@ -283,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", @@ -306,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", @@ -316,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", @@ -334,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", @@ -342,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", @@ -429,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", @@ -446,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", @@ -459,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", @@ -468,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", @@ -479,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", @@ -493,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", @@ -544,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", @@ -617,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", @@ -645,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", @@ -713,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", @@ -799,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", @@ -826,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", @@ -834,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", @@ -842,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", @@ -1313,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", } } @@ -1331,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", @@ -1608,47 +1648,58 @@ enum Enchantment { registry! { /// An enum that contains every type of entity. enum EntityKind { + AcaciaBoat => "minecraft:acacia_boat", + AcaciaChestBoat => "minecraft:acacia_chest_boat", Allay => "minecraft:allay", AreaEffectCloud => "minecraft:area_effect_cloud", Armadillo => "minecraft:armadillo", ArmorStand => "minecraft:armor_stand", Arrow => "minecraft:arrow", Axolotl => "minecraft:axolotl", + BambooChestRaft => "minecraft:bamboo_chest_raft", + BambooRaft => "minecraft:bamboo_raft", Bat => "minecraft:bat", Bee => "minecraft:bee", + BirchBoat => "minecraft:birch_boat", + BirchChestBoat => "minecraft:birch_chest_boat", Blaze => "minecraft:blaze", BlockDisplay => "minecraft:block_display", - Boat => "minecraft:boat", Bogged => "minecraft:bogged", Breeze => "minecraft:breeze", BreezeWindCharge => "minecraft:breeze_wind_charge", Camel => "minecraft:camel", Cat => "minecraft:cat", CaveSpider => "minecraft:cave_spider", - ChestBoat => "minecraft:chest_boat", + CherryBoat => "minecraft:cherry_boat", + CherryChestBoat => "minecraft:cherry_chest_boat", ChestMinecart => "minecraft:chest_minecart", Chicken => "minecraft:chicken", 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", Dolphin => "minecraft:dolphin", Donkey => "minecraft:donkey", DragonFireball => "minecraft:dragon_fireball", Drowned => "minecraft:drowned", Egg => "minecraft:egg", ElderGuardian => "minecraft:elder_guardian", - EndCrystal => "minecraft:end_crystal", - EnderDragon => "minecraft:ender_dragon", - EnderPearl => "minecraft:ender_pearl", Enderman => "minecraft:enderman", Endermite => "minecraft:endermite", + EnderDragon => "minecraft:ender_dragon", + EnderPearl => "minecraft:ender_pearl", + EndCrystal => "minecraft:end_crystal", Evoker => "minecraft:evoker", EvokerFangs => "minecraft:evoker_fangs", ExperienceBottle => "minecraft:experience_bottle", ExperienceOrb => "minecraft:experience_orb", EyeOfEnder => "minecraft:eye_of_ender", FallingBlock => "minecraft:falling_block", + Fireball => "minecraft:fireball", FireworkRocket => "minecraft:firework_rocket", Fox => "minecraft:fox", Frog => "minecraft:frog", @@ -1669,19 +1720,26 @@ enum EntityKind { Item => "minecraft:item", ItemDisplay => "minecraft:item_display", ItemFrame => "minecraft:item_frame", - OminousItemSpawner => "minecraft:ominous_item_spawner", - Fireball => "minecraft:fireball", + JungleBoat => "minecraft:jungle_boat", + JungleChestBoat => "minecraft:jungle_chest_boat", LeashKnot => "minecraft:leash_knot", LightningBolt => "minecraft:lightning_bolt", Llama => "minecraft:llama", LlamaSpit => "minecraft:llama_spit", MagmaCube => "minecraft:magma_cube", + MangroveBoat => "minecraft:mangrove_boat", + MangroveChestBoat => "minecraft:mangrove_chest_boat", Marker => "minecraft:marker", Minecart => "minecraft:minecart", Mooshroom => "minecraft:mooshroom", Mule => "minecraft:mule", + OakBoat => "minecraft:oak_boat", + OakChestBoat => "minecraft:oak_chest_boat", 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", @@ -1704,11 +1762,13 @@ enum EntityKind { Slime => "minecraft:slime", SmallFireball => "minecraft:small_fireball", Sniffer => "minecraft:sniffer", - SnowGolem => "minecraft:snow_golem", Snowball => "minecraft:snowball", + SnowGolem => "minecraft:snow_golem", SpawnerMinecart => "minecraft:spawner_minecart", SpectralArrow => "minecraft:spectral_arrow", Spider => "minecraft:spider", + SpruceBoat => "minecraft:spruce_boat", + SpruceChestBoat => "minecraft:spruce_chest_boat", Squid => "minecraft:squid", Stray => "minecraft:stray", Strider => "minecraft:strider", @@ -1913,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", @@ -1925,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", @@ -2008,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", @@ -2022,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", @@ -2032,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", @@ -2042,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", @@ -2053,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", @@ -2115,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", @@ -2129,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", @@ -2169,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", @@ -2188,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", @@ -2260,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", @@ -2561,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", @@ -2576,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", @@ -2588,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", @@ -2608,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", @@ -2627,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", @@ -2643,6 +2722,7 @@ enum Item { HopperMinecart => "minecraft:hopper_minecart", CarrotOnAStick => "minecraft:carrot_on_a_stick", WarpedFungusOnAStick => "minecraft:warped_fungus_on_a_stick", + PhantomMembrane => "minecraft:phantom_membrane", Elytra => "minecraft:elytra", OakBoat => "minecraft:oak_boat", OakChestBoat => "minecraft:oak_chest_boat", @@ -2658,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", @@ -2763,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", @@ -2774,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", @@ -2801,6 +2885,22 @@ enum Item { Compass => "minecraft:compass", RecoveryCompass => "minecraft:recovery_compass", Bundle => "minecraft:bundle", + WhiteBundle => "minecraft:white_bundle", + OrangeBundle => "minecraft:orange_bundle", + MagentaBundle => "minecraft:magenta_bundle", + LightBlueBundle => "minecraft:light_blue_bundle", + YellowBundle => "minecraft:yellow_bundle", + LimeBundle => "minecraft:lime_bundle", + PinkBundle => "minecraft:pink_bundle", + GrayBundle => "minecraft:gray_bundle", + LightGrayBundle => "minecraft:light_gray_bundle", + CyanBundle => "minecraft:cyan_bundle", + PurpleBundle => "minecraft:purple_bundle", + BlueBundle => "minecraft:blue_bundle", + BrownBundle => "minecraft:brown_bundle", + GreenBundle => "minecraft:green_bundle", + RedBundle => "minecraft:red_bundle", + BlackBundle => "minecraft:black_bundle", FishingRod => "minecraft:fishing_rod", Clock => "minecraft:clock", Spyglass => "minecraft:spyglass", @@ -2868,8 +2968,8 @@ enum Item { GhastTear => "minecraft:ghast_tear", GoldNugget => "minecraft:gold_nugget", NetherWart => "minecraft:nether_wart", - Potion => "minecraft:potion", GlassBottle => "minecraft:glass_bottle", + Potion => "minecraft:potion", SpiderEye => "minecraft:spider_eye", FermentedSpiderEye => "minecraft:fermented_spider_eye", BlazePowder => "minecraft:blaze_powder", @@ -2954,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", @@ -2963,6 +3064,7 @@ enum Item { WindCharge => "minecraft:wind_charge", WritableBook => "minecraft:writable_book", WrittenBook => "minecraft:written_book", + BreezeRod => "minecraft:breeze_rod", Mace => "minecraft:mace", ItemFrame => "minecraft:item_frame", GlowItemFrame => "minecraft:glow_item_frame", @@ -3059,7 +3161,6 @@ enum Item { MusicDiscPrecipice => "minecraft:music_disc_precipice", DiscFragment5 => "minecraft:disc_fragment_5", Trident => "minecraft:trident", - PhantomMembrane => "minecraft:phantom_membrane", NautilusShell => "minecraft:nautilus_shell", HeartOfTheSea => "minecraft:heart_of_the_sea", Crossbow => "minecraft:crossbow", @@ -3073,6 +3174,8 @@ enum Item { PiglinBannerPattern => "minecraft:piglin_banner_pattern", FlowBannerPattern => "minecraft:flow_banner_pattern", GusterBannerPattern => "minecraft:guster_banner_pattern", + FieldMasonedBannerPattern => "minecraft:field_masoned_banner_pattern", + BordureIndentedBannerPattern => "minecraft:bordure_indented_banner_pattern", GoatHorn => "minecraft:goat_horn", Composter => "minecraft:composter", Barrel => "minecraft:barrel", @@ -3202,7 +3305,6 @@ enum Item { OminousTrialKey => "minecraft:ominous_trial_key", Vault => "minecraft:vault", OminousBottle => "minecraft:ominous_bottle", - BreezeRod => "minecraft:breeze_rod", } } @@ -3580,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", @@ -3643,6 +3746,7 @@ enum ParticleKind { OminousSpawning => "minecraft:ominous_spawning", RaidOmen => "minecraft:raid_omen", TrialOmen => "minecraft:trial_omen", + BlockCrumble => "minecraft:block_crumble", } } @@ -3751,8 +3855,7 @@ enum RecipeSerializer { CraftingSpecialTippedarrow => "minecraft:crafting_special_tippedarrow", CraftingSpecialBannerduplicate => "minecraft:crafting_special_bannerduplicate", CraftingSpecialShielddecoration => "minecraft:crafting_special_shielddecoration", - CraftingSpecialShulkerboxcoloring => "minecraft:crafting_special_shulkerboxcoloring", - CraftingSpecialSuspiciousstew => "minecraft:crafting_special_suspiciousstew", + CraftingTransmute => "minecraft:crafting_transmute", CraftingSpecialRepairitem => "minecraft:crafting_special_repairitem", Smelting => "minecraft:smelting", Blasting => "minecraft:blasting", @@ -4040,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", @@ -4054,6 +4158,7 @@ enum SoundEvent { ItemBucketFillTadpole => "minecraft:item.bucket.fill_tadpole", ItemBundleDropContents => "minecraft:item.bundle.drop_contents", ItemBundleInsert => "minecraft:item.bundle.insert", + ItemBundleInsertFail => "minecraft:item.bundle.insert_fail", ItemBundleRemoveOne => "minecraft:item.bundle.remove_one", BlockCakeAddCandle => "minecraft:block.cake.add_candle", BlockCalciteBreak => "minecraft:block.calcite.break", @@ -4202,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", @@ -4447,7 +4570,6 @@ enum SoundEvent { EntityGoatPrepareRam => "minecraft:entity.goat.prepare_ram", EntityGoatRamImpact => "minecraft:entity.goat.ram_impact", EntityGoatHornBreak => "minecraft:entity.goat.horn_break", - ItemGoatHornPlay => "minecraft:item.goat_horn.play", EntityGoatScreamingAmbient => "minecraft:entity.goat.screaming.ambient", EntityGoatScreamingDeath => "minecraft:entity.goat.screaming.death", EntityGoatScreamingEat => "minecraft:entity.goat.screaming.eat", @@ -4456,7 +4578,6 @@ enum SoundEvent { EntityGoatScreamingMilk => "minecraft:entity.goat.screaming.milk", EntityGoatScreamingPrepareRam => "minecraft:entity.goat.screaming.prepare_ram", EntityGoatScreamingRamImpact => "minecraft:entity.goat.screaming.ram_impact", - EntityGoatScreamingHornBreak => "minecraft:entity.goat.screaming.horn_break", EntityGoatStep => "minecraft:entity.goat.step", BlockGrassBreak => "minecraft:block.grass.break", BlockGrassFall => "minecraft:block.grass.fall", @@ -4844,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", @@ -4863,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", @@ -5127,6 +5250,11 @@ enum SoundEvent { BlockSoulSoilHit => "minecraft:block.soul_soil.hit", BlockSoulSoilFall => "minecraft:block.soul_soil.fall", ParticleSoulEscape => "minecraft:particle.soul_escape", + BlockSpawnerBreak => "minecraft:block.spawner.break", + BlockSpawnerFall => "minecraft:block.spawner.fall", + BlockSpawnerHit => "minecraft:block.spawner.hit", + BlockSpawnerPlace => "minecraft:block.spawner.place", + BlockSpawnerStep => "minecraft:block.spawner.step", BlockSporeBlossomBreak => "minecraft:block.spore_blossom.break", BlockSporeBlossomFall => "minecraft:block.spore_blossom.fall", BlockSporeBlossomHit => "minecraft:block.spore_blossom.hit", @@ -5695,7 +5823,6 @@ enum WorldgenPlacementModifierKind { HeightRange => "minecraft:height_range", InSquare => "minecraft:in_square", RandomOffset => "minecraft:random_offset", - CarvingMask => "minecraft:carving_mask", FixedPlacement => "minecraft:fixed_placement", } } @@ -5825,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", @@ -5973,7 +6102,6 @@ enum BlockKind { Carpet => "minecraft:carpet", Carrot => "minecraft:carrot", CartographyTable => "minecraft:cartography_table", - CarvedPumpkin => "minecraft:carved_pumpkin", Cauldron => "minecraft:cauldron", CaveVines => "minecraft:cave_vines", CaveVinesPlant => "minecraft:cave_vines_plant", @@ -6018,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", @@ -6033,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", @@ -6063,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", @@ -6122,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", @@ -6222,7 +6353,7 @@ enum TriggerKind { FishingRodHooked => "minecraft:fishing_rod_hooked", ChanneledLightning => "minecraft:channeled_lightning", ShotCrossbow => "minecraft:shot_crossbow", - KilledByCrossbow => "minecraft:killed_by_crossbow", + KilledByArrow => "minecraft:killed_by_arrow", HeroOfTheVillage => "minecraft:hero_of_the_village", VoluntaryExile => "minecraft:voluntary_exile", SlideDownBlock => "minecraft:slide_down_block", @@ -6279,6 +6410,7 @@ enum DataComponentKind { Unbreakable => "minecraft:unbreakable", CustomName => "minecraft:custom_name", ItemName => "minecraft:item_name", + ItemModel => "minecraft:item_model", Lore => "minecraft:lore", Rarity => "minecraft:rarity", Enchantments => "minecraft:enchantments", @@ -6293,8 +6425,17 @@ enum DataComponentKind { EnchantmentGlintOverride => "minecraft:enchantment_glint_override", IntangibleProjectile => "minecraft:intangible_projectile", Food => "minecraft:food", - FireResistant => "minecraft:fire_resistant", + Consumable => "minecraft:consumable", + UseRemainder => "minecraft:use_remainder", + UseCooldown => "minecraft:use_cooldown", + DamageResistant => "minecraft:damage_resistant", Tool => "minecraft:tool", + Enchantable => "minecraft:enchantable", + Equippable => "minecraft:equippable", + Repairable => "minecraft:repairable", + Glider => "minecraft:glider", + TooltipStyle => "minecraft:tooltip_style", + DeathProtection => "minecraft:death_protection", StoredEnchantments => "minecraft:stored_enchantments", DyedColor => "minecraft:dyed_color", MapColor => "minecraft:map_color", @@ -6339,8 +6480,8 @@ enum EntitySubPredicateKind { Player => "minecraft:player", Slime => "minecraft:slime", Raider => "minecraft:raider", + Sheep => "minecraft:sheep", Axolotl => "minecraft:axolotl", - Boat => "minecraft:boat", Fox => "minecraft:fox", Mooshroom => "minecraft:mooshroom", Rabbit => "minecraft:rabbit", @@ -6348,6 +6489,7 @@ enum EntitySubPredicateKind { Llama => "minecraft:llama", Villager => "minecraft:villager", Parrot => "minecraft:parrot", + Salmon => "minecraft:salmon", TropicalFish => "minecraft:tropical_fish", Painting => "minecraft:painting", Cat => "minecraft:cat", @@ -6454,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", @@ -6483,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", @@ -6543,3 +6685,54 @@ enum DecoratedPotPattern { Blank => "minecraft:blank", } } + +registry! { +enum ConsumeEffectKind { + ApplyEffects => "minecraft:apply_effects", + RemoveEffects => "minecraft:remove_effects", + ClearAllEffects => "minecraft:clear_all_effects", + TeleportRandomly => "minecraft:teleport_randomly", + 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/blocks.rs b/azalea-registry/src/tags/blocks.rs index 039ee0f83..b57ae8c9e 100644 --- a/azalea-registry/src/tags/blocks.rs +++ b/azalea-registry/src/tags/blocks.rs @@ -286,6 +286,16 @@ pub static BASE_STONE_OVERWORLD: Lazy> = Lazy::new(|| { Block::Deepslate, ]) }); +pub static BATS_SPAWNABLE_ON: Lazy> = Lazy::new(|| { + HashSet::from_iter(vec![ + Block::Stone, + Block::Granite, + Block::Diorite, + Block::Andesite, + Block::Tuff, + Block::Deepslate, + ]) +}); pub static BEACON_BASE_BLOCKS: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ Block::NetheriteBlock, diff --git a/azalea-registry/src/tags/items.rs b/azalea-registry/src/tags/items.rs index dcb85967f..e8c31ddf3 100644 --- a/azalea-registry/src/tags/items.rs +++ b/azalea-registry/src/tags/items.rs @@ -188,6 +188,29 @@ pub static BREAKS_DECORATED_POTS: Lazy> = Lazy::new(|| { Item::IronHoe, ]) }); +pub static BREWING_FUEL: Lazy> = + Lazy::new(|| HashSet::from_iter(vec![Item::BlazePowder])); +pub static BUNDLES: Lazy> = Lazy::new(|| { + HashSet::from_iter(vec![ + Item::Bundle, + Item::BlackBundle, + Item::BlueBundle, + Item::BrownBundle, + Item::CyanBundle, + Item::GrayBundle, + Item::GreenBundle, + Item::LightBlueBundle, + Item::LightGrayBundle, + Item::LimeBundle, + Item::MagentaBundle, + Item::OrangeBundle, + Item::PinkBundle, + Item::PurpleBundle, + Item::RedBundle, + Item::YellowBundle, + Item::WhiteBundle, + ]) +}); pub static BUTTONS: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ Item::OakButton, @@ -472,6 +495,8 @@ pub static DECORATED_POT_SHERDS: Lazy> = Lazy::new(|| { }); pub static DIAMOND_ORES: Lazy> = Lazy::new(|| HashSet::from_iter(vec![Item::DiamondOre, Item::DeepslateDiamondOre])); +pub static DIAMOND_TOOL_MATERIALS: Lazy> = + Lazy::new(|| HashSet::from_iter(vec![Item::Diamond])); pub static DIRT: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ Item::Dirt, @@ -509,6 +534,8 @@ pub static DOORS: Lazy> = Lazy::new(|| { Item::CherryDoor, ]) }); +pub static DUPLICATES_ALLAYS: Lazy> = + Lazy::new(|| HashSet::from_iter(vec![Item::AmethystShard])); pub static DYEABLE: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ Item::LeatherHelmet, @@ -993,6 +1020,10 @@ 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![ @@ -1001,6 +1032,8 @@ pub static GOLD_ORES: Lazy> = Lazy::new(|| { Item::DeepslateGoldOre, ]) }); +pub static GOLD_TOOL_MATERIALS: Lazy> = + Lazy::new(|| HashSet::from_iter(vec![Item::GoldIngot])); pub static HANGING_SIGNS: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ Item::OakHangingSign, @@ -1061,6 +1094,8 @@ pub static IGNORED_BY_PIGLIN_BABIES: Lazy> = Lazy::new(|| HashSet::from_iter(vec![Item::Leather])); pub static IRON_ORES: Lazy> = Lazy::new(|| HashSet::from_iter(vec![Item::IronOre, Item::DeepslateIronOre])); +pub static IRON_TOOL_MATERIALS: Lazy> = + Lazy::new(|| HashSet::from_iter(vec![Item::IronIngot])); pub static JUNGLE_LOGS: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ Item::JungleLog, @@ -1189,6 +1224,8 @@ pub static MANGROVE_LOGS: Lazy> = Lazy::new(|| { Item::StrippedMangroveWood, ]) }); +pub static MAP_INVISIBILITY_EQUIPMENT: Lazy> = + Lazy::new(|| HashSet::from_iter(vec![Item::CarvedPumpkin])); pub static MEAT: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ Item::Beef, @@ -1204,6 +1241,8 @@ pub static MEAT: Lazy> = Lazy::new(|| { Item::RottenFlesh, ]) }); +pub static NETHERITE_TOOL_MATERIALS: Lazy> = + Lazy::new(|| HashSet::from_iter(vec![Item::NetheriteIngot])); pub static NON_FLAMMABLE_WOOD: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ Item::WarpedStem, @@ -1259,6 +1298,8 @@ pub static OAK_LOGS: Lazy> = Lazy::new(|| { }); pub static OCELOT_FOOD: Lazy> = Lazy::new(|| HashSet::from_iter(vec![Item::Cod, Item::Salmon])); +pub static PANDA_EATS_FROM_GROUND: Lazy> = + Lazy::new(|| HashSet::from_iter(vec![Item::Cake, Item::Bamboo])); pub static PANDA_FOOD: Lazy> = Lazy::new(|| HashSet::from_iter(vec![Item::Bamboo])); pub static PARROT_FOOD: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ @@ -1317,6 +1358,14 @@ pub static PIGLIN_LOVED: Lazy> = Lazy::new(|| { }); pub static PIGLIN_REPELLENTS: Lazy> = Lazy::new(|| HashSet::from_iter(vec![Item::SoulTorch, Item::SoulLantern, Item::SoulCampfire])); +pub static PIGLIN_SAFE_ARMOR: Lazy> = Lazy::new(|| { + HashSet::from_iter(vec![ + Item::GoldenHelmet, + Item::GoldenChestplate, + Item::GoldenLeggings, + Item::GoldenBoots, + ]) +}); pub static PLANKS: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ Item::OakPlanks, @@ -1344,6 +1393,22 @@ pub static RAILS: Lazy> = Lazy::new(|| { }); pub static REDSTONE_ORES: Lazy> = Lazy::new(|| HashSet::from_iter(vec![Item::RedstoneOre, Item::DeepslateRedstoneOre])); +pub static REPAIRS_CHAIN_ARMOR: Lazy> = + Lazy::new(|| HashSet::from_iter(vec![Item::IronIngot])); +pub static REPAIRS_DIAMOND_ARMOR: Lazy> = + Lazy::new(|| HashSet::from_iter(vec![Item::Diamond])); +pub static REPAIRS_GOLD_ARMOR: Lazy> = + Lazy::new(|| HashSet::from_iter(vec![Item::GoldIngot])); +pub static REPAIRS_IRON_ARMOR: Lazy> = + Lazy::new(|| HashSet::from_iter(vec![Item::IronIngot])); +pub static REPAIRS_LEATHER_ARMOR: Lazy> = + Lazy::new(|| HashSet::from_iter(vec![Item::Leather])); +pub static REPAIRS_NETHERITE_ARMOR: Lazy> = + Lazy::new(|| HashSet::from_iter(vec![Item::NetheriteIngot])); +pub static REPAIRS_TURTLE_HELMET: Lazy> = + Lazy::new(|| HashSet::from_iter(vec![Item::TurtleScute])); +pub static REPAIRS_WOLF_ARMOR: Lazy> = + Lazy::new(|| HashSet::from_iter(vec![Item::ArmadilloScute])); pub static SAND: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ Item::Sand, @@ -1377,6 +1442,27 @@ pub static SHOVELS: Lazy> = Lazy::new(|| { Item::IronShovel, ]) }); +pub static SHULKER_BOXES: Lazy> = Lazy::new(|| { + HashSet::from_iter(vec![ + Item::ShulkerBox, + Item::BlackShulkerBox, + Item::BlueShulkerBox, + Item::BrownShulkerBox, + Item::CyanShulkerBox, + Item::GrayShulkerBox, + Item::GreenShulkerBox, + Item::LightBlueShulkerBox, + Item::LightGrayShulkerBox, + Item::LimeShulkerBox, + Item::MagentaShulkerBox, + Item::OrangeShulkerBox, + Item::PinkShulkerBox, + Item::PurpleShulkerBox, + Item::RedShulkerBox, + Item::WhiteShulkerBox, + Item::YellowShulkerBox, + ]) +}); pub static SIGNS: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ Item::OakSign, @@ -1718,6 +1804,19 @@ pub static TRIMMABLE_ARMOR: Lazy> = Lazy::new(|| { }); pub static TURTLE_FOOD: Lazy> = Lazy::new(|| HashSet::from_iter(vec![Item::Seagrass])); +pub static VILLAGER_PICKS_UP: Lazy> = Lazy::new(|| { + HashSet::from_iter(vec![ + Item::Bread, + Item::Wheat, + Item::Beetroot, + Item::WheatSeeds, + Item::Potato, + Item::Carrot, + Item::BeetrootSeeds, + Item::TorchflowerSeeds, + Item::PitcherPod, + ]) +}); pub static VILLAGER_PLANTABLE_SEEDS: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ Item::WheatSeeds, @@ -1769,6 +1868,13 @@ pub static WART_BLOCKS: Lazy> = Lazy::new(|| HashSet::from_iter(vec![Item::NetherWartBlock, Item::WarpedWartBlock])); pub static WOLF_FOOD: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ + Item::Cod, + Item::CookedCod, + Item::Salmon, + Item::CookedSalmon, + Item::TropicalFish, + Item::Pufferfish, + Item::RabbitStew, Item::Beef, Item::Chicken, Item::CookedBeef, @@ -1872,6 +1978,21 @@ pub static WOODEN_STAIRS: Lazy> = Lazy::new(|| { Item::CherryStairs, ]) }); +pub static WOODEN_TOOL_MATERIALS: Lazy> = Lazy::new(|| { + HashSet::from_iter(vec![ + Item::OakPlanks, + Item::SprucePlanks, + Item::BirchPlanks, + Item::JunglePlanks, + Item::AcaciaPlanks, + Item::DarkOakPlanks, + Item::CrimsonPlanks, + Item::WarpedPlanks, + Item::MangrovePlanks, + Item::BambooPlanks, + Item::CherryPlanks, + ]) +}); pub static WOODEN_TRAPDOORS: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ Item::AcaciaTrapdoor, diff --git a/azalea/src/nearest_entity.rs b/azalea/src/nearest_entity.rs index 363c8fb08..415c72667 100644 --- a/azalea/src/nearest_entity.rs +++ b/azalea/src/nearest_entity.rs @@ -129,7 +129,7 @@ where position: &'a Position, instance_name: &'a InstanceName, max_distance: f64, - ) -> impl Iterator + '_ { + ) -> impl Iterator + 'a { self.filtered_entities .iter() .filter_map(move |(target_entity, e_instance, e_pos)| { @@ -156,7 +156,7 @@ where &'a self, entity: Entity, max_distance: f64, - ) -> impl Iterator + '_ { + ) -> impl Iterator + 'a { let position; let instance_name; if let Ok((pos, instance)) = self.all_entities.get(entity) { diff --git a/codegen/genitemcomponents.py b/codegen/genitemcomponents.py new file mode 100644 index 000000000..32923e7e7 --- /dev/null +++ b/codegen/genitemcomponents.py @@ -0,0 +1,165 @@ +import lib.code.inventory +import lib.code.registry +import lib.code.version +import lib.code.packet +import lib.code.utils +import lib.code.tags +import lib.download +import lib.extract +import lib.utils + +ITEM_COMPONENTS_DIR = 'azalea-inventory/src/components.rs' + +def generate(version_id: str): + expected_variants = get_expected_variants(version_id) + actual_variants = get_actual_variants() + + new_variants = [] + removed_variants = [] + + for variant in expected_variants: + if variant not in actual_variants: + new_variants.append(variant) + for variant in actual_variants: + if variant not in expected_variants: + removed_variants.append(variant) + + print('New variants:') + for variant in new_variants: + print('-', variant) + print() + print('Removed variants:') + for variant in removed_variants: + print('-', variant) + print() + + for variant in removed_variants: + print(f'Removing {variant}...') + remove_variant(variant) + for variant in new_variants: + print(f'Adding {variant}...') + add_variant(variant) + + lib.code.utils.fmt() + + print('Done!') + +def get_expected_variants(version_id: str): + expected_variants = [] + registries = lib.extract.get_registries_report(version_id) + + registry = registries['minecraft:data_component_type'] + registry_entries = sorted( + registry['entries'].items(), key=lambda x: x[1]['protocol_id']) + for variant_name, _variant in registry_entries: + variant_struct_name = lib.utils.to_camel_case(variant_name.split(':')[-1]) + expected_variants.append(variant_struct_name) + + return expected_variants + +def get_actual_variants(): + actual_variants = [] + with open(ITEM_COMPONENTS_DIR, 'r') as f: + code = f.read().split('\n') + + in_match = False + for line in code: + if in_match: + if line == ' })': + break + variant_line_prefix = ' DataComponentKind::' + if line.startswith(variant_line_prefix): + variant = line[len(variant_line_prefix):].split(' ', 1)[0] + actual_variants.append(variant) + elif line == ' Ok(match kind {': + in_match = True + + return actual_variants + +def remove_variant(variant: str): + with open(ITEM_COMPONENTS_DIR, 'r') as f: + code = f.read().split('\n') + + first_line_with_variant = None + line_after_variant = None + + in_match = False + for i, line in enumerate(list(code)): + if in_match: + if line == ' })': + line_after_variant = i + break + variant_line_prefix = ' DataComponentKind::' + if line.startswith(variant_line_prefix): + if first_line_with_variant is not None: + line_after_variant = i + break + variant_name = line[len(variant_line_prefix):].split(' ', 1)[0] + if variant_name == variant: + first_line_with_variant = i + elif line == ' Ok(match kind {': + in_match = True + + if first_line_with_variant is None: + raise ValueError(f'Variant {variant} not found') + if line_after_variant is None: + raise ValueError(f'Couldn\'t find end of variant {variant}') + + code = code[:first_line_with_variant] + code[line_after_variant:] + + # now remove the struct + line_before_struct = None # this is the #[derive] line + line_after_struct = None # impl DataComponent for ... {} + for i, line in enumerate(list(code)): + if line == f'pub struct {variant} {{' or line == f'pub struct {variant};': + line_before_struct = i - 1 + elif line == f'impl DataComponent for {variant} {{}}': + line_after_struct = i + 1 + break + if line_before_struct is None: + raise ValueError(f'Couldn\'t find struct {variant}') + if line_after_struct is None: + raise ValueError(f'Couldn\'t find impl DataComponent for {variant}') + + code = code[:line_before_struct] + code[line_after_struct:] + + with open(ITEM_COMPONENTS_DIR, 'w') as f: + f.write('\n'.join(code)) + +def add_variant(variant: str): + with open(ITEM_COMPONENTS_DIR, 'r') as f: + code = f.read().split('\n') + + in_match = False + last_line_in_match = None + for i, line in enumerate(list(code)): + if in_match: + if line == ' })': + last_line_in_match = i + break + elif line == ' Ok(match kind {': + in_match = True + + if last_line_in_match is None: + raise ValueError('Couldn\'t find end of match') + + code = code[:last_line_in_match] + [ + f' DataComponentKind::{variant} => Box::new({variant}::read_from(buf)?),', + ] + code[last_line_in_match:] + + # now insert the struct + code.append('') + code.append('#[derive(Clone, PartialEq, McBuf)]') + code.append(f'pub struct {variant} {{') + code.append(' pub todo: todo!(), // see DataComponents.java') + code.append('}') + code.append(f'impl DataComponent for {variant} {{}}') + + with open(ITEM_COMPONENTS_DIR, 'w') as f: + f.write('\n'.join(code)) + + lib.code.utils.fmt() + +if __name__ == '__main__': + version_id = lib.code.version.get_version_id() + generate(version_id) diff --git a/codegen/lib/code/registry.py b/codegen/lib/code/registry.py index e203c11a5..401f4b022 100755 --- a/codegen/lib/code/registry.py +++ b/codegen/lib/code/registry.py @@ -5,7 +5,6 @@ REGISTRIES_DIR = get_dir_location('../azalea-registry/src/lib.rs') - def generate_registries(registries: dict): with open(REGISTRIES_DIR, 'r') as f: code = f.read().split('\n') @@ -17,23 +16,14 @@ def generate_registries(registries: dict): # }); registry_name = registry_name.split(':')[1] - - if registry_name.endswith('_type'): - # change _type to _kind because that's Rustier (and because _type - # is a reserved keyword) - registry_name = registry_name[:-5] + '_kind' - elif registry_name in {'menu'}: - registry_name += '_kind' - - registry_struct_name = to_camel_case(registry_name) + registry_enum_name = registry_name_to_enum_name(registry_name) registry_code = [] - registry_code.append(f'enum {registry_struct_name} {{') + registry_code.append(f'enum {registry_enum_name} {{') registry_entries = sorted( registry['entries'].items(), key=lambda x: x[1]['protocol_id']) for variant_name, _variant in registry_entries: - variant_struct_name = to_camel_case( - variant_name.split(':')[1]) + variant_struct_name = to_camel_case(variant_name.split(':')[-1]) registry_code.append(f'\t{variant_struct_name} => "{variant_name}",') registry_code.append('}') @@ -59,3 +49,15 @@ def generate_registries(registries: dict): with open(REGISTRIES_DIR, 'w') as f: f.write('\n'.join(code)) + +def registry_name_to_enum_name(registry_name: str) -> str: + registry_name = registry_name.split(':')[-1] + + if registry_name.endswith('_type'): + # change _type to _kind because that's Rustier (and because _type + # is a reserved keyword) + registry_name = registry_name[:-5] + '_kind' + elif registry_name in {'menu'}: + registry_name += '_kind' + + return to_camel_case(registry_name) 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)