From 8e14951022503c75a0d65c65d133a4a5c2ce6efc Mon Sep 17 00:00:00 2001 From: mat Date: Tue, 26 Nov 2024 20:21:32 +0000 Subject: [PATCH 01/18] start updating to 1.21.4 --- Cargo.lock | 4 +- README.md | 2 +- azalea-block/Cargo.toml | 2 +- azalea-chat/Cargo.toml | 4 +- azalea-entity/Cargo.toml | 4 +- azalea-entity/src/metadata.rs | 107 +++---------- azalea-entity/src/particle.rs | 6 +- azalea-inventory/Cargo.toml | 6 +- azalea-language/src/en_us.json | 42 ++++- azalea-protocol/Cargo.toml | 13 +- azalea-protocol/src/packets/mod.rs | 2 +- azalea-registry/src/lib.rs | 42 ++++- azalea-registry/src/tags/blocks.rs | 240 ++++++++++++++++++++++------- azalea-registry/src/tags/items.rs | 147 +++++++++--------- azalea-world/Cargo.toml | 4 +- azalea/src/pathfinder/goals.rs | 3 +- 16 files changed, 389 insertions(+), 239 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 493365355..1b81a014e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -250,7 +250,7 @@ dependencies = [ [[package]] name = "azalea-block" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4" dependencies = [ "azalea-block-macros", "azalea-buf", @@ -404,7 +404,7 @@ dependencies = [ [[package]] name = "azalea-inventory" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4" dependencies = [ "azalea-buf", "azalea-chat", diff --git a/README.md b/README.md index bdfebeb27..0453a6806 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.2`._ +_Currently supported Minecraft version: `1.21.4-pre3`._ > [!WARNING] > Azalea is still very unfinished, though most crates are in a somewhat useable state diff --git a/azalea-block/Cargo.toml b/azalea-block/Cargo.toml index dc0bc1993..9f5bf9674 100644 --- a/azalea-block/Cargo.toml +++ b/azalea-block/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-block" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-block" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4" [lib] diff --git a/azalea-chat/Cargo.toml b/azalea-chat/Cargo.toml index 6cd9c16ee..79a0b15aa 100644 --- a/azalea-chat/Cargo.toml +++ b/azalea-chat/Cargo.toml @@ -15,7 +15,9 @@ azalea-buf = ["dep:azalea-buf", "simdnbt"] numbers = ["dep:azalea-registry", "dep:simdnbt"] [dependencies] -azalea-buf = { path = "../azalea-buf", features = ["serde_json"], version = "0.10.0", optional = true } +azalea-buf = { path = "../azalea-buf", features = [ + "serde_json", +], version = "0.10.0", optional = true } azalea-language = { path = "../azalea-language", version = "0.10.0" } azalea-registry = { path = "../azalea-registry", version = "0.10.0", optional = true } once_cell = { workspace = true } diff --git a/azalea-entity/Cargo.toml b/azalea-entity/Cargo.toml index 2f2948574..77848aeef 100644 --- a/azalea-entity/Cargo.toml +++ b/azalea-entity/Cargo.toml @@ -11,7 +11,9 @@ license = "MIT" [dependencies] azalea-block = { version = "0.10.0", path = "../azalea-block" } azalea-buf = { version = "0.10.0", path = "../azalea-buf" } -azalea-chat = { version = "0.10.0", path = "../azalea-chat", features = ["azalea-buf"] } +azalea-chat = { version = "0.10.0", path = "../azalea-chat", features = [ + "azalea-buf", +] } azalea-core = { version = "0.10.0", path = "../azalea-core" } azalea-inventory = { version = "0.10.0", path = "../azalea-inventory" } azalea-registry = { version = "0.10.0", path = "../azalea-registry" } diff --git a/azalea-entity/src/metadata.rs b/azalea-entity/src/metadata.rs index 2a6f996ed..c32b7cf4b 100644 --- a/azalea-entity/src/metadata.rs +++ b/azalea-entity/src/metadata.rs @@ -2564,6 +2564,10 @@ impl Default for CowMetadataBundle { pub struct CanMove(pub bool); #[derive(Component, Deref, DerefMut, Clone)] pub struct IsActive(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct IsTearingDown(pub bool); +#[derive(Component, Deref, DerefMut, Clone)] +pub struct CreakingHomePos(pub Option); #[derive(Component)] pub struct Creaking; impl Creaking { @@ -2579,6 +2583,12 @@ impl Creaking { 17 => { entity.insert(IsActive(d.value.into_boolean()?)); } + 18 => { + entity.insert(IsTearingDown(d.value.into_boolean()?)); + } + 19 => { + entity.insert(CreakingHomePos(d.value.into_optional_block_pos()?)); + } _ => {} } Ok(()) @@ -2591,6 +2601,8 @@ pub struct CreakingMetadataBundle { parent: AbstractMonsterMetadataBundle, can_move: CanMove, is_active: IsActive, + is_tearing_down: IsTearingDown, + creaking_home_pos: CreakingHomePos, } impl Default for CreakingMetadataBundle { fn default() -> Self { @@ -2638,79 +2650,8 @@ impl Default for CreakingMetadataBundle { }, can_move: CanMove(true), is_active: IsActive(false), - } - } -} - -#[derive(Component)] -pub struct CreakingTransient; -impl CreakingTransient { - pub fn apply_metadata( - entity: &mut bevy_ecs::system::EntityCommands, - d: EntityDataItem, - ) -> Result<(), UpdateMetadataError> { - match d.index { - 0..=17 => Creaking::apply_metadata(entity, d)?, - _ => {} - } - Ok(()) - } -} - -#[derive(Bundle)] -pub struct CreakingTransientMetadataBundle { - _marker: CreakingTransient, - parent: CreakingMetadataBundle, -} -impl Default for CreakingTransientMetadataBundle { - fn default() -> Self { - Self { - _marker: CreakingTransient, - parent: CreakingMetadataBundle { - _marker: Creaking, - parent: AbstractMonsterMetadataBundle { - _marker: AbstractMonster, - parent: AbstractCreatureMetadataBundle { - _marker: AbstractCreature, - parent: AbstractInsentientMetadataBundle { - _marker: AbstractInsentient, - parent: AbstractLivingMetadataBundle { - _marker: AbstractLiving, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), - }, - auto_spin_attack: AutoSpinAttack(false), - abstract_living_using_item: AbstractLivingUsingItem(false), - health: Health(1.0), - effect_particles: EffectParticles(Default::default()), - effect_ambience: EffectAmbience(false), - arrow_count: ArrowCount(0), - stinger_count: StingerCount(0), - sleeping_pos: SleepingPos(None), - }, - no_ai: NoAi(false), - left_handed: LeftHanded(false), - aggressive: Aggressive(false), - }, - }, - }, - can_move: CanMove(true), - is_active: IsActive(false), - }, + is_tearing_down: IsTearingDown(false), + creaking_home_pos: CreakingHomePos(None), } } } @@ -8398,7 +8339,7 @@ impl Default for RavagerMetadataBundle { #[derive(Component, Deref, DerefMut, Clone)] pub struct SalmonFromBucket(pub bool); #[derive(Component, Deref, DerefMut, Clone)] -pub struct SalmonKind(pub String); +pub struct SalmonKind(pub i32); #[derive(Component)] pub struct Salmon; impl Salmon { @@ -8412,7 +8353,7 @@ impl Salmon { entity.insert(SalmonFromBucket(d.value.into_boolean()?)); } 17 => { - entity.insert(SalmonKind(d.value.into_string()?)); + entity.insert(SalmonKind(d.value.into_int()?)); } _ => {} } @@ -10509,7 +10450,7 @@ impl Default for TropicalFishMetadataBundle { } #[derive(Component, Deref, DerefMut, Clone)] -pub struct HomePos(pub BlockPos); +pub struct TurtleHomePos(pub BlockPos); #[derive(Component, Deref, DerefMut, Clone)] pub struct HasEgg(pub bool); #[derive(Component, Deref, DerefMut, Clone)] @@ -10530,7 +10471,7 @@ impl Turtle { match d.index { 0..=16 => AbstractAnimal::apply_metadata(entity, d)?, 17 => { - entity.insert(HomePos(d.value.into_block_pos()?)); + entity.insert(TurtleHomePos(d.value.into_block_pos()?)); } 18 => { entity.insert(HasEgg(d.value.into_boolean()?)); @@ -10557,7 +10498,7 @@ impl Turtle { pub struct TurtleMetadataBundle { _marker: Turtle, parent: AbstractAnimalMetadataBundle, - home_pos: HomePos, + turtle_home_pos: TurtleHomePos, has_egg: HasEgg, laying_egg: LayingEgg, travel_pos: TravelPos, @@ -10612,7 +10553,7 @@ impl Default for TurtleMetadataBundle { abstract_ageable_baby: AbstractAgeableBaby(false), }, }, - home_pos: HomePos(BlockPos::new(0, 0, 0)), + turtle_home_pos: TurtleHomePos(BlockPos::new(0, 0, 0)), has_egg: HasEgg(false), laying_egg: LayingEgg(false), travel_pos: TravelPos(BlockPos::new(0, 0, 0)), @@ -12703,11 +12644,6 @@ pub fn apply_metadata( 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)?; @@ -13402,9 +13338,6 @@ pub fn apply_default_metadata( azalea_registry::EntityKind::Creaking => { entity.insert(CreakingMetadataBundle::default()); } - azalea_registry::EntityKind::CreakingTransient => { - entity.insert(CreakingTransientMetadataBundle::default()); - } azalea_registry::EntityKind::Creeper => { entity.insert(CreeperMetadataBundle::default()); } diff --git a/azalea-entity/src/particle.rs b/azalea-entity/src/particle.rs index 6484b28f5..dca4c821c 100755 --- a/azalea-entity/src/particle.rs +++ b/azalea-entity/src/particle.rs @@ -4,7 +4,7 @@ use azalea_inventory::ItemSlot; use azalea_registry::ParticleKind; use bevy_ecs::component::Component; -// the order of this enum must be kept in-sync with ParticleKind, otherwise +// the order of this enum must be kept in sync with ParticleKind, otherwise // we get errors parsing particles. /// A [`ParticleKind`] with data potentially attached to it. #[derive(Component, Clone, Debug, McBuf, Default)] @@ -44,6 +44,7 @@ pub enum Particle { Flame, Infested, CherryLeaves, + PaleOakLeaves, SculkSoul, SculkCharge(SculkChargeParticle), SculkChargePop, @@ -128,7 +129,7 @@ impl From for Particle { /// attached (like block particles), then it's set to the default. fn from(kind: ParticleKind) -> Self { // this is mostly just here so it fails to compile when a new particle is added - // to ParticleKind, since ParticleData has to be updated manually + // to ParticleKind, since `Particle` has to be updated manually match kind { ParticleKind::AngryVillager => Self::AngryVillager, ParticleKind::Block => Self::Block(BlockParticle::default()), @@ -162,6 +163,7 @@ impl From for Particle { ParticleKind::Fishing => Self::Fishing, ParticleKind::Flame => Self::Flame, ParticleKind::CherryLeaves => Self::CherryLeaves, + ParticleKind::PaleOakLeaves => Self::PaleOakLeaves, ParticleKind::SculkSoul => Self::SculkSoul, ParticleKind::SculkCharge => Self::SculkCharge(SculkChargeParticle::default()), ParticleKind::SculkChargePop => Self::SculkChargePop, diff --git a/azalea-inventory/Cargo.toml b/azalea-inventory/Cargo.toml index 816df100d..2c1b6fc29 100644 --- a/azalea-inventory/Cargo.toml +++ b/azalea-inventory/Cargo.toml @@ -4,13 +4,15 @@ edition = "2021" license = "MIT" name = "azalea-inventory" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-inventory-macros" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] azalea-buf = { version = "0.10.0", path = "../azalea-buf" } -azalea-chat = { version = "0.10.0", path = "../azalea-chat", features = ["azalea-buf"] } +azalea-chat = { version = "0.10.0", path = "../azalea-chat", features = [ + "azalea-buf", +] } azalea-core = { version = "0.10.0", path = "../azalea-core" } azalea-inventory-macros = { version = "0.10.0", path = "./azalea-inventory-macros" } azalea-registry = { version = "0.10.0", path = "../azalea-registry" } diff --git a/azalea-language/src/en_us.json b/azalea-language/src/en_us.json index e1819511a..2826affe5 100755 --- a/azalea-language/src/en_us.json +++ b/azalea-language/src/en_us.json @@ -1429,6 +1429,7 @@ "block.minecraft.chiseled_polished_blackstone": "Chiseled Polished Blackstone", "block.minecraft.chiseled_quartz_block": "Chiseled Quartz Block", "block.minecraft.chiseled_red_sandstone": "Chiseled Red Sandstone", + "block.minecraft.chiseled_resin_bricks": "Chiseled Resin Bricks", "block.minecraft.chiseled_sandstone": "Chiseled Sandstone", "block.minecraft.chiseled_stone_bricks": "Chiseled Stone Bricks", "block.minecraft.chiseled_tuff": "Chiseled Tuff", @@ -1436,6 +1437,7 @@ "block.minecraft.chorus_flower": "Chorus Flower", "block.minecraft.chorus_plant": "Chorus Plant", "block.minecraft.clay": "Clay", + "block.minecraft.closed_eyeblossom": "Closed Eyeblossom", "block.minecraft.coal_block": "Block of Coal", "block.minecraft.coal_ore": "Coal Ore", "block.minecraft.coarse_dirt": "Coarse Dirt", @@ -1856,6 +1858,7 @@ "block.minecraft.obsidian": "Obsidian", "block.minecraft.ochre_froglight": "Ochre Froglight", "block.minecraft.ominous_banner": "Ominous Banner", + "block.minecraft.open_eyeblossom": "Open Eyeblossom", "block.minecraft.orange_banner": "Orange Banner", "block.minecraft.orange_bed": "Orange Bed", "block.minecraft.orange_candle": "Orange Candle", @@ -1971,6 +1974,7 @@ "block.minecraft.potted_brown_mushroom": "Potted Brown Mushroom", "block.minecraft.potted_cactus": "Potted Cactus", "block.minecraft.potted_cherry_sapling": "Potted Cherry Sapling", + "block.minecraft.potted_closed_eyeblossom": "Potted Closed Eyeblossom", "block.minecraft.potted_cornflower": "Potted Cornflower", "block.minecraft.potted_crimson_fungus": "Potted Crimson Fungus", "block.minecraft.potted_crimson_roots": "Potted Crimson Roots", @@ -1983,6 +1987,7 @@ "block.minecraft.potted_lily_of_the_valley": "Potted Lily of the Valley", "block.minecraft.potted_mangrove_propagule": "Potted Mangrove Propagule", "block.minecraft.potted_oak_sapling": "Potted Oak Sapling", + "block.minecraft.potted_open_eyeblossom": "Potted Open Eyeblossom", "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", @@ -2068,6 +2073,12 @@ "block.minecraft.reinforced_deepslate": "Reinforced Deepslate", "block.minecraft.repeater": "Redstone Repeater", "block.minecraft.repeating_command_block": "Repeating Command Block", + "block.minecraft.resin_block": "Block of Resin", + "block.minecraft.resin_brick_slab": "Resin Brick Slab", + "block.minecraft.resin_brick_stairs": "Resin Brick Stairs", + "block.minecraft.resin_brick_wall": "Resin Brick Wall", + "block.minecraft.resin_bricks": "Resin Bricks", + "block.minecraft.resin_clump": "Resin Clump", "block.minecraft.respawn_anchor": "Respawn Anchor", "block.minecraft.rooted_dirt": "Rooted Dirt", "block.minecraft.rose_bush": "Rose Bush", @@ -2431,6 +2442,7 @@ "commands.advancement.revoke.one.to.one.failure": "Couldn't revoke advancement %s from %s as they don't have it", "commands.advancement.revoke.one.to.one.success": "Revoked the advancement %s from %s", "commands.attribute.base_value.get.success": "Base value of attribute %s for entity %s is %s", + "commands.attribute.base_value.reset.success": "Base value for attribute %s for entity %s reset to default %s", "commands.attribute.base_value.set.success": "Base value for attribute %s for entity %s set to %s", "commands.attribute.failed.entity": "%s is not a valid entity for this command", "commands.attribute.failed.modifier_already_present": "Modifier %s is already present on attribute %s for entity %s", @@ -4358,6 +4370,8 @@ "item.minecraft.red_bundle": "Red Bundle", "item.minecraft.red_dye": "Red Dye", "item.minecraft.redstone": "Redstone Dust", + "item.minecraft.resin_brick": "Resin Brick", + "item.minecraft.resin_clump": "Resin Clump", "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", @@ -4569,6 +4583,9 @@ "item.modifiers.mainhand": "When in Main Hand:", "item.modifiers.offhand": "When in Off Hand:", "item.nbt_tags": "NBT: %s tag(s)", + "item.op_block_warning.line1": "Warning:", + "item.op_block_warning.line2": "Use of this item might lead to command execution", + "item.op_block_warning.line3": "Do not use unless you know the exact contents!", "item.unbreakable": "Unbreakable", "itemGroup.buildingBlocks": "Building Blocks", "itemGroup.coloredBlocks": "Colored Blocks", @@ -5999,6 +6016,7 @@ "structure_block.size.z": "structure size z", "structure_block.structure_name": "Structure Name", "subtitles.ambient.cave": "Eerie noise", + "subtitles.ambient.sound": "Eerie noise", "subtitles.block.amethyst_block.chime": "Amethyst chimes", "subtitles.block.amethyst_block.resonate": "Amethyst resonates", "subtitles.block.anvil.destroy": "Anvil destroyed", @@ -6050,7 +6068,7 @@ "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.hurt": "Creaking Heart grumbles", "subtitles.block.creaking_heart.idle": "Eerie noise", "subtitles.block.creaking_heart.spawn": "Creaking Heart awakens", "subtitles.block.decorated_pot.insert": "Decorated Pot fills", @@ -6062,12 +6080,16 @@ "subtitles.block.enchantment_table.use": "Enchanting Table used", "subtitles.block.end_portal_frame.fill": "Eye of Ender attaches", "subtitles.block.end_portal.spawn": "End Portal opens", + "subtitles.block.eyeblossom.close": "Eyeblossom closes", + "subtitles.block.eyeblossom.idle": "Eyeblossom whispers", + "subtitles.block.eyeblossom.open": "Eyeblossom opens", "subtitles.block.fence_gate.toggle": "Fence Gate creaks", "subtitles.block.fire.ambient": "Fire crackles", "subtitles.block.fire.extinguish": "Fire extinguished", "subtitles.block.frogspawn.hatch": "Tadpole hatches", "subtitles.block.furnace.fire_crackle": "Furnace crackles", "subtitles.block.generic.break": "Block broken", + "subtitles.block.generic.fall": "Something falls on a block", "subtitles.block.generic.footsteps": "Footsteps", "subtitles.block.generic.hit": "Block breaking", "subtitles.block.generic.place": "Block placed", @@ -6240,15 +6262,15 @@ "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.activate": "Creaking watches", "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.deactivate": "Creaking calms", + "subtitles.entity.creaking.death": "Creaking crumbles", "subtitles.entity.creaking.freeze": "Creaking stops", - "subtitles.entity.creaking.spawn": "Creaking lives", - "subtitles.entity.creaking.sway": "Creaking is shielded", + "subtitles.entity.creaking.spawn": "Creaking manifests", + "subtitles.entity.creaking.sway": "Creaking is hit", + "subtitles.entity.creaking.twitch": "Creaking twitches", "subtitles.entity.creaking.unfreeze": "Creaking moves", "subtitles.entity.creeper.death": "Creeper dies", "subtitles.entity.creeper.hurt": "Creeper hurts", @@ -6315,6 +6337,7 @@ "subtitles.entity.firework_rocket.blast": "Firework blasts", "subtitles.entity.firework_rocket.launch": "Firework launches", "subtitles.entity.firework_rocket.twinkle": "Firework twinkles", + "subtitles.entity.fish.swim": "Splashes", "subtitles.entity.fishing_bobber.retrieve": "Bobber retrieved", "subtitles.entity.fishing_bobber.splash": "Fishing Bobber splashes", "subtitles.entity.fishing_bobber.throw": "Bobber thrown", @@ -6434,6 +6457,8 @@ "subtitles.entity.magma_cube.death": "Magma Cube dies", "subtitles.entity.magma_cube.hurt": "Magma Cube hurts", "subtitles.entity.magma_cube.squish": "Magma Cube squishes", + "subtitles.entity.minecart.inside": "Minecart jangles", + "subtitles.entity.minecart.inside_underwater": "Minecart jangles underwater", "subtitles.entity.minecart.riding": "Minecart rolls", "subtitles.entity.mooshroom.convert": "Mooshroom transforms", "subtitles.entity.mooshroom.eat": "Mooshroom eats", @@ -6590,6 +6615,7 @@ "subtitles.entity.skeleton_horse.ambient": "Skeleton Horse cries", "subtitles.entity.skeleton_horse.death": "Skeleton Horse dies", "subtitles.entity.skeleton_horse.hurt": "Skeleton Horse hurts", + "subtitles.entity.skeleton_horse.jump_water": "Skeleton Horse jumps", "subtitles.entity.skeleton_horse.swim": "Skeleton Horse swims", "subtitles.entity.skeleton.ambient": "Skeleton rattles", "subtitles.entity.skeleton.converted_to_stray": "Skeleton converts to Stray", @@ -6802,6 +6828,7 @@ "subtitles.item.crossbow.load": "Crossbow loads", "subtitles.item.crossbow.shoot": "Crossbow fires", "subtitles.item.dye.use": "Dye stains", + "subtitles.item.elytra.flying": "Swoosh", "subtitles.item.firecharge.use": "Fireball whooshes", "subtitles.item.flintandsteel.use": "Flint and Steel click", "subtitles.item.glow_ink_sac.use": "Glow Ink Sac splotches", @@ -6936,6 +6963,7 @@ "trim_material.minecraft.netherite": "Netherite Material", "trim_material.minecraft.quartz": "Quartz Material", "trim_material.minecraft.redstone": "Redstone Material", + "trim_material.minecraft.resin": "Resin Material", "trim_pattern.minecraft.bolt": "Bolt Armor Trim", "trim_pattern.minecraft.coast": "Coast Armor Trim", "trim_pattern.minecraft.dune": "Dune Armor Trim", diff --git a/azalea-protocol/Cargo.toml b/azalea-protocol/Cargo.toml index 1e32d71d0..32daaa7a5 100644 --- a/azalea-protocol/Cargo.toml +++ b/azalea-protocol/Cargo.toml @@ -12,10 +12,17 @@ version = "0.10.3+mc1.21.1" async-recursion = { workspace = true } azalea-auth = { path = "../azalea-auth", version = "0.10.0" } azalea-block = { path = "../azalea-block", default-features = false, version = "0.10.0" } -azalea-brigadier = { path = "../azalea-brigadier", version = "0.10.0", features = ["azalea-buf"] } +azalea-brigadier = { path = "../azalea-brigadier", version = "0.10.0", features = [ + "azalea-buf", +] } azalea-buf = { path = "../azalea-buf", version = "0.10.0" } -azalea-chat = { path = "../azalea-chat", version = "0.10.0", features = ["numbers", "azalea-buf"] } -azalea-core = { path = "../azalea-core", optional = true, version = "0.10.0", features = ["serde"] } +azalea-chat = { path = "../azalea-chat", version = "0.10.0", features = [ + "numbers", + "azalea-buf", +] } +azalea-core = { path = "../azalea-core", optional = true, version = "0.10.0", features = [ + "serde", +] } azalea-crypto = { path = "../azalea-crypto", version = "0.10.0" } azalea-entity = { version = "0.10.0", path = "../azalea-entity" } azalea-inventory = { version = "0.10.0", path = "../azalea-inventory" } diff --git a/azalea-protocol/src/packets/mod.rs b/azalea-protocol/src/packets/mod.rs index 1dabe1751..d17e5c73d 100755 --- a/azalea-protocol/src/packets/mod.rs +++ b/azalea-protocol/src/packets/mod.rs @@ -14,7 +14,7 @@ use crate::read::ReadPacketError; // TODO: rename the packet files to just like clientbound_add_entity instead of // clientbound_add_entity_packet -pub const PROTOCOL_VERSION: i32 = 768; +pub const PROTOCOL_VERSION: i32 = 1073742049; #[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 e4287b1c1..e9c26c03a 100755 --- a/azalea-registry/src/lib.rs +++ b/azalea-registry/src/lib.rs @@ -600,12 +600,19 @@ enum Block { MelonStem => "minecraft:melon_stem", Vine => "minecraft:vine", GlowLichen => "minecraft:glow_lichen", + ResinClump => "minecraft:resin_clump", OakFenceGate => "minecraft:oak_fence_gate", BrickStairs => "minecraft:brick_stairs", StoneBrickStairs => "minecraft:stone_brick_stairs", MudBrickStairs => "minecraft:mud_brick_stairs", Mycelium => "minecraft:mycelium", LilyPad => "minecraft:lily_pad", + ResinBlock => "minecraft:resin_block", + ResinBricks => "minecraft:resin_bricks", + ResinBrickStairs => "minecraft:resin_brick_stairs", + ResinBrickSlab => "minecraft:resin_brick_slab", + ResinBrickWall => "minecraft:resin_brick_wall", + ChiseledResinBricks => "minecraft:chiseled_resin_bricks", NetherBricks => "minecraft:nether_bricks", NetherBrickFence => "minecraft:nether_brick_fence", NetherBrickStairs => "minecraft:nether_brick_stairs", @@ -1351,6 +1358,10 @@ enum Block { PaleMossBlock => "minecraft:pale_moss_block", PaleMossCarpet => "minecraft:pale_moss_carpet", PaleHangingMoss => "minecraft:pale_hanging_moss", + OpenEyeblossom => "minecraft:open_eyeblossom", + ClosedEyeblossom => "minecraft:closed_eyeblossom", + PottedOpenEyeblossom => "minecraft:potted_open_eyeblossom", + PottedClosedEyeblossom => "minecraft:potted_closed_eyeblossom", } } @@ -1677,7 +1688,6 @@ enum EntityKind { 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", @@ -2155,6 +2165,8 @@ enum Item { RedWool => "minecraft:red_wool", BlackWool => "minecraft:black_wool", Dandelion => "minecraft:dandelion", + OpenEyeblossom => "minecraft:open_eyeblossom", + ClosedEyeblossom => "minecraft:closed_eyeblossom", Poppy => "minecraft:poppy", BlueOrchid => "minecraft:blue_orchid", Allium => "minecraft:allium", @@ -2303,6 +2315,13 @@ enum Item { Melon => "minecraft:melon", Vine => "minecraft:vine", GlowLichen => "minecraft:glow_lichen", + ResinClump => "minecraft:resin_clump", + ResinBlock => "minecraft:resin_block", + ResinBricks => "minecraft:resin_bricks", + ResinBrickStairs => "minecraft:resin_brick_stairs", + ResinBrickSlab => "minecraft:resin_brick_slab", + ResinBrickWall => "minecraft:resin_brick_wall", + ChiseledResinBricks => "minecraft:chiseled_resin_bricks", BrickStairs => "minecraft:brick_stairs", StoneBrickStairs => "minecraft:stone_brick_stairs", MudBrickStairs => "minecraft:mud_brick_stairs", @@ -3087,6 +3106,7 @@ enum Item { FireworkStar => "minecraft:firework_star", EnchantedBook => "minecraft:enchanted_book", NetherBrick => "minecraft:nether_brick", + ResinBrick => "minecraft:resin_brick", PrismarineShard => "minecraft:prismarine_shard", PrismarineCrystals => "minecraft:prismarine_crystals", Rabbit => "minecraft:rabbit", @@ -3669,6 +3689,7 @@ enum ParticleKind { Flame => "minecraft:flame", Infested => "minecraft:infested", CherryLeaves => "minecraft:cherry_leaves", + PaleOakLeaves => "minecraft:pale_oak_leaves", SculkSoul => "minecraft:sculk_soul", SculkCharge => "minecraft:sculk_charge", SculkChargePop => "minecraft:sculk_charge_pop", @@ -4316,6 +4337,7 @@ enum SoundEvent { EntityCreakingUnfreeze => "minecraft:entity.creaking.unfreeze", EntityCreakingSpawn => "minecraft:entity.creaking.spawn", EntityCreakingSway => "minecraft:entity.creaking.sway", + EntityCreakingTwitch => "minecraft:entity.creaking.twitch", BlockCreakingHeartBreak => "minecraft:block.creaking_heart.break", BlockCreakingHeartFall => "minecraft:block.creaking_heart.fall", BlockCreakingHeartHit => "minecraft:block.creaking_heart.hit", @@ -4454,6 +4476,11 @@ enum SoundEvent { EntityEvokerPrepareWololo => "minecraft:entity.evoker.prepare_wololo", EntityExperienceBottleThrow => "minecraft:entity.experience_bottle.throw", EntityExperienceOrbPickup => "minecraft:entity.experience_orb.pickup", + BlockEyeblossomOpenLong => "minecraft:block.eyeblossom.open_long", + BlockEyeblossomOpen => "minecraft:block.eyeblossom.open", + BlockEyeblossomCloseLong => "minecraft:block.eyeblossom.close_long", + BlockEyeblossomClose => "minecraft:block.eyeblossom.close", + BlockEyeblossomIdle => "minecraft:block.eyeblossom.idle", BlockFenceGateClose => "minecraft:block.fence_gate.close", BlockFenceGateOpen => "minecraft:block.fence_gate.open", ItemFirechargeUse => "minecraft:item.firecharge.use", @@ -5254,6 +5281,15 @@ enum SoundEvent { BlockSpawnerHit => "minecraft:block.spawner.hit", BlockSpawnerPlace => "minecraft:block.spawner.place", BlockSpawnerStep => "minecraft:block.spawner.step", + BlockResinBreak => "minecraft:block.resin.break", + BlockResinFall => "minecraft:block.resin.fall", + BlockResinPlace => "minecraft:block.resin.place", + BlockResinStep => "minecraft:block.resin.step", + BlockResinBricksBreak => "minecraft:block.resin_bricks.break", + BlockResinBricksFall => "minecraft:block.resin_bricks.fall", + BlockResinBricksHit => "minecraft:block.resin_bricks.hit", + BlockResinBricksPlace => "minecraft:block.resin_bricks.place", + BlockResinBricksStep => "minecraft:block.resin_bricks.step", BlockSporeBlossomBreak => "minecraft:block.spore_blossom.break", BlockSporeBlossomFall => "minecraft:block.spore_blossom.fall", BlockSporeBlossomHit => "minecraft:block.spore_blossom.hit", @@ -6106,7 +6142,6 @@ enum BlockKind { CaveVinesPlant => "minecraft:cave_vines_plant", CeilingHangingSign => "minecraft:ceiling_hanging_sign", Chain => "minecraft:chain", - CherryLeaves => "minecraft:cherry_leaves", Chest => "minecraft:chest", ChiseledBookShelf => "minecraft:chiseled_book_shelf", ChorusFlower => "minecraft:chorus_flower", @@ -6144,6 +6179,7 @@ enum BlockKind { EndPortal => "minecraft:end_portal", EndPortalFrame => "minecraft:end_portal_frame", EndRod => "minecraft:end_rod", + Eyeblossom => "minecraft:eyeblossom", Farm => "minecraft:farm", BonemealableFeaturePlacer => "minecraft:bonemealable_feature_placer", Fence => "minecraft:fence", @@ -6195,6 +6231,7 @@ enum BlockKind { MossyCarpet => "minecraft:mossy_carpet", MovingPiston => "minecraft:moving_piston", Mud => "minecraft:mud", + Multiface => "minecraft:multiface", Mushroom => "minecraft:mushroom", Mycelium => "minecraft:mycelium", NetherPortal => "minecraft:nether_portal", @@ -6205,6 +6242,7 @@ enum BlockKind { Nylium => "minecraft:nylium", Observer => "minecraft:observer", Piglinwallskull => "minecraft:piglinwallskull", + ParticleLeaves => "minecraft:particle_leaves", PinkPetals => "minecraft:pink_petals", PistonBase => "minecraft:piston_base", PistonHead => "minecraft:piston_head", diff --git a/azalea-registry/src/tags/blocks.rs b/azalea-registry/src/tags/blocks.rs index b57ae8c9e..cbf3a24ec 100644 --- a/azalea-registry/src/tags/blocks.rs +++ b/azalea-registry/src/tags/blocks.rs @@ -25,6 +25,7 @@ pub static ALL_HANGING_SIGNS: Lazy> = Lazy::new(|| { Block::CherryHangingSign, Block::JungleHangingSign, Block::DarkOakHangingSign, + Block::PaleOakHangingSign, Block::CrimsonHangingSign, Block::WarpedHangingSign, Block::MangroveHangingSign, @@ -36,6 +37,7 @@ pub static ALL_HANGING_SIGNS: Lazy> = Lazy::new(|| { Block::CherryWallHangingSign, Block::JungleWallHangingSign, Block::DarkOakWallHangingSign, + Block::PaleOakWallHangingSign, Block::CrimsonWallHangingSign, Block::WarpedWallHangingSign, Block::MangroveWallHangingSign, @@ -50,6 +52,7 @@ pub static ALL_SIGNS: Lazy> = Lazy::new(|| { Block::AcaciaSign, Block::JungleSign, Block::DarkOakSign, + Block::PaleOakSign, Block::CrimsonSign, Block::WarpedSign, Block::MangroveSign, @@ -61,6 +64,7 @@ pub static ALL_SIGNS: Lazy> = Lazy::new(|| { Block::AcaciaWallSign, Block::JungleWallSign, Block::DarkOakWallSign, + Block::PaleOakWallSign, Block::CrimsonWallSign, Block::WarpedWallSign, Block::MangroveWallSign, @@ -73,6 +77,7 @@ pub static ALL_SIGNS: Lazy> = Lazy::new(|| { Block::CherryHangingSign, Block::JungleHangingSign, Block::DarkOakHangingSign, + Block::PaleOakHangingSign, Block::CrimsonHangingSign, Block::WarpedHangingSign, Block::MangroveHangingSign, @@ -84,6 +89,7 @@ pub static ALL_SIGNS: Lazy> = Lazy::new(|| { Block::CherryWallHangingSign, Block::JungleWallHangingSign, Block::DarkOakWallHangingSign, + Block::PaleOakWallHangingSign, Block::CrimsonWallHangingSign, Block::WarpedWallHangingSign, Block::MangroveWallHangingSign, @@ -137,6 +143,7 @@ pub static AZALEA_GROWS_ON: Lazy> = Lazy::new(|| { Block::Mycelium, Block::RootedDirt, Block::MossBlock, + Block::PaleMossBlock, Block::Mud, Block::MuddyMangroveRoots, Block::Sand, @@ -183,6 +190,7 @@ pub static AZALEA_ROOT_REPLACEABLE: Lazy> = Lazy::new(|| { Block::Mycelium, Block::RootedDirt, Block::MossBlock, + Block::PaleMossBlock, Block::Mud, Block::MuddyMangroveRoots, Block::Terracotta, @@ -234,6 +242,7 @@ pub static BAMBOO_PLANTABLE_ON: Lazy> = Lazy::new(|| { Block::Mycelium, Block::RootedDirt, Block::MossBlock, + Block::PaleMossBlock, Block::Mud, Block::MuddyMangroveRoots, ]) @@ -325,6 +334,37 @@ pub static BEDS: Lazy> = Lazy::new(|| { Block::YellowBed, ]) }); +pub static BEE_ATTRACTIVE: Lazy> = Lazy::new(|| { + HashSet::from_iter(vec![ + Block::Dandelion, + Block::OpenEyeblossom, + Block::Poppy, + Block::BlueOrchid, + Block::Allium, + Block::AzureBluet, + Block::RedTulip, + Block::OrangeTulip, + Block::WhiteTulip, + Block::PinkTulip, + Block::OxeyeDaisy, + Block::Cornflower, + Block::LilyOfTheValley, + Block::WitherRose, + Block::Torchflower, + Block::Sunflower, + Block::Lilac, + Block::Peony, + Block::RoseBush, + Block::PitcherPlant, + Block::FloweringAzaleaLeaves, + Block::FloweringAzalea, + Block::MangrovePropagule, + Block::CherryLeaves, + Block::PinkPetals, + Block::ChorusFlower, + Block::SporeBlossom, + ]) +}); pub static BEE_GROWABLES: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ Block::SweetBerryBush, @@ -354,6 +394,7 @@ pub static BIG_DRIPLEAF_PLACEABLE: Lazy> = Lazy::new(|| { Block::Mycelium, Block::RootedDirt, Block::MossBlock, + Block::PaleMossBlock, Block::Mud, Block::MuddyMangroveRoots, ]) @@ -376,6 +417,7 @@ pub static BUTTONS: Lazy> = Lazy::new(|| { Block::JungleButton, Block::AcaciaButton, Block::DarkOakButton, + Block::PaleOakButton, Block::CrimsonButton, Block::WarpedButton, Block::MangroveButton, @@ -472,6 +514,7 @@ pub static CEILING_HANGING_SIGNS: Lazy> = Lazy::new(|| { Block::CherryHangingSign, Block::JungleHangingSign, Block::DarkOakHangingSign, + Block::PaleOakHangingSign, Block::CrimsonHangingSign, Block::WarpedHangingSign, Block::MangroveHangingSign, @@ -504,10 +547,12 @@ pub static COAL_ORES: Lazy> = pub static COMBINATION_STEP_SOUND_BLOCKS: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ Block::MossCarpet, + Block::PaleMossCarpet, Block::Snow, Block::NetherSprouts, Block::WarpedRoots, Block::CrimsonRoots, + Block::ResinClump, Block::WhiteCarpet, Block::OrangeCarpet, Block::MagentaCarpet, @@ -531,6 +576,7 @@ pub static COMPLETES_FIND_TREE_TUTORIAL: Lazy> = Lazy::new(|| { Block::JungleLeaves, Block::OakLeaves, Block::SpruceLeaves, + Block::PaleOakLeaves, Block::DarkOakLeaves, Block::AcaciaLeaves, Block::BirchLeaves, @@ -552,6 +598,10 @@ pub static COMPLETES_FIND_TREE_TUTORIAL: Lazy> = Lazy::new(|| { Block::DarkOakWood, Block::StrippedDarkOakLog, Block::StrippedDarkOakWood, + Block::PaleOakLog, + Block::PaleOakWood, + Block::StrippedPaleOakLog, + Block::StrippedPaleOakWood, Block::OakLog, Block::OakWood, Block::StrippedOakLog, @@ -734,6 +784,7 @@ pub static DEAD_BUSH_MAY_PLACE_ON: Lazy> = Lazy::new(|| { Block::Mycelium, Block::RootedDirt, Block::MossBlock, + Block::PaleMossBlock, Block::Mud, Block::MuddyMangroveRoots, ]) @@ -751,6 +802,7 @@ pub static DIRT: Lazy> = Lazy::new(|| { Block::Mycelium, Block::RootedDirt, Block::MossBlock, + Block::PaleMossBlock, Block::Mud, Block::MuddyMangroveRoots, ]) @@ -774,6 +826,7 @@ pub static DOORS: Lazy> = Lazy::new(|| { Block::JungleDoor, Block::AcaciaDoor, Block::DarkOakDoor, + Block::PaleOakDoor, Block::CrimsonDoor, Block::WarpedDoor, Block::MangroveDoor, @@ -833,6 +886,7 @@ pub static ENCHANTMENT_POWER_TRANSMITTER: Lazy> = Lazy::new(|| { Block::Snow, Block::Vine, Block::GlowLichen, + Block::ResinClump, Block::Light, Block::TallGrass, Block::LargeFern, @@ -866,6 +920,7 @@ pub static ENDERMAN_HOLDABLE: Lazy> = Lazy::new(|| { Block::WarpedNylium, Block::WarpedRoots, Block::Dandelion, + Block::OpenEyeblossom, Block::Poppy, Block::BlueOrchid, Block::Allium, @@ -879,6 +934,7 @@ pub static ENDERMAN_HOLDABLE: Lazy> = Lazy::new(|| { Block::LilyOfTheValley, Block::WitherRose, Block::Torchflower, + Block::ClosedEyeblossom, Block::Dirt, Block::GrassBlock, Block::Podzol, @@ -886,6 +942,7 @@ pub static ENDERMAN_HOLDABLE: Lazy> = Lazy::new(|| { Block::Mycelium, Block::RootedDirt, Block::MossBlock, + Block::PaleMossBlock, Block::Mud, Block::MuddyMangroveRoots, ]) @@ -921,6 +978,7 @@ pub static FENCE_GATES: Lazy> = Lazy::new(|| { Block::AcaciaFenceGate, Block::BirchFenceGate, Block::DarkOakFenceGate, + Block::PaleOakFenceGate, Block::JungleFenceGate, Block::OakFenceGate, Block::SpruceFenceGate, @@ -937,6 +995,7 @@ pub static FENCES: Lazy> = Lazy::new(|| { Block::OakFence, Block::AcaciaFence, Block::DarkOakFence, + Block::PaleOakFence, Block::SpruceFence, Block::BirchFence, Block::JungleFence, @@ -952,6 +1011,8 @@ pub static FIRE: Lazy> = pub static FLOWER_POTS: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ Block::FlowerPot, + Block::PottedOpenEyeblossom, + Block::PottedClosedEyeblossom, Block::PottedPoppy, Block::PottedBlueOrchid, Block::PottedAllium, @@ -968,6 +1029,7 @@ pub static FLOWER_POTS: Lazy> = Lazy::new(|| { Block::PottedJungleSapling, Block::PottedAcaciaSapling, Block::PottedDarkOakSapling, + Block::PottedPaleOakSapling, Block::PottedRedMushroom, Block::PottedBrownMushroom, Block::PottedDeadBush, @@ -990,6 +1052,11 @@ pub static FLOWER_POTS: Lazy> = Lazy::new(|| { }); pub static FLOWERS: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ + Block::Sunflower, + Block::Lilac, + Block::Peony, + Block::RoseBush, + Block::PitcherPlant, Block::FloweringAzaleaLeaves, Block::FloweringAzalea, Block::MangrovePropagule, @@ -998,6 +1065,7 @@ pub static FLOWERS: Lazy> = Lazy::new(|| { Block::ChorusFlower, Block::SporeBlossom, Block::Dandelion, + Block::OpenEyeblossom, Block::Poppy, Block::BlueOrchid, Block::Allium, @@ -1011,11 +1079,7 @@ pub static FLOWERS: Lazy> = Lazy::new(|| { Block::LilyOfTheValley, Block::WitherRose, Block::Torchflower, - Block::Sunflower, - Block::Lilac, - Block::Peony, - Block::RoseBush, - Block::PitcherPlant, + Block::ClosedEyeblossom, ]) }); pub static FOXES_SPAWNABLE_ON: Lazy> = Lazy::new(|| { @@ -1230,14 +1294,6 @@ pub static INCORRECT_FOR_GOLD_TOOL: Lazy> = Lazy::new(|| { Block::WaxedExposedCopperTrapdoor, Block::WaxedWeatheredCopperTrapdoor, Block::WaxedOxidizedCopperTrapdoor, - Block::CopperDoor, - Block::ExposedCopperDoor, - Block::WeatheredCopperDoor, - Block::OxidizedCopperDoor, - Block::WaxedCopperDoor, - Block::WaxedExposedCopperDoor, - Block::WaxedWeatheredCopperDoor, - Block::WaxedOxidizedCopperDoor, ]) }); pub static INCORRECT_FOR_IRON_TOOL: Lazy> = Lazy::new(|| { @@ -1367,14 +1423,6 @@ pub static INCORRECT_FOR_WOODEN_TOOL: Lazy> = Lazy::new(|| { Block::WaxedExposedCopperTrapdoor, Block::WaxedWeatheredCopperTrapdoor, Block::WaxedOxidizedCopperTrapdoor, - Block::CopperDoor, - Block::ExposedCopperDoor, - Block::WeatheredCopperDoor, - Block::OxidizedCopperDoor, - Block::WaxedCopperDoor, - Block::WaxedExposedCopperDoor, - Block::WaxedWeatheredCopperDoor, - Block::WaxedOxidizedCopperDoor, ]) }); pub static INFINIBURN_END: Lazy> = @@ -1419,6 +1467,7 @@ pub static LAVA_POOL_STONE_CANNOT_REPLACE: Lazy> = Lazy::new(|| { Block::JungleLeaves, Block::OakLeaves, Block::SpruceLeaves, + Block::PaleOakLeaves, Block::DarkOakLeaves, Block::AcaciaLeaves, Block::BirchLeaves, @@ -1438,6 +1487,10 @@ pub static LAVA_POOL_STONE_CANNOT_REPLACE: Lazy> = Lazy::new(|| { Block::DarkOakWood, Block::StrippedDarkOakLog, Block::StrippedDarkOakWood, + Block::PaleOakLog, + Block::PaleOakWood, + Block::StrippedPaleOakLog, + Block::StrippedPaleOakWood, Block::OakLog, Block::OakWood, Block::StrippedOakLog, @@ -1473,6 +1526,7 @@ pub static LEAVES: Lazy> = Lazy::new(|| { Block::JungleLeaves, Block::OakLeaves, Block::SpruceLeaves, + Block::PaleOakLeaves, Block::DarkOakLeaves, Block::AcaciaLeaves, Block::BirchLeaves, @@ -1496,6 +1550,10 @@ pub static LOGS: Lazy> = Lazy::new(|| { Block::DarkOakWood, Block::StrippedDarkOakLog, Block::StrippedDarkOakWood, + Block::PaleOakLog, + Block::PaleOakWood, + Block::StrippedPaleOakLog, + Block::StrippedPaleOakWood, Block::OakLog, Block::OakWood, Block::StrippedOakLog, @@ -1532,6 +1590,10 @@ pub static LOGS_THAT_BURN: Lazy> = Lazy::new(|| { Block::DarkOakWood, Block::StrippedDarkOakLog, Block::StrippedDarkOakWood, + Block::PaleOakLog, + Block::PaleOakWood, + Block::StrippedPaleOakLog, + Block::StrippedPaleOakWood, Block::OakLog, Block::OakWood, Block::StrippedOakLog, @@ -1582,6 +1644,7 @@ pub static LUSH_GROUND_REPLACEABLE: Lazy> = Lazy::new(|| { Block::Mycelium, Block::RootedDirt, Block::MossBlock, + Block::PaleMossBlock, Block::Mud, Block::MuddyMangroveRoots, ]) @@ -1705,6 +1768,7 @@ pub static MINEABLE_AXE: Lazy> = Lazy::new(|| { Block::BambooMosaicSlab, Block::BambooMosaicStairs, Block::ChiseledBookshelf, + Block::CreakingHeart, Block::WhiteBanner, Block::OrangeBanner, Block::MagentaBanner, @@ -1740,6 +1804,7 @@ pub static MINEABLE_AXE: Lazy> = Lazy::new(|| { Block::AcaciaFenceGate, Block::BirchFenceGate, Block::DarkOakFenceGate, + Block::PaleOakFenceGate, Block::JungleFenceGate, Block::OakFenceGate, Block::SpruceFenceGate, @@ -1754,6 +1819,7 @@ pub static MINEABLE_AXE: Lazy> = Lazy::new(|| { Block::JunglePlanks, Block::AcaciaPlanks, Block::DarkOakPlanks, + Block::PaleOakPlanks, Block::CrimsonPlanks, Block::WarpedPlanks, Block::MangrovePlanks, @@ -1765,6 +1831,7 @@ pub static MINEABLE_AXE: Lazy> = Lazy::new(|| { Block::JungleSapling, Block::AcaciaSapling, Block::DarkOakSapling, + Block::PaleOakSapling, Block::Azalea, Block::FloweringAzalea, Block::MangrovePropagule, @@ -1775,6 +1842,7 @@ pub static MINEABLE_AXE: Lazy> = Lazy::new(|| { Block::JungleButton, Block::AcaciaButton, Block::DarkOakButton, + Block::PaleOakButton, Block::CrimsonButton, Block::WarpedButton, Block::MangroveButton, @@ -1786,6 +1854,7 @@ pub static MINEABLE_AXE: Lazy> = Lazy::new(|| { Block::JungleDoor, Block::AcaciaDoor, Block::DarkOakDoor, + Block::PaleOakDoor, Block::CrimsonDoor, Block::WarpedDoor, Block::MangroveDoor, @@ -1794,6 +1863,7 @@ pub static MINEABLE_AXE: Lazy> = Lazy::new(|| { Block::OakFence, Block::AcaciaFence, Block::DarkOakFence, + Block::PaleOakFence, Block::SpruceFence, Block::BirchFence, Block::JungleFence, @@ -1808,6 +1878,7 @@ pub static MINEABLE_AXE: Lazy> = Lazy::new(|| { Block::JunglePressurePlate, Block::AcaciaPressurePlate, Block::DarkOakPressurePlate, + Block::PaleOakPressurePlate, Block::CrimsonPressurePlate, Block::WarpedPressurePlate, Block::MangrovePressurePlate, @@ -1819,6 +1890,7 @@ pub static MINEABLE_AXE: Lazy> = Lazy::new(|| { Block::JungleSlab, Block::AcaciaSlab, Block::DarkOakSlab, + Block::PaleOakSlab, Block::CrimsonSlab, Block::WarpedSlab, Block::MangroveSlab, @@ -1830,6 +1902,7 @@ pub static MINEABLE_AXE: Lazy> = Lazy::new(|| { Block::JungleStairs, Block::AcaciaStairs, Block::DarkOakStairs, + Block::PaleOakStairs, Block::CrimsonStairs, Block::WarpedStairs, Block::MangroveStairs, @@ -1838,6 +1911,7 @@ pub static MINEABLE_AXE: Lazy> = Lazy::new(|| { Block::AcaciaTrapdoor, Block::BirchTrapdoor, Block::DarkOakTrapdoor, + Block::PaleOakTrapdoor, Block::JungleTrapdoor, Block::OakTrapdoor, Block::SpruceTrapdoor, @@ -1862,6 +1936,7 @@ pub static MINEABLE_AXE: Lazy> = Lazy::new(|| { Block::AcaciaSign, Block::JungleSign, Block::DarkOakSign, + Block::PaleOakSign, Block::CrimsonSign, Block::WarpedSign, Block::MangroveSign, @@ -1873,6 +1948,7 @@ pub static MINEABLE_AXE: Lazy> = Lazy::new(|| { Block::AcaciaWallSign, Block::JungleWallSign, Block::DarkOakWallSign, + Block::PaleOakWallSign, Block::CrimsonWallSign, Block::WarpedWallSign, Block::MangroveWallSign, @@ -1885,6 +1961,7 @@ pub static MINEABLE_AXE: Lazy> = Lazy::new(|| { Block::CherryHangingSign, Block::JungleHangingSign, Block::DarkOakHangingSign, + Block::PaleOakHangingSign, Block::CrimsonHangingSign, Block::WarpedHangingSign, Block::MangroveHangingSign, @@ -1896,6 +1973,7 @@ pub static MINEABLE_AXE: Lazy> = Lazy::new(|| { Block::CherryWallHangingSign, Block::JungleWallHangingSign, Block::DarkOakWallHangingSign, + Block::PaleOakWallHangingSign, Block::CrimsonWallHangingSign, Block::WarpedWallHangingSign, Block::MangroveWallHangingSign, @@ -1904,6 +1982,10 @@ pub static MINEABLE_AXE: Lazy> = Lazy::new(|| { Block::DarkOakWood, Block::StrippedDarkOakLog, Block::StrippedDarkOakWood, + Block::PaleOakLog, + Block::PaleOakWood, + Block::StrippedPaleOakLog, + Block::StrippedPaleOakWood, Block::OakLog, Block::OakWood, Block::StrippedOakLog, @@ -1947,6 +2029,7 @@ pub static MINEABLE_HOE: Lazy> = Lazy::new(|| { Block::JungleLeaves, Block::OakLeaves, Block::SpruceLeaves, + Block::PaleOakLeaves, Block::DarkOakLeaves, Block::AcaciaLeaves, Block::BirchLeaves, @@ -1957,6 +2040,8 @@ pub static MINEABLE_HOE: Lazy> = Lazy::new(|| { Block::CalibratedSculkSensor, Block::MossBlock, Block::MossCarpet, + Block::PaleMossBlock, + Block::PaleMossCarpet, Block::Sculk, Block::SculkCatalyst, Block::SculkVein, @@ -1984,6 +2069,7 @@ pub static MINEABLE_PICKAXE: Lazy> = Lazy::new(|| { Block::NetherGoldOre, Block::LapisOre, Block::DeepslateLapisOre, + Block::ResinBricks, Block::LapisBlock, Block::Dispenser, Block::Sandstone, @@ -2345,6 +2431,11 @@ pub static MINEABLE_PICKAXE: Lazy> = Lazy::new(|| { Block::WaxedWeatheredCopperTrapdoor, Block::WaxedOxidizedCopperTrapdoor, Block::HeavyCore, + Block::ResinBricks, + Block::ResinBrickSlab, + Block::ResinBrickWall, + Block::ResinBrickStairs, + Block::ChiseledResinBricks, Block::StoneButton, Block::PolishedBlackstoneButton, Block::CobblestoneWall, @@ -2372,6 +2463,7 @@ pub static MINEABLE_PICKAXE: Lazy> = Lazy::new(|| { Block::TuffWall, Block::PolishedTuffWall, Block::TuffBrickWall, + Block::ResinBrickWall, Block::ShulkerBox, Block::BlackShulkerBox, Block::BlueShulkerBox, @@ -2458,6 +2550,7 @@ pub static MOB_INTERACTABLE_DOORS: Lazy> = Lazy::new(|| { Block::JungleDoor, Block::AcaciaDoor, Block::DarkOakDoor, + Block::PaleOakDoor, Block::CrimsonDoor, Block::WarpedDoor, Block::MangroveDoor, @@ -2484,6 +2577,7 @@ pub static MOSS_REPLACEABLE: Lazy> = Lazy::new(|| { Block::Mycelium, Block::RootedDirt, Block::MossBlock, + Block::PaleMossBlock, Block::Mud, Block::MuddyMangroveRoots, ]) @@ -2599,14 +2693,6 @@ pub static NEEDS_STONE_TOOL: Lazy> = Lazy::new(|| { Block::WaxedExposedCopperTrapdoor, Block::WaxedWeatheredCopperTrapdoor, Block::WaxedOxidizedCopperTrapdoor, - Block::CopperDoor, - Block::ExposedCopperDoor, - Block::WeatheredCopperDoor, - Block::OxidizedCopperDoor, - Block::WaxedCopperDoor, - Block::WaxedExposedCopperDoor, - Block::WaxedWeatheredCopperDoor, - Block::WaxedOxidizedCopperDoor, ]) }); pub static NETHER_CARVER_REPLACEABLES: Lazy> = Lazy::new(|| { @@ -2629,6 +2715,7 @@ pub static NETHER_CARVER_REPLACEABLES: Lazy> = Lazy::new(|| { Block::Mycelium, Block::RootedDirt, Block::MossBlock, + Block::PaleMossBlock, Block::Mud, Block::MuddyMangroveRoots, Block::CrimsonNylium, @@ -2675,7 +2762,6 @@ pub static OVERWORLD_CARVER_REPLACEABLES: Lazy> = Lazy::new(|| { Block::Sandstone, Block::RedSandstone, Block::Calcite, - Block::Snow, Block::PackedIce, Block::RawIronBlock, Block::RawCopperBlock, @@ -2692,6 +2778,7 @@ pub static OVERWORLD_CARVER_REPLACEABLES: Lazy> = Lazy::new(|| { Block::Mycelium, Block::RootedDirt, Block::MossBlock, + Block::PaleMossBlock, Block::Mud, Block::MuddyMangroveRoots, Block::Sand, @@ -2719,6 +2806,9 @@ pub static OVERWORLD_CARVER_REPLACEABLES: Lazy> = Lazy::new(|| { Block::DeepslateIronOre, Block::CopperOre, Block::DeepslateCopperOre, + Block::Snow, + Block::SnowBlock, + Block::PowderSnow, ]) }); pub static OVERWORLD_NATURAL_LOGS: Lazy> = Lazy::new(|| { @@ -2729,10 +2819,19 @@ pub static OVERWORLD_NATURAL_LOGS: Lazy> = Lazy::new(|| { Block::JungleLog, Block::SpruceLog, Block::DarkOakLog, + Block::PaleOakLog, Block::MangroveLog, Block::CherryLog, ]) }); +pub static PALE_OAK_LOGS: Lazy> = Lazy::new(|| { + HashSet::from_iter(vec![ + Block::PaleOakLog, + Block::PaleOakWood, + Block::StrippedPaleOakLog, + Block::StrippedPaleOakWood, + ]) +}); pub static PARROTS_SPAWNABLE_ON: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ Block::GrassBlock, @@ -2740,6 +2839,7 @@ pub static PARROTS_SPAWNABLE_ON: Lazy> = Lazy::new(|| { Block::JungleLeaves, Block::OakLeaves, Block::SpruceLeaves, + Block::PaleOakLeaves, Block::DarkOakLeaves, Block::AcaciaLeaves, Block::BirchLeaves, @@ -2759,6 +2859,10 @@ pub static PARROTS_SPAWNABLE_ON: Lazy> = Lazy::new(|| { Block::DarkOakWood, Block::StrippedDarkOakLog, Block::StrippedDarkOakWood, + Block::PaleOakLog, + Block::PaleOakWood, + Block::StrippedPaleOakLog, + Block::StrippedPaleOakWood, Block::OakLog, Block::OakWood, Block::StrippedOakLog, @@ -2806,6 +2910,7 @@ pub static PLANKS: Lazy> = Lazy::new(|| { Block::JunglePlanks, Block::AcaciaPlanks, Block::DarkOakPlanks, + Block::PaleOakPlanks, Block::CrimsonPlanks, Block::WarpedPlanks, Block::MangrovePlanks, @@ -2832,6 +2937,7 @@ pub static PRESSURE_PLATES: Lazy> = Lazy::new(|| { Block::JunglePressurePlate, Block::AcaciaPressurePlate, Block::DarkOakPressurePlate, + Block::PaleOakPressurePlate, Block::CrimsonPressurePlate, Block::WarpedPressurePlate, Block::MangrovePressurePlate, @@ -2882,6 +2988,7 @@ pub static REPLACEABLE: Lazy> = Lazy::new(|| { Block::Snow, Block::Vine, Block::GlowLichen, + Block::ResinClump, Block::Light, Block::TallGrass, Block::LargeFern, @@ -2897,6 +3004,7 @@ pub static REPLACEABLE: Lazy> = Lazy::new(|| { }); pub static REPLACEABLE_BY_TREES: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ + Block::PaleMossCarpet, Block::ShortGrass, Block::Fern, Block::DeadBush, @@ -2919,6 +3027,7 @@ pub static REPLACEABLE_BY_TREES: Lazy> = Lazy::new(|| { Block::JungleLeaves, Block::OakLeaves, Block::SpruceLeaves, + Block::PaleOakLeaves, Block::DarkOakLeaves, Block::AcaciaLeaves, Block::BirchLeaves, @@ -2926,6 +3035,22 @@ pub static REPLACEABLE_BY_TREES: Lazy> = Lazy::new(|| { Block::FloweringAzaleaLeaves, Block::MangroveLeaves, Block::CherryLeaves, + Block::Dandelion, + Block::OpenEyeblossom, + Block::Poppy, + Block::BlueOrchid, + Block::Allium, + Block::AzureBluet, + Block::RedTulip, + Block::OrangeTulip, + Block::WhiteTulip, + Block::PinkTulip, + Block::OxeyeDaisy, + Block::Cornflower, + Block::LilyOfTheValley, + Block::WitherRose, + Block::Torchflower, + Block::ClosedEyeblossom, ]) }); pub static SAND: Lazy> = Lazy::new(|| { @@ -2944,6 +3069,7 @@ pub static SAPLINGS: Lazy> = Lazy::new(|| { Block::JungleSapling, Block::AcaciaSapling, Block::DarkOakSapling, + Block::PaleOakSapling, Block::Azalea, Block::FloweringAzalea, Block::MangrovePropagule, @@ -2977,6 +3103,7 @@ pub static SCULK_REPLACEABLE: Lazy> = Lazy::new(|| { Block::Mycelium, Block::RootedDirt, Block::MossBlock, + Block::PaleMossBlock, Block::Mud, Block::MuddyMangroveRoots, Block::Terracotta, @@ -3036,6 +3163,7 @@ pub static SCULK_REPLACEABLE_WORLD_GEN: Lazy> = Lazy::new(|| { Block::Mycelium, Block::RootedDirt, Block::MossBlock, + Block::PaleMossBlock, Block::Mud, Block::MuddyMangroveRoots, Block::Terracotta, @@ -3091,6 +3219,7 @@ pub static SIGNS: Lazy> = Lazy::new(|| { Block::AcaciaSign, Block::JungleSign, Block::DarkOakSign, + Block::PaleOakSign, Block::CrimsonSign, Block::WarpedSign, Block::MangroveSign, @@ -3102,6 +3231,7 @@ pub static SIGNS: Lazy> = Lazy::new(|| { Block::AcaciaWallSign, Block::JungleWallSign, Block::DarkOakWallSign, + Block::PaleOakWallSign, Block::CrimsonWallSign, Block::WarpedWallSign, Block::MangroveWallSign, @@ -3160,12 +3290,14 @@ pub static SLABS: Lazy> = Lazy::new(|| { Block::TuffSlab, Block::PolishedTuffSlab, Block::TuffBrickSlab, + Block::ResinBrickSlab, Block::OakSlab, Block::SpruceSlab, Block::BirchSlab, Block::JungleSlab, Block::AcaciaSlab, Block::DarkOakSlab, + Block::PaleOakSlab, Block::CrimsonSlab, Block::WarpedSlab, Block::MangroveSlab, @@ -3178,6 +3310,7 @@ pub static SMALL_DRIPLEAF_PLACEABLE: Lazy> = pub static SMALL_FLOWERS: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ Block::Dandelion, + Block::OpenEyeblossom, Block::Poppy, Block::BlueOrchid, Block::Allium, @@ -3191,6 +3324,7 @@ pub static SMALL_FLOWERS: Lazy> = Lazy::new(|| { Block::LilyOfTheValley, Block::WitherRose, Block::Torchflower, + Block::ClosedEyeblossom, ]) }); pub static SMELTS_TO_GLASS: Lazy> = @@ -3209,6 +3343,7 @@ pub static SNAPS_GOAT_HORN: Lazy> = Lazy::new(|| { Block::JungleLog, Block::SpruceLog, Block::DarkOakLog, + Block::PaleOakLog, Block::MangroveLog, Block::CherryLog, ]) @@ -3221,6 +3356,7 @@ pub static SNIFFER_DIGGABLE_BLOCK: Lazy> = Lazy::new(|| { Block::CoarseDirt, Block::RootedDirt, Block::MossBlock, + Block::PaleMossBlock, Block::Mud, Block::MuddyMangroveRoots, ]) @@ -3292,12 +3428,14 @@ pub static STAIRS: Lazy> = Lazy::new(|| { Block::TuffStairs, Block::PolishedTuffStairs, Block::TuffBrickStairs, + Block::ResinBrickStairs, Block::OakStairs, Block::SpruceStairs, Block::BirchStairs, Block::JungleStairs, Block::AcaciaStairs, Block::DarkOakStairs, + Block::PaleOakStairs, Block::CrimsonStairs, Block::WarpedStairs, Block::MangroveStairs, @@ -3313,6 +3451,7 @@ pub static STANDING_SIGNS: Lazy> = Lazy::new(|| { Block::AcaciaSign, Block::JungleSign, Block::DarkOakSign, + Block::PaleOakSign, Block::CrimsonSign, Block::WarpedSign, Block::MangroveSign, @@ -3377,7 +3516,6 @@ pub static SWORD_EFFICIENT: Lazy> = Lazy::new(|| { Block::CaveVines, Block::CaveVinesPlant, Block::SporeBlossom, - Block::MossCarpet, Block::PinkPetals, Block::BigDripleaf, Block::BigDripleafStem, @@ -3397,6 +3535,7 @@ pub static SWORD_EFFICIENT: Lazy> = Lazy::new(|| { Block::JungleLeaves, Block::OakLeaves, Block::SpruceLeaves, + Block::PaleOakLeaves, Block::DarkOakLeaves, Block::AcaciaLeaves, Block::BirchLeaves, @@ -3410,24 +3549,11 @@ pub static SWORD_EFFICIENT: Lazy> = Lazy::new(|| { Block::JungleSapling, Block::AcaciaSapling, Block::DarkOakSapling, + Block::PaleOakSapling, Block::Azalea, Block::FloweringAzalea, Block::MangrovePropagule, Block::CherrySapling, - Block::Dandelion, - Block::Poppy, - Block::BlueOrchid, - Block::Allium, - Block::AzureBluet, - Block::RedTulip, - Block::OrangeTulip, - Block::WhiteTulip, - Block::PinkTulip, - Block::OxeyeDaisy, - Block::Cornflower, - Block::LilyOfTheValley, - Block::WitherRose, - Block::Torchflower, Block::Beetroots, Block::Carrots, Block::Potatoes, @@ -3438,15 +3564,6 @@ pub static SWORD_EFFICIENT: Lazy> = Lazy::new(|| { Block::PitcherCrop, ]) }); -pub static TALL_FLOWERS: Lazy> = Lazy::new(|| { - HashSet::from_iter(vec![ - Block::Sunflower, - Block::Lilac, - Block::Peony, - Block::RoseBush, - Block::PitcherPlant, - ]) -}); pub static TERRACOTTA: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ Block::Terracotta, @@ -3484,6 +3601,7 @@ pub static TRAPDOORS: Lazy> = Lazy::new(|| { Block::AcaciaTrapdoor, Block::BirchTrapdoor, Block::DarkOakTrapdoor, + Block::PaleOakTrapdoor, Block::JungleTrapdoor, Block::OakTrapdoor, Block::SpruceTrapdoor, @@ -3519,6 +3637,7 @@ pub static UNSTABLE_BOTTOM_CENTER: Lazy> = Lazy::new(|| { Block::AcaciaFenceGate, Block::BirchFenceGate, Block::DarkOakFenceGate, + Block::PaleOakFenceGate, Block::JungleFenceGate, Block::OakFenceGate, Block::SpruceFenceGate, @@ -3551,6 +3670,7 @@ pub static WALL_HANGING_SIGNS: Lazy> = Lazy::new(|| { Block::CherryWallHangingSign, Block::JungleWallHangingSign, Block::DarkOakWallHangingSign, + Block::PaleOakWallHangingSign, Block::CrimsonWallHangingSign, Block::WarpedWallHangingSign, Block::MangroveWallHangingSign, @@ -3603,6 +3723,7 @@ pub static WALL_POST_OVERRIDE: Lazy> = Lazy::new(|| { Block::AcaciaSign, Block::JungleSign, Block::DarkOakSign, + Block::PaleOakSign, Block::CrimsonSign, Block::WarpedSign, Block::MangroveSign, @@ -3614,6 +3735,7 @@ pub static WALL_POST_OVERRIDE: Lazy> = Lazy::new(|| { Block::AcaciaWallSign, Block::JungleWallSign, Block::DarkOakWallSign, + Block::PaleOakWallSign, Block::CrimsonWallSign, Block::WarpedWallSign, Block::MangroveWallSign, @@ -3625,6 +3747,7 @@ pub static WALL_POST_OVERRIDE: Lazy> = Lazy::new(|| { Block::JunglePressurePlate, Block::AcaciaPressurePlate, Block::DarkOakPressurePlate, + Block::PaleOakPressurePlate, Block::CrimsonPressurePlate, Block::WarpedPressurePlate, Block::MangrovePressurePlate, @@ -3642,6 +3765,7 @@ pub static WALL_SIGNS: Lazy> = Lazy::new(|| { Block::AcaciaWallSign, Block::JungleWallSign, Block::DarkOakWallSign, + Block::PaleOakWallSign, Block::CrimsonWallSign, Block::WarpedWallSign, Block::MangroveWallSign, @@ -3676,6 +3800,7 @@ pub static WALLS: Lazy> = Lazy::new(|| { Block::TuffWall, Block::PolishedTuffWall, Block::TuffBrickWall, + Block::ResinBrickWall, ]) }); pub static WARPED_STEMS: Lazy> = Lazy::new(|| { @@ -3724,6 +3849,7 @@ pub static WOODEN_BUTTONS: Lazy> = Lazy::new(|| { Block::JungleButton, Block::AcaciaButton, Block::DarkOakButton, + Block::PaleOakButton, Block::CrimsonButton, Block::WarpedButton, Block::MangroveButton, @@ -3739,6 +3865,7 @@ pub static WOODEN_DOORS: Lazy> = Lazy::new(|| { Block::JungleDoor, Block::AcaciaDoor, Block::DarkOakDoor, + Block::PaleOakDoor, Block::CrimsonDoor, Block::WarpedDoor, Block::MangroveDoor, @@ -3751,6 +3878,7 @@ pub static WOODEN_FENCES: Lazy> = Lazy::new(|| { Block::OakFence, Block::AcaciaFence, Block::DarkOakFence, + Block::PaleOakFence, Block::SpruceFence, Block::BirchFence, Block::JungleFence, @@ -3769,6 +3897,7 @@ pub static WOODEN_PRESSURE_PLATES: Lazy> = Lazy::new(|| { Block::JunglePressurePlate, Block::AcaciaPressurePlate, Block::DarkOakPressurePlate, + Block::PaleOakPressurePlate, Block::CrimsonPressurePlate, Block::WarpedPressurePlate, Block::MangrovePressurePlate, @@ -3784,6 +3913,7 @@ pub static WOODEN_SLABS: Lazy> = Lazy::new(|| { Block::JungleSlab, Block::AcaciaSlab, Block::DarkOakSlab, + Block::PaleOakSlab, Block::CrimsonSlab, Block::WarpedSlab, Block::MangroveSlab, @@ -3799,6 +3929,7 @@ pub static WOODEN_STAIRS: Lazy> = Lazy::new(|| { Block::JungleStairs, Block::AcaciaStairs, Block::DarkOakStairs, + Block::PaleOakStairs, Block::CrimsonStairs, Block::WarpedStairs, Block::MangroveStairs, @@ -3811,6 +3942,7 @@ pub static WOODEN_TRAPDOORS: Lazy> = Lazy::new(|| { Block::AcaciaTrapdoor, Block::BirchTrapdoor, Block::DarkOakTrapdoor, + Block::PaleOakTrapdoor, Block::JungleTrapdoor, Block::OakTrapdoor, Block::SpruceTrapdoor, diff --git a/azalea-registry/src/tags/items.rs b/azalea-registry/src/tags/items.rs index e8c31ddf3..61b4dd1e9 100644 --- a/azalea-registry/src/tags/items.rs +++ b/azalea-registry/src/tags/items.rs @@ -85,14 +85,8 @@ pub static BEDS: Lazy> = Lazy::new(|| { }); pub static BEE_FOOD: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ - Item::FloweringAzaleaLeaves, - Item::FloweringAzalea, - Item::MangrovePropagule, - Item::CherryLeaves, - Item::PinkPetals, - Item::ChorusFlower, - Item::SporeBlossom, Item::Dandelion, + Item::OpenEyeblossom, Item::Poppy, Item::BlueOrchid, Item::Allium, @@ -111,6 +105,13 @@ pub static BEE_FOOD: Lazy> = Lazy::new(|| { Item::Peony, Item::RoseBush, Item::PitcherPlant, + Item::FloweringAzaleaLeaves, + Item::FloweringAzalea, + Item::MangrovePropagule, + Item::CherryLeaves, + Item::PinkPetals, + Item::ChorusFlower, + Item::SporeBlossom, ]) }); pub static BIRCH_LOGS: Lazy> = Lazy::new(|| { @@ -129,6 +130,7 @@ pub static BOATS: Lazy> = Lazy::new(|| { Item::JungleBoat, Item::AcaciaBoat, Item::DarkOakBoat, + Item::PaleOakBoat, Item::MangroveBoat, Item::BambooRaft, Item::CherryBoat, @@ -138,6 +140,7 @@ pub static BOATS: Lazy> = Lazy::new(|| { Item::JungleChestBoat, Item::AcaciaChestBoat, Item::DarkOakChestBoat, + Item::PaleOakChestBoat, Item::MangroveChestBoat, Item::BambooChestRaft, Item::CherryChestBoat, @@ -219,6 +222,7 @@ pub static BUTTONS: Lazy> = Lazy::new(|| { Item::JungleButton, Item::AcaciaButton, Item::DarkOakButton, + Item::PaleOakButton, Item::CrimsonButton, Item::WarpedButton, Item::MangroveButton, @@ -278,6 +282,7 @@ pub static CHEST_BOATS: Lazy> = Lazy::new(|| { Item::JungleChestBoat, Item::AcaciaChestBoat, Item::DarkOakChestBoat, + Item::PaleOakChestBoat, Item::MangroveChestBoat, Item::BambooChestRaft, Item::CherryChestBoat, @@ -314,6 +319,7 @@ pub static COMPLETES_FIND_TREE_TUTORIAL: Lazy> = Lazy::new(|| { Item::JungleLeaves, Item::OakLeaves, Item::SpruceLeaves, + Item::PaleOakLeaves, Item::DarkOakLeaves, Item::AcaciaLeaves, Item::BirchLeaves, @@ -335,6 +341,10 @@ pub static COMPLETES_FIND_TREE_TUTORIAL: Lazy> = Lazy::new(|| { Item::DarkOakWood, Item::StrippedDarkOakLog, Item::StrippedDarkOakWood, + Item::PaleOakLog, + Item::PaleOakWood, + Item::StrippedPaleOakLog, + Item::StrippedPaleOakWood, Item::OakLog, Item::OakWood, Item::StrippedOakLog, @@ -506,6 +516,7 @@ pub static DIRT: Lazy> = Lazy::new(|| { Item::Mycelium, Item::RootedDirt, Item::MossBlock, + Item::PaleMossBlock, Item::Mud, Item::MuddyMangroveRoots, ]) @@ -527,6 +538,7 @@ pub static DOORS: Lazy> = Lazy::new(|| { Item::JungleDoor, Item::AcaciaDoor, Item::DarkOakDoor, + Item::PaleOakDoor, Item::CrimsonDoor, Item::WarpedDoor, Item::MangroveDoor, @@ -534,6 +546,8 @@ pub static DOORS: Lazy> = Lazy::new(|| { Item::CherryDoor, ]) }); +pub static DROWNED_PREFERRED_WEAPONS: Lazy> = + Lazy::new(|| HashSet::from_iter(vec![Item::Trident])); pub static DUPLICATES_ALLAYS: Lazy> = Lazy::new(|| HashSet::from_iter(vec![Item::AmethystShard])); pub static DYEABLE: Lazy> = Lazy::new(|| { @@ -932,6 +946,7 @@ pub static FENCE_GATES: Lazy> = Lazy::new(|| { Item::AcaciaFenceGate, Item::BirchFenceGate, Item::DarkOakFenceGate, + Item::PaleOakFenceGate, Item::JungleFenceGate, Item::OakFenceGate, Item::SpruceFenceGate, @@ -948,6 +963,7 @@ pub static FENCES: Lazy> = Lazy::new(|| { Item::OakFence, Item::AcaciaFence, Item::DarkOakFence, + Item::PaleOakFence, Item::SpruceFence, Item::BirchFence, Item::JungleFence, @@ -968,36 +984,6 @@ pub static FISHES: Lazy> = Lazy::new(|| { Item::TropicalFish, ]) }); -pub static FLOWERS: Lazy> = Lazy::new(|| { - HashSet::from_iter(vec![ - Item::FloweringAzaleaLeaves, - Item::FloweringAzalea, - Item::MangrovePropagule, - Item::CherryLeaves, - Item::PinkPetals, - Item::ChorusFlower, - Item::SporeBlossom, - Item::Dandelion, - Item::Poppy, - Item::BlueOrchid, - Item::Allium, - Item::AzureBluet, - Item::RedTulip, - Item::OrangeTulip, - Item::WhiteTulip, - Item::PinkTulip, - Item::OxeyeDaisy, - Item::Cornflower, - Item::LilyOfTheValley, - Item::WitherRose, - Item::Torchflower, - Item::Sunflower, - Item::Lilac, - Item::Peony, - Item::RoseBush, - Item::PitcherPlant, - ]) -}); pub static FOOT_ARMOR: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ Item::LeatherBoots, @@ -1043,6 +1029,7 @@ pub static HANGING_SIGNS: Lazy> = Lazy::new(|| { Item::CherryHangingSign, Item::JungleHangingSign, Item::DarkOakHangingSign, + Item::PaleOakHangingSign, Item::CrimsonHangingSign, Item::WarpedHangingSign, Item::MangroveHangingSign, @@ -1111,6 +1098,7 @@ pub static LEAVES: Lazy> = Lazy::new(|| { Item::JungleLeaves, Item::OakLeaves, Item::SpruceLeaves, + Item::PaleOakLeaves, Item::DarkOakLeaves, Item::AcaciaLeaves, Item::BirchLeaves, @@ -1150,6 +1138,10 @@ pub static LOGS: Lazy> = Lazy::new(|| { Item::DarkOakWood, Item::StrippedDarkOakLog, Item::StrippedDarkOakWood, + Item::PaleOakLog, + Item::PaleOakWood, + Item::StrippedPaleOakLog, + Item::StrippedPaleOakWood, Item::OakLog, Item::OakWood, Item::StrippedOakLog, @@ -1186,6 +1178,10 @@ pub static LOGS_THAT_BURN: Lazy> = Lazy::new(|| { Item::DarkOakWood, Item::StrippedDarkOakLog, Item::StrippedDarkOakWood, + Item::PaleOakLog, + Item::PaleOakWood, + Item::StrippedPaleOakLog, + Item::StrippedPaleOakWood, Item::OakLog, Item::OakWood, Item::StrippedOakLog, @@ -1298,6 +1294,14 @@ pub static OAK_LOGS: Lazy> = Lazy::new(|| { }); pub static OCELOT_FOOD: Lazy> = Lazy::new(|| HashSet::from_iter(vec![Item::Cod, Item::Salmon])); +pub static PALE_OAK_LOGS: Lazy> = Lazy::new(|| { + HashSet::from_iter(vec![ + Item::PaleOakLog, + Item::PaleOakWood, + Item::StrippedPaleOakLog, + Item::StrippedPaleOakWood, + ]) +}); 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])); @@ -1356,6 +1360,8 @@ pub static PIGLIN_LOVED: Lazy> = Lazy::new(|| { Item::DeepslateGoldOre, ]) }); +pub static PIGLIN_PREFERRED_WEAPONS: Lazy> = + Lazy::new(|| HashSet::from_iter(vec![Item::Crossbow])); 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(|| { @@ -1366,6 +1372,8 @@ pub static PIGLIN_SAFE_ARMOR: Lazy> = Lazy::new(|| { Item::GoldenBoots, ]) }); +pub static PILLAGER_PREFERRED_WEAPONS: Lazy> = + Lazy::new(|| HashSet::from_iter(vec![Item::Crossbow])); pub static PLANKS: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ Item::OakPlanks, @@ -1374,6 +1382,7 @@ pub static PLANKS: Lazy> = Lazy::new(|| { Item::JunglePlanks, Item::AcaciaPlanks, Item::DarkOakPlanks, + Item::PaleOakPlanks, Item::CrimsonPlanks, Item::WarpedPlanks, Item::MangrovePlanks, @@ -1425,6 +1434,7 @@ pub static SAPLINGS: Lazy> = Lazy::new(|| { Item::JungleSapling, Item::AcaciaSapling, Item::DarkOakSapling, + Item::PaleOakSapling, Item::Azalea, Item::FloweringAzalea, Item::MangrovePropagule, @@ -1471,6 +1481,7 @@ pub static SIGNS: Lazy> = Lazy::new(|| { Item::AcaciaSign, Item::JungleSign, Item::DarkOakSign, + Item::PaleOakSign, Item::CrimsonSign, Item::WarpedSign, Item::MangroveSign, @@ -1478,6 +1489,8 @@ pub static SIGNS: Lazy> = Lazy::new(|| { Item::CherrySign, ]) }); +pub static SKELETON_PREFERRED_WEAPONS: Lazy> = + Lazy::new(|| HashSet::from_iter(vec![Item::Bow])); pub static SKULLS: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ Item::PlayerHead, @@ -1540,12 +1553,14 @@ pub static SLABS: Lazy> = Lazy::new(|| { Item::TuffSlab, Item::PolishedTuffSlab, Item::TuffBrickSlab, + Item::ResinBrickSlab, Item::OakSlab, Item::SpruceSlab, Item::BirchSlab, Item::JungleSlab, Item::AcaciaSlab, Item::DarkOakSlab, + Item::PaleOakSlab, Item::CrimsonSlab, Item::WarpedSlab, Item::MangroveSlab, @@ -1556,6 +1571,7 @@ pub static SLABS: Lazy> = Lazy::new(|| { pub static SMALL_FLOWERS: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ Item::Dandelion, + Item::OpenEyeblossom, Item::Poppy, Item::BlueOrchid, Item::Allium, @@ -1569,6 +1585,7 @@ pub static SMALL_FLOWERS: Lazy> = Lazy::new(|| { Item::LilyOfTheValley, Item::WitherRose, Item::Torchflower, + Item::ClosedEyeblossom, ]) }); pub static SMELTS_TO_GLASS: Lazy> = @@ -1632,12 +1649,14 @@ pub static STAIRS: Lazy> = Lazy::new(|| { Item::TuffStairs, Item::PolishedTuffStairs, Item::TuffBrickStairs, + Item::ResinBrickStairs, Item::OakStairs, Item::SpruceStairs, Item::BirchStairs, Item::JungleStairs, Item::AcaciaStairs, Item::DarkOakStairs, + Item::PaleOakStairs, Item::CrimsonStairs, Item::WarpedStairs, Item::MangroveStairs, @@ -1683,15 +1702,6 @@ pub static SWORDS: Lazy> = Lazy::new(|| { Item::IronSword, ]) }); -pub static TALL_FLOWERS: Lazy> = Lazy::new(|| { - HashSet::from_iter(vec![ - Item::Sunflower, - Item::Lilac, - Item::Peony, - Item::RoseBush, - Item::PitcherPlant, - ]) -}); pub static TERRACOTTA: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ Item::Terracotta, @@ -1727,6 +1737,7 @@ pub static TRAPDOORS: Lazy> = Lazy::new(|| { Item::AcaciaTrapdoor, Item::BirchTrapdoor, Item::DarkOakTrapdoor, + Item::PaleOakTrapdoor, Item::JungleTrapdoor, Item::OakTrapdoor, Item::SpruceTrapdoor, @@ -1739,38 +1750,17 @@ pub static TRAPDOORS: Lazy> = Lazy::new(|| { }); pub static TRIM_MATERIALS: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ - Item::IronIngot, + Item::AmethystShard, Item::CopperIngot, + Item::Diamond, + Item::Emerald, Item::GoldIngot, + Item::IronIngot, Item::LapisLazuli, - Item::Emerald, - Item::Diamond, Item::NetheriteIngot, - Item::Redstone, Item::Quartz, - Item::AmethystShard, - ]) -}); -pub static TRIM_TEMPLATES: Lazy> = Lazy::new(|| { - HashSet::from_iter(vec![ - Item::WardArmorTrimSmithingTemplate, - Item::SpireArmorTrimSmithingTemplate, - Item::CoastArmorTrimSmithingTemplate, - Item::EyeArmorTrimSmithingTemplate, - Item::DuneArmorTrimSmithingTemplate, - Item::WildArmorTrimSmithingTemplate, - Item::RibArmorTrimSmithingTemplate, - Item::TideArmorTrimSmithingTemplate, - Item::SentryArmorTrimSmithingTemplate, - Item::VexArmorTrimSmithingTemplate, - Item::SnoutArmorTrimSmithingTemplate, - Item::WayfinderArmorTrimSmithingTemplate, - Item::ShaperArmorTrimSmithingTemplate, - Item::SilenceArmorTrimSmithingTemplate, - Item::RaiserArmorTrimSmithingTemplate, - Item::HostArmorTrimSmithingTemplate, - Item::FlowArmorTrimSmithingTemplate, - Item::BoltArmorTrimSmithingTemplate, + Item::Redstone, + Item::ResinBrick, ]) }); pub static TRIMMABLE_ARMOR: Lazy> = Lazy::new(|| { @@ -1854,6 +1844,7 @@ pub static WALLS: Lazy> = Lazy::new(|| { Item::TuffWall, Item::PolishedTuffWall, Item::TuffBrickWall, + Item::ResinBrickWall, ]) }); pub static WARPED_STEMS: Lazy> = Lazy::new(|| { @@ -1866,6 +1857,8 @@ pub static WARPED_STEMS: Lazy> = Lazy::new(|| { }); pub static WART_BLOCKS: Lazy> = Lazy::new(|| HashSet::from_iter(vec![Item::NetherWartBlock, Item::WarpedWartBlock])); +pub static WITHER_SKELETON_DISLIKED_WEAPONS: Lazy> = + Lazy::new(|| HashSet::from_iter(vec![Item::Bow, Item::Crossbow])); pub static WOLF_FOOD: Lazy> = Lazy::new(|| { HashSet::from_iter(vec![ Item::Cod, @@ -1896,6 +1889,7 @@ pub static WOODEN_BUTTONS: Lazy> = Lazy::new(|| { Item::JungleButton, Item::AcaciaButton, Item::DarkOakButton, + Item::PaleOakButton, Item::CrimsonButton, Item::WarpedButton, Item::MangroveButton, @@ -1911,6 +1905,7 @@ pub static WOODEN_DOORS: Lazy> = Lazy::new(|| { Item::JungleDoor, Item::AcaciaDoor, Item::DarkOakDoor, + Item::PaleOakDoor, Item::CrimsonDoor, Item::WarpedDoor, Item::MangroveDoor, @@ -1923,6 +1918,7 @@ pub static WOODEN_FENCES: Lazy> = Lazy::new(|| { Item::OakFence, Item::AcaciaFence, Item::DarkOakFence, + Item::PaleOakFence, Item::SpruceFence, Item::BirchFence, Item::JungleFence, @@ -1941,6 +1937,7 @@ pub static WOODEN_PRESSURE_PLATES: Lazy> = Lazy::new(|| { Item::JunglePressurePlate, Item::AcaciaPressurePlate, Item::DarkOakPressurePlate, + Item::PaleOakPressurePlate, Item::CrimsonPressurePlate, Item::WarpedPressurePlate, Item::MangrovePressurePlate, @@ -1956,6 +1953,7 @@ pub static WOODEN_SLABS: Lazy> = Lazy::new(|| { Item::JungleSlab, Item::AcaciaSlab, Item::DarkOakSlab, + Item::PaleOakSlab, Item::CrimsonSlab, Item::WarpedSlab, Item::MangroveSlab, @@ -1971,6 +1969,7 @@ pub static WOODEN_STAIRS: Lazy> = Lazy::new(|| { Item::JungleStairs, Item::AcaciaStairs, Item::DarkOakStairs, + Item::PaleOakStairs, Item::CrimsonStairs, Item::WarpedStairs, Item::MangroveStairs, @@ -1986,6 +1985,7 @@ pub static WOODEN_TOOL_MATERIALS: Lazy> = Lazy::new(|| { Item::JunglePlanks, Item::AcaciaPlanks, Item::DarkOakPlanks, + Item::PaleOakPlanks, Item::CrimsonPlanks, Item::WarpedPlanks, Item::MangrovePlanks, @@ -1998,6 +1998,7 @@ pub static WOODEN_TRAPDOORS: Lazy> = Lazy::new(|| { Item::AcaciaTrapdoor, Item::BirchTrapdoor, Item::DarkOakTrapdoor, + Item::PaleOakTrapdoor, Item::JungleTrapdoor, Item::OakTrapdoor, Item::SpruceTrapdoor, diff --git a/azalea-world/Cargo.toml b/azalea-world/Cargo.toml index c69bff4c7..1dff5dc13 100644 --- a/azalea-world/Cargo.toml +++ b/azalea-world/Cargo.toml @@ -11,7 +11,9 @@ version = "0.10.3+mc1.21.1" [dependencies] azalea-block = { path = "../azalea-block", default-features = false, version = "0.10.0" } azalea-buf = { path = "../azalea-buf", version = "0.10.0" } -azalea-core = { path = "../azalea-core", version = "0.10.0", features = ["bevy_ecs"] } +azalea-core = { path = "../azalea-core", version = "0.10.0", features = [ + "bevy_ecs", +] } azalea-registry = { path = "../azalea-registry", version = "0.10.0" } bevy_ecs = { workspace = true } derive_more = { workspace = true, features = ["deref", "deref_mut"] } diff --git a/azalea/src/pathfinder/goals.rs b/azalea/src/pathfinder/goals.rs index 7e02d0cfb..7e33f7d80 100644 --- a/azalea/src/pathfinder/goals.rs +++ b/azalea/src/pathfinder/goals.rs @@ -1,10 +1,11 @@ //! The goals that a pathfinder can try to reach. +use std::f32::consts::SQRT_2; + use azalea_core::position::{BlockPos, Vec3}; use azalea_world::ChunkStorage; #[cfg(feature = "serde")] use serde::{Deserialize, Serialize}; -use std::f32::consts::SQRT_2; use super::costs::{COST_HEURISTIC, FALL_N_BLOCKS_COST, JUMP_ONE_BLOCK_COST}; From a2a941f92aa33a1c5b198206d4d061c8b681c86a Mon Sep 17 00:00:00 2001 From: mat Date: Tue, 26 Nov 2024 20:59:03 +0000 Subject: [PATCH 02/18] fix block codegen and stop using block data from burger --- azalea-block/src/generated.rs | 504 +++++++++++++++++-------- azalea-physics/src/collision/blocks.rs | 4 +- codegen/genblocks.py | 56 ++- codegen/genregistries.py | 1 - codegen/lib/code/blocks.py | 87 ++--- codegen/lib/code/shapes.py | 6 +- codegen/lib/extract.py | 11 - 7 files changed, 411 insertions(+), 258 deletions(-) diff --git a/azalea-block/src/generated.rs b/azalea-block/src/generated.rs index 18ee93fcc..de3605500 100755 --- a/azalea-block/src/generated.rs +++ b/azalea-block/src/generated.rs @@ -7,6 +7,11 @@ use crate::{Block, BlockBehavior, BlockState, BlockStates, Property}; make_block_states! { Properties => { "snowy" => Snowy(bool), + "axis" => Axis { + X, + Y, + Z, + }, "stage" => OakSaplingStage { _0, _1, @@ -35,6 +40,10 @@ make_block_states! { _0, _1, }, + "stage" => PaleOakSaplingStage { + _0, + _1, + }, "age" => MangrovePropaguleAge { _0, _1, @@ -96,11 +105,6 @@ make_block_states! { _2, _3, }, - "axis" => Axis { - X, - Y, - Z, - }, "distance" => OakLeavesDistance { _1, _2, @@ -165,6 +169,15 @@ make_block_states! { _6, _7, }, + "distance" => PaleOakLeavesDistance { + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, "distance" => MangroveLeavesDistance { _1, _2, @@ -284,7 +297,12 @@ make_block_states! { }, "short" => Short(bool), "unstable" => Unstable(bool), - "slot_5_occupied" => TrueFalse(bool), + "slot_0_occupied" => Slot0Occupied(bool), + "slot_1_occupied" => Slot1Occupied(bool), + "slot_2_occupied" => Slot2Occupied(bool), + "slot_3_occupied" => Slot3Occupied(bool), + "slot_4_occupied" => Slot4Occupied(bool), + "slot_5_occupied" => Slot5Occupied(bool), "age" => FireAge { _0, _1, @@ -308,6 +326,8 @@ make_block_states! { "south" => South(bool), "up" => Up(bool), "west" => West(bool), + "active" => Active(bool), + "natural" => Natural(bool), "half" => TopBottom { Top, Bottom, @@ -509,6 +529,24 @@ make_block_states! { _14, _15, }, + "rotation" => PaleOakSignRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, "rotation" => MangroveSignRotation { _0, _1, @@ -689,6 +727,24 @@ make_block_states! { _14, _15, }, + "rotation" => PaleOakHangingSignRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, "rotation" => CrimsonHangingSignRotation { _0, _1, @@ -855,6 +911,31 @@ make_block_states! { _7, }, "in_wall" => InWall(bool), + "type" => Type { + Top, + Bottom, + Double, + }, + "east" => WallEast { + None, + Low, + Tall, + }, + "north" => WallNorth { + None, + Low, + Tall, + }, + "south" => WallSouth { + None, + Low, + Tall, + }, + "west" => WallWest { + None, + Low, + Tall, + }, "age" => NetherWartAge { _0, _1, @@ -882,26 +963,6 @@ make_block_states! { }, "disarmed" => Disarmed(bool), "conditional" => Conditional(bool), - "east" => EastWall { - None, - Low, - Tall, - }, - "north" => NorthWall { - None, - Low, - Tall, - }, - "south" => SouthWall { - None, - Low, - Tall, - }, - "west" => WestWall { - None, - Low, - Tall, - }, "age" => CarrotsAge { _0, _1, @@ -1133,11 +1194,6 @@ make_block_states! { _14, _15, }, - "type" => Type { - Top, - Bottom, - Double, - }, "rotation" => WhiteBannerRotation { _0, _1, @@ -1438,17 +1494,13 @@ make_block_states! { _0, _1, }, - "age" => _0_1_2_3_4 { + "age" => PitcherCropAge { _0, _1, _2, _3, _4, }, - "half" => UpperLower { - Upper, - Lower, - }, "age" => BeetrootsAge { _0, _1, @@ -1673,7 +1725,7 @@ make_block_states! { _7, _8, }, - "power" => TargetOutputPower { + "power" => TargetPower { _0, _1, _2, @@ -1707,7 +1759,7 @@ make_block_states! { _4, _5, }, - "charges" => RespawnAnchorCharge { + "charges" => RespawnAnchorCharges { _0, _1, _2, @@ -1834,7 +1886,7 @@ make_block_states! { _14, _15, }, - "sculk_sensor_phase" => Phase { + "sculk_sensor_phase" => SculkSensorPhase { Inactive, Active, Cooldown, @@ -1867,7 +1919,7 @@ make_block_states! { Middle, Base, }, - "vertical_direction" => TipDirection { + "vertical_direction" => VerticalDirection { Up, Down, }, @@ -1900,7 +1952,7 @@ make_block_states! { _25, }, "berries" => Berries(bool), - "flower_amount" => PinkPetalsAmount { + "flower_amount" => PinkPetalsFlowerAmount { _1, _2, _3, @@ -1912,11 +1964,6 @@ make_block_states! { Partial, Full, }, - "axis" => Falling { - X, - Y, - Z, - }, "cracked" => Cracked(bool), "crafting" => Crafting(bool), "ominous" => Ominous(bool), @@ -1934,6 +1981,7 @@ make_block_states! { Unlocking, Ejecting, }, + "tip" => Tip(bool), }, Blocks => { air => BlockBehavior::new(), {}, @@ -1960,6 +2008,10 @@ make_block_states! { acacia_planks => BlockBehavior::new().strength(2.0, 3.0), {}, cherry_planks => BlockBehavior::new().strength(2.0, 3.0), {}, dark_oak_planks => BlockBehavior::new().strength(2.0, 3.0), {}, + pale_oak_wood => BlockBehavior::new(), { + "axis": Axis::Y, + }, + pale_oak_planks => BlockBehavior::new(), {}, mangrove_planks => BlockBehavior::new().strength(2.0, 3.0), {}, bamboo_planks => BlockBehavior::new().strength(2.0, 3.0), {}, bamboo_mosaic => BlockBehavior::new().strength(2.0, 3.0), {}, @@ -1984,6 +2036,9 @@ make_block_states! { dark_oak_sapling => BlockBehavior::new(), { "stage": DarkOakSaplingStage::_0, }, + pale_oak_sapling => BlockBehavior::new(), { + "stage": PaleOakSaplingStage::_0, + }, mangrove_propagule => BlockBehavior::new(), { "age": MangrovePropaguleAge::_0, "hanging": Hanging(false), @@ -2034,6 +2089,9 @@ make_block_states! { dark_oak_log => BlockBehavior::new().strength(2.0, 2.0), { "axis": Axis::Y, }, + pale_oak_log => BlockBehavior::new(), { + "axis": Axis::Y, + }, mangrove_log => BlockBehavior::new().strength(2.0, 2.0), { "axis": Axis::Y, }, @@ -2064,6 +2122,9 @@ make_block_states! { stripped_dark_oak_log => BlockBehavior::new().strength(2.0, 2.0), { "axis": Axis::Y, }, + stripped_pale_oak_log => BlockBehavior::new(), { + "axis": Axis::Y, + }, stripped_oak_log => BlockBehavior::new().strength(2.0, 2.0), { "axis": Axis::Y, }, @@ -2118,6 +2179,9 @@ make_block_states! { stripped_dark_oak_wood => BlockBehavior::new().strength(2.0, 2.0), { "axis": Axis::Y, }, + stripped_pale_oak_wood => BlockBehavior::new(), { + "axis": Axis::Y, + }, stripped_mangrove_wood => BlockBehavior::new().strength(2.0, 2.0), { "axis": Axis::Y, }, @@ -2156,6 +2220,11 @@ make_block_states! { "persistent": Persistent(false), "waterlogged": Waterlogged(false), }, + pale_oak_leaves => BlockBehavior::new(), { + "distance": PaleOakLeavesDistance::_7, + "persistent": Persistent(false), + "waterlogged": Waterlogged(false), + }, mangrove_leaves => BlockBehavior::new().strength(0.2, 0.2), { "distance": MangroveLeavesDistance::_7, "persistent": Persistent(false), @@ -2345,12 +2414,12 @@ make_block_states! { bookshelf => BlockBehavior::new().strength(1.5, 1.5), {}, chiseled_bookshelf => BlockBehavior::new().strength(1.5, 1.5), { "facing": FacingCardinal::North, - "slot_0_occupied": TrueFalse(false), - "slot_1_occupied": TrueFalse(false), - "slot_2_occupied": TrueFalse(false), - "slot_3_occupied": TrueFalse(false), - "slot_4_occupied": TrueFalse(false), - "slot_5_occupied": TrueFalse(false), + "slot_0_occupied": Slot0Occupied(false), + "slot_1_occupied": Slot1Occupied(false), + "slot_2_occupied": Slot2Occupied(false), + "slot_3_occupied": Slot3Occupied(false), + "slot_4_occupied": Slot4Occupied(false), + "slot_5_occupied": Slot5Occupied(false), }, mossy_cobblestone => BlockBehavior::new().requires_correct_tool_for_drops().strength(2.0, 6.0), {}, obsidian => BlockBehavior::new().requires_correct_tool_for_drops().strength(50.0, 1200.0), {}, @@ -2368,6 +2437,11 @@ make_block_states! { }, soul_fire => BlockBehavior::new(), {}, spawner => BlockBehavior::new().requires_correct_tool_for_drops().strength(5.0, 5.0), {}, + creaking_heart => BlockBehavior::new(), { + "active": Active(false), + "axis": Axis::Y, + "natural": Natural(false), + }, oak_stairs => BlockBehavior::new().strength(2.0, 3.0), { "facing": FacingCardinal::North, "half": TopBottom::Bottom, @@ -2428,6 +2502,10 @@ make_block_states! { "rotation": DarkOakSignRotation::_0, "waterlogged": Waterlogged(false), }, + pale_oak_sign => BlockBehavior::new(), { + "rotation": PaleOakSignRotation::_0, + "waterlogged": Waterlogged(false), + }, mangrove_sign => BlockBehavior::new().strength(1.0, 1.0), { "rotation": MangroveSignRotation::_0, "waterlogged": Waterlogged(false), @@ -2485,6 +2563,10 @@ make_block_states! { "facing": FacingCardinal::North, "waterlogged": Waterlogged(false), }, + pale_oak_wall_sign => BlockBehavior::new(), { + "facing": FacingCardinal::North, + "waterlogged": Waterlogged(false), + }, mangrove_wall_sign => BlockBehavior::new().strength(1.0, 1.0), { "facing": FacingCardinal::North, "waterlogged": Waterlogged(false), @@ -2528,6 +2610,11 @@ make_block_states! { "rotation": DarkOakHangingSignRotation::_0, "waterlogged": Waterlogged(false), }, + pale_oak_hanging_sign => BlockBehavior::new(), { + "attached": Attached(false), + "rotation": PaleOakHangingSignRotation::_0, + "waterlogged": Waterlogged(false), + }, crimson_hanging_sign => BlockBehavior::new().strength(1.0, 1.0), { "attached": Attached(false), "rotation": CrimsonHangingSignRotation::_0, @@ -2576,6 +2663,10 @@ make_block_states! { "facing": FacingCardinal::North, "waterlogged": Waterlogged(false), }, + pale_oak_wall_hanging_sign => BlockBehavior::new(), { + "facing": FacingCardinal::North, + "waterlogged": Waterlogged(false), + }, mangrove_wall_hanging_sign => BlockBehavior::new().strength(1.0, 1.0), { "facing": FacingCardinal::North, "waterlogged": Waterlogged(false), @@ -2628,6 +2719,9 @@ make_block_states! { dark_oak_pressure_plate => BlockBehavior::new().strength(0.5, 0.5), { "powered": Powered(false), }, + pale_oak_pressure_plate => BlockBehavior::new(), { + "powered": Powered(false), + }, mangrove_pressure_plate => BlockBehavior::new().strength(0.5, 0.5), { "powered": Powered(false), }, @@ -2771,6 +2865,13 @@ make_block_states! { "powered": Powered(false), "waterlogged": Waterlogged(false), }, + pale_oak_trapdoor => BlockBehavior::new(), { + "facing": FacingCardinal::North, + "half": TopBottom::Bottom, + "open": Open(false), + "powered": Powered(false), + "waterlogged": Waterlogged(false), + }, mangrove_trapdoor => BlockBehavior::new().strength(3.0, 3.0), { "facing": FacingCardinal::North, "half": TopBottom::Bottom, @@ -2869,6 +2970,15 @@ make_block_states! { "waterlogged": Waterlogged(false), "west": West(false), }, + resin_clump => BlockBehavior::new(), { + "down": Down(false), + "east": East(false), + "north": North(false), + "south": South(false), + "up": Up(false), + "waterlogged": Waterlogged(false), + "west": West(false), + }, oak_fence_gate => BlockBehavior::new().strength(2.0, 3.0), { "facing": FacingCardinal::North, "in_wall": InWall(false), @@ -2897,6 +3007,27 @@ make_block_states! { "snowy": Snowy(false), }, lily_pad => BlockBehavior::new(), {}, + resin_block => BlockBehavior::new(), {}, + resin_bricks => BlockBehavior::new(), {}, + resin_brick_stairs => BlockBehavior::new(), { + "facing": FacingCardinal::North, + "half": TopBottom::Bottom, + "shape": StairShape::Straight, + "waterlogged": Waterlogged(false), + }, + resin_brick_slab => BlockBehavior::new(), { + "type": Type::Bottom, + "waterlogged": Waterlogged(false), + }, + resin_brick_wall => BlockBehavior::new(), { + "east": WallEast::None, + "north": WallNorth::None, + "south": WallSouth::None, + "up": Up(true), + "waterlogged": Waterlogged(false), + "west": WallWest::None, + }, + chiseled_resin_bricks => BlockBehavior::new(), {}, nether_bricks => BlockBehavior::new().requires_correct_tool_for_drops().strength(2.0, 6.0), {}, nether_brick_fence => BlockBehavior::new().requires_correct_tool_for_drops().strength(2.0, 6.0), { "east": East(false), @@ -2993,20 +3124,20 @@ make_block_states! { }, beacon => BlockBehavior::new().strength(3.0, 3.0), {}, cobblestone_wall => BlockBehavior::new().requires_correct_tool_for_drops().strength(2.0, 6.0), { - "east": EastWall::None, - "north": NorthWall::None, - "south": SouthWall::None, + "east": WallEast::None, + "north": WallNorth::None, + "south": WallSouth::None, "up": Up(true), "waterlogged": Waterlogged(false), - "west": WestWall::None, + "west": WallWest::None, }, mossy_cobblestone_wall => BlockBehavior::new().requires_correct_tool_for_drops().strength(2.0, 6.0), { - "east": EastWall::None, - "north": NorthWall::None, - "south": SouthWall::None, + "east": WallEast::None, + "north": WallNorth::None, + "south": WallSouth::None, "up": Up(true), "waterlogged": Waterlogged(false), - "west": WestWall::None, + "west": WallWest::None, }, flower_pot => BlockBehavior::new(), {}, potted_torchflower => BlockBehavior::new(), {}, @@ -3017,6 +3148,7 @@ make_block_states! { potted_acacia_sapling => BlockBehavior::new(), {}, potted_cherry_sapling => BlockBehavior::new(), {}, potted_dark_oak_sapling => BlockBehavior::new(), {}, + potted_pale_oak_sapling => BlockBehavior::new(), {}, potted_mangrove_propagule => BlockBehavior::new(), {}, potted_fern => BlockBehavior::new(), {}, potted_dandelion => BlockBehavior::new(), {}, @@ -3077,6 +3209,11 @@ make_block_states! { "facing": FacingCardinal::North, "powered": Powered(false), }, + pale_oak_button => BlockBehavior::new(), { + "face": Face::Wall, + "facing": FacingCardinal::North, + "powered": Powered(false), + }, mangrove_button => BlockBehavior::new().strength(0.5, 0.5), { "face": Face::Wall, "facing": FacingCardinal::North, @@ -3344,6 +3481,12 @@ make_block_states! { "shape": StairShape::Straight, "waterlogged": Waterlogged(false), }, + pale_oak_stairs => BlockBehavior::new(), { + "facing": FacingCardinal::North, + "half": TopBottom::Bottom, + "shape": StairShape::Straight, + "waterlogged": Waterlogged(false), + }, mangrove_stairs => BlockBehavior::new().strength(2.0, 3.0), { "facing": FacingCardinal::North, "half": TopBottom::Bottom, @@ -3584,6 +3727,10 @@ make_block_states! { "type": Type::Bottom, "waterlogged": Waterlogged(false), }, + pale_oak_slab => BlockBehavior::new(), { + "type": Type::Bottom, + "waterlogged": Waterlogged(false), + }, mangrove_slab => BlockBehavior::new().strength(2.0, 3.0), { "type": Type::Bottom, "waterlogged": Waterlogged(false), @@ -3692,6 +3839,12 @@ make_block_states! { "open": Open(false), "powered": Powered(false), }, + pale_oak_fence_gate => BlockBehavior::new(), { + "facing": FacingCardinal::North, + "in_wall": InWall(false), + "open": Open(false), + "powered": Powered(false), + }, mangrove_fence_gate => BlockBehavior::new().strength(2.0, 3.0), { "facing": FacingCardinal::North, "in_wall": InWall(false), @@ -3746,6 +3899,13 @@ make_block_states! { "waterlogged": Waterlogged(false), "west": West(false), }, + pale_oak_fence => BlockBehavior::new(), { + "east": East(false), + "north": North(false), + "south": South(false), + "waterlogged": Waterlogged(false), + "west": West(false), + }, mangrove_fence => BlockBehavior::new().strength(2.0, 3.0), { "east": East(false), "north": North(false), @@ -3802,6 +3962,13 @@ make_block_states! { "open": Open(false), "powered": Powered(false), }, + pale_oak_door => BlockBehavior::new(), { + "facing": FacingCardinal::North, + "half": Half::Lower, + "hinge": Hinge::Left, + "open": Open(false), + "powered": Powered(false), + }, mangrove_door => BlockBehavior::new().strength(3.0, 3.0), { "facing": FacingCardinal::North, "half": Half::Lower, @@ -3845,8 +4012,8 @@ make_block_states! { "age": TorchflowerCropAge::_0, }, pitcher_crop => BlockBehavior::new(), { - "age": _0_1_2_3_4::_0, - "half": UpperLower::Lower, + "age": PitcherCropAge::_0, + "half": Half::Lower, }, pitcher_plant => BlockBehavior::new(), { "half": Half::Lower, @@ -4288,108 +4455,108 @@ make_block_states! { "waterlogged": Waterlogged(false), }, brick_wall => BlockBehavior::new().requires_correct_tool_for_drops().strength(2.0, 6.0), { - "east": EastWall::None, - "north": NorthWall::None, - "south": SouthWall::None, + "east": WallEast::None, + "north": WallNorth::None, + "south": WallSouth::None, "up": Up(true), "waterlogged": Waterlogged(false), - "west": WestWall::None, + "west": WallWest::None, }, prismarine_wall => BlockBehavior::new().requires_correct_tool_for_drops().strength(1.5, 6.0), { - "east": EastWall::None, - "north": NorthWall::None, - "south": SouthWall::None, + "east": WallEast::None, + "north": WallNorth::None, + "south": WallSouth::None, "up": Up(true), "waterlogged": Waterlogged(false), - "west": WestWall::None, + "west": WallWest::None, }, red_sandstone_wall => BlockBehavior::new().requires_correct_tool_for_drops().strength(0.8, 0.8), { - "east": EastWall::None, - "north": NorthWall::None, - "south": SouthWall::None, + "east": WallEast::None, + "north": WallNorth::None, + "south": WallSouth::None, "up": Up(true), "waterlogged": Waterlogged(false), - "west": WestWall::None, + "west": WallWest::None, }, mossy_stone_brick_wall => BlockBehavior::new().requires_correct_tool_for_drops().strength(1.5, 6.0), { - "east": EastWall::None, - "north": NorthWall::None, - "south": SouthWall::None, + "east": WallEast::None, + "north": WallNorth::None, + "south": WallSouth::None, "up": Up(true), "waterlogged": Waterlogged(false), - "west": WestWall::None, + "west": WallWest::None, }, granite_wall => BlockBehavior::new().requires_correct_tool_for_drops().strength(1.5, 6.0), { - "east": EastWall::None, - "north": NorthWall::None, - "south": SouthWall::None, + "east": WallEast::None, + "north": WallNorth::None, + "south": WallSouth::None, "up": Up(true), "waterlogged": Waterlogged(false), - "west": WestWall::None, + "west": WallWest::None, }, stone_brick_wall => BlockBehavior::new().requires_correct_tool_for_drops().strength(1.5, 6.0), { - "east": EastWall::None, - "north": NorthWall::None, - "south": SouthWall::None, + "east": WallEast::None, + "north": WallNorth::None, + "south": WallSouth::None, "up": Up(true), "waterlogged": Waterlogged(false), - "west": WestWall::None, + "west": WallWest::None, }, mud_brick_wall => BlockBehavior::new().requires_correct_tool_for_drops().strength(1.5, 3.0), { - "east": EastWall::None, - "north": NorthWall::None, - "south": SouthWall::None, + "east": WallEast::None, + "north": WallNorth::None, + "south": WallSouth::None, "up": Up(true), "waterlogged": Waterlogged(false), - "west": WestWall::None, + "west": WallWest::None, }, nether_brick_wall => BlockBehavior::new().requires_correct_tool_for_drops().strength(2.0, 6.0), { - "east": EastWall::None, - "north": NorthWall::None, - "south": SouthWall::None, + "east": WallEast::None, + "north": WallNorth::None, + "south": WallSouth::None, "up": Up(true), "waterlogged": Waterlogged(false), - "west": WestWall::None, + "west": WallWest::None, }, andesite_wall => BlockBehavior::new().requires_correct_tool_for_drops().strength(1.5, 6.0), { - "east": EastWall::None, - "north": NorthWall::None, - "south": SouthWall::None, + "east": WallEast::None, + "north": WallNorth::None, + "south": WallSouth::None, "up": Up(true), "waterlogged": Waterlogged(false), - "west": WestWall::None, + "west": WallWest::None, }, red_nether_brick_wall => BlockBehavior::new().requires_correct_tool_for_drops().strength(2.0, 6.0), { - "east": EastWall::None, - "north": NorthWall::None, - "south": SouthWall::None, + "east": WallEast::None, + "north": WallNorth::None, + "south": WallSouth::None, "up": Up(true), "waterlogged": Waterlogged(false), - "west": WestWall::None, + "west": WallWest::None, }, sandstone_wall => BlockBehavior::new().requires_correct_tool_for_drops().strength(0.8, 0.8), { - "east": EastWall::None, - "north": NorthWall::None, - "south": SouthWall::None, + "east": WallEast::None, + "north": WallNorth::None, + "south": WallSouth::None, "up": Up(true), "waterlogged": Waterlogged(false), - "west": WestWall::None, + "west": WallWest::None, }, end_stone_brick_wall => BlockBehavior::new().requires_correct_tool_for_drops().strength(3.0, 9.0), { - "east": EastWall::None, - "north": NorthWall::None, - "south": SouthWall::None, + "east": WallEast::None, + "north": WallNorth::None, + "south": WallSouth::None, "up": Up(true), "waterlogged": Waterlogged(false), - "west": WestWall::None, + "west": WallWest::None, }, diorite_wall => BlockBehavior::new().requires_correct_tool_for_drops().strength(1.5, 6.0), { - "east": EastWall::None, - "north": NorthWall::None, - "south": SouthWall::None, + "east": WallEast::None, + "north": WallNorth::None, + "south": WallSouth::None, "up": Up(true), "waterlogged": Waterlogged(false), - "west": WestWall::None, + "west": WallWest::None, }, scaffolding => BlockBehavior::new(), { "bottom": Bottom(false), @@ -4613,7 +4780,7 @@ make_block_states! { "level": ComposterLevel::_0, }, target => BlockBehavior::new().strength(0.5, 0.5), { - "power": TargetOutputPower::_0, + "power": TargetPower::_0, }, bee_nest => BlockBehavior::new().strength(0.3, 0.3), { "facing": FacingCardinal::North, @@ -4629,7 +4796,7 @@ make_block_states! { ancient_debris => BlockBehavior::new().requires_correct_tool_for_drops().strength(30.0, 1200.0), {}, crying_obsidian => BlockBehavior::new().requires_correct_tool_for_drops().strength(50.0, 1200.0), {}, respawn_anchor => BlockBehavior::new().requires_correct_tool_for_drops().strength(50.0, 1200.0), { - "charges": RespawnAnchorCharge::_0, + "charges": RespawnAnchorCharges::_0, }, potted_crimson_fungus => BlockBehavior::new(), {}, potted_warped_fungus => BlockBehavior::new(), {}, @@ -4644,12 +4811,12 @@ make_block_states! { "waterlogged": Waterlogged(false), }, blackstone_wall => BlockBehavior::new().requires_correct_tool_for_drops().strength(1.5, 6.0), { - "east": EastWall::None, - "north": NorthWall::None, - "south": SouthWall::None, + "east": WallEast::None, + "north": WallNorth::None, + "south": WallSouth::None, "up": Up(true), "waterlogged": Waterlogged(false), - "west": WestWall::None, + "west": WallWest::None, }, blackstone_slab => BlockBehavior::new().requires_correct_tool_for_drops().strength(2.0, 6.0), { "type": Type::Bottom, @@ -4670,12 +4837,12 @@ make_block_states! { "waterlogged": Waterlogged(false), }, polished_blackstone_brick_wall => BlockBehavior::new().requires_correct_tool_for_drops().strength(1.5, 6.0), { - "east": EastWall::None, - "north": NorthWall::None, - "south": SouthWall::None, + "east": WallEast::None, + "north": WallNorth::None, + "south": WallSouth::None, "up": Up(true), "waterlogged": Waterlogged(false), - "west": WestWall::None, + "west": WallWest::None, }, gilded_blackstone => BlockBehavior::new().requires_correct_tool_for_drops().strength(1.5, 6.0), {}, polished_blackstone_stairs => BlockBehavior::new().requires_correct_tool_for_drops().strength(2.0, 6.0), { @@ -4697,12 +4864,12 @@ make_block_states! { "powered": Powered(false), }, polished_blackstone_wall => BlockBehavior::new().requires_correct_tool_for_drops().strength(2.0, 6.0), { - "east": EastWall::None, - "north": NorthWall::None, - "south": SouthWall::None, + "east": WallEast::None, + "north": WallNorth::None, + "south": WallSouth::None, "up": Up(true), "waterlogged": Waterlogged(false), - "west": WestWall::None, + "west": WallWest::None, }, chiseled_nether_bricks => BlockBehavior::new().requires_correct_tool_for_drops().strength(2.0, 6.0), {}, cracked_nether_bricks => BlockBehavior::new().requires_correct_tool_for_drops().strength(2.0, 6.0), {}, @@ -4873,12 +5040,12 @@ make_block_states! { "waterlogged": Waterlogged(false), }, tuff_wall => BlockBehavior::new().requires_correct_tool_for_drops().strength(1.5, 6.0), { - "east": EastWall::None, - "north": NorthWall::None, - "south": SouthWall::None, + "east": WallEast::None, + "north": WallNorth::None, + "south": WallSouth::None, "up": Up(true), "waterlogged": Waterlogged(false), - "west": WestWall::None, + "west": WallWest::None, }, polished_tuff => BlockBehavior::new().requires_correct_tool_for_drops().strength(1.5, 6.0), {}, polished_tuff_slab => BlockBehavior::new().requires_correct_tool_for_drops().strength(1.5, 6.0), { @@ -4892,12 +5059,12 @@ make_block_states! { "waterlogged": Waterlogged(false), }, polished_tuff_wall => BlockBehavior::new().requires_correct_tool_for_drops().strength(1.5, 6.0), { - "east": EastWall::None, - "north": NorthWall::None, - "south": SouthWall::None, + "east": WallEast::None, + "north": WallNorth::None, + "south": WallSouth::None, "up": Up(true), "waterlogged": Waterlogged(false), - "west": WestWall::None, + "west": WallWest::None, }, chiseled_tuff => BlockBehavior::new().requires_correct_tool_for_drops().strength(1.5, 6.0), {}, tuff_bricks => BlockBehavior::new().requires_correct_tool_for_drops().strength(1.5, 6.0), {}, @@ -4912,12 +5079,12 @@ make_block_states! { "waterlogged": Waterlogged(false), }, tuff_brick_wall => BlockBehavior::new().requires_correct_tool_for_drops().strength(1.5, 6.0), { - "east": EastWall::None, - "north": NorthWall::None, - "south": SouthWall::None, + "east": WallEast::None, + "north": WallNorth::None, + "south": WallSouth::None, "up": Up(true), "waterlogged": Waterlogged(false), - "west": WestWall::None, + "west": WallWest::None, }, chiseled_tuff_bricks => BlockBehavior::new().requires_correct_tool_for_drops().strength(1.5, 6.0), {}, calcite => BlockBehavior::new().requires_correct_tool_for_drops().strength(0.75, 0.75), {}, @@ -4925,13 +5092,13 @@ make_block_states! { powder_snow => BlockBehavior::new().strength(0.25, 0.25), {}, sculk_sensor => BlockBehavior::new().strength(1.5, 1.5), { "power": SculkSensorPower::_0, - "sculk_sensor_phase": Phase::Inactive, + "sculk_sensor_phase": SculkSensorPhase::Inactive, "waterlogged": Waterlogged(false), }, calibrated_sculk_sensor => BlockBehavior::new().strength(1.5, 1.5), { "facing": FacingCardinal::North, "power": CalibratedSculkSensorPower::_0, - "sculk_sensor_phase": Phase::Inactive, + "sculk_sensor_phase": SculkSensorPhase::Inactive, "waterlogged": Waterlogged(false), }, sculk => BlockBehavior::new().strength(0.2, 0.2), {}, @@ -5233,7 +5400,7 @@ make_block_states! { }, pointed_dripstone => BlockBehavior::new().strength(1.5, 3.0), { "thickness": Thickness::Tip, - "vertical_direction": TipDirection::Up, + "vertical_direction": VerticalDirection::Up, "waterlogged": Waterlogged(false), }, dripstone_block => BlockBehavior::new().requires_correct_tool_for_drops().strength(1.5, 1.0), {}, @@ -5250,7 +5417,7 @@ make_block_states! { moss_carpet => BlockBehavior::new().strength(0.1, 0.1), {}, pink_petals => BlockBehavior::new(), { "facing": FacingCardinal::North, - "flower_amount": PinkPetalsAmount::_1, + "flower_amount": PinkPetalsFlowerAmount::_1, }, moss_block => BlockBehavior::new().strength(0.1, 0.1), {}, big_dripleaf => BlockBehavior::new().strength(0.1, 0.1), { @@ -5287,12 +5454,12 @@ make_block_states! { "waterlogged": Waterlogged(false), }, cobbled_deepslate_wall => BlockBehavior::new().requires_correct_tool_for_drops().strength(3.5, 6.0), { - "east": EastWall::None, - "north": NorthWall::None, - "south": SouthWall::None, + "east": WallEast::None, + "north": WallNorth::None, + "south": WallSouth::None, "up": Up(true), "waterlogged": Waterlogged(false), - "west": WestWall::None, + "west": WallWest::None, }, polished_deepslate => BlockBehavior::new().requires_correct_tool_for_drops().strength(3.5, 6.0), {}, polished_deepslate_stairs => BlockBehavior::new().requires_correct_tool_for_drops().strength(3.5, 6.0), { @@ -5306,12 +5473,12 @@ make_block_states! { "waterlogged": Waterlogged(false), }, polished_deepslate_wall => BlockBehavior::new().requires_correct_tool_for_drops().strength(3.5, 6.0), { - "east": EastWall::None, - "north": NorthWall::None, - "south": SouthWall::None, + "east": WallEast::None, + "north": WallNorth::None, + "south": WallSouth::None, "up": Up(true), "waterlogged": Waterlogged(false), - "west": WestWall::None, + "west": WallWest::None, }, deepslate_tiles => BlockBehavior::new().requires_correct_tool_for_drops().strength(3.5, 6.0), {}, deepslate_tile_stairs => BlockBehavior::new().requires_correct_tool_for_drops().strength(3.5, 6.0), { @@ -5325,12 +5492,12 @@ make_block_states! { "waterlogged": Waterlogged(false), }, deepslate_tile_wall => BlockBehavior::new().requires_correct_tool_for_drops().strength(3.5, 6.0), { - "east": EastWall::None, - "north": NorthWall::None, - "south": SouthWall::None, + "east": WallEast::None, + "north": WallNorth::None, + "south": WallSouth::None, "up": Up(true), "waterlogged": Waterlogged(false), - "west": WestWall::None, + "west": WallWest::None, }, deepslate_bricks => BlockBehavior::new().requires_correct_tool_for_drops().strength(3.5, 6.0), {}, deepslate_brick_stairs => BlockBehavior::new().requires_correct_tool_for_drops().strength(3.5, 6.0), { @@ -5344,18 +5511,18 @@ make_block_states! { "waterlogged": Waterlogged(false), }, deepslate_brick_wall => BlockBehavior::new().requires_correct_tool_for_drops().strength(3.5, 6.0), { - "east": EastWall::None, - "north": NorthWall::None, - "south": SouthWall::None, + "east": WallEast::None, + "north": WallNorth::None, + "south": WallSouth::None, "up": Up(true), "waterlogged": Waterlogged(false), - "west": WestWall::None, + "west": WallWest::None, }, chiseled_deepslate => BlockBehavior::new().requires_correct_tool_for_drops().strength(3.5, 6.0), {}, cracked_deepslate_bricks => BlockBehavior::new().requires_correct_tool_for_drops().strength(3.5, 6.0), {}, cracked_deepslate_tiles => BlockBehavior::new().requires_correct_tool_for_drops().strength(3.5, 6.0), {}, infested_deepslate => BlockBehavior::new().strength(1.5, 0.75), { - "axis": Falling::Y, + "axis": Axis::Y, }, smooth_basalt => BlockBehavior::new().requires_correct_tool_for_drops().strength(1.25, 4.2), {}, raw_iron_block => BlockBehavior::new().requires_correct_tool_for_drops().strength(5.0, 6.0), {}, @@ -5396,5 +5563,20 @@ make_block_states! { heavy_core => BlockBehavior::new(), { "waterlogged": Waterlogged(false), }, + pale_moss_block => BlockBehavior::new(), {}, + pale_moss_carpet => BlockBehavior::new(), { + "bottom": Bottom(true), + "east": WallEast::None, + "north": WallNorth::None, + "south": WallSouth::None, + "west": WallWest::None, + }, + pale_hanging_moss => BlockBehavior::new(), { + "tip": Tip(true), + }, + open_eyeblossom => BlockBehavior::new(), {}, + closed_eyeblossom => BlockBehavior::new(), {}, + potted_open_eyeblossom => BlockBehavior::new(), {}, + potted_closed_eyeblossom => BlockBehavior::new(), {}, } } diff --git a/azalea-physics/src/collision/blocks.rs b/azalea-physics/src/collision/blocks.rs index 01784963d..8fab8a029 100644 --- a/azalea-physics/src/collision/blocks.rs +++ b/azalea-physics/src/collision/blocks.rs @@ -1740,11 +1740,11 @@ impl BlockWithShape for BlockState { } fn is_shape_empty(&self) -> bool { - 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) + matches!(self.id, 0|29..=42|45..=84|86..=117|1987..=2034|2047..=2053|2106..=2133|2398..=2915|3033..=4328|4333..=4340|4357..=4580|4613..=4676|4749..=4768|4849..=4904|4913..=5376|5441..=5696|5793..=5818|5883..=5896|5899..=5902|5907..=5941|5968..=5983|6027..=6031|6033..=6034|7046..=7229|7358..=7359|7362..=7363|7366..=7367|7370..=7371|7374..=7375|7378..=7379|7382..=7383|7386..=7387|8159..=8162|8180|8295..=8438|8699|8702|9023|9026|9370..=9553|9578..=9625|9942..=9973|10119..=10142|11246..=11277|11626..=11957|12195..=12196|12199..=12200|12203..=12204|12207..=12208|12211..=12212|12215..=12216|12219..=12220|12223..=12224|12227..=12228|12231..=12232|12235..=12236|12239..=12240|12243..=12244|12247..=12248|12251..=12252|12255..=12256|12259..=12260|12263..=12264|12267..=12268|12271..=12272|12275..=12276|12279..=12280|12283..=12284|12287..=12288|12291..=12292|12295..=12296|12299..=12300|12303..=12304|12307..=12308|12311..=12312|12315..=12316|12319..=12320|12323..=12324|12327..=12328|12331..=12332|12335..=12336|12339..=12340|12343..=12344|12347..=12348|12351..=12352|12355..=12356|12359..=12360|12363..=12364|12367..=12368|12371..=12372|12375..=12376|12379..=12380|12383..=12384|12419..=12420|12423..=12424|12427..=12428|12431..=12432|12435..=12436|12439..=12440|12443..=12444|12447..=12448|12451..=12452|12455..=12456|12459..=12460|12463..=12464|12467..=12468|12471..=12472|12475..=12476|12479..=12480|13508..=13509|13512|13514|13516|13518|13520..=13525|13527|13562|13773..=13799|13826..=13945|13957|13971..=13974|15179|15182|15503|15506|15827|15830|16151|16154|16475|16478|16799|16802|17123|17126|17447|17450|17771|17774|18095|18098|18419|18422|18743|18746|19067|19070|19588..=19591|19605|19607..=19608|19622|19624..=19678|19693..=19696|19889..=19890|19893..=19894|19897..=19898|19901..=19902|19905..=19906|19909..=19910|19913..=19914|19917..=19918|19921..=19922|19925..=19926|19929..=19930|19933..=19934|19937..=19938|19941..=19942|19945..=19946|19949..=19950|20113..=20160|20289..=20368|20560|20563|20980|20983|21385..=21410|21417|21420|22187|22190|22598|22601|23010|23013|23331|23813..=23940|25782..=25836|25840..=25855|25863..=25864|25871..=25872|25879..=25880|25887..=25914|26013|26016|26424|26427|26835|26838|27246|27249|27585) } fn is_shape_full(&self) -> bool { - 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) + 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|4329..=4332|4349..=4356|5903..=5906|5949..=5950|5967|5984..=5985|6018|6020..=6026|6032|6035..=6042|6114..=6129|6770..=6973|7044..=7045|7630..=7631|8046|8189|8191..=8192|8285..=8286|8439|8680..=8692|10022..=10023|10034..=10038|10143..=10170|11243..=11245|11342..=11344|11589..=11590|11595..=11596|11601..=11606|11623..=11625|11958..=11960|12045..=12046|12051..=12052|12057..=12058|12063..=12064|12069..=12070|12075..=12076|12081..=12082|12093..=12094|12099..=12100|12105..=12106|12111..=12112|12117..=12118|12123..=12124|12129..=12130|12135..=12136|12141..=12142|12147..=12148|12153..=12154|12159..=12160|12165..=12166|12171..=12172|12177..=12178|12183..=12184|12189..=12194|13417..=13426|13507|13528..=13561|13563..=13772|13800|13816..=13825|13954|15099..=15100|15105..=15106|15111..=15112|15117..=15118|15123..=15124|15129..=15130|15135..=15136|15141..=15142|15147..=15148|15153..=15154|15159..=15160|15165..=15166|15171..=15172|19417..=19450|19479|19592..=19604|19606|19609..=19621|19623|19679..=19680|19685..=19686|19691..=19692|20369..=20384|20394..=20457|20459..=20467|20472..=20473|20882..=20887|20892..=20893|21298|21383..=21384|21735..=21737|22044..=22045|22094|22099..=22100|22505|22510..=22511|22916..=22917|22922..=22923|23328..=23330|23812|23941..=23942|23951..=23968|24293..=24294|24299..=24300|24305..=24306|24311..=24320|24645..=24646|24651..=24652|24657..=24658|24663..=24664|25689..=25736|25781|25856|25915|25917..=25920|26005..=26006|26331|26416..=26417|26742|26827..=26828|27153|27238..=27239|27564..=27573|27576..=27584|27586|27603..=27656) } } diff --git a/codegen/genblocks.py b/codegen/genblocks.py index 1af0ad106..c86644519 100755 --- a/codegen/genblocks.py +++ b/codegen/genblocks.py @@ -7,25 +7,49 @@ import lib.extract import lib.utils -version_id = lib.code.version.get_version_id() +def generate(): + version_id = lib.code.version.get_version_id() -# TODO: pixlyzer is broken so we use old data -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') + # TODO: pixlyzer is broken so we use old data + 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') -mappings = lib.download.get_mappings_for_version(version_id) -block_states_burger = lib.extract.get_block_states_burger(version_id) -ordered_blocks = lib.extract.get_ordered_blocks_burger(version_id) -block_states_report = lib.extract.get_block_states_report(version_id) -lib.code.blocks.generate_blocks( - block_states_burger, block_states_report, pixlyzer_block_datas, ordered_blocks, mappings) + mappings = lib.download.get_mappings_for_version(version_id) + block_states_report = lib.extract.get_block_states_report(version_id) -lib.code.shapes.generate_block_shapes( - pixlyzer_block_datas, shape_datas['shapes'], shape_datas['aabbs'], block_states_report, block_states_burger, mappings) + registries = lib.extract.get_registries_report(version_id) + ordered_blocks = get_ordered_blocks(registries) -lib.code.utils.fmt() + lib.code.blocks.generate_blocks( + block_states_report, pixlyzer_block_datas, ordered_blocks, mappings) -print('Done!') + lib.code.shapes.generate_block_shapes( + pixlyzer_block_datas, shape_datas['shapes'], shape_datas['aabbs'], block_states_report, mappings) + + lib.code.utils.fmt() + + print('Done!') + +def get_ordered_blocks(registries_report: dict[str, dict]) -> list[str]: + ''' + Returns a list of block ids (like ['air', 'stone', ...]) ordered by their protocol id. + ''' + blocks_registry = registries_report['minecraft:block'] + + blocks_to_ids = {} + for block_id, value in blocks_registry['entries'].items(): + prefix = 'minecraft:' + assert block_id.startswith(prefix) + block_id = block_id[len(prefix):] + protocol_id = value['protocol_id'] + blocks_to_ids[block_id] = protocol_id + + ordered_blocks = [] + for block_id in sorted(blocks_to_ids, key=blocks_to_ids.get): + ordered_blocks.append(block_id) + return ordered_blocks + +generate() diff --git a/codegen/genregistries.py b/codegen/genregistries.py index b867903bf..175d1b207 100755 --- a/codegen/genregistries.py +++ b/codegen/genregistries.py @@ -14,7 +14,6 @@ def generate(version_id: str): lib.code.registry.generate_registries(registries) lib.code.inventory.update_menus(registries['minecraft:menu']['entries']) - block_tags = lib.extract.get_registry_tags(version_id, 'block') item_tags = lib.extract.get_registry_tags(version_id, 'item') fluid_tags = lib.extract.get_registry_tags(version_id, 'fluid') diff --git a/codegen/lib/code/blocks.py b/codegen/lib/code/blocks.py index cda95339c..7b0ebe2f1 100755 --- a/codegen/lib/code/blocks.py +++ b/codegen/lib/code/blocks.py @@ -12,7 +12,7 @@ # - Block: Has properties and states. -def generate_blocks(blocks_burger: dict, blocks_report: dict, pixlyzer_block_datas: dict, ordered_blocks: list[str], mappings: Mappings): +def generate_blocks(blocks_report: dict, pixlyzer_block_datas: dict, ordered_blocks: list[str], mappings: Mappings): with open(BLOCKS_RS_DIR, 'r') as f: existing_code = f.read().splitlines() @@ -25,25 +25,14 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, pixlyzer_block_dat # This dict looks like { 'FloweringAzaleaLeavesDistance': 'distance' } property_struct_names_to_names = {} for block_id in ordered_blocks: - block_data_burger = blocks_burger[block_id] block_data_report = blocks_report[f'minecraft:{block_id}'] block_properties = {} - for property_name in list(block_data_report.get('properties', {}).keys()): - property_burger = None - for property in block_data_burger.get('states', []): - if property['name'] == property_name: - property_burger = property - break - - property_variants = block_data_report['properties'][property_name] - - if property_burger is None: - print( - f'Warning: The reports have states for a block, but Burger doesn\'t! (missing "{property_name}")', block_data_burger) + for property_id in list(block_data_report.get('properties', {}).keys()): + property_variants = block_data_report['properties'][property_id] property_struct_name = get_property_struct_name( - property_burger, block_data_burger, property_variants, mappings) + block_id, property_id, property_variants, mappings) if property_struct_name in properties: if not properties[property_struct_name] == property_variants: @@ -55,7 +44,7 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, pixlyzer_block_dat block_properties[property_struct_name] = property_variants - property_struct_names_to_names[property_struct_name] = property_name + property_struct_names_to_names[property_struct_name] = property_id properties.update(block_properties) @@ -67,7 +56,7 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, pixlyzer_block_dat # Wall, # Ceiling, # }, - property_name = property_struct_names_to_names[property_struct_name] + property_id = property_struct_names_to_names[property_struct_name] # if the only variants are true and false, we make it unit struct with a boolean instead of an enum if property_variants == ['true', 'false']: @@ -79,38 +68,28 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, pixlyzer_block_dat property_shape_code += ' }' new_make_block_states_macro_code.append( - f' "{property_name}" => {property_shape_code},') + f' "{property_id}" => {property_shape_code},') new_make_block_states_macro_code.append(' },') # Block codegen new_make_block_states_macro_code.append(' Blocks => {') for block_id in ordered_blocks: - block_data_burger = blocks_burger[block_id] block_data_report = blocks_report['minecraft:' + block_id] block_data_pixlyzer = pixlyzer_block_datas.get(f'minecraft:{block_id}', {}) - block_properties = block_data_burger.get('states', []) - block_properties_burger = block_data_burger.get('states', []) - default_property_variants: dict[str, str] = {} for state in block_data_report['states']: if state.get('default'): default_property_variants = state.get('properties', {}) properties_code = '{' - for property_name in list(block_data_report.get('properties', {}).keys()): - property_burger = None - for property in block_data_burger.get('states', []): - if property['name'] == property_name: - property_burger = property - break - - property_default = default_property_variants.get(property_name) - property_variants = block_data_report['properties'][property_name] + for property_id in list(block_data_report.get('properties', {}).keys()): + property_default = default_property_variants.get(property_id) + property_variants = block_data_report['properties'][property_id] property_struct_name = get_property_struct_name( - property_burger, block_data_burger, property_variants, mappings) + block_id, property_id, property_variants, mappings) is_boolean_property = property_variants == ['true', 'false'] @@ -123,7 +102,7 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, pixlyzer_block_dat assert property_default is not None - this_property_code = f'"{property_name}": {property_default_type}' + this_property_code = f'"{property_id}": {property_default_type}' properties_code += f'\n {this_property_code},' # if there's nothing inside the properties, keep it in one line @@ -177,8 +156,7 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, pixlyzer_block_dat with open(BLOCKS_RS_DIR, 'w') as f: f.write('\n'.join(new_code)) - -def get_property_struct_name(property: Optional[dict], block_data_burger: dict, property_variants: list[str], mappings: Mappings) -> str: +def get_property_struct_name(block_id: str, property_id: str, property_variants: list[str], mappings: Mappings) -> str: # these are hardcoded because otherwise they cause conflicts # some names inspired by https://github.com/feather-rs/feather/blob/main/feather/blocks/src/generated/table.rs if property_variants == ['north', 'east', 'south', 'west', 'up', 'down']: @@ -205,34 +183,15 @@ def get_property_struct_name(property: Optional[dict], block_data_burger: dict, return 'VaultState' if 'harp' in property_variants and 'didgeridoo' in property_variants: return 'Sound' - - if property is None: - return ''.join(map(to_camel_case, property_variants)) - - if property_variants == ['true', 'false']: - # booleans are weird, so just return the string name minecraft uses - return to_camel_case(property['name']) - - for class_name in [block_data_burger['class']] + block_data_burger['super']: - property_name = mappings.get_field( - class_name, property['field_name']) - if property_name: - break - if property_name is None: - if 'declared_in' in property: - property_name = mappings.get_field( - property['declared_in'], property['field_name']) - if property_name is None: - property_name = property['name'] - assert property_name - property_name = to_camel_case(property_name.lower()) - if property['type'] == 'int': - property_name = to_camel_case( - block_data_burger['text_id']) + property_name - - # if property_variants == ['none', 'low', 'tall']: - + if is_list_of_string_integers(property_variants): + # if the values are all integers, then prepend the block name + return to_camel_case(block_id) + to_camel_case(property_id) if property_variants == ['up', 'side', 'none']: - property_name = 'Wire' + to_camel_case(property_name) + return 'Wire' + to_camel_case(property_id) + if property_variants == ['none', 'low', 'tall']: + return 'Wall' + to_camel_case(property_id) + + return to_camel_case(property_id) - return property_name +def is_list_of_string_integers(l: list[str]) -> bool: + return all(map(str.isdigit, l)) diff --git a/codegen/lib/code/shapes.py b/codegen/lib/code/shapes.py index b50cdcf1e..1483bd74a 100755 --- a/codegen/lib/code/shapes.py +++ b/codegen/lib/code/shapes.py @@ -5,11 +5,11 @@ '../azalea-physics/src/collision/blocks.rs') -def generate_block_shapes(blocks_pixlyzer: dict, shapes: dict, aabbs: dict, block_states_report, block_datas_burger, mappings: Mappings): +def generate_block_shapes(blocks_pixlyzer: dict, shapes: dict, aabbs: dict, block_states_report, mappings: Mappings): blocks, shapes = simplify_shapes(blocks_pixlyzer, shapes, aabbs) code = generate_block_shapes_code( - blocks, shapes, block_states_report, block_datas_burger, mappings) + blocks, shapes, block_states_report, mappings) with open(COLLISION_BLOCKS_RS_DIR, 'w') as f: f.write(code) @@ -63,7 +63,7 @@ def simplify_shapes(blocks: dict, shapes: dict, aabbs: dict): return new_blocks, new_shapes -def generate_block_shapes_code(blocks: dict, shapes: dict, block_states_report, block_datas_burger, mappings: Mappings): +def generate_block_shapes_code(blocks: dict, shapes: dict, block_states_report, mappings: Mappings): # look at __cache__/generator-mod-*/blockCollisionShapes.json for format of blocks and shapes generated_shape_code = '' diff --git a/codegen/lib/extract.py b/codegen/lib/extract.py index da69b7534..fdd788fe7 100755 --- a/codegen/lib/extract.py +++ b/codegen/lib/extract.py @@ -50,17 +50,6 @@ def get_registry_tags(version_id: str, name: str): tags[relative_path[:-5]] = json.load(f) return tags - -def get_block_states_burger(version_id: str): - burger_data = get_burger_data_for_version(version_id) - return burger_data[0]['blocks']['block'] - - -def get_ordered_blocks_burger(version_id: str): - burger_data = get_burger_data_for_version(version_id) - return burger_data[0]['blocks']['ordered_blocks'] - - python_command = None From 4dcd95e18263a5d982e361dd90491dfc95812efb Mon Sep 17 00:00:00 2001 From: mat Date: Tue, 26 Nov 2024 22:07:58 +0000 Subject: [PATCH 03/18] rename packet related modules and structs to be simpler --- azalea-client/src/attack.rs | 8 +- azalea-client/src/chat.rs | 62 +- azalea-client/src/chunks.rs | 8 +- azalea-client/src/client.rs | 29 +- azalea-client/src/configuration.rs | 23 +- azalea-client/src/events.rs | 8 +- azalea-client/src/interact.rs | 10 +- azalea-client/src/inventory.rs | 11 +- azalea-client/src/lib.rs | 2 +- azalea-client/src/local_player.rs | 6 +- azalea-client/src/mining.rs | 24 +- azalea-client/src/movement.rs | 24 +- .../src/packet_handling/configuration.rs | 92 ++- azalea-client/src/packet_handling/game.rs | 38 +- azalea-client/src/packet_handling/login.rs | 6 +- azalea-client/src/packet_handling/mod.rs | 4 +- azalea-client/src/ping.rs | 19 +- azalea-client/src/respawn.rs | 8 +- .../azalea-protocol-macros/src/lib.rs | 147 ++-- azalea-protocol/examples/handshake_proxy.rs | 20 +- ...client_information_packet.rs => common.rs} | 56 +- azalea-protocol/src/connect.rs | 38 +- azalea-protocol/src/lib.rs | 27 +- .../src/packets/config/c_cookie_request.rs | 8 + .../c_custom_payload.rs} | 6 +- .../src/packets/config/c_disconnect.rs | 8 + .../packets/config/c_finish_configuration.rs | 5 + .../src/packets/config/c_keep_alive.rs | 7 + azalea-protocol/src/packets/config/c_ping.rs | 7 + .../c_registry_data.rs} | 6 +- .../src/packets/config/c_reset_chat.rs | 5 + .../src/packets/config/c_resource_pack.rs | 11 + .../src/packets/config/c_resource_pack_pop.rs | 8 + .../c_resource_pack_push.rs} | 6 +- .../packets/config/c_select_known_packs.rs | 9 + .../src/packets/config/c_store_cookie.rs | 9 + .../src/packets/config/c_transfer.rs | 9 + .../config/c_update_enabled_features.rs | 8 + .../c_update_tags.rs} | 6 +- azalea-protocol/src/packets/config/mod.rs | 56 ++ .../packets/config/s_client_information.rs | 59 ++ .../src/packets/config/s_cookie_response.rs | 9 + .../s_custom_payload.rs} | 6 +- .../packets/config/s_finish_configuration.rs | 5 + .../src/packets/config/s_keep_alive.rs | 7 + azalea-protocol/src/packets/config/s_pong.rs | 7 + .../s_resource_pack.rs} | 6 +- .../s_select_known_packs.rs} | 6 +- .../clientbound_cookie_request_packet.rs | 8 - .../clientbound_disconnect_packet.rs | 8 - ...clientbound_finish_configuration_packet.rs | 5 - .../clientbound_keep_alive_packet.rs | 7 - .../configuration/clientbound_ping_packet.rs | 7 - .../clientbound_reset_chat_packet.rs | 5 - .../clientbound_resource_pack_packet.rs | 11 - .../clientbound_resource_pack_pop_packet.rs | 8 - .../clientbound_select_known_packs_packet.rs | 9 - .../clientbound_store_cookie_packet.rs | 9 - .../clientbound_transfer_packet.rs | 9 - ...entbound_update_enabled_features_packet.rs | 8 - .../src/packets/configuration/mod.rs | 56 -- .../serverbound_cookie_response_packet.rs | 9 - ...serverbound_finish_configuration_packet.rs | 5 - .../serverbound_keep_alive_packet.rs | 7 - .../configuration/serverbound_pong_packet.rs | 7 - ...d_add_entity_packet.rs => c_add_entity.rs} | 4 +- ..._orb_packet.rs => c_add_experience_orb.rs} | 2 +- ...d_add_player_packet.rs => c_add_player.rs} | 4 +- ...ntbound_animate_packet.rs => c_animate.rs} | 2 +- ...award_stats_packet.rs => c_award_stats.rs} | 2 +- ...d_ack_packet.rs => c_block_changed_ack.rs} | 2 +- ...ction_packet.rs => c_block_destruction.rs} | 2 +- ..._data_packet.rs => c_block_entity_data.rs} | 2 +- ...block_event_packet.rs => c_block_event.rs} | 2 +- ...ock_update_packet.rs => c_block_update.rs} | 2 +- ...d_boss_event_packet.rs => c_boss_event.rs} | 2 +- ...ientbound_bundle_packet.rs => c_bundle.rs} | 2 +- ...culty_packet.rs => c_change_difficulty.rs} | 2 +- ...at_preview_packet.rs => c_chat_preview.rs} | 2 +- ...ed_packet.rs => c_chunk_batch_finished.rs} | 2 +- ...start_packet.rs => c_chunk_batch_start.rs} | 2 +- ...ks_biomes_packet.rs => c_chunks_biomes.rs} | 2 +- ...ear_titles_packet.rs => c_clear_titles.rs} | 2 +- ...ons_packet.rs => c_command_suggestions.rs} | 2 +- ...bound_commands_packet.rs => c_commands.rs} | 2 +- ...r_close_packet.rs => c_container_close.rs} | 2 +- ...t_packet.rs => c_container_set_content.rs} | 2 +- ...data_packet.rs => c_container_set_data.rs} | 2 +- ...slot_packet.rs => c_container_set_slot.rs} | 2 +- ..._request_packet.rs => c_cookie_request.rs} | 2 +- ...bound_cooldown_packet.rs => c_cooldown.rs} | 2 +- ...packet.rs => c_custom_chat_completions.rs} | 2 +- ..._payload_packet.rs => c_custom_payload.rs} | 2 +- ...s_packet.rs => c_custom_report_details.rs} | 2 +- ...stom_sound_packet.rs => c_custom_sound.rs} | 2 +- ...mage_event_packet.rs => c_damage_event.rs} | 2 +- ...bug_sample_packet.rs => c_debug_sample.rs} | 4 +- ...delete_chat_packet.rs => c_delete_chat.rs} | 4 +- ...d_disconnect_packet.rs => c_disconnect.rs} | 2 +- ...sed_chat_packet.rs => c_disguised_chat.rs} | 8 +- ...tity_event_packet.rs => c_entity_event.rs} | 2 +- ...nc_packet.rs => c_entity_position_sync.rs} | 2 +- ...ntbound_explode_packet.rs => c_explode.rs} | 8 +- ...hunk_packet.rs => c_forget_level_chunk.rs} | 2 +- ...d_game_event_packet.rs => c_game_event.rs} | 2 +- ..._open_packet.rs => c_horse_screen_open.rs} | 2 +- ...nimation_packet.rs => c_hurt_animation.rs} | 2 +- ...order_packet.rs => c_initialize_border.rs} | 2 +- ...d_keep_alive_packet.rs => c_keep_alive.rs} | 2 +- ..._packet.rs => c_level_chunk_with_light.rs} | 6 +- ...level_event_packet.rs => c_level_event.rs} | 2 +- ...rticles_packet.rs => c_level_particles.rs} | 4 +- ...ght_update_packet.rs => c_light_update.rs} | 2 +- ...clientbound_login_packet.rs => c_login.rs} | 2 +- ...item_data_packet.rs => c_map_item_data.rs} | 2 +- ..._offers_packet.rs => c_merchant_offers.rs} | 2 +- ...ity_pos_packet.rs => c_move_entity_pos.rs} | 2 +- ...rot_packet.rs => c_move_entity_pos_rot.rs} | 2 +- ...ity_rot_packet.rs => c_move_entity_rot.rs} | 2 +- ..._minecart_packet.rs => c_move_minecart.rs} | 2 +- ...ve_vehicle_packet.rs => c_move_vehicle.rs} | 2 +- ...und_open_book_packet.rs => c_open_book.rs} | 4 +- ...open_screen_packet.rs => c_open_screen.rs} | 2 +- ...editor_packet.rs => c_open_sign_editor.rs} | 2 +- .../{clientbound_ping_packet.rs => c_ping.rs} | 2 +- ...cipe_packet.rs => c_place_ghost_recipe.rs} | 2 +- ...lities_packet.rs => c_player_abilities.rs} | 2 +- ...player_chat_packet.rs => c_player_chat.rs} | 8 +- ...ader_packet.rs => c_player_chat_header.rs} | 2 +- ...t_end_packet.rs => c_player_combat_end.rs} | 2 +- ...ter_packet.rs => c_player_combat_enter.rs} | 2 +- ...kill_packet.rs => c_player_combat_kill.rs} | 2 +- ...move_packet.rs => c_player_info_remove.rs} | 2 +- ...date_packet.rs => c_player_info_update.rs} | 10 +- ..._look_at_packet.rs => c_player_look_at.rs} | 2 +- ...osition_packet.rs => c_player_position.rs} | 2 +- ...otation_packet.rs => c_player_rotation.rs} | 2 +- ..._response_packet.rs => c_pong_response.rs} | 2 +- ..._power_packet.rs => c_projectile_power.rs} | 2 +- ...ook_add_packet.rs => c_recipe_book_add.rs} | 4 +- ...move_packet.rs => c_recipe_book_remove.rs} | 7 +- ...gs_packet.rs => c_recipe_book_settings.rs} | 2 +- ...ntities_packet.rs => c_remove_entities.rs} | 2 +- ...ffect_packet.rs => c_remove_mob_effect.rs} | 2 +- ...reset_score_packet.rs => c_reset_score.rs} | 2 +- ...k_pop_packet.rs => c_resource_pack_pop.rs} | 2 +- ...push_packet.rs => c_resource_pack_push.rs} | 2 +- ...ntbound_respawn_packet.rs => c_respawn.rs} | 2 +- ...rotate_head_packet.rs => c_rotate_head.rs} | 2 +- ...e_packet.rs => c_section_blocks_update.rs} | 2 +- ...packet.rs => c_select_advancements_tab.rs} | 2 +- ...server_data_packet.rs => c_server_data.rs} | 2 +- ...rver_links_packet.rs => c_server_links.rs} | 2 +- ...ext_packet.rs => c_set_action_bar_text.rs} | 2 +- ...enter_packet.rs => c_set_border_center.rs} | 2 +- ...ze_packet.rs => c_set_border_lerp_size.rs} | 2 +- ...er_size_packet.rs => c_set_border_size.rs} | 2 +- ...acket.rs => c_set_border_warning_delay.rs} | 2 +- ...et.rs => c_set_border_warning_distance.rs} | 2 +- ...d_set_camera_packet.rs => c_set_camera.rs} | 2 +- ..._packet.rs => c_set_chunk_cache_center.rs} | 2 +- ..._packet.rs => c_set_chunk_cache_radius.rs} | 2 +- ...or_item_packet.rs => c_set_cursor_item.rs} | 2 +- ...ket.rs => c_set_default_spawn_position.rs} | 2 +- ...acket.rs => c_set_display_chat_preview.rs} | 2 +- ...e_packet.rs => c_set_display_objective.rs} | 2 +- ...ty_data_packet.rs => c_set_entity_data.rs} | 2 +- ...ty_link_packet.rs => c_set_entity_link.rs} | 2 +- ...otion_packet.rs => c_set_entity_motion.rs} | 2 +- ...equipment_packet.rs => c_set_equipment.rs} | 2 +- ...perience_packet.rs => c_set_experience.rs} | 2 +- ...d_set_health_packet.rs => c_set_health.rs} | 2 +- ...held_slot_packet.rs => c_set_held_slot.rs} | 2 +- ...objective_packet.rs => c_set_objective.rs} | 2 +- ...ssengers_packet.rs => c_set_passengers.rs} | 2 +- ...ry_packet.rs => c_set_player_inventory.rs} | 2 +- ...er_team_packet.rs => c_set_player_team.rs} | 2 +- ...und_set_score_packet.rs => c_set_score.rs} | 2 +- ...packet.rs => c_set_simulation_distance.rs} | 2 +- ..._text_packet.rs => c_set_subtitle_text.rs} | 2 +- ...bound_set_time_packet.rs => c_set_time.rs} | 2 +- ...bar_text_packet.rs => c_set_title_text.rs} | 2 +- ...on_packet.rs => c_set_titles_animation.rs} | 2 +- ...clientbound_sound_packet.rs => c_sound.rs} | 2 +- ...und_entity_packet.rs => c_sound_entity.rs} | 2 +- ...ion_packet.rs => c_start_configuration.rs} | 2 +- ...d_stop_sound_packet.rs => c_stop_sound.rs} | 8 +- ...ore_cookie_packet.rs => c_store_cookie.rs} | 2 +- ...system_chat_packet.rs => c_system_chat.rs} | 10 +- ...bound_tab_list_packet.rs => c_tab_list.rs} | 2 +- ...und_tag_query_packet.rs => c_tag_query.rs} | 2 +- ...entity_packet.rs => c_take_item_entity.rs} | 2 +- ..._entity_packet.rs => c_teleport_entity.rs} | 2 +- ...ing_state_packet.rs => c_ticking_state.rs} | 2 +- ...cking_step_packet.rs => c_ticking_step.rs} | 2 +- ...bound_transfer_packet.rs => c_transfer.rs} | 2 +- ...nts_packet.rs => c_update_advancements.rs} | 6 +- ...butes_packet.rs => c_update_attributes.rs} | 2 +- ...packet.rs => c_update_enabled_features.rs} | 2 +- ...ffect_packet.rs => c_update_mob_effect.rs} | 2 +- ..._recipes_packet.rs => c_update_recipes.rs} | 2 +- ...update_tags_packet.rs => c_update_tags.rs} | 2 +- azalea-protocol/src/packets/game/mod.rs | 764 +++++++++--------- ...on_packet.rs => s_accept_teleportation.rs} | 2 +- ...g_query.rs => s_block_entity_tag_query.rs} | 2 +- ...culty_packet.rs => s_change_difficulty.rs} | 2 +- .../{serverbound_chat_packet.rs => s_chat.rs} | 2 +- ...bound_chat_ack_packet.rs => s_chat_ack.rs} | 2 +- ...at_command_packet.rs => s_chat_command.rs} | 2 +- ...ned_packet.rs => s_chat_command_signed.rs} | 4 +- ...at_preview_packet.rs => s_chat_preview.rs} | 2 +- ...ate_packet.rs => s_chat_session_update.rs} | 2 +- ...ed_packet.rs => s_chunk_batch_received.rs} | 2 +- ..._command_packet.rs => s_client_command.rs} | 2 +- ...tion_packet.rs => s_client_information.rs} | 4 +- ...ick_end_packet.rs => s_client_tick_end.rs} | 2 +- ...tion_packet.rs => s_command_suggestion.rs} | 2 +- ...ket.rs => s_configuration_acknowledged.rs} | 2 +- ..._packet.rs => s_container_button_click.rs} | 2 +- ...r_click_packet.rs => s_container_click.rs} | 2 +- ...r_close_packet.rs => s_container_close.rs} | 2 +- ...t.rs => s_container_slot_state_changed.rs} | 2 +- ...esponse_packet.rs => s_cookie_response.rs} | 2 +- ..._payload_packet.rs => s_custom_payload.rs} | 2 +- ...tion.rs => s_debug_sample_subscription.rs} | 0 ...und_edit_book_packet.rs => s_edit_book.rs} | 2 +- ...ity_tag_query.rs => s_entity_tag_query.rs} | 0 ...bound_interact_packet.rs => s_interact.rs} | 2 +- ...enerate_packet.rs => s_jigsaw_generate.rs} | 2 +- ...d_keep_alive_packet.rs => s_keep_alive.rs} | 2 +- ...ficulty_packet.rs => s_lock_difficulty.rs} | 2 +- ...yer_pos_packet.rs => s_move_player_pos.rs} | 2 +- ...rot_packet.rs => s_move_player_pos_rot.rs} | 2 +- ...yer_rot_packet.rs => s_move_player_rot.rs} | 2 +- ...packet.rs => s_move_player_status_only.rs} | 2 +- ...ve_vehicle_packet.rs => s_move_vehicle.rs} | 2 +- ...paddle_boat_packet.rs => s_paddle_boat.rs} | 2 +- ...und_pick_item_packet.rs => s_pick_item.rs} | 2 +- ...ng_request_packet.rs => s_ping_request.rs} | 2 +- ...ace_recipe_packet.rs => s_place_recipe.rs} | 2 +- ...lities_packet.rs => s_player_abilities.rs} | 6 +- ...er_action_packet.rs => s_player_action.rs} | 2 +- ..._command_packet.rs => s_player_command.rs} | 2 +- ...ayer_input_packet.rs => s_player_input.rs} | 6 +- .../{serverbound_pong_packet.rs => s_pong.rs} | 2 +- ...et.rs => s_recipe_book_change_settings.rs} | 2 +- ...packet.rs => s_recipe_book_seen_recipe.rs} | 2 +- ...rename_item_packet.rs => s_rename_item.rs} | 2 +- ...urce_pack_packet.rs => s_resource_pack.rs} | 2 +- ...ments_packet.rs => s_seen_advancements.rs} | 6 +- ...item_packet.rs => s_select_bundle_item.rs} | 2 +- ...lect_trade_packet.rs => s_select_trade.rs} | 2 +- ...d_set_beacon_packet.rs => s_set_beacon.rs} | 2 +- ...d_item_packet.rs => s_set_carried_item.rs} | 2 +- ...block_packet.rs => s_set_command_block.rs} | 6 +- ...rt_packet.rs => s_set_command_minecart.rs} | 2 +- ..._packet.rs => s_set_creative_mode_slot.rs} | 2 +- ..._block_packet.rs => s_set_jigsaw_block.rs} | 2 +- ...ock_packet.rs => s_set_structure_block.rs} | 2 +- ...sign_update_packet.rs => s_sign_update.rs} | 2 +- ...serverbound_swing_packet.rs => s_swing.rs} | 4 +- ...tity_packet.rs => s_teleport_to_entity.rs} | 2 +- ...bound_use_item_packet.rs => s_use_item.rs} | 4 +- ...use_item_on_packet.rs => s_use_item_on.rs} | 4 +- ...rverbound_block_entity_tag_query_packet.rs | 10 - .../serverbound_entity_tag_query_packet.rs | 10 - .../packets/{handshaking => handshake}/mod.rs | 4 +- .../s_client_intention.rs} | 2 +- ..._request_packet.rs => c_cookie_request.rs} | 2 +- ...stom_query_packet.rs => c_custom_query.rs} | 2 +- ...clientbound_hello_packet.rs => c_hello.rs} | 2 +- ...ssion_packet.rs => c_login_compression.rs} | 2 +- ...onnect_packet.rs => c_login_disconnect.rs} | 12 +- ...finished_packet.rs => c_login_finished.rs} | 2 +- azalea-protocol/src/packets/login/mod.rs | 44 +- ...esponse_packet.rs => s_cookie_response.rs} | 2 +- ...stom_query_packet.rs => s_custom_query.rs} | 2 +- ...wer_packet.rs => s_custom_query_answer.rs} | 2 +- ...serverbound_hello_packet.rs => s_hello.rs} | 6 +- .../{serverbound_key_packet.rs => s_key.rs} | 2 +- ...dged_packet.rs => s_login_acknowledged.rs} | 2 +- azalea-protocol/src/packets/mod.rs | 8 +- ..._response_packet.rs => c_pong_response.rs} | 2 +- ...esponse_packet.rs => c_status_response.rs} | 12 +- azalea-protocol/src/packets/status/mod.rs | 16 +- ...ng_request_packet.rs => s_ping_request.rs} | 2 +- ..._request_packet.rs => s_status_request.rs} | 2 +- azalea/examples/testbot/commands.rs | 4 +- azalea/src/accept_resource_packs.rs | 12 +- azalea/src/swarm/chat.rs | 30 +- azalea/src/swarm/mod.rs | 4 +- codegen/azprotorefactor.py | 18 + codegen/lib/code/packet.py | 2 +- 293 files changed, 1276 insertions(+), 1320 deletions(-) rename azalea-protocol/src/{packets/configuration/serverbound_client_information_packet.rs => common.rs} (69%) create mode 100644 azalea-protocol/src/packets/config/c_cookie_request.rs rename azalea-protocol/src/packets/{configuration/serverbound_custom_payload_packet.rs => config/c_custom_payload.rs} (52%) create mode 100644 azalea-protocol/src/packets/config/c_disconnect.rs create mode 100644 azalea-protocol/src/packets/config/c_finish_configuration.rs create mode 100644 azalea-protocol/src/packets/config/c_keep_alive.rs create mode 100644 azalea-protocol/src/packets/config/c_ping.rs rename azalea-protocol/src/packets/{configuration/clientbound_registry_data_packet.rs => config/c_registry_data.rs} (60%) create mode 100644 azalea-protocol/src/packets/config/c_reset_chat.rs create mode 100644 azalea-protocol/src/packets/config/c_resource_pack.rs create mode 100644 azalea-protocol/src/packets/config/c_resource_pack_pop.rs rename azalea-protocol/src/packets/{configuration/clientbound_resource_pack_push_packet.rs => config/c_resource_pack_push.rs} (53%) create mode 100644 azalea-protocol/src/packets/config/c_select_known_packs.rs create mode 100644 azalea-protocol/src/packets/config/c_store_cookie.rs create mode 100644 azalea-protocol/src/packets/config/c_transfer.rs create mode 100644 azalea-protocol/src/packets/config/c_update_enabled_features.rs rename azalea-protocol/src/packets/{configuration/clientbound_update_tags_packet.rs => config/c_update_tags.rs} (92%) create mode 100755 azalea-protocol/src/packets/config/mod.rs create mode 100644 azalea-protocol/src/packets/config/s_client_information.rs create mode 100644 azalea-protocol/src/packets/config/s_cookie_response.rs rename azalea-protocol/src/packets/{configuration/clientbound_custom_payload_packet.rs => config/s_custom_payload.rs} (52%) create mode 100644 azalea-protocol/src/packets/config/s_finish_configuration.rs create mode 100644 azalea-protocol/src/packets/config/s_keep_alive.rs create mode 100644 azalea-protocol/src/packets/config/s_pong.rs rename azalea-protocol/src/packets/{configuration/serverbound_resource_pack_packet.rs => config/s_resource_pack.rs} (63%) rename azalea-protocol/src/packets/{configuration/serverbound_select_known_packs_packet.rs => config/s_select_known_packs.rs} (53%) delete mode 100644 azalea-protocol/src/packets/configuration/clientbound_cookie_request_packet.rs delete mode 100644 azalea-protocol/src/packets/configuration/clientbound_disconnect_packet.rs delete mode 100644 azalea-protocol/src/packets/configuration/clientbound_finish_configuration_packet.rs delete mode 100644 azalea-protocol/src/packets/configuration/clientbound_keep_alive_packet.rs delete mode 100644 azalea-protocol/src/packets/configuration/clientbound_ping_packet.rs delete mode 100644 azalea-protocol/src/packets/configuration/clientbound_reset_chat_packet.rs delete mode 100644 azalea-protocol/src/packets/configuration/clientbound_resource_pack_packet.rs delete mode 100644 azalea-protocol/src/packets/configuration/clientbound_resource_pack_pop_packet.rs delete mode 100644 azalea-protocol/src/packets/configuration/clientbound_select_known_packs_packet.rs delete mode 100644 azalea-protocol/src/packets/configuration/clientbound_store_cookie_packet.rs delete mode 100644 azalea-protocol/src/packets/configuration/clientbound_transfer_packet.rs delete mode 100644 azalea-protocol/src/packets/configuration/clientbound_update_enabled_features_packet.rs delete mode 100755 azalea-protocol/src/packets/configuration/mod.rs delete mode 100644 azalea-protocol/src/packets/configuration/serverbound_cookie_response_packet.rs delete mode 100644 azalea-protocol/src/packets/configuration/serverbound_finish_configuration_packet.rs delete mode 100644 azalea-protocol/src/packets/configuration/serverbound_keep_alive_packet.rs delete mode 100644 azalea-protocol/src/packets/configuration/serverbound_pong_packet.rs rename azalea-protocol/src/packets/game/{clientbound_add_entity_packet.rs => c_add_entity.rs} (93%) rename azalea-protocol/src/packets/game/{clientbound_add_experience_orb_packet.rs => c_add_experience_orb.rs} (82%) rename azalea-protocol/src/packets/game/{clientbound_add_player_packet.rs => c_add_player.rs} (91%) rename azalea-protocol/src/packets/game/{clientbound_animate_packet.rs => c_animate.rs} (93%) rename azalea-protocol/src/packets/game/{clientbound_award_stats_packet.rs => c_award_stats.rs} (93%) rename azalea-protocol/src/packets/game/{clientbound_block_changed_ack_packet.rs => c_block_changed_ack.rs} (78%) rename azalea-protocol/src/packets/game/{clientbound_block_destruction_packet.rs => c_block_destruction.rs} (88%) rename azalea-protocol/src/packets/game/{clientbound_block_entity_data_packet.rs => c_block_entity_data.rs} (86%) rename azalea-protocol/src/packets/game/{clientbound_block_event_packet.rs => c_block_event.rs} (87%) rename azalea-protocol/src/packets/game/{clientbound_block_update_packet.rs => c_block_update.rs} (85%) rename azalea-protocol/src/packets/game/{clientbound_boss_event_packet.rs => c_boss_event.rs} (98%) rename azalea-protocol/src/packets/game/{clientbound_bundle_packet.rs => c_bundle.rs} (77%) rename azalea-protocol/src/packets/game/{clientbound_change_difficulty_packet.rs => c_change_difficulty.rs} (82%) rename azalea-protocol/src/packets/game/{clientbound_chat_preview_packet.rs => c_chat_preview.rs} (84%) rename azalea-protocol/src/packets/game/{clientbound_chunk_batch_finished_packet.rs => c_chunk_batch_finished.rs} (77%) rename azalea-protocol/src/packets/game/{clientbound_chunk_batch_start_packet.rs => c_chunk_batch_start.rs} (73%) rename azalea-protocol/src/packets/game/{clientbound_chunks_biomes_packet.rs => c_chunks_biomes.rs} (88%) rename azalea-protocol/src/packets/game/{clientbound_clear_titles_packet.rs => c_clear_titles.rs} (79%) rename azalea-protocol/src/packets/game/{clientbound_command_suggestions_packet.rs => c_command_suggestions.rs} (95%) rename azalea-protocol/src/packets/game/{clientbound_commands_packet.rs => c_commands.rs} (99%) rename azalea-protocol/src/packets/game/{clientbound_container_close_packet.rs => c_container_close.rs} (77%) rename azalea-protocol/src/packets/game/{clientbound_container_set_content_packet.rs => c_container_set_content.rs} (85%) rename azalea-protocol/src/packets/game/{clientbound_container_set_data_packet.rs => c_container_set_data.rs} (80%) rename azalea-protocol/src/packets/game/{clientbound_container_set_slot_packet.rs => c_container_set_slot.rs} (85%) rename azalea-protocol/src/packets/game/{clientbound_cookie_request_packet.rs => c_cookie_request.rs} (83%) rename azalea-protocol/src/packets/game/{clientbound_cooldown_packet.rs => c_cooldown.rs} (83%) rename azalea-protocol/src/packets/game/{clientbound_custom_chat_completions_packet.rs => c_custom_chat_completions.rs} (84%) rename azalea-protocol/src/packets/game/{clientbound_custom_payload_packet.rs => c_custom_payload.rs} (86%) rename azalea-protocol/src/packets/game/{clientbound_custom_report_details_packet.rs => c_custom_report_details.rs} (87%) rename azalea-protocol/src/packets/game/{clientbound_custom_sound_packet.rs => c_custom_sound.rs} (93%) rename azalea-protocol/src/packets/game/{clientbound_damage_event_packet.rs => c_damage_event.rs} (96%) rename azalea-protocol/src/packets/game/{clientbound_debug_sample_packet.rs => c_debug_sample.rs} (64%) rename azalea-protocol/src/packets/game/{clientbound_delete_chat_packet.rs => c_delete_chat.rs} (61%) rename azalea-protocol/src/packets/game/{clientbound_disconnect_packet.rs => c_disconnect.rs} (82%) rename azalea-protocol/src/packets/game/{clientbound_disguised_chat_packet.rs => c_disguised_chat.rs} (84%) rename azalea-protocol/src/packets/game/{clientbound_entity_event_packet.rs => c_entity_event.rs} (80%) rename azalea-protocol/src/packets/game/{clientbound_entity_position_sync_packet.rs => c_entity_position_sync.rs} (89%) rename azalea-protocol/src/packets/game/{clientbound_explode_packet.rs => c_explode.rs} (96%) rename azalea-protocol/src/packets/game/{clientbound_forget_level_chunk_packet.rs => c_forget_level_chunk.rs} (80%) rename azalea-protocol/src/packets/game/{clientbound_game_event_packet.rs => c_game_event.rs} (93%) rename azalea-protocol/src/packets/game/{clientbound_horse_screen_open_packet.rs => c_horse_screen_open.rs} (82%) rename azalea-protocol/src/packets/game/{clientbound_hurt_animation_packet.rs => c_hurt_animation.rs} (80%) rename azalea-protocol/src/packets/game/{clientbound_initialize_border_packet.rs => c_initialize_border.rs} (89%) rename azalea-protocol/src/packets/game/{clientbound_keep_alive_packet.rs => c_keep_alive.rs} (78%) rename azalea-protocol/src/packets/game/{clientbound_level_chunk_with_light_packet.rs => c_level_chunk_with_light.rs} (99%) rename azalea-protocol/src/packets/game/{clientbound_level_event_packet.rs => c_level_event.rs} (86%) rename azalea-protocol/src/packets/game/{clientbound_level_particles_packet.rs => c_level_particles.rs} (91%) rename azalea-protocol/src/packets/game/{clientbound_light_update_packet.rs => c_light_update.rs} (92%) rename azalea-protocol/src/packets/game/{clientbound_login_packet.rs => c_login.rs} (95%) rename azalea-protocol/src/packets/game/{clientbound_map_item_data_packet.rs => c_map_item_data.rs} (97%) rename azalea-protocol/src/packets/game/{clientbound_merchant_offers_packet.rs => c_merchant_offers.rs} (93%) rename azalea-protocol/src/packets/game/{clientbound_move_entity_pos_packet.rs => c_move_entity_pos.rs} (85%) rename azalea-protocol/src/packets/game/{clientbound_move_entity_pos_rot_packet.rs => c_move_entity_pos_rot.rs} (88%) rename azalea-protocol/src/packets/game/{clientbound_move_entity_rot_packet.rs => c_move_entity_rot.rs} (83%) rename azalea-protocol/src/packets/game/{clientbound_move_minecart_packet.rs => c_move_minecart.rs} (90%) rename azalea-protocol/src/packets/game/{clientbound_move_vehicle_packet.rs => c_move_vehicle.rs} (83%) rename azalea-protocol/src/packets/game/{clientbound_open_book_packet.rs => c_open_book.rs} (62%) rename azalea-protocol/src/packets/game/{clientbound_open_screen_packet.rs => c_open_screen.rs} (87%) rename azalea-protocol/src/packets/game/{clientbound_open_sign_editor_packet.rs => c_open_sign_editor.rs} (83%) rename azalea-protocol/src/packets/game/{clientbound_ping_packet.rs => c_ping.rs} (80%) rename azalea-protocol/src/packets/game/{clientbound_place_ghost_recipe_packet.rs => c_place_ghost_recipe.rs} (83%) rename azalea-protocol/src/packets/game/{clientbound_player_abilities_packet.rs => c_player_abilities.rs} (96%) rename azalea-protocol/src/packets/game/{clientbound_player_chat_packet.rs => c_player_chat.rs} (97%) rename azalea-protocol/src/packets/game/{clientbound_player_chat_header_packet.rs => c_player_chat_header.rs} (86%) rename azalea-protocol/src/packets/game/{clientbound_player_combat_end_packet.rs => c_player_combat_end.rs} (81%) rename azalea-protocol/src/packets/game/{clientbound_player_combat_enter_packet.rs => c_player_combat_enter.rs} (75%) rename azalea-protocol/src/packets/game/{clientbound_player_combat_kill_packet.rs => c_player_combat_kill.rs} (84%) rename azalea-protocol/src/packets/game/{clientbound_player_info_remove_packet.rs => c_player_info_remove.rs} (79%) rename azalea-protocol/src/packets/game/{clientbound_player_info_update_packet.rs => c_player_info_update.rs} (97%) rename azalea-protocol/src/packets/game/{clientbound_player_look_at_packet.rs => c_player_look_at.rs} (91%) rename azalea-protocol/src/packets/game/{clientbound_player_position_packet.rs => c_player_position.rs} (97%) rename azalea-protocol/src/packets/game/{clientbound_player_rotation_packet.rs => c_player_rotation.rs} (79%) rename azalea-protocol/src/packets/game/{clientbound_pong_response_packet.rs => c_pong_response.rs} (77%) rename azalea-protocol/src/packets/game/{clientbound_projectile_power_packet.rs => c_projectile_power.rs} (79%) rename azalea-protocol/src/packets/game/{clientbound_recipe_book_add_packet.rs => c_recipe_book_add.rs} (94%) rename azalea-protocol/src/packets/game/{clientbound_recipe_book_remove_packet.rs => c_recipe_book_remove.rs} (55%) rename azalea-protocol/src/packets/game/{clientbound_recipe_book_settings_packet.rs => c_recipe_book_settings.rs} (91%) rename azalea-protocol/src/packets/game/{clientbound_remove_entities_packet.rs => c_remove_entities.rs} (79%) rename azalea-protocol/src/packets/game/{clientbound_remove_mob_effect_packet.rs => c_remove_mob_effect.rs} (82%) rename azalea-protocol/src/packets/game/{clientbound_reset_score_packet.rs => c_reset_score.rs} (82%) rename azalea-protocol/src/packets/game/{clientbound_resource_pack_pop_packet.rs => c_resource_pack_pop.rs} (78%) rename azalea-protocol/src/packets/game/{clientbound_resource_pack_push_packet.rs => c_resource_pack_push.rs} (86%) rename azalea-protocol/src/packets/game/{clientbound_respawn_packet.rs => c_respawn.rs} (86%) rename azalea-protocol/src/packets/game/{clientbound_rotate_head_packet.rs => c_rotate_head.rs} (82%) rename azalea-protocol/src/packets/game/{clientbound_section_blocks_update_packet.rs => c_section_blocks_update.rs} (96%) rename azalea-protocol/src/packets/game/{clientbound_select_advancements_tab_packet.rs => c_select_advancements_tab.rs} (81%) rename azalea-protocol/src/packets/game/{clientbound_server_data_packet.rs => c_server_data.rs} (84%) rename azalea-protocol/src/packets/game/{clientbound_server_links_packet.rs => c_server_links.rs} (93%) rename azalea-protocol/src/packets/game/{clientbound_set_title_text_packet.rs => c_set_action_bar_text.rs} (81%) rename azalea-protocol/src/packets/game/{clientbound_set_border_center_packet.rs => c_set_border_center.rs} (80%) rename azalea-protocol/src/packets/game/{clientbound_set_border_lerp_size_packet.rs => c_set_border_lerp_size.rs} (81%) rename azalea-protocol/src/packets/game/{clientbound_set_border_size_packet.rs => c_set_border_size.rs} (77%) rename azalea-protocol/src/packets/game/{clientbound_set_border_warning_delay_packet.rs => c_set_border_warning_delay.rs} (76%) rename azalea-protocol/src/packets/game/{clientbound_set_border_warning_distance_packet.rs => c_set_border_warning_distance.rs} (75%) rename azalea-protocol/src/packets/game/{clientbound_set_camera_packet.rs => c_set_camera.rs} (80%) rename azalea-protocol/src/packets/game/{clientbound_set_chunk_cache_center_packet.rs => c_set_chunk_cache_center.rs} (78%) rename azalea-protocol/src/packets/game/{clientbound_set_chunk_cache_radius_packet.rs => c_set_chunk_cache_radius.rs} (76%) rename azalea-protocol/src/packets/game/{clientbound_set_cursor_item_packet.rs => c_set_cursor_item.rs} (81%) rename azalea-protocol/src/packets/game/{clientbound_set_default_spawn_position_packet.rs => c_set_default_spawn_position.rs} (79%) rename azalea-protocol/src/packets/game/{clientbound_set_display_chat_preview_packet.rs => c_set_display_chat_preview.rs} (74%) rename azalea-protocol/src/packets/game/{clientbound_set_display_objective_packet.rs => c_set_display_objective.rs} (91%) rename azalea-protocol/src/packets/game/{clientbound_set_entity_data_packet.rs => c_set_entity_data.rs} (84%) rename azalea-protocol/src/packets/game/{clientbound_set_entity_link_packet.rs => c_set_entity_link.rs} (80%) rename azalea-protocol/src/packets/game/{clientbound_set_entity_motion_packet.rs => c_set_entity_motion.rs} (82%) rename azalea-protocol/src/packets/game/{clientbound_set_equipment_packet.rs => c_set_equipment.rs} (98%) rename azalea-protocol/src/packets/game/{clientbound_set_experience_packet.rs => c_set_experience.rs} (84%) rename azalea-protocol/src/packets/game/{clientbound_set_health_packet.rs => c_set_health.rs} (83%) rename azalea-protocol/src/packets/game/{clientbound_set_held_slot_packet.rs => c_set_held_slot.rs} (78%) rename azalea-protocol/src/packets/game/{clientbound_set_objective_packet.rs => c_set_objective.rs} (98%) rename azalea-protocol/src/packets/game/{clientbound_set_passengers_packet.rs => c_set_passengers.rs} (82%) rename azalea-protocol/src/packets/game/{clientbound_set_player_inventory_packet.rs => c_set_player_inventory.rs} (82%) rename azalea-protocol/src/packets/game/{clientbound_set_player_team_packet.rs => c_set_player_team.rs} (98%) rename azalea-protocol/src/packets/game/{clientbound_set_score_packet.rs => c_set_score.rs} (90%) rename azalea-protocol/src/packets/game/{clientbound_set_simulation_distance_packet.rs => c_set_simulation_distance.rs} (77%) rename azalea-protocol/src/packets/game/{clientbound_set_subtitle_text_packet.rs => c_set_subtitle_text.rs} (80%) rename azalea-protocol/src/packets/game/{clientbound_set_time_packet.rs => c_set_time.rs} (84%) rename azalea-protocol/src/packets/game/{clientbound_set_action_bar_text_packet.rs => c_set_title_text.rs} (80%) rename azalea-protocol/src/packets/game/{clientbound_set_titles_animation_packet.rs => c_set_titles_animation.rs} (79%) rename azalea-protocol/src/packets/game/{clientbound_sound_packet.rs => c_sound.rs} (93%) rename azalea-protocol/src/packets/game/{clientbound_sound_entity_packet.rs => c_sound_entity.rs} (92%) rename azalea-protocol/src/packets/game/{clientbound_start_configuration_packet.rs => c_start_configuration.rs} (72%) rename azalea-protocol/src/packets/game/{clientbound_stop_sound_packet.rs => c_stop_sound.rs} (86%) rename azalea-protocol/src/packets/game/{clientbound_store_cookie_packet.rs => c_store_cookie.rs} (85%) rename azalea-protocol/src/packets/game/{clientbound_system_chat_packet.rs => c_system_chat.rs} (92%) rename azalea-protocol/src/packets/game/{clientbound_tab_list_packet.rs => c_tab_list.rs} (97%) rename azalea-protocol/src/packets/game/{clientbound_tag_query_packet.rs => c_tag_query.rs} (84%) rename azalea-protocol/src/packets/game/{clientbound_take_item_entity_packet.rs => c_take_item_entity.rs} (83%) rename azalea-protocol/src/packets/game/{clientbound_teleport_entity_packet.rs => c_teleport_entity.rs} (86%) rename azalea-protocol/src/packets/game/{clientbound_ticking_state_packet.rs => c_ticking_state.rs} (80%) rename azalea-protocol/src/packets/game/{clientbound_ticking_step_packet.rs => c_ticking_step.rs} (79%) rename azalea-protocol/src/packets/game/{clientbound_transfer_packet.rs => c_transfer.rs} (82%) rename azalea-protocol/src/packets/game/{clientbound_update_advancements_packet.rs => c_update_advancements.rs} (96%) rename azalea-protocol/src/packets/game/{clientbound_update_attributes_packet.rs => c_update_attributes.rs} (90%) rename azalea-protocol/src/packets/game/{clientbound_update_enabled_features_packet.rs => c_update_enabled_features.rs} (81%) rename azalea-protocol/src/packets/game/{clientbound_update_mob_effect_packet.rs => c_update_mob_effect.rs} (87%) rename azalea-protocol/src/packets/game/{clientbound_update_recipes_packet.rs => c_update_recipes.rs} (97%) rename azalea-protocol/src/packets/game/{clientbound_update_tags_packet.rs => c_update_tags.rs} (98%) rename azalea-protocol/src/packets/game/{serverbound_accept_teleportation_packet.rs => s_accept_teleportation.rs} (76%) rename azalea-protocol/src/packets/game/{serverbound_block_entity_tag_query.rs => s_block_entity_tag_query.rs} (89%) mode change 100755 => 100644 rename azalea-protocol/src/packets/game/{serverbound_change_difficulty_packet.rs => s_change_difficulty.rs} (81%) rename azalea-protocol/src/packets/game/{serverbound_chat_packet.rs => s_chat.rs} (93%) rename azalea-protocol/src/packets/game/{serverbound_chat_ack_packet.rs => s_chat_ack.rs} (81%) rename azalea-protocol/src/packets/game/{serverbound_chat_command_packet.rs => s_chat_command.rs} (78%) rename azalea-protocol/src/packets/game/{serverbound_chat_command_signed_packet.rs => s_chat_command_signed.rs} (81%) rename azalea-protocol/src/packets/game/{serverbound_chat_preview_packet.rs => s_chat_preview.rs} (80%) rename azalea-protocol/src/packets/game/{serverbound_chat_session_update_packet.rs => s_chat_session_update.rs} (91%) rename azalea-protocol/src/packets/game/{serverbound_chunk_batch_received_packet.rs => s_chunk_batch_received.rs} (77%) rename azalea-protocol/src/packets/game/{serverbound_client_command_packet.rs => s_client_command.rs} (85%) rename azalea-protocol/src/packets/game/{serverbound_client_information_packet.rs => s_client_information.rs} (54%) rename azalea-protocol/src/packets/game/{serverbound_client_tick_end_packet.rs => s_client_tick_end.rs} (76%) rename azalea-protocol/src/packets/game/{serverbound_command_suggestion_packet.rs => s_command_suggestion.rs} (79%) rename azalea-protocol/src/packets/game/{serverbound_configuration_acknowledged_packet.rs => s_configuration_acknowledged.rs} (69%) rename azalea-protocol/src/packets/game/{serverbound_container_button_click_packet.rs => s_container_button_click.rs} (77%) rename azalea-protocol/src/packets/game/{serverbound_container_click_packet.rs => s_container_click.rs} (90%) rename azalea-protocol/src/packets/game/{serverbound_container_close_packet.rs => s_container_close.rs} (77%) rename azalea-protocol/src/packets/game/{serverbound_container_slot_state_changed_packet.rs => s_container_slot_state_changed.rs} (80%) rename azalea-protocol/src/packets/game/{serverbound_cookie_response_packet.rs => s_cookie_response.rs} (84%) rename azalea-protocol/src/packets/game/{serverbound_custom_payload_packet.rs => s_custom_payload.rs} (86%) rename azalea-protocol/src/packets/game/{serverbound_debug_sample_subscription.rs => s_debug_sample_subscription.rs} (100%) mode change 100755 => 100644 rename azalea-protocol/src/packets/game/{serverbound_edit_book_packet.rs => s_edit_book.rs} (84%) rename azalea-protocol/src/packets/game/{serverbound_entity_tag_query.rs => s_entity_tag_query.rs} (100%) mode change 100755 => 100644 rename azalea-protocol/src/packets/game/{serverbound_interact_packet.rs => s_interact.rs} (98%) rename azalea-protocol/src/packets/game/{serverbound_jigsaw_generate_packet.rs => s_jigsaw_generate.rs} (84%) rename azalea-protocol/src/packets/game/{serverbound_keep_alive_packet.rs => s_keep_alive.rs} (78%) rename azalea-protocol/src/packets/game/{serverbound_lock_difficulty_packet.rs => s_lock_difficulty.rs} (77%) rename azalea-protocol/src/packets/game/{serverbound_move_player_pos_packet.rs => s_move_player_pos.rs} (82%) rename azalea-protocol/src/packets/game/{serverbound_move_player_pos_rot_packet.rs => s_move_player_pos_rot.rs} (83%) rename azalea-protocol/src/packets/game/{serverbound_move_player_rot_packet.rs => s_move_player_rot.rs} (81%) rename azalea-protocol/src/packets/game/{serverbound_move_player_status_only_packet.rs => s_move_player_status_only.rs} (75%) rename azalea-protocol/src/packets/game/{serverbound_move_vehicle_packet.rs => s_move_vehicle.rs} (83%) rename azalea-protocol/src/packets/game/{serverbound_paddle_boat_packet.rs => s_paddle_boat.rs} (80%) rename azalea-protocol/src/packets/game/{serverbound_pick_item_packet.rs => s_pick_item.rs} (80%) rename azalea-protocol/src/packets/game/{serverbound_ping_request_packet.rs => s_ping_request.rs} (78%) rename azalea-protocol/src/packets/game/{serverbound_place_recipe_packet.rs => s_place_recipe.rs} (86%) rename azalea-protocol/src/packets/game/{serverbound_player_abilities_packet.rs => s_player_abilities.rs} (81%) rename azalea-protocol/src/packets/game/{serverbound_player_action_packet.rs => s_player_action.rs} (92%) rename azalea-protocol/src/packets/game/{serverbound_player_command_packet.rs => s_player_command.rs} (91%) rename azalea-protocol/src/packets/game/{serverbound_player_input_packet.rs => s_player_input.rs} (90%) rename azalea-protocol/src/packets/game/{serverbound_pong_packet.rs => s_pong.rs} (80%) rename azalea-protocol/src/packets/game/{serverbound_recipe_book_change_settings_packet.rs => s_recipe_book_change_settings.rs} (86%) rename azalea-protocol/src/packets/game/{serverbound_recipe_book_seen_recipe_packet.rs => s_recipe_book_seen_recipe.rs} (81%) rename azalea-protocol/src/packets/game/{serverbound_rename_item_packet.rs => s_rename_item.rs} (78%) rename azalea-protocol/src/packets/game/{serverbound_resource_pack_packet.rs => s_resource_pack.rs} (90%) rename azalea-protocol/src/packets/game/{serverbound_seen_advancements_packet.rs => s_seen_advancements.rs} (85%) rename azalea-protocol/src/packets/game/{serverbound_select_bundle_item_packet.rs => s_select_bundle_item.rs} (81%) rename azalea-protocol/src/packets/game/{serverbound_select_trade_packet.rs => s_select_trade.rs} (79%) rename azalea-protocol/src/packets/game/{serverbound_set_beacon_packet.rs => s_set_beacon.rs} (84%) rename azalea-protocol/src/packets/game/{serverbound_set_carried_item_packet.rs => s_set_carried_item.rs} (76%) rename azalea-protocol/src/packets/game/{serverbound_set_command_block_packet.rs => s_set_command_block.rs} (90%) rename azalea-protocol/src/packets/game/{serverbound_set_command_minecart_packet.rs => s_set_command_minecart.rs} (81%) rename azalea-protocol/src/packets/game/{serverbound_set_creative_mode_slot_packet.rs => s_set_creative_mode_slot.rs} (81%) rename azalea-protocol/src/packets/game/{serverbound_set_jigsaw_block_packet.rs => s_set_jigsaw_block.rs} (96%) rename azalea-protocol/src/packets/game/{serverbound_set_structure_block_packet.rs => s_set_structure_block.rs} (97%) rename azalea-protocol/src/packets/game/{serverbound_sign_update_packet.rs => s_sign_update.rs} (85%) rename azalea-protocol/src/packets/game/{serverbound_swing_packet.rs => s_swing.rs} (60%) rename azalea-protocol/src/packets/game/{serverbound_teleport_to_entity_packet.rs => s_teleport_to_entity.rs} (78%) rename azalea-protocol/src/packets/game/{serverbound_use_item_packet.rs => s_use_item.rs} (68%) rename azalea-protocol/src/packets/game/{serverbound_use_item_on_packet.rs => s_use_item_on.rs} (95%) delete mode 100644 azalea-protocol/src/packets/game/serverbound_block_entity_tag_query_packet.rs delete mode 100644 azalea-protocol/src/packets/game/serverbound_entity_tag_query_packet.rs rename azalea-protocol/src/packets/{handshaking => handshake}/mod.rs (61%) rename azalea-protocol/src/packets/{handshaking/client_intention_packet.rs => handshake/s_client_intention.rs} (89%) rename azalea-protocol/src/packets/login/{clientbound_cookie_request_packet.rs => c_cookie_request.rs} (81%) rename azalea-protocol/src/packets/login/{clientbound_custom_query_packet.rs => c_custom_query.rs} (89%) rename azalea-protocol/src/packets/login/{clientbound_hello_packet.rs => c_hello.rs} (89%) rename azalea-protocol/src/packets/login/{clientbound_login_compression_packet.rs => c_login_compression.rs} (81%) rename azalea-protocol/src/packets/login/{clientbound_login_disconnect_packet.rs => c_login_disconnect.rs} (71%) rename azalea-protocol/src/packets/login/{clientbound_login_finished_packet.rs => c_login_finished.rs} (82%) rename azalea-protocol/src/packets/login/{serverbound_cookie_response_packet.rs => s_cookie_response.rs} (84%) rename azalea-protocol/src/packets/login/{serverbound_custom_query_packet.rs => s_custom_query.rs} (84%) rename azalea-protocol/src/packets/login/{serverbound_custom_query_answer_packet.rs => s_custom_query_answer.rs} (84%) rename azalea-protocol/src/packets/login/{serverbound_hello_packet.rs => s_hello.rs} (77%) rename azalea-protocol/src/packets/login/{serverbound_key_packet.rs => s_key.rs} (85%) rename azalea-protocol/src/packets/login/{serverbound_login_acknowledged_packet.rs => s_login_acknowledged.rs} (72%) rename azalea-protocol/src/packets/status/{clientbound_pong_response_packet.rs => c_pong_response.rs} (78%) rename azalea-protocol/src/packets/status/{clientbound_status_response_packet.rs => c_status_response.rs} (81%) rename azalea-protocol/src/packets/status/{serverbound_ping_request_packet.rs => s_ping_request.rs} (78%) rename azalea-protocol/src/packets/status/{serverbound_status_request_packet.rs => s_status_request.rs} (74%) create mode 100644 codegen/azprotorefactor.py diff --git a/azalea-client/src/attack.rs b/azalea-client/src/attack.rs index a28f800db..233f85275 100644 --- a/azalea-client/src/attack.rs +++ b/azalea-client/src/attack.rs @@ -4,9 +4,7 @@ use azalea_entity::{ update_bounding_box, Attributes, Physics, }; use azalea_physics::PhysicsSet; -use azalea_protocol::packets::game::serverbound_interact_packet::{ - self, ServerboundInteractPacket, -}; +use azalea_protocol::packets::game::s_interact::{self, ServerboundInteract}; use azalea_world::MinecraftEntityId; use bevy_app::{App, Plugin, Update}; use bevy_ecs::prelude::*; @@ -87,9 +85,9 @@ pub fn handle_attack_event( }); send_packet_events.send(SendPacketEvent { entity: event.entity, - packet: ServerboundInteractPacket { + packet: ServerboundInteract { entity_id: *event.target, - action: serverbound_interact_packet::ActionType::Attack, + action: s_interact::ActionType::Attack, using_secondary_action: **sneaking, } .get(), diff --git a/azalea-client/src/chat.rs b/azalea-client/src/chat.rs index 1f69d46e5..5a2071aff 100755 --- a/azalea-client/src/chat.rs +++ b/azalea-client/src/chat.rs @@ -7,11 +7,11 @@ use std::{ use azalea_chat::FormattedText; use azalea_protocol::packets::game::{ - clientbound_disguised_chat_packet::ClientboundDisguisedChatPacket, - clientbound_player_chat_packet::ClientboundPlayerChatPacket, - clientbound_system_chat_packet::ClientboundSystemChatPacket, - serverbound_chat_command_packet::ServerboundChatCommandPacket, - serverbound_chat_packet::{LastSeenMessagesUpdate, ServerboundChatPacket}, + c_disguised_chat::ClientboundDisguisedChat, + c_player_chat::ClientboundPlayerChat, + c_system_chat::ClientboundSystemChat, + s_chat::{LastSeenMessagesUpdate, ServerboundChat}, + s_chat_command::ServerboundChatCommand, }; use bevy_app::{App, Plugin, Update}; use bevy_ecs::{ @@ -29,10 +29,10 @@ use crate::{ /// A chat packet, either a system message or a chat message. #[derive(Debug, Clone, PartialEq)] -pub enum ChatPacket { - System(Arc), - Player(Arc), - Disguised(Arc), +pub enum Chat { + System(Arc), + Player(Arc), + Disguised(Arc), } macro_rules! regex { @@ -42,13 +42,13 @@ macro_rules! regex { }}; } -impl ChatPacket { +impl Chat { /// Get the message shown in chat for this packet. pub fn message(&self) -> FormattedText { match self { - ChatPacket::System(p) => p.content.clone(), - ChatPacket::Player(p) => p.message(), - ChatPacket::Disguised(p) => p.message(), + Chat::System(p) => p.content.clone(), + Chat::Player(p) => p.message(), + Chat::Disguised(p) => p.message(), } } @@ -58,7 +58,7 @@ impl ChatPacket { /// None. pub fn split_sender_and_content(&self) -> (Option, String) { match self { - ChatPacket::System(p) => { + Chat::System(p) => { let message = p.content.to_string(); // Overlay messages aren't in chat if p.overlay { @@ -72,13 +72,13 @@ impl ChatPacket { (None, message) } - ChatPacket::Player(p) => ( + Chat::Player(p) => ( // If it's a player chat packet, then the sender and content // are already split for us. Some(p.chat_type.name.to_string()), p.body.content.clone(), ), - ChatPacket::Disguised(p) => ( + Chat::Disguised(p) => ( // disguised chat packets are basically the same as player chat packets but without // the chat signing things Some(p.chat_type.name.to_string()), @@ -99,9 +99,9 @@ impl ChatPacket { /// when a server uses a plugin to modify chat messages). pub fn uuid(&self) -> Option { match self { - ChatPacket::System(_) => None, - ChatPacket::Player(m) => Some(m.sender), - ChatPacket::Disguised(_) => None, + Chat::System(_) => None, + Chat::Player(m) => Some(m.sender), + Chat::Disguised(_) => None, } } @@ -112,10 +112,10 @@ impl ChatPacket { self.split_sender_and_content().1 } - /// Create a new ChatPacket from a string. This is meant to be used as a + /// Create a new Chat from a string. This is meant to be used as a /// convenience function for testing. pub fn new(message: &str) -> Self { - ChatPacket::System(Arc::new(ClientboundSystemChatPacket { + Chat::System(Arc::new(ClientboundSystemChat { content: FormattedText::from(message), overlay: false, })) @@ -142,7 +142,7 @@ impl Client { self.ecs.lock().send_event(SendChatKindEvent { entity: self.entity, content: message.to_string(), - kind: ChatPacketKind::Message, + kind: ChatKind::Message, }); self.run_schedule_sender.send(()).unwrap(); } @@ -153,7 +153,7 @@ impl Client { self.ecs.lock().send_event(SendChatKindEvent { entity: self.entity, content: command.to_string(), - kind: ChatPacketKind::Command, + kind: ChatKind::Command, }); self.run_schedule_sender.send(()).unwrap(); } @@ -197,7 +197,7 @@ impl Plugin for ChatPlugin { #[derive(Event, Debug, Clone)] pub struct ChatReceivedEvent { pub entity: Entity, - pub packet: ChatPacket, + pub packet: Chat, } /// Send a chat message (or command, if it starts with a slash) to the server. @@ -216,13 +216,13 @@ pub fn handle_send_chat_event( send_chat_kind_events.send(SendChatKindEvent { entity: event.entity, content: event.content[1..].to_string(), - kind: ChatPacketKind::Command, + kind: ChatKind::Command, }); } else { send_chat_kind_events.send(SendChatKindEvent { entity: event.entity, content: event.content.clone(), - kind: ChatPacketKind::Message, + kind: ChatKind::Message, }); } } @@ -241,11 +241,11 @@ pub fn handle_send_chat_event( pub struct SendChatKindEvent { pub entity: Entity, pub content: String, - pub kind: ChatPacketKind, + pub kind: ChatKind, } /// A kind of chat packet, either a chat message or a command. -pub enum ChatPacketKind { +pub enum ChatKind { Message, Command, } @@ -262,7 +262,7 @@ pub fn handle_send_chat_kind_event( .take(256) .collect::(); let packet = match event.kind { - ChatPacketKind::Message => ServerboundChatPacket { + ChatKind::Message => ServerboundChat { message: content, timestamp: SystemTime::now() .duration_since(UNIX_EPOCH) @@ -275,9 +275,9 @@ pub fn handle_send_chat_kind_event( last_seen_messages: LastSeenMessagesUpdate::default(), } .get(), - ChatPacketKind::Command => { + ChatKind::Command => { // TODO: chat signing - ServerboundChatCommandPacket { command: content }.get() + ServerboundChatCommand { command: content }.get() } }; diff --git a/azalea-client/src/chunks.rs b/azalea-client/src/chunks.rs index 40e295aa3..b86d00f2e 100644 --- a/azalea-client/src/chunks.rs +++ b/azalea-client/src/chunks.rs @@ -10,8 +10,8 @@ use std::{ use azalea_core::position::ChunkPos; use azalea_protocol::packets::game::{ - clientbound_level_chunk_with_light_packet::ClientboundLevelChunkWithLightPacket, - serverbound_chunk_batch_received_packet::ServerboundChunkBatchReceivedPacket, + c_level_chunk_with_light::ClientboundLevelChunkWithLight, + s_chunk_batch_received::ServerboundChunkBatchReceived, }; use bevy_app::{App, Plugin, Update}; use bevy_ecs::prelude::*; @@ -51,7 +51,7 @@ impl Plugin for ChunkPlugin { #[derive(Event)] pub struct ReceiveChunkEvent { pub entity: Entity, - pub packet: ClientboundLevelChunkWithLightPacket, + pub packet: ClientboundLevelChunkWithLight, } #[derive(Component, Clone, Debug)] @@ -161,7 +161,7 @@ pub fn handle_chunk_batch_finished_event( let desired_chunks_per_tick = chunk_batch_info.desired_chunks_per_tick(); send_packets.send(SendPacketEvent { entity: event.entity, - packet: ServerboundChunkBatchReceivedPacket { + packet: ServerboundChunkBatchReceived { desired_chunks_per_tick, } .get(), diff --git a/azalea-client/src/client.rs b/azalea-client/src/client.rs index 9083a80b8..482402b38 100644 --- a/azalea-client/src/client.rs +++ b/azalea-client/src/client.rs @@ -17,22 +17,18 @@ use azalea_entity::{ }; use azalea_physics::PhysicsPlugin; use azalea_protocol::{ + common::ClientInformation, connect::{Connection, ConnectionError, Proxy}, packets::{ - configuration::{ - serverbound_client_information_packet::ClientInformation, - ClientboundConfigurationPacket, ServerboundConfigurationPacket, - }, + config::{ClientboundConfigPacket, ServerboundConfigPacket}, game::ServerboundGamePacket, - handshaking::{ - client_intention_packet::ClientIntentionPacket, ClientboundHandshakePacket, + handshake::{ + s_client_intention::ServerboundClientIntention, ClientboundHandshakePacket, ServerboundHandshakePacket, }, login::{ - serverbound_hello_packet::ServerboundHelloPacket, - serverbound_key_packet::ServerboundKeyPacket, - serverbound_login_acknowledged_packet::ServerboundLoginAcknowledgedPacket, - ClientboundLoginPacket, + s_hello::ServerboundHello, s_key::ServerboundKey, + s_login_acknowledged::ServerboundLoginAcknowledged, ClientboundLoginPacket, }, ClientIntention, ConnectionProtocol, PROTOCOL_VERSION, }, @@ -347,14 +343,14 @@ impl Client { address: &ServerAddress, ) -> Result< ( - Connection, + Connection, GameProfile, ), JoinError, > { // handshake conn.write( - ClientIntentionPacket { + ServerboundClientIntention { protocol_version: PROTOCOL_VERSION, hostname: address.host.clone(), port: address.port, @@ -375,7 +371,7 @@ impl Client { // login conn.write( - ServerboundHelloPacket { + ServerboundHello { name: account.username.clone(), // TODO: pretty sure this should generate an offline-mode uuid instead of just // Uuid::default() @@ -443,7 +439,7 @@ impl Client { } conn.write( - ServerboundKeyPacket { + ServerboundKey { key_bytes: e.encrypted_public_key, encrypted_challenge: e.encrypted_challenge, } @@ -462,8 +458,7 @@ impl Client { "Got profile {:?}. handshake is finished and we're now switching to the configuration state", p.game_profile ); - conn.write(ServerboundLoginAcknowledgedPacket {}.get()) - .await?; + conn.write(ServerboundLoginAcknowledged {}.get()).await?; break (conn.configuration(), p.game_profile); } ClientboundLoginPacket::LoginDisconnect(p) => { @@ -605,7 +600,7 @@ impl Client { "Sending client information (already logged in): {:?}", client_information ); - self.write_packet(azalea_protocol::packets::game::serverbound_client_information_packet::ServerboundClientInformationPacket { information: client_information.clone() }.get())?; + self.write_packet(azalea_protocol::packets::game::s_client_information::ServerboundClientInformation { information: client_information.clone() }.get())?; } Ok(()) diff --git a/azalea-client/src/configuration.rs b/azalea-client/src/configuration.rs index 99b97f60d..c03fde788 100644 --- a/azalea-client/src/configuration.rs +++ b/azalea-client/src/configuration.rs @@ -1,17 +1,16 @@ use azalea_buf::McBufWritable; use azalea_core::resource_location::ResourceLocation; -use azalea_protocol::packets::configuration::{ - serverbound_client_information_packet::{ - ClientInformation, ServerboundClientInformationPacket, +use azalea_protocol::{ + common::ClientInformation, + packets::config::{ + s_client_information::ServerboundClientInformation, + s_custom_payload::ServerboundCustomPayload, }, - serverbound_custom_payload_packet::ServerboundCustomPayloadPacket, }; use bevy_app::prelude::*; use bevy_ecs::prelude::*; -use crate::{ - client::InConfigurationState, packet_handling::configuration::SendConfigurationPacketEvent, -}; +use crate::{client::InConfigurationState, packet_handling::configuration::SendConfigurationEvent}; pub struct ConfigurationPlugin; impl Plugin for ConfigurationPlugin { @@ -26,24 +25,24 @@ impl Plugin for ConfigurationPlugin { fn handle_in_configuration_state( query: Query<(Entity, &ClientInformation), Added>, - mut send_packet_events: EventWriter, + mut send_packet_events: EventWriter, ) { for (entity, client_information) in query.iter() { let mut brand_data = Vec::new(); // they don't have to know :) "vanilla".write_into(&mut brand_data).unwrap(); - send_packet_events.send(SendConfigurationPacketEvent { + send_packet_events.send(SendConfigurationEvent { entity, - packet: ServerboundCustomPayloadPacket { + packet: ServerboundCustomPayload { identifier: ResourceLocation::new("brand"), data: brand_data.into(), } .get(), }); - send_packet_events.send(SendConfigurationPacketEvent { + send_packet_events.send(SendConfigurationEvent { entity, - packet: ServerboundClientInformationPacket { + packet: ServerboundClientInformation { information: client_information.clone(), } .get(), diff --git a/azalea-client/src/events.rs b/azalea-client/src/events.rs index 61104a4ba..29ff76376 100644 --- a/azalea-client/src/events.rs +++ b/azalea-client/src/events.rs @@ -6,7 +6,7 @@ use std::sync::Arc; use azalea_chat::FormattedText; use azalea_core::tick::GameTick; use azalea_protocol::packets::game::{ - clientbound_player_combat_kill_packet::ClientboundPlayerCombatKillPacket, ClientboundGamePacket, + c_player_combat_kill::ClientboundPlayerCombatKill, ClientboundGamePacket, }; use azalea_world::{InstanceName, MinecraftEntityId}; use bevy_app::{App, Plugin, PreUpdate, Update}; @@ -21,7 +21,7 @@ use derive_more::{Deref, DerefMut}; use tokio::sync::mpsc; use crate::{ - chat::{ChatPacket, ChatReceivedEvent}, + chat::{Chat, ChatReceivedEvent}, disconnect::DisconnectEvent, packet_handling::game::{ AddPlayerEvent, DeathEvent, KeepAliveEvent, PacketEvent, RemovePlayerEvent, @@ -62,7 +62,7 @@ pub enum Event { /// The client is now in the world. Fired when we receive a login packet. Login, /// A chat message was sent in the game chat. - Chat(ChatPacket), + Chat(Chat), /// Happens 20 times per second, but only when the world is loaded. Tick, /// We received a packet from the server. @@ -93,7 +93,7 @@ pub enum Event { /// name, or latency changed). UpdatePlayer(PlayerInfo), /// The client player died in-game. - Death(Option>), + Death(Option>), /// A `KeepAlive` packet was sent by the server. KeepAlive(u64), /// The client disconnected from the server. diff --git a/azalea-client/src/interact.rs b/azalea-client/src/interact.rs index 94b60ddc4..bfa05cdc1 100644 --- a/azalea-client/src/interact.rs +++ b/azalea-client/src/interact.rs @@ -13,9 +13,9 @@ use azalea_entity::{ use azalea_inventory::{ItemSlot, ItemSlotData}; use azalea_physics::clip::{BlockShapeType, ClipContext, FluidPickType}; use azalea_protocol::packets::game::{ - serverbound_interact_packet::InteractionHand, - serverbound_swing_packet::ServerboundSwingPacket, - serverbound_use_item_on_packet::{BlockHit, ServerboundUseItemOnPacket}, + s_interact::InteractionHand, + s_swing::ServerboundSwing, + s_use_item_on::{BlockHit, ServerboundUseItemOn}, }; use azalea_registry::DataComponentKind; use azalea_world::{Instance, InstanceContainer, InstanceName}; @@ -150,7 +150,7 @@ pub fn handle_block_interact_event( send_packet_events.send(SendPacketEvent { entity, - packet: ServerboundUseItemOnPacket { + packet: ServerboundUseItemOn { hand: InteractionHand::MainHand, block_hit, sequence: sequence_number.0, @@ -304,7 +304,7 @@ pub fn handle_swing_arm_event( for event in events.read() { send_packet_events.send(SendPacketEvent { entity: event.entity, - packet: ServerboundSwingPacket { + packet: ServerboundSwing { hand: InteractionHand::MainHand, } .get(), diff --git a/azalea-client/src/inventory.rs b/azalea-client/src/inventory.rs index d4ccab145..194153d56 100644 --- a/azalea-client/src/inventory.rs +++ b/azalea-client/src/inventory.rs @@ -10,9 +10,8 @@ use azalea_inventory::{ }, }; use azalea_protocol::packets::game::{ - serverbound_container_click_packet::ServerboundContainerClickPacket, - serverbound_container_close_packet::ServerboundContainerClosePacket, - serverbound_set_carried_item_packet::ServerboundSetCarriedItemPacket, + s_container_click::ServerboundContainerClick, s_container_close::ServerboundContainerClose, + s_set_carried_item::ServerboundSetCarriedItem, }; use azalea_registry::MenuKind; use bevy_app::{App, Plugin, Update}; @@ -630,7 +629,7 @@ fn handle_container_close_event( send_packet_events.send(SendPacketEvent { entity, - packet: ServerboundContainerClosePacket { + packet: ServerboundContainerClose { container_id: inventory.id, } .get(), @@ -698,7 +697,7 @@ pub fn handle_container_click_event( send_packet_events.send(SendPacketEvent { entity, - packet: ServerboundContainerClickPacket { + packet: ServerboundContainerClick { container_id: event.window_id, state_id: inventory.state_id, slot_num: event.operation.slot_num().map(|n| n as i16).unwrap_or(-999), @@ -766,7 +765,7 @@ fn handle_set_selected_hotbar_slot_event( inventory.selected_hotbar_slot = event.slot; send_packet_events.send(SendPacketEvent { entity: event.entity, - packet: ServerboundSetCarriedItemPacket { + packet: ServerboundSetCarriedItem { slot: event.slot as u16, } .get(), diff --git a/azalea-client/src/lib.rs b/azalea-client/src/lib.rs index 82d4f5616..58a47f38e 100644 --- a/azalea-client/src/lib.rs +++ b/azalea-client/src/lib.rs @@ -30,7 +30,7 @@ pub mod respawn; pub mod task_pool; pub use account::{Account, AccountOpts}; -pub use azalea_protocol::packets::configuration::serverbound_client_information_packet::ClientInformation; +pub use azalea_protocol::common::ClientInformation; pub use client::{ start_ecs_runner, Client, DefaultPlugins, JoinError, JoinedClientBundle, StartClientOpts, TickBroadcast, diff --git a/azalea-client/src/local_player.rs b/azalea-client/src/local_player.rs index 3cc77f9da..d2fce3f15 100644 --- a/azalea-client/src/local_player.rs +++ b/azalea-client/src/local_player.rs @@ -3,7 +3,7 @@ use std::{collections::HashMap, io, sync::Arc}; use azalea_auth::game_profile::GameProfile; use azalea_core::game_type::GameMode; use azalea_entity::Dead; -use azalea_protocol::packets::game::clientbound_player_abilities_packet::ClientboundPlayerAbilitiesPacket; +use azalea_protocol::packets::game::c_player_abilities::ClientboundPlayerAbilities; use azalea_world::{Instance, PartialInstance}; use bevy_ecs::{component::Component, prelude::*}; use derive_more::{Deref, DerefMut}; @@ -62,8 +62,8 @@ pub struct PlayerAbilities { /// Used for the fov pub walking_speed: f32, } -impl From<&ClientboundPlayerAbilitiesPacket> for PlayerAbilities { - fn from(packet: &ClientboundPlayerAbilitiesPacket) -> Self { +impl From<&ClientboundPlayerAbilities> for PlayerAbilities { + fn from(packet: &ClientboundPlayerAbilities) -> Self { Self { invulnerable: packet.flags.invulnerable, flying: packet.flags.flying, diff --git a/azalea-client/src/mining.rs b/azalea-client/src/mining.rs index 1c8461c56..dfa08e14d 100644 --- a/azalea-client/src/mining.rs +++ b/azalea-client/src/mining.rs @@ -3,9 +3,7 @@ use azalea_core::{direction::Direction, game_type::GameMode, position::BlockPos, use azalea_entity::{mining::get_mine_progress, FluidOnEyes, Physics}; use azalea_inventory::ItemSlot; use azalea_physics::PhysicsSet; -use azalea_protocol::packets::game::serverbound_player_action_packet::{ - self, ServerboundPlayerActionPacket, -}; +use azalea_protocol::packets::game::s_player_action::{self, ServerboundPlayerAction}; use azalea_world::{InstanceContainer, InstanceName}; use bevy_app::{App, Plugin, Update}; use bevy_ecs::prelude::*; @@ -255,8 +253,8 @@ fn handle_start_mining_block_with_direction_event( // send a packet to stop mining since we just changed target send_packet_events.send(SendPacketEvent { entity: event.entity, - packet: ServerboundPlayerActionPacket { - action: serverbound_player_action_packet::Action::AbortDestroyBlock, + packet: ServerboundPlayerAction { + action: s_player_action::Action::AbortDestroyBlock, pos: current_mining_pos .expect("IsMining is true so MineBlockPos must be present"), direction: event.direction, @@ -328,8 +326,8 @@ fn handle_start_mining_block_with_direction_event( send_packet_events.send(SendPacketEvent { entity: event.entity, - packet: ServerboundPlayerActionPacket { - action: serverbound_player_action_packet::Action::StartDestroyBlock, + packet: ServerboundPlayerAction { + action: s_player_action::Action::StartDestroyBlock, pos: event.position, direction: event.direction, sequence: **sequence_number, @@ -498,8 +496,8 @@ pub fn handle_stop_mining_block_event( mine_block_pos.expect("IsMining is true so MineBlockPos must be present"); send_packet_events.send(SendPacketEvent { entity: event.entity, - packet: ServerboundPlayerActionPacket { - action: serverbound_player_action_packet::Action::AbortDestroyBlock, + packet: ServerboundPlayerAction { + action: s_player_action::Action::AbortDestroyBlock, pos: mine_block_pos, direction: Direction::Down, sequence: 0, @@ -572,8 +570,8 @@ pub fn continue_mining_block( *sequence_number += 1; send_packet_events.send(SendPacketEvent { entity, - packet: ServerboundPlayerActionPacket { - action: serverbound_player_action_packet::Action::StartDestroyBlock, + packet: ServerboundPlayerAction { + action: s_player_action::Action::StartDestroyBlock, pos: mining.pos, direction: mining.dir, sequence: **sequence_number, @@ -618,8 +616,8 @@ pub fn continue_mining_block( }); send_packet_events.send(SendPacketEvent { entity, - packet: ServerboundPlayerActionPacket { - action: serverbound_player_action_packet::Action::StopDestroyBlock, + packet: ServerboundPlayerAction { + action: s_player_action::Action::StopDestroyBlock, pos: mining.pos, direction: mining.dir, sequence: **sequence_number, diff --git a/azalea-client/src/movement.rs b/azalea-client/src/movement.rs index 806f87341..99b9e0dd3 100644 --- a/azalea-client/src/movement.rs +++ b/azalea-client/src/movement.rs @@ -5,12 +5,12 @@ use azalea_core::tick::GameTick; use azalea_entity::{metadata::Sprinting, Attributes, Jumping}; use azalea_entity::{InLoadedChunk, LastSentPosition, LookDirection, Physics, Position}; use azalea_physics::{ai_step, PhysicsSet}; -use azalea_protocol::packets::game::serverbound_player_command_packet::ServerboundPlayerCommandPacket; +use azalea_protocol::packets::game::s_player_command::ServerboundPlayerCommand; use azalea_protocol::packets::game::{ - serverbound_move_player_pos_packet::ServerboundMovePlayerPosPacket, - serverbound_move_player_pos_rot_packet::ServerboundMovePlayerPosRotPacket, - serverbound_move_player_rot_packet::ServerboundMovePlayerRotPacket, - serverbound_move_player_status_only_packet::ServerboundMovePlayerStatusOnlyPacket, + s_move_player_pos::ServerboundMovePlayerPos, + s_move_player_pos_rot::ServerboundMovePlayerPosRot, + s_move_player_rot::ServerboundMovePlayerRot, + s_move_player_status_only::ServerboundMovePlayerStatusOnly, }; use azalea_world::{MinecraftEntityId, MoveEntityError}; use bevy_app::{App, Plugin, Update}; @@ -188,7 +188,7 @@ pub fn send_position( // } let packet = if sending_position && sending_direction { Some( - ServerboundMovePlayerPosRotPacket { + ServerboundMovePlayerPosRot { x: position.x, y: position.y, z: position.z, @@ -200,7 +200,7 @@ pub fn send_position( ) } else if sending_position { Some( - ServerboundMovePlayerPosPacket { + ServerboundMovePlayerPos { x: position.x, y: position.y, z: position.z, @@ -210,7 +210,7 @@ pub fn send_position( ) } else if sending_direction { Some( - ServerboundMovePlayerRotPacket { + ServerboundMovePlayerRot { x_rot: direction.x_rot, y_rot: direction.y_rot, on_ground: physics.on_ground, @@ -219,7 +219,7 @@ pub fn send_position( ) } else if physics.last_on_ground != physics.on_ground { Some( - ServerboundMovePlayerStatusOnlyPacket { + ServerboundMovePlayerStatusOnly { on_ground: physics.on_ground, } .get(), @@ -257,13 +257,13 @@ fn send_sprinting_if_needed( let was_sprinting = physics_state.was_sprinting; if **sprinting != was_sprinting { let sprinting_action = if **sprinting { - azalea_protocol::packets::game::serverbound_player_command_packet::Action::StartSprinting + azalea_protocol::packets::game::s_player_command::Action::StartSprinting } else { - azalea_protocol::packets::game::serverbound_player_command_packet::Action::StopSprinting + azalea_protocol::packets::game::s_player_command::Action::StopSprinting }; send_packet_events.send(SendPacketEvent { entity, - packet: ServerboundPlayerCommandPacket { + packet: ServerboundPlayerCommand { id: **minecraft_entity_id, action: sprinting_action, data: 0, diff --git a/azalea-client/src/packet_handling/configuration.rs b/azalea-client/src/packet_handling/configuration.rs index de365394a..d23c15b35 100644 --- a/azalea-client/src/packet_handling/configuration.rs +++ b/azalea-client/src/packet_handling/configuration.rs @@ -1,14 +1,10 @@ use std::io::Cursor; use azalea_entity::indexing::EntityIdIndex; -use azalea_protocol::packets::configuration::serverbound_finish_configuration_packet::ServerboundFinishConfigurationPacket; -use azalea_protocol::packets::configuration::serverbound_keep_alive_packet::ServerboundKeepAlivePacket; -use azalea_protocol::packets::configuration::serverbound_pong_packet::ServerboundPongPacket; -use azalea_protocol::packets::configuration::serverbound_resource_pack_packet::ServerboundResourcePackPacket; -use azalea_protocol::packets::configuration::serverbound_select_known_packs_packet::ServerboundSelectKnownPacksPacket; -use azalea_protocol::packets::configuration::{ - ClientboundConfigurationPacket, ServerboundConfigurationPacket, -}; +use azalea_protocol::packets::config::s_finish_configuration::ServerboundFinishConfiguration; +use azalea_protocol::packets::config::s_keep_alive::ServerboundKeepAlive; +use azalea_protocol::packets::config::s_select_known_packs::ServerboundSelectKnownPacks; +use azalea_protocol::packets::config::{self, ClientboundConfigPacket, ServerboundConfigPacket}; use azalea_protocol::packets::ConnectionProtocol; use azalea_protocol::read::deserialize_packet; use bevy_ecs::prelude::*; @@ -23,16 +19,16 @@ use crate::raw_connection::RawConnection; use crate::InstanceHolder; #[derive(Event, Debug, Clone)] -pub struct ConfigurationPacketEvent { +pub struct ConfigurationEvent { /// The client entity that received the packet. pub entity: Entity, /// The packet that was actually received. - pub packet: ClientboundConfigurationPacket, + pub packet: ClientboundConfigPacket, } pub fn send_packet_events( query: Query<(Entity, &RawConnection), With>, - mut packet_events: ResMut>, + mut packet_events: ResMut>, ) { // we manually clear and send the events at the beginning of each update // since otherwise it'd cause issues with events in process_packet_events @@ -43,9 +39,9 @@ pub fn send_packet_events( let mut packets = packets_lock.lock(); if !packets.is_empty() { for raw_packet in packets.iter() { - let packet = match deserialize_packet::( - &mut Cursor::new(raw_packet), - ) { + let packet = match deserialize_packet::(&mut Cursor::new( + raw_packet, + )) { Ok(packet) => packet, Err(err) => { error!("failed to read packet: {:?}", err); @@ -53,7 +49,7 @@ pub fn send_packet_events( continue; } }; - packet_events.send(ConfigurationPacketEvent { + packet_events.send(ConfigurationEvent { entity: player_entity, packet, }); @@ -66,10 +62,9 @@ pub fn send_packet_events( pub fn process_packet_events(ecs: &mut World) { let mut events_owned = Vec::new(); - let mut system_state: SystemState> = - SystemState::new(ecs); + let mut system_state: SystemState> = SystemState::new(ecs); let mut events = system_state.get_mut(ecs); - for ConfigurationPacketEvent { + for ConfigurationEvent { entity: player_entity, packet, } in events.read() @@ -79,7 +74,7 @@ pub fn process_packet_events(ecs: &mut World) { } for (player_entity, packet) in events_owned { match packet { - ClientboundConfigurationPacket::RegistryData(p) => { + ClientboundConfigPacket::RegistryData(p) => { let mut system_state: SystemState> = SystemState::new(ecs); let mut query = system_state.get_mut(ecs); @@ -90,10 +85,10 @@ pub fn process_packet_events(ecs: &mut World) { instance.registries.append(p.registry_id, p.entries); } - ClientboundConfigurationPacket::CustomPayload(p) => { + ClientboundConfigPacket::CustomPayload(p) => { debug!("Got custom payload packet {p:?}"); } - ClientboundConfigurationPacket::Disconnect(p) => { + ClientboundConfigPacket::Disconnect(p) => { warn!("Got disconnect packet {p:?}"); let mut system_state: SystemState> = SystemState::new(ecs); @@ -103,7 +98,7 @@ pub fn process_packet_events(ecs: &mut World) { reason: Some(p.reason.clone()), }); } - ClientboundConfigurationPacket::FinishConfiguration(p) => { + ClientboundConfigPacket::FinishConfiguration(p) => { debug!("got FinishConfiguration packet: {p:?}"); let mut system_state: SystemState> = @@ -112,7 +107,7 @@ pub fn process_packet_events(ecs: &mut World) { let mut raw_connection = query.get_mut(player_entity).unwrap(); raw_connection - .write_packet(ServerboundFinishConfigurationPacket {}.get()) + .write_packet(ServerboundFinishConfiguration {}.get()) .expect( "we should be in the right state and encoding this packet shouldn't fail", ); @@ -140,7 +135,7 @@ pub fn process_packet_events(ecs: &mut World) { _local_entity: azalea_entity::LocalEntity, }); } - ClientboundConfigurationPacket::KeepAlive(p) => { + ClientboundConfigPacket::KeepAlive(p) => { debug!("Got keep alive packet (in configuration) {p:?} for {player_entity:?}"); let mut system_state: SystemState<( @@ -155,10 +150,10 @@ pub fn process_packet_events(ecs: &mut World) { id: p.id, }); raw_connection - .write_packet(ServerboundKeepAlivePacket { id: p.id }.get()) + .write_packet(ServerboundKeepAlive { id: p.id }.get()) .unwrap(); } - ClientboundConfigurationPacket::Ping(p) => { + ClientboundConfigPacket::Ping(p) => { debug!("Got ping packet {p:?}"); let mut system_state: SystemState> = SystemState::new(ecs); @@ -166,10 +161,10 @@ pub fn process_packet_events(ecs: &mut World) { let raw_connection = query.get_mut(player_entity).unwrap(); raw_connection - .write_packet(ServerboundPongPacket { id: p.id }.get()) + .write_packet(config::s_pong::ServerboundPong { id: p.id }.get()) .unwrap(); } - ClientboundConfigurationPacket::ResourcePackPush(p) => { + ClientboundConfigPacket::ResourcePackPush(p) => { debug!("Got resource pack packet {p:?}"); let mut system_state: SystemState> = SystemState::new(ecs); @@ -177,35 +172,38 @@ pub fn process_packet_events(ecs: &mut World) { let raw_connection = query.get_mut(player_entity).unwrap(); // always accept resource pack - raw_connection.write_packet( - ServerboundResourcePackPacket { - id: p.id, - action: azalea_protocol::packets::configuration::serverbound_resource_pack_packet::Action::Accepted - }.get() - ).unwrap(); - } - ClientboundConfigurationPacket::ResourcePackPop(_) => { + raw_connection + .write_packet( + config::s_resource_pack::ServerboundResourcePack { + id: p.id, + action: config::s_resource_pack::Action::Accepted, + } + .get(), + ) + .unwrap(); + } + ClientboundConfigPacket::ResourcePackPop(_) => { // we can ignore this } - ClientboundConfigurationPacket::UpdateEnabledFeatures(p) => { + ClientboundConfigPacket::UpdateEnabledFeatures(p) => { debug!("Got update enabled features packet {p:?}"); } - ClientboundConfigurationPacket::UpdateTags(_p) => { + ClientboundConfigPacket::UpdateTags(_p) => { debug!("Got update tags packet"); } - ClientboundConfigurationPacket::CookieRequest(p) => { + ClientboundConfigPacket::CookieRequest(p) => { debug!("Got cookie request packet {p:?}"); } - ClientboundConfigurationPacket::ResetChat(p) => { + ClientboundConfigPacket::ResetChat(p) => { debug!("Got reset chat packet {p:?}"); } - ClientboundConfigurationPacket::StoreCookie(p) => { + ClientboundConfigPacket::StoreCookie(p) => { debug!("Got store cookie packet {p:?}"); } - ClientboundConfigurationPacket::Transfer(p) => { + ClientboundConfigPacket::Transfer(p) => { debug!("Got transfer packet {p:?}"); } - ClientboundConfigurationPacket::SelectKnownPacks(p) => { + ClientboundConfigPacket::SelectKnownPacks(p) => { debug!("Got select known packs packet {p:?}"); let mut system_state: SystemState> = SystemState::new(ecs); @@ -215,7 +213,7 @@ pub fn process_packet_events(ecs: &mut World) { // resource pack management isn't implemented raw_connection .write_packet( - ServerboundSelectKnownPacksPacket { + ServerboundSelectKnownPacks { known_packs: vec![], } .get(), @@ -229,13 +227,13 @@ pub fn process_packet_events(ecs: &mut World) { /// An event for sending a packet to the server while we're in the /// `configuration` state. #[derive(Event)] -pub struct SendConfigurationPacketEvent { +pub struct SendConfigurationEvent { pub entity: Entity, - pub packet: ServerboundConfigurationPacket, + pub packet: ServerboundConfigPacket, } pub fn handle_send_packet_event( - mut send_packet_events: EventReader, + mut send_packet_events: EventReader, mut query: Query<&mut RawConnection>, ) { for event in send_packet_events.read() { diff --git a/azalea-client/src/packet_handling/game.rs b/azalea-client/src/packet_handling/game.rs index 3c6ad6b57..2b87a91fa 100644 --- a/azalea-client/src/packet_handling/game.rs +++ b/azalea-client/src/packet_handling/game.rs @@ -18,13 +18,11 @@ use azalea_entity::{ }; use azalea_protocol::{ packets::game::{ - clientbound_player_combat_kill_packet::ClientboundPlayerCombatKillPacket, - serverbound_accept_teleportation_packet::ServerboundAcceptTeleportationPacket, - serverbound_configuration_acknowledged_packet::ServerboundConfigurationAcknowledgedPacket, - serverbound_keep_alive_packet::ServerboundKeepAlivePacket, - serverbound_move_player_pos_rot_packet::ServerboundMovePlayerPosRotPacket, - serverbound_pong_packet::ServerboundPongPacket, ClientboundGamePacket, - ServerboundGamePacket, + c_player_combat_kill::ClientboundPlayerCombatKill, + s_accept_teleportation::ServerboundAcceptTeleportation, + s_configuration_acknowledged::ServerboundConfigurationAcknowledged, + s_keep_alive::ServerboundKeepAlive, s_move_player_pos_rot::ServerboundMovePlayerPosRot, + s_pong::ServerboundPong, ClientboundGamePacket, ServerboundGamePacket, }, read::deserialize_packet, }; @@ -35,7 +33,7 @@ use tracing::{debug, error, trace, warn}; use uuid::Uuid; use crate::{ - chat::{ChatPacket, ChatReceivedEvent}, + chat::{Chat, ChatReceivedEvent}, chunks, disconnect::DisconnectEvent, inventory::{ @@ -103,12 +101,12 @@ pub struct UpdatePlayerEvent { } /// Event for when an entity dies. dies. If it's a local player and there's a -/// reason in the death screen, the [`ClientboundPlayerCombatKillPacket`] will +/// reason in the death screen, the [`ClientboundPlayerCombatKill`] will /// be included. #[derive(Event, Debug, Clone)] pub struct DeathEvent { pub entity: Entity, - pub packet: Option, + pub packet: Option, } /// A KeepAlive packet is sent from the server to verify that the client is @@ -342,7 +340,7 @@ pub fn process_packet_events(ecs: &mut World) { ); send_packet_events.send(SendPacketEvent { entity: player_entity, - packet: azalea_protocol::packets::game::serverbound_client_information_packet::ServerboundClientInformationPacket { information: client_information.clone() }.get(), + packet: azalea_protocol::packets::game::s_client_information::ServerboundClientInformation { information: client_information.clone() }.get(), }); system_state.apply(ecs); @@ -495,11 +493,11 @@ pub fn process_packet_events(ecs: &mut World) { send_packet_events.send(SendPacketEvent { entity: player_entity, - packet: ServerboundAcceptTeleportationPacket { id: p.id }.get(), + packet: ServerboundAcceptTeleportation { id: p.id }.get(), }); send_packet_events.send(SendPacketEvent { entity: player_entity, - packet: ServerboundMovePlayerPosRotPacket { + packet: ServerboundMovePlayerPosRot { x: new_pos.x, y: new_pos.y, z: new_pos.z, @@ -985,7 +983,7 @@ pub fn process_packet_events(ecs: &mut World) { }); send_packet_events.send(SendPacketEvent { entity: player_entity, - packet: ServerboundKeepAlivePacket { id: p.id }.get(), + packet: ServerboundKeepAlive { id: p.id }.get(), }); } ClientboundGamePacket::RemoveEntities(p) => { @@ -1032,7 +1030,7 @@ pub fn process_packet_events(ecs: &mut World) { chat_events.send(ChatReceivedEvent { entity: player_entity, - packet: ChatPacket::Player(Arc::new(p.clone())), + packet: Chat::Player(Arc::new(p.clone())), }); } ClientboundGamePacket::SystemChat(p) => { @@ -1044,7 +1042,7 @@ pub fn process_packet_events(ecs: &mut World) { chat_events.send(ChatReceivedEvent { entity: player_entity, - packet: ChatPacket::System(Arc::new(p.clone())), + packet: Chat::System(Arc::new(p.clone())), }); } ClientboundGamePacket::DisguisedChat(p) => { @@ -1056,7 +1054,7 @@ pub fn process_packet_events(ecs: &mut World) { chat_events.send(ChatReceivedEvent { entity: player_entity, - packet: ChatPacket::Disguised(Arc::new(p.clone())), + packet: Chat::Disguised(Arc::new(p.clone())), }); } ClientboundGamePacket::Sound(_p) => { @@ -1096,7 +1094,7 @@ pub fn process_packet_events(ecs: &mut World) { } } ClientboundGamePacket::GameEvent(p) => { - use azalea_protocol::packets::game::clientbound_game_event_packet::EventType; + use azalea_protocol::packets::game::c_game_event::EventType; debug!("Got game event packet {p:?}"); @@ -1281,7 +1279,7 @@ pub fn process_packet_events(ecs: &mut World) { send_packet_events.send(SendPacketEvent { entity: player_entity, - packet: ServerboundPongPacket { id: p.id }.get(), + packet: ServerboundPong { id: p.id }.get(), }); } ClientboundGamePacket::PlaceGhostRecipe(_) => {} @@ -1425,7 +1423,7 @@ pub fn process_packet_events(ecs: &mut World) { packet_events.send(SendPacketEvent { entity: player_entity, - packet: ServerboundConfigurationAcknowledgedPacket {}.get(), + packet: ServerboundConfigurationAcknowledged {}.get(), }); commands diff --git a/azalea-client/src/packet_handling/login.rs b/azalea-client/src/packet_handling/login.rs index 7d71b440a..d2719c938 100644 --- a/azalea-client/src/packet_handling/login.rs +++ b/azalea-client/src/packet_handling/login.rs @@ -4,8 +4,8 @@ use std::{collections::HashSet, sync::Arc}; use azalea_protocol::packets::login::{ - serverbound_custom_query_answer_packet::ServerboundCustomQueryAnswerPacket, - ClientboundLoginPacket, ServerboundLoginPacket, + s_custom_query_answer::ServerboundCustomQueryAnswer, ClientboundLoginPacket, + ServerboundLoginPacket, }; use bevy_ecs::{prelude::*, system::SystemState}; use derive_more::{Deref, DerefMut}; @@ -88,7 +88,7 @@ pub fn process_packet_events(ecs: &mut World) { send_packet_events.send(SendLoginPacketEvent { entity: player_entity, - packet: ServerboundCustomQueryAnswerPacket { + packet: ServerboundCustomQueryAnswer { transaction_id: p.transaction_id, data: None, } diff --git a/azalea-client/src/packet_handling/mod.rs b/azalea-client/src/packet_handling/mod.rs index eb8f1d47a..6bb9c3191 100644 --- a/azalea-client/src/packet_handling/mod.rs +++ b/azalea-client/src/packet_handling/mod.rs @@ -61,9 +61,9 @@ impl Plugin for PacketHandlerPlugin { ) // we do this instead of add_event so we can handle the events ourselves .init_resource::>() - .init_resource::>() + .init_resource::>() .add_event::() - .add_event::() + .add_event::() .add_event::() .add_event::() .add_event::() diff --git a/azalea-client/src/ping.rs b/azalea-client/src/ping.rs index ded1b5217..be0409705 100755 --- a/azalea-client/src/ping.rs +++ b/azalea-client/src/ping.rs @@ -5,14 +5,13 @@ use std::io; use azalea_protocol::{ connect::{Connection, ConnectionError, Proxy}, packets::{ - handshaking::{ - client_intention_packet::ClientIntentionPacket, ClientboundHandshakePacket, + handshake::{ + s_client_intention::ServerboundClientIntention, ClientboundHandshakePacket, ServerboundHandshakePacket, }, status::{ - clientbound_status_response_packet::ClientboundStatusResponsePacket, - serverbound_status_request_packet::ServerboundStatusRequestPacket, - ClientboundStatusPacket, + c_status_response::ClientboundStatusResponse, + s_status_request::ServerboundStatusRequest, ClientboundStatusPacket, }, ClientIntention, PROTOCOL_VERSION, }, @@ -49,7 +48,7 @@ pub enum PingError { /// ``` pub async fn ping_server( address: impl TryInto, -) -> Result { +) -> Result { let address: ServerAddress = address.try_into().map_err(|_| PingError::InvalidAddress)?; let resolved_address = resolver::resolve_address(&address).await?; let conn = Connection::new(&resolved_address).await?; @@ -60,7 +59,7 @@ pub async fn ping_server( pub async fn ping_server_with_proxy( address: impl TryInto, proxy: Proxy, -) -> Result { +) -> Result { let address: ServerAddress = address.try_into().map_err(|_| PingError::InvalidAddress)?; let resolved_address = resolver::resolve_address(&address).await?; let conn = Connection::new_with_proxy(&resolved_address, proxy).await?; @@ -73,10 +72,10 @@ pub async fn ping_server_with_proxy( pub async fn ping_server_with_connection( address: ServerAddress, mut conn: Connection, -) -> Result { +) -> Result { // send the client intention packet and switch to the status state conn.write( - ClientIntentionPacket { + ServerboundClientIntention { protocol_version: PROTOCOL_VERSION, hostname: address.host.clone(), port: address.port, @@ -88,7 +87,7 @@ pub async fn ping_server_with_connection( let mut conn = conn.status(); // send the empty status request packet - conn.write(ServerboundStatusRequestPacket {}.get()).await?; + conn.write(ServerboundStatusRequest {}.get()).await?; let packet = conn.read().await?; diff --git a/azalea-client/src/respawn.rs b/azalea-client/src/respawn.rs index 150b35913..9f61e2646 100644 --- a/azalea-client/src/respawn.rs +++ b/azalea-client/src/respawn.rs @@ -1,6 +1,4 @@ -use azalea_protocol::packets::game::serverbound_client_command_packet::{ - self, ServerboundClientCommandPacket, -}; +use azalea_protocol::packets::game::s_client_command::{self, ServerboundClientCommand}; use bevy_app::{App, Plugin, Update}; use bevy_ecs::prelude::*; @@ -28,8 +26,8 @@ pub fn perform_respawn( for event in events.read() { send_packets.send(SendPacketEvent { entity: event.entity, - packet: ServerboundClientCommandPacket { - action: serverbound_client_command_packet::Action::PerformRespawn, + packet: ServerboundClientCommand { + action: s_client_command::Action::PerformRespawn, } .get(), }); diff --git a/azalea-protocol/azalea-protocol-macros/src/lib.rs b/azalea-protocol/azalea-protocol-macros/src/lib.rs index 756d0d825..962646aae 100755 --- a/azalea-protocol/azalea-protocol-macros/src/lib.rs +++ b/azalea-protocol/azalea-protocol-macros/src/lib.rs @@ -41,68 +41,68 @@ fn as_packet_derive(input: TokenStream, state: proc_macro2::TokenStream) -> Toke } #[proc_macro_derive(ServerboundGamePacket, attributes(var))] -pub fn derive_serverbound_game_packet(input: TokenStream) -> TokenStream { +pub fn derive_s_game_packet(input: TokenStream) -> TokenStream { as_packet_derive(input, quote! {crate::packets::game::ServerboundGamePacket}) } #[proc_macro_derive(ServerboundHandshakePacket, attributes(var))] -pub fn derive_serverbound_handshake_packet(input: TokenStream) -> TokenStream { +pub fn derive_s_handshake_packet(input: TokenStream) -> TokenStream { as_packet_derive( input, - quote! {crate::packets::handshaking::ServerboundHandshakePacket}, + quote! {crate::packets::handshake::ServerboundHandshakePacket}, ) } #[proc_macro_derive(ServerboundLoginPacket, attributes(var))] -pub fn derive_serverbound_login_packet(input: TokenStream) -> TokenStream { +pub fn derive_s_login_packet(input: TokenStream) -> TokenStream { as_packet_derive( input, quote! {crate::packets::login::ServerboundLoginPacket}, ) } #[proc_macro_derive(ServerboundStatusPacket, attributes(var))] -pub fn derive_serverbound_status_packet(input: TokenStream) -> TokenStream { +pub fn derive_s_status_packet(input: TokenStream) -> TokenStream { as_packet_derive( input, quote! {crate::packets::status::ServerboundStatusPacket}, ) } -#[proc_macro_derive(ServerboundConfigurationPacket, attributes(var))] -pub fn derive_serverbound_configuration_packet(input: TokenStream) -> TokenStream { +#[proc_macro_derive(ServerboundConfigPacket, attributes(var))] +pub fn derive_s_config_packet(input: TokenStream) -> TokenStream { as_packet_derive( input, - quote! {crate::packets::configuration::ServerboundConfigurationPacket}, + quote! {crate::packets::config::ServerboundConfigPacket}, ) } #[proc_macro_derive(ClientboundGamePacket, attributes(var))] -pub fn derive_clientbound_game_packet(input: TokenStream) -> TokenStream { +pub fn derive_c_game_packet(input: TokenStream) -> TokenStream { as_packet_derive(input, quote! {crate::packets::game::ClientboundGamePacket}) } #[proc_macro_derive(ClientboundHandshakePacket, attributes(var))] -pub fn derive_clientbound_handshake_packet(input: TokenStream) -> TokenStream { +pub fn derive_c_handshake_packet(input: TokenStream) -> TokenStream { as_packet_derive( input, - quote! {crate::packets::handshaking::ClientboundHandshakePacket}, + quote! {crate::packets::handshake::ClientboundHandshakePacket}, ) } #[proc_macro_derive(ClientboundLoginPacket, attributes(var))] -pub fn derive_clientbound_login_packet(input: TokenStream) -> TokenStream { +pub fn derive_c_login_packet(input: TokenStream) -> TokenStream { as_packet_derive( input, quote! {crate::packets::login::ClientboundLoginPacket}, ) } #[proc_macro_derive(ClientboundStatusPacket, attributes(var))] -pub fn derive_clientbound_status_packet(input: TokenStream) -> TokenStream { +pub fn derive_c_status_packet(input: TokenStream) -> TokenStream { as_packet_derive( input, quote! {crate::packets::status::ClientboundStatusPacket}, ) } -#[proc_macro_derive(ClientboundConfigurationPacket, attributes(var))] -pub fn derive_clientbound_configuration_packet(input: TokenStream) -> TokenStream { +#[proc_macro_derive(ClientboundConfigPacket, attributes(var))] +pub fn derive_c_config_packet(input: TokenStream) -> TokenStream { as_packet_derive( input, - quote! {crate::packets::configuration::ClientboundConfigurationPacket}, + quote! {crate::packets::config::ClientboundConfigPacket}, ) } @@ -122,14 +122,14 @@ impl Parse for PacketIdMap { let mut packets = vec![]; // example: - // 0x0e: clientbound_change_difficulty_packet::ClientboundChangeDifficultyPacket, + // 0x0e: c_change_difficulty::ClientboundChangeDifficultyPacket, // 0x0e while let Ok(packet_id) = input.parse::() { let packet_id = packet_id.base10_parse::()?; // : input.parse::()?; - // clientbound_change_difficulty_packet + // c_change_difficulty_packet let module: Ident = input.parse()?; // :: input.parse::()?; @@ -163,12 +163,9 @@ impl Parse for DeclareStatePackets { let name = input.parse()?; input.parse::()?; - let serverbound_token: Ident = input.parse()?; - if serverbound_token != "Serverbound" { - return Err(syn::Error::new( - serverbound_token.span(), - "Expected `Serverbound`", - )); + let s_token: Ident = input.parse()?; + if s_token != "Serverbound" { + return Err(syn::Error::new(s_token.span(), "Expected `Serverbound`")); } input.parse::]>()?; let content; @@ -177,12 +174,9 @@ impl Parse for DeclareStatePackets { input.parse::()?; - let clientbound_token: Ident = input.parse()?; - if clientbound_token != "Clientbound" { - return Err(syn::Error::new( - clientbound_token.span(), - "Expected `Clientbound`", - )); + let c_token: Ident = input.parse()?; + if c_token != "Clientbound" { + return Err(syn::Error::new(c_token.span(), "Expected `Clientbound`")); } input.parse::]>()?; let content; @@ -200,39 +194,37 @@ impl Parse for DeclareStatePackets { pub fn declare_state_packets(input: TokenStream) -> TokenStream { let input = parse_macro_input!(input as DeclareStatePackets); - let serverbound_state_name = - Ident::new(&format!("Serverbound{}", input.name), input.name.span()); - let clientbound_state_name = - Ident::new(&format!("Clientbound{}", input.name), input.name.span()); + let s_state_name = Ident::new(&format!("Serverbound{}", input.name), input.name.span()); + let c_state_name = Ident::new(&format!("Clientbound{}", input.name), input.name.span()); let state_name_litstr = syn::LitStr::new(&input.name.to_string(), input.name.span()); - let has_serverbound_packets = !input.serverbound.packets.is_empty(); - let has_clientbound_packets = !input.clientbound.packets.is_empty(); + let has_s_packets = !input.serverbound.packets.is_empty(); + let has_c_packets = !input.clientbound.packets.is_empty(); - let mut serverbound_enum_contents = quote!(); - let mut clientbound_enum_contents = quote!(); - let mut serverbound_id_match_contents = quote!(); - let mut clientbound_id_match_contents = quote!(); - let mut serverbound_write_match_contents = quote!(); - let mut clientbound_write_match_contents = quote!(); - let mut serverbound_read_match_contents = quote!(); - let mut clientbound_read_match_contents = quote!(); + let mut s_enum_contents = quote!(); + let mut c_enum_contents = quote!(); + let mut s_id_match_contents = quote!(); + let mut c_id_match_contents = quote!(); + let mut s_write_match_contents = quote!(); + let mut c_write_match_contents = quote!(); + let mut s_read_match_contents = quote!(); + let mut c_read_match_contents = quote!(); for PacketIdPair { id, module, name } in input.serverbound.packets { let variant_name = variant_name_from(&name); let name_litstr = syn::LitStr::new(&name.to_string(), name.span()); - serverbound_enum_contents.extend(quote! { + s_enum_contents.extend(quote! { #variant_name(#module::#name), }); - serverbound_id_match_contents.extend(quote! { - #serverbound_state_name::#variant_name(_packet) => #id, + s_id_match_contents.extend(quote! { + #s_state_name::#variant_name(_packet) => #id, }); - serverbound_write_match_contents.extend(quote! { - #serverbound_state_name::#variant_name(packet) => packet.write(buf), + s_write_match_contents.extend(quote! { + #s_state_name::#variant_name(packet) => packet.write(buf), }); - serverbound_read_match_contents.extend(quote! { + s_read_match_contents.extend(quote! { #id => { let data = #module::#name::read(buf).map_err(|e| crate::read::ReadPacketError::Parse { source: e, @@ -256,16 +248,16 @@ pub fn declare_state_packets(input: TokenStream) -> TokenStream { let name_litstr = syn::LitStr::new(&name.to_string(), name.span()); let variant_name = variant_name_from(&name); - clientbound_enum_contents.extend(quote! { + c_enum_contents.extend(quote! { #variant_name(#module::#name), }); - clientbound_id_match_contents.extend(quote! { - #clientbound_state_name::#variant_name(_packet) => #id, + c_id_match_contents.extend(quote! { + #c_state_name::#variant_name(_packet) => #id, }); - clientbound_write_match_contents.extend(quote! { - #clientbound_state_name::#variant_name(packet) => packet.write(buf), + c_write_match_contents.extend(quote! { + #c_state_name::#variant_name(packet) => packet.write(buf), }); - clientbound_read_match_contents.extend(quote! { + c_read_match_contents.extend(quote! { #id => { let data = #module::#name::read(buf).map_err(|e| crate::read::ReadPacketError::Parse { source: e, @@ -293,52 +285,52 @@ pub fn declare_state_packets(input: TokenStream) -> TokenStream { }); } - if !has_serverbound_packets { - serverbound_id_match_contents.extend(quote! { + if !has_s_packets { + s_id_match_contents.extend(quote! { _ => unreachable!("This enum is empty and can't exist.") }); - serverbound_write_match_contents.extend(quote! { + s_write_match_contents.extend(quote! { _ => unreachable!("This enum is empty and can't exist.") }); } - if !has_clientbound_packets { - clientbound_id_match_contents.extend(quote! { + if !has_c_packets { + c_id_match_contents.extend(quote! { _ => unreachable!("This enum is empty and can't exist.") }); - clientbound_write_match_contents.extend(quote! { + c_write_match_contents.extend(quote! { _ => unreachable!("This enum is empty and can't exist.") }); } let mut contents = quote! { #[derive(Clone, Debug)] - pub enum #serverbound_state_name + pub enum #s_state_name where Self: Sized, { - #serverbound_enum_contents + #s_enum_contents } #[derive(Clone, Debug)] - pub enum #clientbound_state_name + pub enum #c_state_name where Self: Sized, { - #clientbound_enum_contents + #c_enum_contents } }; contents.extend(quote! { #[allow(unreachable_code)] - impl crate::packets::ProtocolPacket for #serverbound_state_name { + impl crate::packets::ProtocolPacket for #s_state_name { fn id(&self) -> u32 { match self { - #serverbound_id_match_contents + #s_id_match_contents } } fn write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { match self { - #serverbound_write_match_contents + #s_write_match_contents } } @@ -346,12 +338,12 @@ pub fn declare_state_packets(input: TokenStream) -> TokenStream { fn read( id: u32, buf: &mut std::io::Cursor<&[u8]>, - ) -> Result<#serverbound_state_name, Box> + ) -> Result<#s_state_name, Box> where Self: Sized, { Ok(match id { - #serverbound_read_match_contents + #s_read_match_contents _ => return Err(Box::new(crate::read::ReadPacketError::UnknownPacketId { state_name: #state_name_litstr.to_string(), id })), }) } @@ -360,16 +352,16 @@ pub fn declare_state_packets(input: TokenStream) -> TokenStream { contents.extend(quote! { #[allow(unreachable_code)] - impl crate::packets::ProtocolPacket for #clientbound_state_name { + impl crate::packets::ProtocolPacket for #c_state_name { fn id(&self) -> u32 { match self { - #clientbound_id_match_contents + #c_id_match_contents } } fn write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { match self { - #clientbound_write_match_contents + #c_write_match_contents } } @@ -377,12 +369,12 @@ pub fn declare_state_packets(input: TokenStream) -> TokenStream { fn read( id: u32, buf: &mut std::io::Cursor<&[u8]>, - ) -> Result<#clientbound_state_name, Box> + ) -> Result<#c_state_name, Box> where Self: Sized, { Ok(match id { - #clientbound_read_match_contents + #c_read_match_contents _ => return Err(Box::new(crate::read::ReadPacketError::UnknownPacketId { state_name: #state_name_litstr.to_string(), id })), }) } @@ -400,8 +392,5 @@ fn variant_name_from(name: &syn::Ident) -> syn::Ident { } else if variant_name.starts_with("Serverbound") { variant_name = variant_name["Serverbound".len()..].to_string(); } - if variant_name.ends_with("Packet") { - variant_name = variant_name[..variant_name.len() - "Packet".len()].to_string(); - } syn::Ident::new(&variant_name, name.span()) } diff --git a/azalea-protocol/examples/handshake_proxy.rs b/azalea-protocol/examples/handshake_proxy.rs index 8e675c588..aa998f268 100644 --- a/azalea-protocol/examples/handshake_proxy.rs +++ b/azalea-protocol/examples/handshake_proxy.rs @@ -6,16 +6,14 @@ use std::error::Error; use azalea_protocol::{ connect::Connection, packets::{ - handshaking::{ - client_intention_packet::ClientIntentionPacket, ClientboundHandshakePacket, + handshake::{ + client_intention::ClientIntention, ClientboundHandshakePacket, ServerboundHandshakePacket, }, - login::{serverbound_hello_packet::ServerboundHelloPacket, ServerboundLoginPacket}, + login::{s_hello::ServerboundHello, ServerboundLoginPacket}, status::{ - clientbound_pong_response_packet::ClientboundPongResponsePacket, - clientbound_status_response_packet::{ - ClientboundStatusResponsePacket, Players, Version, - }, + c_pong_response::ClientboundPongResponse, + c_status_response::{ClientboundStatusResponse, Players, Version}, ServerboundStatusPacket, }, ClientIntention, PROTOCOL_VERSION, @@ -103,7 +101,7 @@ async fn handle_connection(stream: TcpStream) -> anyhow::Result<()> { Ok(p) => match p { ServerboundStatusPacket::StatusRequest(_) => { conn.write( - ClientboundStatusResponsePacket { + ClientboundStatusResponse { description: PROXY_DESC.into(), favicon: PROXY_FAVICON.clone(), players: PROXY_PLAYERS.clone(), @@ -115,7 +113,7 @@ async fn handle_connection(stream: TcpStream) -> anyhow::Result<()> { .await?; } ServerboundStatusPacket::PingRequest(p) => { - conn.write(ClientboundPongResponsePacket { time: p.time }.get()) + conn.write(ClientboundPongResponse { time: p.time }.get()) .await?; break; } @@ -180,8 +178,8 @@ async fn handle_connection(stream: TcpStream) -> anyhow::Result<()> { async fn transfer( mut inbound: TcpStream, - intent: ClientIntentionPacket, - hello: ServerboundHelloPacket, + intent: ClientIntention, + hello: ServerboundHello, ) -> Result<(), Box> { let outbound = TcpStream::connect(PROXY_ADDR).await?; let name = hello.name.clone(); diff --git a/azalea-protocol/src/packets/configuration/serverbound_client_information_packet.rs b/azalea-protocol/src/common.rs similarity index 69% rename from azalea-protocol/src/packets/configuration/serverbound_client_information_packet.rs rename to azalea-protocol/src/common.rs index b5fd6a355..a63844c96 100644 --- a/azalea-protocol/src/packets/configuration/serverbound_client_information_packet.rs +++ b/azalea-protocol/src/common.rs @@ -1,13 +1,9 @@ +//! Some serializable data types that are used by several packets. + use azalea_buf::{McBuf, McBufReadable, McBufWritable}; use azalea_core::bitset::FixedBitSet; -use azalea_protocol_macros::ServerboundConfigurationPacket; use bevy_ecs::component::Component; -#[derive(Clone, Debug, McBuf, ServerboundConfigurationPacket, PartialEq, Eq)] -pub struct ServerboundClientInformationPacket { - pub information: ClientInformation, -} - /// A component that contains some of the "settings" for this client that are /// sent to the server, such as render distance. This is only present on local /// players. @@ -143,51 +139,3 @@ impl McBufWritable for ModelCustomization { set.write_into(buf) } } - -#[cfg(test)] -mod tests { - use std::io::Cursor; - - use super::*; - - #[test] - fn test_client_information_packet() { - { - let data = ClientInformation::default(); - let mut buf = Vec::new(); - data.write_into(&mut buf).unwrap(); - let mut data_cursor: Cursor<&[u8]> = Cursor::new(&buf); - - let read_data = ClientInformation::read_from(&mut data_cursor).unwrap(); - assert_eq!(read_data, data); - } - - { - let data = ClientInformation { - language: "en_gb".to_string(), - view_distance: 24, - chat_visibility: ChatVisibility::Hidden, - chat_colors: false, - model_customization: ModelCustomization { - cape: false, - jacket: false, - left_sleeve: true, - right_sleeve: false, - left_pants: true, - right_pants: false, - hat: true, - }, - 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(); - let mut data_cursor: Cursor<&[u8]> = Cursor::new(&buf); - - let read_data = ClientInformation::read_from(&mut data_cursor).unwrap(); - assert_eq!(read_data, data); - } - } -} diff --git a/azalea-protocol/src/connect.rs b/azalea-protocol/src/connect.rs index 0a449bfd7..e041a0326 100755 --- a/azalea-protocol/src/connect.rs +++ b/azalea-protocol/src/connect.rs @@ -16,12 +16,10 @@ use tokio::net::TcpStream; use tracing::{error, info}; use uuid::Uuid; -use crate::packets::configuration::{ - ClientboundConfigurationPacket, ServerboundConfigurationPacket, -}; +use crate::packets::config::{ClientboundConfigPacket, ServerboundConfigPacket}; use crate::packets::game::{ClientboundGamePacket, ServerboundGamePacket}; -use crate::packets::handshaking::{ClientboundHandshakePacket, ServerboundHandshakePacket}; -use crate::packets::login::clientbound_hello_packet::ClientboundHelloPacket; +use crate::packets::handshake::{ClientboundHandshakePacket, ServerboundHandshakePacket}; +use crate::packets::login::c_hello::ClientboundHello; use crate::packets::login::{ClientboundLoginPacket, ServerboundLoginPacket}; use crate::packets::status::{ClientboundStatusPacket, ServerboundStatusPacket}; use crate::packets::ProtocolPacket; @@ -66,10 +64,10 @@ pub struct WriteConnection { /// ClientIntention, PROTOCOL_VERSION, /// login::{ /// ClientboundLoginPacket, -/// serverbound_hello_packet::ServerboundHelloPacket, -/// serverbound_key_packet::ServerboundKeyPacket +/// s_hello::ServerboundHello, +/// s_key::ServerboundKeyPacket /// }, -/// handshaking::client_intention_packet::ClientIntentionPacket +/// handshaking::client_intention::ClientIntention /// } /// }; /// @@ -80,7 +78,7 @@ pub struct WriteConnection { /// /// // handshake /// conn.write( -/// ClientIntentionPacket { +/// ClientIntention { /// protocol_version: PROTOCOL_VERSION, /// hostname: resolved_address.ip().to_string(), /// port: resolved_address.port(), @@ -94,7 +92,7 @@ pub struct WriteConnection { /// /// // login /// conn.write( -/// ServerboundHelloPacket { +/// ServerboundHello { /// name: "bot".to_string(), /// profile_id: uuid::Uuid::nil(), /// } @@ -368,9 +366,7 @@ impl Connection { /// Change our state from login to configuration. This is the state where /// the server sends us the registries and resource pack and stuff. #[must_use] - pub fn configuration( - self, - ) -> Connection { + pub fn configuration(self) -> Connection { Connection::from(self) } @@ -385,7 +381,7 @@ impl Connection { /// use azalea_protocol::connect::Connection; /// use azalea_protocol::packets::login::{ /// ClientboundLoginPacket, - /// serverbound_key_packet::ServerboundKeyPacket + /// s_key::ServerboundKeyPacket /// }; /// use uuid::Uuid; /// # use azalea_protocol::ServerAddress; @@ -432,7 +428,7 @@ impl Connection { access_token: &str, uuid: &Uuid, private_key: [u8; 16], - packet: &ClientboundHelloPacket, + packet: &ClientboundHello, ) -> Result<(), ClientSessionServerError> { azalea_auth::sessionserver::join( access_token, @@ -506,14 +502,12 @@ impl Connection { /// Change our state back to configuration. #[must_use] - pub fn configuration( - self, - ) -> Connection { + pub fn configuration(self) -> Connection { Connection::from(self) } } -impl Connection { +impl Connection { /// Change our state from configuration to game. This is the state that's /// used when the client is actually in the world. #[must_use] @@ -522,7 +516,7 @@ impl Connection } } -impl Connection { +impl Connection { /// Change our state from configuration to game. This is the state that's /// used when the client is actually in the world. #[must_use] @@ -534,9 +528,7 @@ impl Connection impl Connection { /// Change our state back to configuration. #[must_use] - pub fn configuration( - self, - ) -> Connection { + pub fn configuration(self) -> Connection { Connection::from(self) } } diff --git a/azalea-protocol/src/lib.rs b/azalea-protocol/src/lib.rs index 1bbb80d40..33c12ff17 100644 --- a/azalea-protocol/src/lib.rs +++ b/azalea-protocol/src/lib.rs @@ -14,6 +14,7 @@ use std::{fmt::Display, net::SocketAddr, str::FromStr}; +pub mod common; #[cfg(feature = "connecting")] pub mod connect; #[cfg(feature = "packets")] @@ -108,8 +109,8 @@ mod tests { use crate::{ packets::{ - game::serverbound_chat_packet::{LastSeenMessagesUpdate, ServerboundChatPacket}, - login::{serverbound_hello_packet::ServerboundHelloPacket, ServerboundLoginPacket}, + game::s_chat::{LastSeenMessagesUpdate, ServerboundChat}, + login::{s_hello::ServerboundHello, ServerboundLoginPacket}, }, read::{compression_decoder, read_packet}, write::{compression_encoder, serialize_packet, write_packet}, @@ -117,7 +118,7 @@ mod tests { #[tokio::test] async fn test_hello_packet() { - let packet = ServerboundHelloPacket { + let packet = ServerboundHello { name: "test".to_string(), profile_id: Uuid::nil(), } @@ -129,19 +130,15 @@ mod tests { let mut stream = Cursor::new(stream); - let _ = read_packet::( - &mut stream, - &mut BytesMut::new(), - None, - &mut None, - ) - .await - .unwrap(); + let _ = + read::(&mut stream, &mut BytesMut::new(), None, &mut None) + .await + .unwrap(); } #[tokio::test] async fn test_double_hello_packet() { - let packet = ServerboundHelloPacket { + let packet = ServerboundHello { name: "test".to_string(), profile_id: Uuid::nil(), } @@ -157,10 +154,10 @@ mod tests { let mut buffer = BytesMut::new(); - let _ = read_packet::(&mut stream, &mut buffer, None, &mut None) + let _ = read::(&mut stream, &mut buffer, None, &mut None) .await .unwrap(); - let _ = read_packet::(&mut stream, &mut buffer, None, &mut None) + let _ = read::(&mut stream, &mut buffer, None, &mut None) .await .unwrap(); } @@ -170,7 +167,7 @@ mod tests { let compression_threshold = 256; let buf = serialize_packet( - &ServerboundChatPacket { + &ServerboundChat { message: "a".repeat(256), timestamp: 0, salt: 0, diff --git a/azalea-protocol/src/packets/config/c_cookie_request.rs b/azalea-protocol/src/packets/config/c_cookie_request.rs new file mode 100644 index 000000000..d9f0a426f --- /dev/null +++ b/azalea-protocol/src/packets/config/c_cookie_request.rs @@ -0,0 +1,8 @@ +use azalea_buf::McBuf; +use azalea_core::resource_location::ResourceLocation; +use azalea_protocol_macros::ClientboundConfigPacket; + +#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +pub struct ClientboundCookieRequest { + pub key: ResourceLocation, +} diff --git a/azalea-protocol/src/packets/configuration/serverbound_custom_payload_packet.rs b/azalea-protocol/src/packets/config/c_custom_payload.rs similarity index 52% rename from azalea-protocol/src/packets/configuration/serverbound_custom_payload_packet.rs rename to azalea-protocol/src/packets/config/c_custom_payload.rs index 48c977b17..c00f22c6f 100644 --- a/azalea-protocol/src/packets/configuration/serverbound_custom_payload_packet.rs +++ b/azalea-protocol/src/packets/config/c_custom_payload.rs @@ -1,10 +1,10 @@ use azalea_buf::McBuf; use azalea_buf::UnsizedByteArray; use azalea_core::resource_location::ResourceLocation; -use azalea_protocol_macros::ServerboundConfigurationPacket; +use azalea_protocol_macros::ClientboundConfigPacket; -#[derive(Clone, Debug, McBuf, ServerboundConfigurationPacket)] -pub struct ServerboundCustomPayloadPacket { +#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +pub struct ClientboundCustomPayload { pub identifier: ResourceLocation, pub data: UnsizedByteArray, } diff --git a/azalea-protocol/src/packets/config/c_disconnect.rs b/azalea-protocol/src/packets/config/c_disconnect.rs new file mode 100644 index 000000000..3dec97f24 --- /dev/null +++ b/azalea-protocol/src/packets/config/c_disconnect.rs @@ -0,0 +1,8 @@ +use azalea_buf::McBuf; +use azalea_chat::FormattedText; +use azalea_protocol_macros::ClientboundConfigPacket; + +#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +pub struct ClientboundDisconnect { + pub reason: FormattedText, +} diff --git a/azalea-protocol/src/packets/config/c_finish_configuration.rs b/azalea-protocol/src/packets/config/c_finish_configuration.rs new file mode 100644 index 000000000..1c904bfcc --- /dev/null +++ b/azalea-protocol/src/packets/config/c_finish_configuration.rs @@ -0,0 +1,5 @@ +use azalea_buf::McBuf; +use azalea_protocol_macros::ClientboundConfigPacket; + +#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +pub struct ClientboundFinishConfiguration {} diff --git a/azalea-protocol/src/packets/config/c_keep_alive.rs b/azalea-protocol/src/packets/config/c_keep_alive.rs new file mode 100644 index 000000000..93ea610fc --- /dev/null +++ b/azalea-protocol/src/packets/config/c_keep_alive.rs @@ -0,0 +1,7 @@ +use azalea_buf::McBuf; +use azalea_protocol_macros::ClientboundConfigPacket; + +#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +pub struct ClientboundKeepAlive { + pub id: u64, +} diff --git a/azalea-protocol/src/packets/config/c_ping.rs b/azalea-protocol/src/packets/config/c_ping.rs new file mode 100644 index 000000000..29067db32 --- /dev/null +++ b/azalea-protocol/src/packets/config/c_ping.rs @@ -0,0 +1,7 @@ +use azalea_buf::McBuf; +use azalea_protocol_macros::ClientboundConfigPacket; + +#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +pub struct ClientboundPing { + pub id: u32, +} diff --git a/azalea-protocol/src/packets/configuration/clientbound_registry_data_packet.rs b/azalea-protocol/src/packets/config/c_registry_data.rs similarity index 60% rename from azalea-protocol/src/packets/configuration/clientbound_registry_data_packet.rs rename to azalea-protocol/src/packets/config/c_registry_data.rs index 8bada6cad..14ae09fb6 100644 --- a/azalea-protocol/src/packets/configuration/clientbound_registry_data_packet.rs +++ b/azalea-protocol/src/packets/config/c_registry_data.rs @@ -2,11 +2,11 @@ use std::collections::HashMap; use azalea_buf::McBuf; use azalea_core::resource_location::ResourceLocation; -use azalea_protocol_macros::ClientboundConfigurationPacket; +use azalea_protocol_macros::ClientboundConfigPacket; use simdnbt::owned::NbtCompound; -#[derive(Clone, Debug, McBuf, ClientboundConfigurationPacket)] -pub struct ClientboundRegistryDataPacket { +#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +pub struct ClientboundRegistryData { pub registry_id: ResourceLocation, pub entries: HashMap>, } diff --git a/azalea-protocol/src/packets/config/c_reset_chat.rs b/azalea-protocol/src/packets/config/c_reset_chat.rs new file mode 100644 index 000000000..7525d925b --- /dev/null +++ b/azalea-protocol/src/packets/config/c_reset_chat.rs @@ -0,0 +1,5 @@ +use azalea_buf::McBuf; +use azalea_protocol_macros::ClientboundConfigPacket; + +#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +pub struct ClientboundResetChat; diff --git a/azalea-protocol/src/packets/config/c_resource_pack.rs b/azalea-protocol/src/packets/config/c_resource_pack.rs new file mode 100644 index 000000000..50b2fb32d --- /dev/null +++ b/azalea-protocol/src/packets/config/c_resource_pack.rs @@ -0,0 +1,11 @@ +use azalea_buf::McBuf; +use azalea_chat::FormattedText; +use azalea_protocol_macros::ClientboundConfigPacket; + +#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +pub struct ClientboundResourcePack { + pub url: String, + pub hash: String, + pub required: bool, + pub prompt: Option, +} diff --git a/azalea-protocol/src/packets/config/c_resource_pack_pop.rs b/azalea-protocol/src/packets/config/c_resource_pack_pop.rs new file mode 100644 index 000000000..042ba8ff6 --- /dev/null +++ b/azalea-protocol/src/packets/config/c_resource_pack_pop.rs @@ -0,0 +1,8 @@ +use azalea_buf::McBuf; +use azalea_protocol_macros::ClientboundConfigPacket; +use uuid::Uuid; + +#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +pub struct ClientboundResourcePackPop { + pub id: Option, +} diff --git a/azalea-protocol/src/packets/configuration/clientbound_resource_pack_push_packet.rs b/azalea-protocol/src/packets/config/c_resource_pack_push.rs similarity index 53% rename from azalea-protocol/src/packets/configuration/clientbound_resource_pack_push_packet.rs rename to azalea-protocol/src/packets/config/c_resource_pack_push.rs index 798f5f98f..677f8cef3 100644 --- a/azalea-protocol/src/packets/configuration/clientbound_resource_pack_push_packet.rs +++ b/azalea-protocol/src/packets/config/c_resource_pack_push.rs @@ -1,10 +1,10 @@ use azalea_buf::McBuf; use azalea_chat::FormattedText; -use azalea_protocol_macros::ClientboundConfigurationPacket; +use azalea_protocol_macros::ClientboundConfigPacket; use uuid::Uuid; -#[derive(Clone, Debug, McBuf, ClientboundConfigurationPacket)] -pub struct ClientboundResourcePackPushPacket { +#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +pub struct ClientboundResourcePackPush { pub id: Uuid, pub url: String, pub hash: String, diff --git a/azalea-protocol/src/packets/config/c_select_known_packs.rs b/azalea-protocol/src/packets/config/c_select_known_packs.rs new file mode 100644 index 000000000..ac17fea3b --- /dev/null +++ b/azalea-protocol/src/packets/config/c_select_known_packs.rs @@ -0,0 +1,9 @@ +use azalea_buf::McBuf; +use azalea_protocol_macros::ClientboundConfigPacket; + +use super::s_select_known_packs::KnownPack; + +#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +pub struct ClientboundSelectKnownPacks { + pub known_packs: Vec, +} diff --git a/azalea-protocol/src/packets/config/c_store_cookie.rs b/azalea-protocol/src/packets/config/c_store_cookie.rs new file mode 100644 index 000000000..01f8bf895 --- /dev/null +++ b/azalea-protocol/src/packets/config/c_store_cookie.rs @@ -0,0 +1,9 @@ +use azalea_buf::McBuf; +use azalea_core::resource_location::ResourceLocation; +use azalea_protocol_macros::ClientboundConfigPacket; + +#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +pub struct ClientboundStoreCookie { + pub key: ResourceLocation, + pub payload: Vec, +} diff --git a/azalea-protocol/src/packets/config/c_transfer.rs b/azalea-protocol/src/packets/config/c_transfer.rs new file mode 100644 index 000000000..3d92d5cd6 --- /dev/null +++ b/azalea-protocol/src/packets/config/c_transfer.rs @@ -0,0 +1,9 @@ +use azalea_buf::McBuf; +use azalea_protocol_macros::ClientboundConfigPacket; + +#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +pub struct ClientboundTransfer { + pub host: String, + #[var] + pub port: u32, +} diff --git a/azalea-protocol/src/packets/config/c_update_enabled_features.rs b/azalea-protocol/src/packets/config/c_update_enabled_features.rs new file mode 100644 index 000000000..4b0748f95 --- /dev/null +++ b/azalea-protocol/src/packets/config/c_update_enabled_features.rs @@ -0,0 +1,8 @@ +use azalea_buf::McBuf; +use azalea_core::resource_location::ResourceLocation; +use azalea_protocol_macros::ClientboundConfigPacket; + +#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +pub struct ClientboundUpdateEnabledFeatures { + pub features: Vec, +} diff --git a/azalea-protocol/src/packets/configuration/clientbound_update_tags_packet.rs b/azalea-protocol/src/packets/config/c_update_tags.rs similarity index 92% rename from azalea-protocol/src/packets/configuration/clientbound_update_tags_packet.rs rename to azalea-protocol/src/packets/config/c_update_tags.rs index 10f66e23f..c8548007b 100644 --- a/azalea-protocol/src/packets/configuration/clientbound_update_tags_packet.rs +++ b/azalea-protocol/src/packets/config/c_update_tags.rs @@ -5,10 +5,10 @@ use std::{collections::HashMap, io::Write}; use azalea_buf::{BufReadError, McBuf, McBufVarReadable, McBufVarWritable}; use azalea_buf::{McBufReadable, McBufWritable}; use azalea_core::resource_location::ResourceLocation; -use azalea_protocol_macros::ClientboundConfigurationPacket; +use azalea_protocol_macros::ClientboundConfigPacket; -#[derive(Clone, Debug, McBuf, ClientboundConfigurationPacket)] -pub struct ClientboundUpdateTagsPacket { +#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +pub struct ClientboundUpdateTags { pub tags: TagMap, } diff --git a/azalea-protocol/src/packets/config/mod.rs b/azalea-protocol/src/packets/config/mod.rs new file mode 100755 index 000000000..7c1d0b152 --- /dev/null +++ b/azalea-protocol/src/packets/config/mod.rs @@ -0,0 +1,56 @@ +pub mod c_cookie_request; +pub mod c_custom_payload; +pub mod c_disconnect; +pub mod c_finish_configuration; +pub mod c_keep_alive; +pub mod c_ping; +pub mod c_registry_data; +pub mod c_reset_chat; +pub mod c_resource_pack_pop; +pub mod c_resource_pack_push; +pub mod c_select_known_packs; +pub mod c_store_cookie; +pub mod c_transfer; +pub mod c_update_enabled_features; +pub mod c_update_tags; +pub mod s_client_information; +pub mod s_cookie_response; +pub mod s_custom_payload; +pub mod s_finish_configuration; +pub mod s_keep_alive; +pub mod s_pong; +pub mod s_resource_pack; +pub mod s_select_known_packs; + +use azalea_protocol_macros::declare_state_packets; + +declare_state_packets!( + ConfigPacket, + Serverbound => { + 0x00: s_client_information::ServerboundClientInformation, + 0x01: s_cookie_response::ServerboundCookieResponse, + 0x02: s_custom_payload::ServerboundCustomPayload, + 0x03: s_finish_configuration::ServerboundFinishConfiguration, + 0x04: s_keep_alive::ServerboundKeepAlive, + 0x05: s_pong::ServerboundPong, + 0x06: s_resource_pack::ServerboundResourcePack, + 0x07: s_select_known_packs::ServerboundSelectKnownPacks, + }, + Clientbound => { + 0x00: c_cookie_request::ClientboundCookieRequest, + 0x01: c_custom_payload::ClientboundCustomPayload, + 0x02: c_disconnect::ClientboundDisconnect, + 0x03: c_finish_configuration::ClientboundFinishConfiguration, + 0x04: c_keep_alive::ClientboundKeepAlive, + 0x05: c_ping::ClientboundPing, + 0x06: c_reset_chat::ClientboundResetChat, + 0x07: c_registry_data::ClientboundRegistryData, + 0x08: c_resource_pack_pop::ClientboundResourcePackPop, + 0x09: c_resource_pack_push::ClientboundResourcePackPush, + 0x0a: c_store_cookie::ClientboundStoreCookie, + 0x0b: c_transfer::ClientboundTransfer, + 0x0c: c_update_enabled_features::ClientboundUpdateEnabledFeatures, + 0x0d: c_update_tags::ClientboundUpdateTags, + 0x0e: c_select_known_packs::ClientboundSelectKnownPacks, + } +); diff --git a/azalea-protocol/src/packets/config/s_client_information.rs b/azalea-protocol/src/packets/config/s_client_information.rs new file mode 100644 index 000000000..132207efb --- /dev/null +++ b/azalea-protocol/src/packets/config/s_client_information.rs @@ -0,0 +1,59 @@ +use azalea_buf::McBuf; +use azalea_protocol_macros::ServerboundConfigPacket; + +use crate::common::ClientInformation; + +#[derive(Clone, Debug, McBuf, ServerboundConfigPacket, PartialEq, Eq)] +pub struct ServerboundClientInformation { + pub information: ClientInformation, +} + +#[cfg(test)] +mod tests { + use std::io::Cursor; + + use azalea_buf::{McBufReadable, McBufWritable}; + + use super::*; + + #[test] + fn test_client_information_packet() { + { + let data = ClientInformation::default(); + let mut buf = Vec::new(); + data.write_into(&mut buf).unwrap(); + let mut data_cursor: Cursor<&[u8]> = Cursor::new(&buf); + + let read_data = ClientInformation::read_from(&mut data_cursor).unwrap(); + assert_eq!(read_data, data); + } + + { + let data = ClientInformation { + language: "en_gb".to_string(), + view_distance: 24, + chat_visibility: ChatVisibility::Hidden, + chat_colors: false, + model_customization: ModelCustomization { + cape: false, + jacket: false, + left_sleeve: true, + right_sleeve: false, + left_pants: true, + right_pants: false, + hat: true, + }, + 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(); + let mut data_cursor: Cursor<&[u8]> = Cursor::new(&buf); + + let read_data = ClientInformation::read_from(&mut data_cursor).unwrap(); + assert_eq!(read_data, data); + } + } +} diff --git a/azalea-protocol/src/packets/config/s_cookie_response.rs b/azalea-protocol/src/packets/config/s_cookie_response.rs new file mode 100644 index 000000000..8cde60fa4 --- /dev/null +++ b/azalea-protocol/src/packets/config/s_cookie_response.rs @@ -0,0 +1,9 @@ +use azalea_buf::McBuf; +use azalea_core::resource_location::ResourceLocation; +use azalea_protocol_macros::ServerboundConfigPacket; + +#[derive(Clone, Debug, McBuf, ServerboundConfigPacket)] +pub struct ServerboundCookieResponse { + pub key: ResourceLocation, + pub payload: Option>, +} diff --git a/azalea-protocol/src/packets/configuration/clientbound_custom_payload_packet.rs b/azalea-protocol/src/packets/config/s_custom_payload.rs similarity index 52% rename from azalea-protocol/src/packets/configuration/clientbound_custom_payload_packet.rs rename to azalea-protocol/src/packets/config/s_custom_payload.rs index 701a317c4..b331e5ddd 100644 --- a/azalea-protocol/src/packets/configuration/clientbound_custom_payload_packet.rs +++ b/azalea-protocol/src/packets/config/s_custom_payload.rs @@ -1,10 +1,10 @@ use azalea_buf::McBuf; use azalea_buf::UnsizedByteArray; use azalea_core::resource_location::ResourceLocation; -use azalea_protocol_macros::ClientboundConfigurationPacket; +use azalea_protocol_macros::ServerboundConfigPacket; -#[derive(Clone, Debug, McBuf, ClientboundConfigurationPacket)] -pub struct ClientboundCustomPayloadPacket { +#[derive(Clone, Debug, McBuf, ServerboundConfigPacket)] +pub struct ServerboundCustomPayload { pub identifier: ResourceLocation, pub data: UnsizedByteArray, } diff --git a/azalea-protocol/src/packets/config/s_finish_configuration.rs b/azalea-protocol/src/packets/config/s_finish_configuration.rs new file mode 100644 index 000000000..268f945f4 --- /dev/null +++ b/azalea-protocol/src/packets/config/s_finish_configuration.rs @@ -0,0 +1,5 @@ +use azalea_buf::McBuf; +use azalea_protocol_macros::ServerboundConfigPacket; + +#[derive(Clone, Debug, McBuf, ServerboundConfigPacket)] +pub struct ServerboundFinishConfiguration {} diff --git a/azalea-protocol/src/packets/config/s_keep_alive.rs b/azalea-protocol/src/packets/config/s_keep_alive.rs new file mode 100644 index 000000000..a916deef5 --- /dev/null +++ b/azalea-protocol/src/packets/config/s_keep_alive.rs @@ -0,0 +1,7 @@ +use azalea_buf::McBuf; +use azalea_protocol_macros::ServerboundConfigPacket; + +#[derive(Clone, Debug, McBuf, ServerboundConfigPacket)] +pub struct ServerboundKeepAlive { + pub id: u64, +} diff --git a/azalea-protocol/src/packets/config/s_pong.rs b/azalea-protocol/src/packets/config/s_pong.rs new file mode 100644 index 000000000..c2d041da6 --- /dev/null +++ b/azalea-protocol/src/packets/config/s_pong.rs @@ -0,0 +1,7 @@ +use azalea_buf::McBuf; +use azalea_protocol_macros::ServerboundConfigPacket; + +#[derive(Clone, Debug, McBuf, ServerboundConfigPacket)] +pub struct ServerboundPong { + pub id: u32, +} diff --git a/azalea-protocol/src/packets/configuration/serverbound_resource_pack_packet.rs b/azalea-protocol/src/packets/config/s_resource_pack.rs similarity index 63% rename from azalea-protocol/src/packets/configuration/serverbound_resource_pack_packet.rs rename to azalea-protocol/src/packets/config/s_resource_pack.rs index 6f35525e6..503606aa6 100644 --- a/azalea-protocol/src/packets/configuration/serverbound_resource_pack_packet.rs +++ b/azalea-protocol/src/packets/config/s_resource_pack.rs @@ -1,9 +1,9 @@ use azalea_buf::McBuf; -use azalea_protocol_macros::ServerboundConfigurationPacket; +use azalea_protocol_macros::ServerboundConfigPacket; use uuid::Uuid; -#[derive(Clone, Debug, McBuf, ServerboundConfigurationPacket)] -pub struct ServerboundResourcePackPacket { +#[derive(Clone, Debug, McBuf, ServerboundConfigPacket)] +pub struct ServerboundResourcePack { pub id: Uuid, pub action: Action, } diff --git a/azalea-protocol/src/packets/configuration/serverbound_select_known_packs_packet.rs b/azalea-protocol/src/packets/config/s_select_known_packs.rs similarity index 53% rename from azalea-protocol/src/packets/configuration/serverbound_select_known_packs_packet.rs rename to azalea-protocol/src/packets/config/s_select_known_packs.rs index fe379a176..5d3668d9a 100644 --- a/azalea-protocol/src/packets/configuration/serverbound_select_known_packs_packet.rs +++ b/azalea-protocol/src/packets/config/s_select_known_packs.rs @@ -1,8 +1,8 @@ use azalea_buf::McBuf; -use azalea_protocol_macros::ServerboundConfigurationPacket; +use azalea_protocol_macros::ServerboundConfigPacket; -#[derive(Clone, Debug, McBuf, ServerboundConfigurationPacket)] -pub struct ServerboundSelectKnownPacksPacket { +#[derive(Clone, Debug, McBuf, ServerboundConfigPacket)] +pub struct ServerboundSelectKnownPacks { pub known_packs: Vec, } diff --git a/azalea-protocol/src/packets/configuration/clientbound_cookie_request_packet.rs b/azalea-protocol/src/packets/configuration/clientbound_cookie_request_packet.rs deleted file mode 100644 index 38566564a..000000000 --- a/azalea-protocol/src/packets/configuration/clientbound_cookie_request_packet.rs +++ /dev/null @@ -1,8 +0,0 @@ -use azalea_buf::McBuf; -use azalea_core::resource_location::ResourceLocation; -use azalea_protocol_macros::ClientboundConfigurationPacket; - -#[derive(Clone, Debug, McBuf, ClientboundConfigurationPacket)] -pub struct ClientboundCookieRequestPacket { - pub key: ResourceLocation, -} diff --git a/azalea-protocol/src/packets/configuration/clientbound_disconnect_packet.rs b/azalea-protocol/src/packets/configuration/clientbound_disconnect_packet.rs deleted file mode 100644 index cd0ed42ab..000000000 --- a/azalea-protocol/src/packets/configuration/clientbound_disconnect_packet.rs +++ /dev/null @@ -1,8 +0,0 @@ -use azalea_buf::McBuf; -use azalea_chat::FormattedText; -use azalea_protocol_macros::ClientboundConfigurationPacket; - -#[derive(Clone, Debug, McBuf, ClientboundConfigurationPacket)] -pub struct ClientboundDisconnectPacket { - pub reason: FormattedText, -} diff --git a/azalea-protocol/src/packets/configuration/clientbound_finish_configuration_packet.rs b/azalea-protocol/src/packets/configuration/clientbound_finish_configuration_packet.rs deleted file mode 100644 index 812511088..000000000 --- a/azalea-protocol/src/packets/configuration/clientbound_finish_configuration_packet.rs +++ /dev/null @@ -1,5 +0,0 @@ -use azalea_buf::McBuf; -use azalea_protocol_macros::ClientboundConfigurationPacket; - -#[derive(Clone, Debug, McBuf, ClientboundConfigurationPacket)] -pub struct ClientboundFinishConfigurationPacket {} diff --git a/azalea-protocol/src/packets/configuration/clientbound_keep_alive_packet.rs b/azalea-protocol/src/packets/configuration/clientbound_keep_alive_packet.rs deleted file mode 100644 index 83c256105..000000000 --- a/azalea-protocol/src/packets/configuration/clientbound_keep_alive_packet.rs +++ /dev/null @@ -1,7 +0,0 @@ -use azalea_buf::McBuf; -use azalea_protocol_macros::ClientboundConfigurationPacket; - -#[derive(Clone, Debug, McBuf, ClientboundConfigurationPacket)] -pub struct ClientboundKeepAlivePacket { - pub id: u64, -} diff --git a/azalea-protocol/src/packets/configuration/clientbound_ping_packet.rs b/azalea-protocol/src/packets/configuration/clientbound_ping_packet.rs deleted file mode 100644 index 968dcaed9..000000000 --- a/azalea-protocol/src/packets/configuration/clientbound_ping_packet.rs +++ /dev/null @@ -1,7 +0,0 @@ -use azalea_buf::McBuf; -use azalea_protocol_macros::ClientboundConfigurationPacket; - -#[derive(Clone, Debug, McBuf, ClientboundConfigurationPacket)] -pub struct ClientboundPingPacket { - pub id: u32, -} diff --git a/azalea-protocol/src/packets/configuration/clientbound_reset_chat_packet.rs b/azalea-protocol/src/packets/configuration/clientbound_reset_chat_packet.rs deleted file mode 100644 index 75afa8c12..000000000 --- a/azalea-protocol/src/packets/configuration/clientbound_reset_chat_packet.rs +++ /dev/null @@ -1,5 +0,0 @@ -use azalea_buf::McBuf; -use azalea_protocol_macros::ClientboundConfigurationPacket; - -#[derive(Clone, Debug, McBuf, ClientboundConfigurationPacket)] -pub struct ClientboundResetChatPacket; diff --git a/azalea-protocol/src/packets/configuration/clientbound_resource_pack_packet.rs b/azalea-protocol/src/packets/configuration/clientbound_resource_pack_packet.rs deleted file mode 100644 index b05210b54..000000000 --- a/azalea-protocol/src/packets/configuration/clientbound_resource_pack_packet.rs +++ /dev/null @@ -1,11 +0,0 @@ -use azalea_buf::McBuf; -use azalea_chat::FormattedText; -use azalea_protocol_macros::ClientboundConfigurationPacket; - -#[derive(Clone, Debug, McBuf, ClientboundConfigurationPacket)] -pub struct ClientboundResourcePackPacket { - pub url: String, - pub hash: String, - pub required: bool, - pub prompt: Option, -} diff --git a/azalea-protocol/src/packets/configuration/clientbound_resource_pack_pop_packet.rs b/azalea-protocol/src/packets/configuration/clientbound_resource_pack_pop_packet.rs deleted file mode 100644 index 6533b589b..000000000 --- a/azalea-protocol/src/packets/configuration/clientbound_resource_pack_pop_packet.rs +++ /dev/null @@ -1,8 +0,0 @@ -use azalea_buf::McBuf; -use azalea_protocol_macros::ClientboundConfigurationPacket; -use uuid::Uuid; - -#[derive(Clone, Debug, McBuf, ClientboundConfigurationPacket)] -pub struct ClientboundResourcePackPopPacket { - pub id: Option, -} diff --git a/azalea-protocol/src/packets/configuration/clientbound_select_known_packs_packet.rs b/azalea-protocol/src/packets/configuration/clientbound_select_known_packs_packet.rs deleted file mode 100644 index 0f22b0547..000000000 --- a/azalea-protocol/src/packets/configuration/clientbound_select_known_packs_packet.rs +++ /dev/null @@ -1,9 +0,0 @@ -use azalea_buf::McBuf; -use azalea_protocol_macros::ClientboundConfigurationPacket; - -use super::serverbound_select_known_packs_packet::KnownPack; - -#[derive(Clone, Debug, McBuf, ClientboundConfigurationPacket)] -pub struct ClientboundSelectKnownPacksPacket { - pub known_packs: Vec, -} diff --git a/azalea-protocol/src/packets/configuration/clientbound_store_cookie_packet.rs b/azalea-protocol/src/packets/configuration/clientbound_store_cookie_packet.rs deleted file mode 100644 index fda166896..000000000 --- a/azalea-protocol/src/packets/configuration/clientbound_store_cookie_packet.rs +++ /dev/null @@ -1,9 +0,0 @@ -use azalea_buf::McBuf; -use azalea_core::resource_location::ResourceLocation; -use azalea_protocol_macros::ClientboundConfigurationPacket; - -#[derive(Clone, Debug, McBuf, ClientboundConfigurationPacket)] -pub struct ClientboundStoreCookiePacket { - pub key: ResourceLocation, - pub payload: Vec, -} diff --git a/azalea-protocol/src/packets/configuration/clientbound_transfer_packet.rs b/azalea-protocol/src/packets/configuration/clientbound_transfer_packet.rs deleted file mode 100644 index 88f0054a8..000000000 --- a/azalea-protocol/src/packets/configuration/clientbound_transfer_packet.rs +++ /dev/null @@ -1,9 +0,0 @@ -use azalea_buf::McBuf; -use azalea_protocol_macros::ClientboundConfigurationPacket; - -#[derive(Clone, Debug, McBuf, ClientboundConfigurationPacket)] -pub struct ClientboundTransferPacket { - pub host: String, - #[var] - pub port: u32, -} diff --git a/azalea-protocol/src/packets/configuration/clientbound_update_enabled_features_packet.rs b/azalea-protocol/src/packets/configuration/clientbound_update_enabled_features_packet.rs deleted file mode 100644 index ec37c8f30..000000000 --- a/azalea-protocol/src/packets/configuration/clientbound_update_enabled_features_packet.rs +++ /dev/null @@ -1,8 +0,0 @@ -use azalea_buf::McBuf; -use azalea_core::resource_location::ResourceLocation; -use azalea_protocol_macros::ClientboundConfigurationPacket; - -#[derive(Clone, Debug, McBuf, ClientboundConfigurationPacket)] -pub struct ClientboundUpdateEnabledFeaturesPacket { - pub features: Vec, -} diff --git a/azalea-protocol/src/packets/configuration/mod.rs b/azalea-protocol/src/packets/configuration/mod.rs deleted file mode 100755 index 757c496c2..000000000 --- a/azalea-protocol/src/packets/configuration/mod.rs +++ /dev/null @@ -1,56 +0,0 @@ -pub mod clientbound_cookie_request_packet; -pub mod clientbound_custom_payload_packet; -pub mod clientbound_disconnect_packet; -pub mod clientbound_finish_configuration_packet; -pub mod clientbound_keep_alive_packet; -pub mod clientbound_ping_packet; -pub mod clientbound_registry_data_packet; -pub mod clientbound_reset_chat_packet; -pub mod clientbound_resource_pack_pop_packet; -pub mod clientbound_resource_pack_push_packet; -pub mod clientbound_select_known_packs_packet; -pub mod clientbound_store_cookie_packet; -pub mod clientbound_transfer_packet; -pub mod clientbound_update_enabled_features_packet; -pub mod clientbound_update_tags_packet; -pub mod serverbound_client_information_packet; -pub mod serverbound_cookie_response_packet; -pub mod serverbound_custom_payload_packet; -pub mod serverbound_finish_configuration_packet; -pub mod serverbound_keep_alive_packet; -pub mod serverbound_pong_packet; -pub mod serverbound_resource_pack_packet; -pub mod serverbound_select_known_packs_packet; - -use azalea_protocol_macros::declare_state_packets; - -declare_state_packets!( - ConfigurationPacket, - Serverbound => { - 0x00: serverbound_client_information_packet::ServerboundClientInformationPacket, - 0x01: serverbound_cookie_response_packet::ServerboundCookieResponsePacket, - 0x02: serverbound_custom_payload_packet::ServerboundCustomPayloadPacket, - 0x03: serverbound_finish_configuration_packet::ServerboundFinishConfigurationPacket, - 0x04: serverbound_keep_alive_packet::ServerboundKeepAlivePacket, - 0x05: serverbound_pong_packet::ServerboundPongPacket, - 0x06: serverbound_resource_pack_packet::ServerboundResourcePackPacket, - 0x07: serverbound_select_known_packs_packet::ServerboundSelectKnownPacksPacket, - }, - Clientbound => { - 0x00: clientbound_cookie_request_packet::ClientboundCookieRequestPacket, - 0x01: clientbound_custom_payload_packet::ClientboundCustomPayloadPacket, - 0x02: clientbound_disconnect_packet::ClientboundDisconnectPacket, - 0x03: clientbound_finish_configuration_packet::ClientboundFinishConfigurationPacket, - 0x04: clientbound_keep_alive_packet::ClientboundKeepAlivePacket, - 0x05: clientbound_ping_packet::ClientboundPingPacket, - 0x06: clientbound_reset_chat_packet::ClientboundResetChatPacket, - 0x07: clientbound_registry_data_packet::ClientboundRegistryDataPacket, - 0x08: clientbound_resource_pack_pop_packet::ClientboundResourcePackPopPacket, - 0x09: clientbound_resource_pack_push_packet::ClientboundResourcePackPushPacket, - 0x0a: clientbound_store_cookie_packet::ClientboundStoreCookiePacket, - 0x0b: clientbound_transfer_packet::ClientboundTransferPacket, - 0x0c: clientbound_update_enabled_features_packet::ClientboundUpdateEnabledFeaturesPacket, - 0x0d: clientbound_update_tags_packet::ClientboundUpdateTagsPacket, - 0x0e: clientbound_select_known_packs_packet::ClientboundSelectKnownPacksPacket, - } -); diff --git a/azalea-protocol/src/packets/configuration/serverbound_cookie_response_packet.rs b/azalea-protocol/src/packets/configuration/serverbound_cookie_response_packet.rs deleted file mode 100644 index 6c62c1c8b..000000000 --- a/azalea-protocol/src/packets/configuration/serverbound_cookie_response_packet.rs +++ /dev/null @@ -1,9 +0,0 @@ -use azalea_buf::McBuf; -use azalea_core::resource_location::ResourceLocation; -use azalea_protocol_macros::ServerboundConfigurationPacket; - -#[derive(Clone, Debug, McBuf, ServerboundConfigurationPacket)] -pub struct ServerboundCookieResponsePacket { - pub key: ResourceLocation, - pub payload: Option>, -} diff --git a/azalea-protocol/src/packets/configuration/serverbound_finish_configuration_packet.rs b/azalea-protocol/src/packets/configuration/serverbound_finish_configuration_packet.rs deleted file mode 100644 index 53e04182e..000000000 --- a/azalea-protocol/src/packets/configuration/serverbound_finish_configuration_packet.rs +++ /dev/null @@ -1,5 +0,0 @@ -use azalea_buf::McBuf; -use azalea_protocol_macros::ServerboundConfigurationPacket; - -#[derive(Clone, Debug, McBuf, ServerboundConfigurationPacket)] -pub struct ServerboundFinishConfigurationPacket {} diff --git a/azalea-protocol/src/packets/configuration/serverbound_keep_alive_packet.rs b/azalea-protocol/src/packets/configuration/serverbound_keep_alive_packet.rs deleted file mode 100644 index 4604df46b..000000000 --- a/azalea-protocol/src/packets/configuration/serverbound_keep_alive_packet.rs +++ /dev/null @@ -1,7 +0,0 @@ -use azalea_buf::McBuf; -use azalea_protocol_macros::ServerboundConfigurationPacket; - -#[derive(Clone, Debug, McBuf, ServerboundConfigurationPacket)] -pub struct ServerboundKeepAlivePacket { - pub id: u64, -} diff --git a/azalea-protocol/src/packets/configuration/serverbound_pong_packet.rs b/azalea-protocol/src/packets/configuration/serverbound_pong_packet.rs deleted file mode 100644 index 153e3feaf..000000000 --- a/azalea-protocol/src/packets/configuration/serverbound_pong_packet.rs +++ /dev/null @@ -1,7 +0,0 @@ -use azalea_buf::McBuf; -use azalea_protocol_macros::ServerboundConfigurationPacket; - -#[derive(Clone, Debug, McBuf, ServerboundConfigurationPacket)] -pub struct ServerboundPongPacket { - pub id: u32, -} diff --git a/azalea-protocol/src/packets/game/clientbound_add_entity_packet.rs b/azalea-protocol/src/packets/game/c_add_entity.rs similarity index 93% rename from azalea-protocol/src/packets/game/clientbound_add_entity_packet.rs rename to azalea-protocol/src/packets/game/c_add_entity.rs index 6b62df199..6ff5c9760 100755 --- a/azalea-protocol/src/packets/game/clientbound_add_entity_packet.rs +++ b/azalea-protocol/src/packets/game/c_add_entity.rs @@ -5,7 +5,7 @@ use azalea_protocol_macros::ClientboundGamePacket; use uuid::Uuid; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundAddEntityPacket { +pub struct ClientboundAddEntity { /// The id of the entity. #[var] pub id: u32, @@ -22,7 +22,7 @@ pub struct ClientboundAddEntityPacket { pub z_vel: i16, } -impl ClientboundAddEntityPacket { +impl ClientboundAddEntity { /// Make the entity into a bundle that can be inserted into the ECS. You /// must apply the metadata after inserting the bundle with /// [`Self::apply_metadata`]. diff --git a/azalea-protocol/src/packets/game/clientbound_add_experience_orb_packet.rs b/azalea-protocol/src/packets/game/c_add_experience_orb.rs similarity index 82% rename from azalea-protocol/src/packets/game/clientbound_add_experience_orb_packet.rs rename to azalea-protocol/src/packets/game/c_add_experience_orb.rs index 84edcae62..93d28cd08 100755 --- a/azalea-protocol/src/packets/game/clientbound_add_experience_orb_packet.rs +++ b/azalea-protocol/src/packets/game/c_add_experience_orb.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundAddExperienceOrbPacket { +pub struct ClientboundAddExperienceOrb { #[var] pub id: u32, pub x: f64, diff --git a/azalea-protocol/src/packets/game/clientbound_add_player_packet.rs b/azalea-protocol/src/packets/game/c_add_player.rs similarity index 91% rename from azalea-protocol/src/packets/game/clientbound_add_player_packet.rs rename to azalea-protocol/src/packets/game/c_add_player.rs index 45ab45840..68bc033ae 100755 --- a/azalea-protocol/src/packets/game/clientbound_add_player_packet.rs +++ b/azalea-protocol/src/packets/game/c_add_player.rs @@ -8,7 +8,7 @@ use uuid::Uuid; /// This packet is sent by the server when a player comes into visible range, /// not when a player joins. #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundAddPlayerPacket { +pub struct ClientboundAddPlayer { #[var] pub id: u32, pub uuid: Uuid, @@ -17,7 +17,7 @@ pub struct ClientboundAddPlayerPacket { pub y_rot: i8, } -impl ClientboundAddPlayerPacket { +impl ClientboundAddPlayer { pub fn as_player_bundle(&self, world_name: ResourceLocation) -> PlayerBundle { PlayerBundle { entity: EntityBundle::new(self.uuid, self.position, EntityKind::Player, world_name), diff --git a/azalea-protocol/src/packets/game/clientbound_animate_packet.rs b/azalea-protocol/src/packets/game/c_animate.rs similarity index 93% rename from azalea-protocol/src/packets/game/clientbound_animate_packet.rs rename to azalea-protocol/src/packets/game/c_animate.rs index 8c99b1b75..0c89aafaa 100755 --- a/azalea-protocol/src/packets/game/clientbound_animate_packet.rs +++ b/azalea-protocol/src/packets/game/c_animate.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundAnimatePacket { +pub struct ClientboundAnimate { #[var] pub id: u32, pub action: AnimationAction, diff --git a/azalea-protocol/src/packets/game/clientbound_award_stats_packet.rs b/azalea-protocol/src/packets/game/c_award_stats.rs similarity index 93% rename from azalea-protocol/src/packets/game/clientbound_award_stats_packet.rs rename to azalea-protocol/src/packets/game/c_award_stats.rs index 32e2c8aa1..2239ed9f1 100755 --- a/azalea-protocol/src/packets/game/clientbound_award_stats_packet.rs +++ b/azalea-protocol/src/packets/game/c_award_stats.rs @@ -4,7 +4,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundAwardStatsPacket { +pub struct ClientboundAwardStats { #[var] pub stats: HashMap, } diff --git a/azalea-protocol/src/packets/game/clientbound_block_changed_ack_packet.rs b/azalea-protocol/src/packets/game/c_block_changed_ack.rs similarity index 78% rename from azalea-protocol/src/packets/game/clientbound_block_changed_ack_packet.rs rename to azalea-protocol/src/packets/game/c_block_changed_ack.rs index e9e57c8d7..987885800 100755 --- a/azalea-protocol/src/packets/game/clientbound_block_changed_ack_packet.rs +++ b/azalea-protocol/src/packets/game/c_block_changed_ack.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundBlockChangedAckPacket { +pub struct ClientboundBlockChangedAck { #[var] pub sequence: i32, } diff --git a/azalea-protocol/src/packets/game/clientbound_block_destruction_packet.rs b/azalea-protocol/src/packets/game/c_block_destruction.rs similarity index 88% rename from azalea-protocol/src/packets/game/clientbound_block_destruction_packet.rs rename to azalea-protocol/src/packets/game/c_block_destruction.rs index 130c698e6..e702790e5 100755 --- a/azalea-protocol/src/packets/game/clientbound_block_destruction_packet.rs +++ b/azalea-protocol/src/packets/game/c_block_destruction.rs @@ -3,7 +3,7 @@ use azalea_core::position::BlockPos; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundBlockDestructionPacket { +pub struct ClientboundBlockDestruction { /// The ID of the entity breaking the block. #[var] pub id: u32, diff --git a/azalea-protocol/src/packets/game/clientbound_block_entity_data_packet.rs b/azalea-protocol/src/packets/game/c_block_entity_data.rs similarity index 86% rename from azalea-protocol/src/packets/game/clientbound_block_entity_data_packet.rs rename to azalea-protocol/src/packets/game/c_block_entity_data.rs index 3406a75fe..425ac2660 100755 --- a/azalea-protocol/src/packets/game/clientbound_block_entity_data_packet.rs +++ b/azalea-protocol/src/packets/game/c_block_entity_data.rs @@ -4,7 +4,7 @@ use azalea_protocol_macros::ClientboundGamePacket; use simdnbt::owned::Nbt; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundBlockEntityDataPacket { +pub struct ClientboundBlockEntityData { pub pos: BlockPos, pub block_entity_type: azalea_registry::BlockEntityKind, pub tag: Nbt, diff --git a/azalea-protocol/src/packets/game/clientbound_block_event_packet.rs b/azalea-protocol/src/packets/game/c_block_event.rs similarity index 87% rename from azalea-protocol/src/packets/game/clientbound_block_event_packet.rs rename to azalea-protocol/src/packets/game/c_block_event.rs index 86f57b973..c98661ef4 100755 --- a/azalea-protocol/src/packets/game/clientbound_block_event_packet.rs +++ b/azalea-protocol/src/packets/game/c_block_event.rs @@ -4,7 +4,7 @@ use azalea_protocol_macros::ClientboundGamePacket; use azalea_registry::Block; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundBlockEventPacket { +pub struct ClientboundBlockEvent { pub pos: BlockPos, pub action_id: u8, pub action_parameter: u8, diff --git a/azalea-protocol/src/packets/game/clientbound_block_update_packet.rs b/azalea-protocol/src/packets/game/c_block_update.rs similarity index 85% rename from azalea-protocol/src/packets/game/clientbound_block_update_packet.rs rename to azalea-protocol/src/packets/game/c_block_update.rs index c1869e740..369b8cc55 100755 --- a/azalea-protocol/src/packets/game/clientbound_block_update_packet.rs +++ b/azalea-protocol/src/packets/game/c_block_update.rs @@ -4,7 +4,7 @@ use azalea_core::position::BlockPos; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundBlockUpdatePacket { +pub struct ClientboundBlockUpdate { pub pos: BlockPos, pub block_state: BlockState, } diff --git a/azalea-protocol/src/packets/game/clientbound_boss_event_packet.rs b/azalea-protocol/src/packets/game/c_boss_event.rs similarity index 98% rename from azalea-protocol/src/packets/game/clientbound_boss_event_packet.rs rename to azalea-protocol/src/packets/game/c_boss_event.rs index 65240edf4..058c5f217 100755 --- a/azalea-protocol/src/packets/game/clientbound_boss_event_packet.rs +++ b/azalea-protocol/src/packets/game/c_boss_event.rs @@ -10,7 +10,7 @@ use azalea_protocol_macros::ClientboundGamePacket; use uuid::Uuid; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundBossEventPacket { +pub struct ClientboundBossEvent { pub id: Uuid, pub operation: Operation, } diff --git a/azalea-protocol/src/packets/game/clientbound_bundle_packet.rs b/azalea-protocol/src/packets/game/c_bundle.rs similarity index 77% rename from azalea-protocol/src/packets/game/clientbound_bundle_packet.rs rename to azalea-protocol/src/packets/game/c_bundle.rs index cad2eca3f..1e553ce4a 100644 --- a/azalea-protocol/src/packets/game/clientbound_bundle_packet.rs +++ b/azalea-protocol/src/packets/game/c_bundle.rs @@ -2,4 +2,4 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundBundlePacket {} +pub struct ClientboundBundle {} diff --git a/azalea-protocol/src/packets/game/clientbound_change_difficulty_packet.rs b/azalea-protocol/src/packets/game/c_change_difficulty.rs similarity index 82% rename from azalea-protocol/src/packets/game/clientbound_change_difficulty_packet.rs rename to azalea-protocol/src/packets/game/c_change_difficulty.rs index e7dafbeb6..9f8577728 100755 --- a/azalea-protocol/src/packets/game/clientbound_change_difficulty_packet.rs +++ b/azalea-protocol/src/packets/game/c_change_difficulty.rs @@ -3,7 +3,7 @@ use azalea_core::difficulty::Difficulty; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundChangeDifficultyPacket { +pub struct ClientboundChangeDifficulty { pub difficulty: Difficulty, pub locked: bool, } diff --git a/azalea-protocol/src/packets/game/clientbound_chat_preview_packet.rs b/azalea-protocol/src/packets/game/c_chat_preview.rs similarity index 84% rename from azalea-protocol/src/packets/game/clientbound_chat_preview_packet.rs rename to azalea-protocol/src/packets/game/c_chat_preview.rs index 40f282593..17a3e41e6 100755 --- a/azalea-protocol/src/packets/game/clientbound_chat_preview_packet.rs +++ b/azalea-protocol/src/packets/game/c_chat_preview.rs @@ -3,7 +3,7 @@ use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundChatPreviewPacket { +pub struct ClientboundChatPreview { pub query_id: i32, pub preview: Option, } diff --git a/azalea-protocol/src/packets/game/clientbound_chunk_batch_finished_packet.rs b/azalea-protocol/src/packets/game/c_chunk_batch_finished.rs similarity index 77% rename from azalea-protocol/src/packets/game/clientbound_chunk_batch_finished_packet.rs rename to azalea-protocol/src/packets/game/c_chunk_batch_finished.rs index 27bc2f252..9ea0e73e2 100644 --- a/azalea-protocol/src/packets/game/clientbound_chunk_batch_finished_packet.rs +++ b/azalea-protocol/src/packets/game/c_chunk_batch_finished.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundChunkBatchFinishedPacket { +pub struct ClientboundChunkBatchFinished { #[var] pub batch_size: u32, } diff --git a/azalea-protocol/src/packets/game/clientbound_chunk_batch_start_packet.rs b/azalea-protocol/src/packets/game/c_chunk_batch_start.rs similarity index 73% rename from azalea-protocol/src/packets/game/clientbound_chunk_batch_start_packet.rs rename to azalea-protocol/src/packets/game/c_chunk_batch_start.rs index 308ba8c97..b960abd9a 100644 --- a/azalea-protocol/src/packets/game/clientbound_chunk_batch_start_packet.rs +++ b/azalea-protocol/src/packets/game/c_chunk_batch_start.rs @@ -2,4 +2,4 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundChunkBatchStartPacket {} +pub struct ClientboundChunkBatchStart {} diff --git a/azalea-protocol/src/packets/game/clientbound_chunks_biomes_packet.rs b/azalea-protocol/src/packets/game/c_chunks_biomes.rs similarity index 88% rename from azalea-protocol/src/packets/game/clientbound_chunks_biomes_packet.rs rename to azalea-protocol/src/packets/game/c_chunks_biomes.rs index 7c8f21543..8b85a9a17 100644 --- a/azalea-protocol/src/packets/game/clientbound_chunks_biomes_packet.rs +++ b/azalea-protocol/src/packets/game/c_chunks_biomes.rs @@ -3,7 +3,7 @@ use azalea_core::position::ChunkPos; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundChunksBiomesPacket { +pub struct ClientboundChunksBiomes { pub chunk_biome_data: Vec, } diff --git a/azalea-protocol/src/packets/game/clientbound_clear_titles_packet.rs b/azalea-protocol/src/packets/game/c_clear_titles.rs similarity index 79% rename from azalea-protocol/src/packets/game/clientbound_clear_titles_packet.rs rename to azalea-protocol/src/packets/game/c_clear_titles.rs index 3bdc0c79e..6a4a84977 100644 --- a/azalea-protocol/src/packets/game/clientbound_clear_titles_packet.rs +++ b/azalea-protocol/src/packets/game/c_clear_titles.rs @@ -2,6 +2,6 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundClearTitlesPacket { +pub struct ClientboundClearTitles { pub reset_times: bool, } diff --git a/azalea-protocol/src/packets/game/clientbound_command_suggestions_packet.rs b/azalea-protocol/src/packets/game/c_command_suggestions.rs similarity index 95% rename from azalea-protocol/src/packets/game/clientbound_command_suggestions_packet.rs rename to azalea-protocol/src/packets/game/c_command_suggestions.rs index c9752ee95..18da6f64b 100755 --- a/azalea-protocol/src/packets/game/clientbound_command_suggestions_packet.rs +++ b/azalea-protocol/src/packets/game/c_command_suggestions.rs @@ -3,7 +3,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundCommandSuggestionsPacket { +pub struct ClientboundCommandSuggestions { #[var] pub id: u32, pub suggestions: Suggestions, diff --git a/azalea-protocol/src/packets/game/clientbound_commands_packet.rs b/azalea-protocol/src/packets/game/c_commands.rs similarity index 99% rename from azalea-protocol/src/packets/game/clientbound_commands_packet.rs rename to azalea-protocol/src/packets/game/c_commands.rs index 10055e376..e772dc0dc 100755 --- a/azalea-protocol/src/packets/game/clientbound_commands_packet.rs +++ b/azalea-protocol/src/packets/game/c_commands.rs @@ -8,7 +8,7 @@ use azalea_protocol_macros::ClientboundGamePacket; use tracing::warn; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundCommandsPacket { +pub struct ClientboundCommands { pub entries: Vec, #[var] pub root_index: u32, diff --git a/azalea-protocol/src/packets/game/clientbound_container_close_packet.rs b/azalea-protocol/src/packets/game/c_container_close.rs similarity index 77% rename from azalea-protocol/src/packets/game/clientbound_container_close_packet.rs rename to azalea-protocol/src/packets/game/c_container_close.rs index a59da450d..88ddba430 100644 --- a/azalea-protocol/src/packets/game/clientbound_container_close_packet.rs +++ b/azalea-protocol/src/packets/game/c_container_close.rs @@ -2,6 +2,6 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundContainerClosePacket { +pub struct ClientboundContainerClose { pub container_id: u8, } diff --git a/azalea-protocol/src/packets/game/clientbound_container_set_content_packet.rs b/azalea-protocol/src/packets/game/c_container_set_content.rs similarity index 85% rename from azalea-protocol/src/packets/game/clientbound_container_set_content_packet.rs rename to azalea-protocol/src/packets/game/c_container_set_content.rs index 4e08232d8..b79fe6bfb 100755 --- a/azalea-protocol/src/packets/game/clientbound_container_set_content_packet.rs +++ b/azalea-protocol/src/packets/game/c_container_set_content.rs @@ -3,7 +3,7 @@ use azalea_inventory::ItemSlot; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundContainerSetContentPacket { +pub struct ClientboundContainerSetContent { pub container_id: i8, #[var] pub state_id: u32, diff --git a/azalea-protocol/src/packets/game/clientbound_container_set_data_packet.rs b/azalea-protocol/src/packets/game/c_container_set_data.rs similarity index 80% rename from azalea-protocol/src/packets/game/clientbound_container_set_data_packet.rs rename to azalea-protocol/src/packets/game/c_container_set_data.rs index dc53a0247..ebcace7f1 100755 --- a/azalea-protocol/src/packets/game/clientbound_container_set_data_packet.rs +++ b/azalea-protocol/src/packets/game/c_container_set_data.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundContainerSetDataPacket { +pub struct ClientboundContainerSetData { pub container_id: i8, pub id: u16, pub value: u16, diff --git a/azalea-protocol/src/packets/game/clientbound_container_set_slot_packet.rs b/azalea-protocol/src/packets/game/c_container_set_slot.rs similarity index 85% rename from azalea-protocol/src/packets/game/clientbound_container_set_slot_packet.rs rename to azalea-protocol/src/packets/game/c_container_set_slot.rs index 9b954fa0a..3750e5487 100755 --- a/azalea-protocol/src/packets/game/clientbound_container_set_slot_packet.rs +++ b/azalea-protocol/src/packets/game/c_container_set_slot.rs @@ -3,7 +3,7 @@ use azalea_inventory::ItemSlot; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundContainerSetSlotPacket { +pub struct ClientboundContainerSetSlot { pub container_id: i8, #[var] pub state_id: u32, diff --git a/azalea-protocol/src/packets/game/clientbound_cookie_request_packet.rs b/azalea-protocol/src/packets/game/c_cookie_request.rs similarity index 83% rename from azalea-protocol/src/packets/game/clientbound_cookie_request_packet.rs rename to azalea-protocol/src/packets/game/c_cookie_request.rs index 9f1c1d438..1cecd4f19 100755 --- a/azalea-protocol/src/packets/game/clientbound_cookie_request_packet.rs +++ b/azalea-protocol/src/packets/game/c_cookie_request.rs @@ -3,6 +3,6 @@ use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundCookieRequestPacket { +pub struct ClientboundCookieRequest { pub key: ResourceLocation, } diff --git a/azalea-protocol/src/packets/game/clientbound_cooldown_packet.rs b/azalea-protocol/src/packets/game/c_cooldown.rs similarity index 83% rename from azalea-protocol/src/packets/game/clientbound_cooldown_packet.rs rename to azalea-protocol/src/packets/game/c_cooldown.rs index 41c8291a1..71a2fbf24 100755 --- a/azalea-protocol/src/packets/game/clientbound_cooldown_packet.rs +++ b/azalea-protocol/src/packets/game/c_cooldown.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundCooldownPacket { +pub struct ClientboundCooldown { pub item: azalea_registry::Item, #[var] pub duration: u32, diff --git a/azalea-protocol/src/packets/game/clientbound_custom_chat_completions_packet.rs b/azalea-protocol/src/packets/game/c_custom_chat_completions.rs similarity index 84% rename from azalea-protocol/src/packets/game/clientbound_custom_chat_completions_packet.rs rename to azalea-protocol/src/packets/game/c_custom_chat_completions.rs index 3165bbbed..2145f3127 100755 --- a/azalea-protocol/src/packets/game/clientbound_custom_chat_completions_packet.rs +++ b/azalea-protocol/src/packets/game/c_custom_chat_completions.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundCustomChatCompletionsPacket { +pub struct ClientboundCustomChatCompletions { pub action: Action, pub entries: Vec, } diff --git a/azalea-protocol/src/packets/game/clientbound_custom_payload_packet.rs b/azalea-protocol/src/packets/game/c_custom_payload.rs similarity index 86% rename from azalea-protocol/src/packets/game/clientbound_custom_payload_packet.rs rename to azalea-protocol/src/packets/game/c_custom_payload.rs index fb5f11ba5..600f4b114 100755 --- a/azalea-protocol/src/packets/game/clientbound_custom_payload_packet.rs +++ b/azalea-protocol/src/packets/game/c_custom_payload.rs @@ -4,7 +4,7 @@ use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundCustomPayloadPacket { +pub struct ClientboundCustomPayload { pub identifier: ResourceLocation, pub data: UnsizedByteArray, } diff --git a/azalea-protocol/src/packets/game/clientbound_custom_report_details_packet.rs b/azalea-protocol/src/packets/game/c_custom_report_details.rs similarity index 87% rename from azalea-protocol/src/packets/game/clientbound_custom_report_details_packet.rs rename to azalea-protocol/src/packets/game/c_custom_report_details.rs index a098f9150..e66fedfb3 100644 --- a/azalea-protocol/src/packets/game/clientbound_custom_report_details_packet.rs +++ b/azalea-protocol/src/packets/game/c_custom_report_details.rs @@ -4,7 +4,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundCustomReportDetailsPacket { +pub struct ClientboundCustomReportDetails { // azalea doesn't implement max lengths yet // max length = 32 diff --git a/azalea-protocol/src/packets/game/clientbound_custom_sound_packet.rs b/azalea-protocol/src/packets/game/c_custom_sound.rs similarity index 93% rename from azalea-protocol/src/packets/game/clientbound_custom_sound_packet.rs rename to azalea-protocol/src/packets/game/c_custom_sound.rs index 05b1560b6..f7106bd5b 100644 --- a/azalea-protocol/src/packets/game/clientbound_custom_sound_packet.rs +++ b/azalea-protocol/src/packets/game/c_custom_sound.rs @@ -3,7 +3,7 @@ use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundCustomSoundPacket { +pub struct ClientboundCustomSound { pub name: ResourceLocation, pub source: SoundSource, pub x: i32, diff --git a/azalea-protocol/src/packets/game/clientbound_damage_event_packet.rs b/azalea-protocol/src/packets/game/c_damage_event.rs similarity index 96% rename from azalea-protocol/src/packets/game/clientbound_damage_event_packet.rs rename to azalea-protocol/src/packets/game/c_damage_event.rs index cf5d369ac..9b579ac9e 100644 --- a/azalea-protocol/src/packets/game/clientbound_damage_event_packet.rs +++ b/azalea-protocol/src/packets/game/c_damage_event.rs @@ -5,7 +5,7 @@ use azalea_core::position::Vec3; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundDamageEventPacket { +pub struct ClientboundDamageEvent { #[var] pub entity_id: u32, #[var] diff --git a/azalea-protocol/src/packets/game/clientbound_debug_sample_packet.rs b/azalea-protocol/src/packets/game/c_debug_sample.rs similarity index 64% rename from azalea-protocol/src/packets/game/clientbound_debug_sample_packet.rs rename to azalea-protocol/src/packets/game/c_debug_sample.rs index 641fd05e2..b7624aced 100755 --- a/azalea-protocol/src/packets/game/clientbound_debug_sample_packet.rs +++ b/azalea-protocol/src/packets/game/c_debug_sample.rs @@ -1,10 +1,10 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; -use super::serverbound_debug_sample_subscription::RemoteDebugSampleType; +use super::s_debug_sample_subscription::RemoteDebugSampleType; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundDebugSamplePacket { +pub struct ClientboundDebugSample { pub sample: Vec, pub debug_sample_type: RemoteDebugSampleType, } diff --git a/azalea-protocol/src/packets/game/clientbound_delete_chat_packet.rs b/azalea-protocol/src/packets/game/c_delete_chat.rs similarity index 61% rename from azalea-protocol/src/packets/game/clientbound_delete_chat_packet.rs rename to azalea-protocol/src/packets/game/c_delete_chat.rs index eef9b561e..d151d0415 100755 --- a/azalea-protocol/src/packets/game/clientbound_delete_chat_packet.rs +++ b/azalea-protocol/src/packets/game/c_delete_chat.rs @@ -1,9 +1,9 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; -use super::clientbound_player_chat_packet::PackedMessageSignature; +use super::c_player_chat::PackedMessageSignature; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundDeleteChatPacket { +pub struct ClientboundDeleteChat { pub signature: PackedMessageSignature, } diff --git a/azalea-protocol/src/packets/game/clientbound_disconnect_packet.rs b/azalea-protocol/src/packets/game/c_disconnect.rs similarity index 82% rename from azalea-protocol/src/packets/game/clientbound_disconnect_packet.rs rename to azalea-protocol/src/packets/game/c_disconnect.rs index f8771c37d..b348ea8ea 100755 --- a/azalea-protocol/src/packets/game/clientbound_disconnect_packet.rs +++ b/azalea-protocol/src/packets/game/c_disconnect.rs @@ -3,6 +3,6 @@ use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundDisconnectPacket { +pub struct ClientboundDisconnect { pub reason: FormattedText, } diff --git a/azalea-protocol/src/packets/game/clientbound_disguised_chat_packet.rs b/azalea-protocol/src/packets/game/c_disguised_chat.rs similarity index 84% rename from azalea-protocol/src/packets/game/clientbound_disguised_chat_packet.rs rename to azalea-protocol/src/packets/game/c_disguised_chat.rs index 24e1a9927..cc6f6d240 100644 --- a/azalea-protocol/src/packets/game/clientbound_disguised_chat_packet.rs +++ b/azalea-protocol/src/packets/game/c_disguised_chat.rs @@ -5,19 +5,19 @@ use azalea_chat::{ }; use azalea_protocol_macros::ClientboundGamePacket; -use super::clientbound_player_chat_packet::ChatTypeBound; +use super::c_player_chat::ChatTypeBound; // A disguised chat packet is basically the same as a normal -// [`ClientboundPlayerChatPacket`], except that it doesn't have any of the chat +// [`ClientboundPlayerChat`], except that it doesn't have any of the chat // signing things. Vanilla servers use this when messages are sent from the // console. #[derive(Clone, Debug, McBuf, ClientboundGamePacket, PartialEq)] -pub struct ClientboundDisguisedChatPacket { +pub struct ClientboundDisguisedChat { pub message: FormattedText, pub chat_type: ChatTypeBound, } -impl ClientboundDisguisedChatPacket { +impl ClientboundDisguisedChat { /// Get the full message, including the sender part. #[must_use] pub fn message(&self) -> FormattedText { diff --git a/azalea-protocol/src/packets/game/clientbound_entity_event_packet.rs b/azalea-protocol/src/packets/game/c_entity_event.rs similarity index 80% rename from azalea-protocol/src/packets/game/clientbound_entity_event_packet.rs rename to azalea-protocol/src/packets/game/c_entity_event.rs index 18076a334..6ca5faee8 100755 --- a/azalea-protocol/src/packets/game/clientbound_entity_event_packet.rs +++ b/azalea-protocol/src/packets/game/c_entity_event.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundEntityEventPacket { +pub struct ClientboundEntityEvent { pub entity_id: u32, pub event_id: u8, } diff --git a/azalea-protocol/src/packets/game/clientbound_entity_position_sync_packet.rs b/azalea-protocol/src/packets/game/c_entity_position_sync.rs similarity index 89% rename from azalea-protocol/src/packets/game/clientbound_entity_position_sync_packet.rs rename to azalea-protocol/src/packets/game/c_entity_position_sync.rs index 0125eeb46..735b801b0 100755 --- a/azalea-protocol/src/packets/game/clientbound_entity_position_sync_packet.rs +++ b/azalea-protocol/src/packets/game/c_entity_position_sync.rs @@ -3,7 +3,7 @@ use azalea_core::position::Vec3; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundEntityPositionSyncPacket { +pub struct ClientboundEntityPositionSync { #[var] pub id: u32, pub values: PositionMoveRotation, diff --git a/azalea-protocol/src/packets/game/clientbound_explode_packet.rs b/azalea-protocol/src/packets/game/c_explode.rs similarity index 96% rename from azalea-protocol/src/packets/game/clientbound_explode_packet.rs rename to azalea-protocol/src/packets/game/c_explode.rs index 23c416d1b..e45c10714 100755 --- a/azalea-protocol/src/packets/game/clientbound_explode_packet.rs +++ b/azalea-protocol/src/packets/game/c_explode.rs @@ -11,7 +11,7 @@ use azalea_protocol_macros::ClientboundGamePacket; use azalea_registry::{ParticleKind, SoundEvent}; #[derive(Clone, Debug, PartialEq, ClientboundGamePacket)] -pub struct ClientboundExplodePacket { +pub struct ClientboundExplode { pub x: f64, pub y: f64, pub z: f64, @@ -34,7 +34,7 @@ pub enum BlockInteraction { TriggerBlock, } -impl McBufReadable for ClientboundExplodePacket { +impl McBufReadable for ClientboundExplode { fn read_from(buf: &mut Cursor<&[u8]>) -> Result { let x = f64::read_from(buf)?; let y = f64::read_from(buf)?; @@ -88,7 +88,7 @@ impl McBufReadable for ClientboundExplodePacket { } } -impl McBufWritable for ClientboundExplodePacket { +impl McBufWritable for ClientboundExplode { fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { self.x.write_into(buf)?; self.y.write_into(buf)?; @@ -133,7 +133,7 @@ mod tests { #[test] fn test_read_write() { - let packet = ClientboundExplodePacket { + let packet = ClientboundExplode { x: 123_456.0, y: 789_012.0, z: 345_678.0, diff --git a/azalea-protocol/src/packets/game/clientbound_forget_level_chunk_packet.rs b/azalea-protocol/src/packets/game/c_forget_level_chunk.rs similarity index 80% rename from azalea-protocol/src/packets/game/clientbound_forget_level_chunk_packet.rs rename to azalea-protocol/src/packets/game/c_forget_level_chunk.rs index 027d41ee3..baa8b7866 100755 --- a/azalea-protocol/src/packets/game/clientbound_forget_level_chunk_packet.rs +++ b/azalea-protocol/src/packets/game/c_forget_level_chunk.rs @@ -3,6 +3,6 @@ use azalea_core::position::ChunkPos; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundForgetLevelChunkPacket { +pub struct ClientboundForgetLevelChunk { pub pos: ChunkPos, } diff --git a/azalea-protocol/src/packets/game/clientbound_game_event_packet.rs b/azalea-protocol/src/packets/game/c_game_event.rs similarity index 93% rename from azalea-protocol/src/packets/game/clientbound_game_event_packet.rs rename to azalea-protocol/src/packets/game/c_game_event.rs index 2416f7c33..40f633489 100755 --- a/azalea-protocol/src/packets/game/clientbound_game_event_packet.rs +++ b/azalea-protocol/src/packets/game/c_game_event.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundGameEventPacket { +pub struct ClientboundGameEvent { pub event: EventType, pub param: f32, } diff --git a/azalea-protocol/src/packets/game/clientbound_horse_screen_open_packet.rs b/azalea-protocol/src/packets/game/c_horse_screen_open.rs similarity index 82% rename from azalea-protocol/src/packets/game/clientbound_horse_screen_open_packet.rs rename to azalea-protocol/src/packets/game/c_horse_screen_open.rs index ad3f7b37a..c16164bf1 100755 --- a/azalea-protocol/src/packets/game/clientbound_horse_screen_open_packet.rs +++ b/azalea-protocol/src/packets/game/c_horse_screen_open.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundHorseScreenOpenPacket { +pub struct ClientboundHorseScreenOpen { pub container_id: u8, #[var] pub size: u32, diff --git a/azalea-protocol/src/packets/game/clientbound_hurt_animation_packet.rs b/azalea-protocol/src/packets/game/c_hurt_animation.rs similarity index 80% rename from azalea-protocol/src/packets/game/clientbound_hurt_animation_packet.rs rename to azalea-protocol/src/packets/game/c_hurt_animation.rs index d4a79a275..27ef2652c 100644 --- a/azalea-protocol/src/packets/game/clientbound_hurt_animation_packet.rs +++ b/azalea-protocol/src/packets/game/c_hurt_animation.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundHurtAnimationPacket { +pub struct ClientboundHurtAnimation { #[var] pub id: u32, pub yaw: f32, diff --git a/azalea-protocol/src/packets/game/clientbound_initialize_border_packet.rs b/azalea-protocol/src/packets/game/c_initialize_border.rs similarity index 89% rename from azalea-protocol/src/packets/game/clientbound_initialize_border_packet.rs rename to azalea-protocol/src/packets/game/c_initialize_border.rs index 77742c0a2..fe95fa69d 100755 --- a/azalea-protocol/src/packets/game/clientbound_initialize_border_packet.rs +++ b/azalea-protocol/src/packets/game/c_initialize_border.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, ClientboundGamePacket, McBuf)] -pub struct ClientboundInitializeBorderPacket { +pub struct ClientboundInitializeBorder { pub new_center_x: f64, pub new_center_z: f64, pub old_size: f64, diff --git a/azalea-protocol/src/packets/game/clientbound_keep_alive_packet.rs b/azalea-protocol/src/packets/game/c_keep_alive.rs similarity index 78% rename from azalea-protocol/src/packets/game/clientbound_keep_alive_packet.rs rename to azalea-protocol/src/packets/game/c_keep_alive.rs index 16fe33575..7b6447d94 100755 --- a/azalea-protocol/src/packets/game/clientbound_keep_alive_packet.rs +++ b/azalea-protocol/src/packets/game/c_keep_alive.rs @@ -2,6 +2,6 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundKeepAlivePacket { +pub struct ClientboundKeepAlive { pub id: u64, } diff --git a/azalea-protocol/src/packets/game/clientbound_level_chunk_with_light_packet.rs b/azalea-protocol/src/packets/game/c_level_chunk_with_light.rs similarity index 99% rename from azalea-protocol/src/packets/game/clientbound_level_chunk_with_light_packet.rs rename to azalea-protocol/src/packets/game/c_level_chunk_with_light.rs index f7212ba7c..1e0273772 100755 --- a/azalea-protocol/src/packets/game/clientbound_level_chunk_with_light_packet.rs +++ b/azalea-protocol/src/packets/game/c_level_chunk_with_light.rs @@ -2,10 +2,10 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; use simdnbt::owned::Nbt; -use super::clientbound_light_update_packet::ClientboundLightUpdatePacketData; +use super::c_light_update::ClientboundLightUpdatePacketData; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundLevelChunkWithLightPacket { +pub struct ClientboundLevelChunkWithLight { pub x: i32, pub z: i32, pub chunk_data: ClientboundLevelChunkPacketData, @@ -39,7 +39,7 @@ mod tests { use super::*; #[test] - fn test_clientbound_level_chunk_with_light_packet() { + fn test_c_level_chunk_with_light_packet() { #[rustfmt::skip] let bytes = [ 255, 255, 255, 253, 0, 0, 0, 1, 10, 12, 0, 15, 77, 79, 84, 73, 79, 78, 95, 66, 76, 79, 67, 75, 73, 78, 71, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 240, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 195, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 33, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 170, 37, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 4, 2, 0, 137, 51, 128, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 16, 0, 0, 0, 0, 0, 0, 1, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 4, 2, 0, 137, 51, 128, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 16, 0, 0, 0, 0, 0, 0, 1, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 4, 128, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 128, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 32, 67, 101, 0, 0, 0, 0, 0, 32, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 16, 50, 84, 118, 152, 186, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 16, 50, 84, 118, 152, 186, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 16, 50, 84, 118, 152, 186, 0, 0, 33, 67, 101, 135, 169, 203, 0, 0, 16, 50, 84, 118, 152, 186, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 16, 50, 84, 118, 152, 186, 0, 0, 33, 67, 101, 135, 169, 203, 0, 0, 16, 50, 84, 118, 152, 186, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 16, 50, 84, 118, 152, 186, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 16, 50, 84, 118, 152, 186, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 128, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 diff --git a/azalea-protocol/src/packets/game/clientbound_level_event_packet.rs b/azalea-protocol/src/packets/game/c_level_event.rs similarity index 86% rename from azalea-protocol/src/packets/game/clientbound_level_event_packet.rs rename to azalea-protocol/src/packets/game/c_level_event.rs index a79217f19..5ba76b5ed 100755 --- a/azalea-protocol/src/packets/game/clientbound_level_event_packet.rs +++ b/azalea-protocol/src/packets/game/c_level_event.rs @@ -3,7 +3,7 @@ use azalea_core::position::BlockPos; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundLevelEventPacket { +pub struct ClientboundLevelEvent { pub event_type: u32, pub pos: BlockPos, pub data: u32, diff --git a/azalea-protocol/src/packets/game/clientbound_level_particles_packet.rs b/azalea-protocol/src/packets/game/c_level_particles.rs similarity index 91% rename from azalea-protocol/src/packets/game/clientbound_level_particles_packet.rs rename to azalea-protocol/src/packets/game/c_level_particles.rs index eae996347..54a94d343 100755 --- a/azalea-protocol/src/packets/game/clientbound_level_particles_packet.rs +++ b/azalea-protocol/src/packets/game/c_level_particles.rs @@ -3,7 +3,7 @@ use azalea_entity::particle::Particle; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundLevelParticlesPacket { +pub struct ClientboundLevelParticles { pub override_limiter: bool, pub x: f64, pub y: f64, @@ -25,7 +25,7 @@ mod tests { use super::*; #[test] - fn test_clientbound_level_particles_packet() { + fn test_c_level_particles_packet() { let slice = &[ 0, 64, 139, 10, 0, 0, 0, 0, 0, 192, 26, 0, 0, 0, 0, 0, 0, 64, 144, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 13, 63, 128, 0, 0, 0, 0, 0, diff --git a/azalea-protocol/src/packets/game/clientbound_light_update_packet.rs b/azalea-protocol/src/packets/game/c_light_update.rs similarity index 92% rename from azalea-protocol/src/packets/game/clientbound_light_update_packet.rs rename to azalea-protocol/src/packets/game/c_light_update.rs index 8d50e94d1..7e10d2ff1 100755 --- a/azalea-protocol/src/packets/game/clientbound_light_update_packet.rs +++ b/azalea-protocol/src/packets/game/c_light_update.rs @@ -3,7 +3,7 @@ use azalea_core::bitset::BitSet; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundLightUpdatePacket { +pub struct ClientboundLightUpdate { #[var] pub x: i32, #[var] diff --git a/azalea-protocol/src/packets/game/clientbound_login_packet.rs b/azalea-protocol/src/packets/game/c_login.rs similarity index 95% rename from azalea-protocol/src/packets/game/clientbound_login_packet.rs rename to azalea-protocol/src/packets/game/c_login.rs index 234439d5d..6221c428b 100755 --- a/azalea-protocol/src/packets/game/clientbound_login_packet.rs +++ b/azalea-protocol/src/packets/game/c_login.rs @@ -9,7 +9,7 @@ use crate::packets::common::CommonPlayerSpawnInfo; /// This packet contains information about the state of the player, the /// world, and the registry. #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundLoginPacket { +pub struct ClientboundLogin { pub player_id: u32, pub hardcore: bool, pub levels: Vec, diff --git a/azalea-protocol/src/packets/game/clientbound_map_item_data_packet.rs b/azalea-protocol/src/packets/game/c_map_item_data.rs similarity index 97% rename from azalea-protocol/src/packets/game/clientbound_map_item_data_packet.rs rename to azalea-protocol/src/packets/game/c_map_item_data.rs index 0f858181e..62d51db2b 100755 --- a/azalea-protocol/src/packets/game/clientbound_map_item_data_packet.rs +++ b/azalea-protocol/src/packets/game/c_map_item_data.rs @@ -3,7 +3,7 @@ use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, ClientboundGamePacket, McBuf)] -pub struct ClientboundMapItemDataPacket { +pub struct ClientboundMapItemData { #[var] pub map_id: u32, pub scale: u8, diff --git a/azalea-protocol/src/packets/game/clientbound_merchant_offers_packet.rs b/azalea-protocol/src/packets/game/c_merchant_offers.rs similarity index 93% rename from azalea-protocol/src/packets/game/clientbound_merchant_offers_packet.rs rename to azalea-protocol/src/packets/game/c_merchant_offers.rs index 4253ace46..510e8e3ce 100755 --- a/azalea-protocol/src/packets/game/clientbound_merchant_offers_packet.rs +++ b/azalea-protocol/src/packets/game/c_merchant_offers.rs @@ -3,7 +3,7 @@ use azalea_inventory::ItemSlot; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundMerchantOffersPacket { +pub struct ClientboundMerchantOffers { #[var] pub container_id: u32, pub offers: Vec, diff --git a/azalea-protocol/src/packets/game/clientbound_move_entity_pos_packet.rs b/azalea-protocol/src/packets/game/c_move_entity_pos.rs similarity index 85% rename from azalea-protocol/src/packets/game/clientbound_move_entity_pos_packet.rs rename to azalea-protocol/src/packets/game/c_move_entity_pos.rs index d909fdcc5..f33f40104 100755 --- a/azalea-protocol/src/packets/game/clientbound_move_entity_pos_packet.rs +++ b/azalea-protocol/src/packets/game/c_move_entity_pos.rs @@ -3,7 +3,7 @@ use azalea_core::delta::PositionDelta8; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundMoveEntityPosPacket { +pub struct ClientboundMoveEntityPos { #[var] pub entity_id: u32, pub delta: PositionDelta8, diff --git a/azalea-protocol/src/packets/game/clientbound_move_entity_pos_rot_packet.rs b/azalea-protocol/src/packets/game/c_move_entity_pos_rot.rs similarity index 88% rename from azalea-protocol/src/packets/game/clientbound_move_entity_pos_rot_packet.rs rename to azalea-protocol/src/packets/game/c_move_entity_pos_rot.rs index 5a5dfbd32..03558d696 100755 --- a/azalea-protocol/src/packets/game/clientbound_move_entity_pos_rot_packet.rs +++ b/azalea-protocol/src/packets/game/c_move_entity_pos_rot.rs @@ -4,7 +4,7 @@ use azalea_protocol_macros::ClientboundGamePacket; /// This packet is sent by the server when an entity moves less then 8 blocks. #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundMoveEntityPosRotPacket { +pub struct ClientboundMoveEntityPosRot { #[var] pub entity_id: u32, pub delta: PositionDelta8, diff --git a/azalea-protocol/src/packets/game/clientbound_move_entity_rot_packet.rs b/azalea-protocol/src/packets/game/c_move_entity_rot.rs similarity index 83% rename from azalea-protocol/src/packets/game/clientbound_move_entity_rot_packet.rs rename to azalea-protocol/src/packets/game/c_move_entity_rot.rs index 666abe236..d1f07d34a 100755 --- a/azalea-protocol/src/packets/game/clientbound_move_entity_rot_packet.rs +++ b/azalea-protocol/src/packets/game/c_move_entity_rot.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundMoveEntityRotPacket { +pub struct ClientboundMoveEntityRot { #[var] pub entity_id: u32, pub y_rot: i8, diff --git a/azalea-protocol/src/packets/game/clientbound_move_minecart_packet.rs b/azalea-protocol/src/packets/game/c_move_minecart.rs similarity index 90% rename from azalea-protocol/src/packets/game/clientbound_move_minecart_packet.rs rename to azalea-protocol/src/packets/game/c_move_minecart.rs index 014e2aaae..569be41e2 100644 --- a/azalea-protocol/src/packets/game/clientbound_move_minecart_packet.rs +++ b/azalea-protocol/src/packets/game/c_move_minecart.rs @@ -3,7 +3,7 @@ use azalea_core::position::Vec3; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundMoveMinecartPacket { +pub struct ClientboundMoveMinecart { #[var] pub entity_id: u32, pub lerp_steps: Vec, diff --git a/azalea-protocol/src/packets/game/clientbound_move_vehicle_packet.rs b/azalea-protocol/src/packets/game/c_move_vehicle.rs similarity index 83% rename from azalea-protocol/src/packets/game/clientbound_move_vehicle_packet.rs rename to azalea-protocol/src/packets/game/c_move_vehicle.rs index d2376c358..ea090984a 100755 --- a/azalea-protocol/src/packets/game/clientbound_move_vehicle_packet.rs +++ b/azalea-protocol/src/packets/game/c_move_vehicle.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundMoveVehiclePacket { +pub struct ClientboundMoveVehicle { pub x: f64, pub y: f64, pub z: f64, diff --git a/azalea-protocol/src/packets/game/clientbound_open_book_packet.rs b/azalea-protocol/src/packets/game/c_open_book.rs similarity index 62% rename from azalea-protocol/src/packets/game/clientbound_open_book_packet.rs rename to azalea-protocol/src/packets/game/c_open_book.rs index 1b450b80e..793639c9d 100755 --- a/azalea-protocol/src/packets/game/clientbound_open_book_packet.rs +++ b/azalea-protocol/src/packets/game/c_open_book.rs @@ -1,9 +1,9 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; -use super::serverbound_interact_packet::InteractionHand; +use super::s_interact::InteractionHand; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundOpenBookPacket { +pub struct ClientboundOpenBook { pub hand: InteractionHand, } diff --git a/azalea-protocol/src/packets/game/clientbound_open_screen_packet.rs b/azalea-protocol/src/packets/game/c_open_screen.rs similarity index 87% rename from azalea-protocol/src/packets/game/clientbound_open_screen_packet.rs rename to azalea-protocol/src/packets/game/c_open_screen.rs index 582cac177..234d8f092 100755 --- a/azalea-protocol/src/packets/game/clientbound_open_screen_packet.rs +++ b/azalea-protocol/src/packets/game/c_open_screen.rs @@ -3,7 +3,7 @@ use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundOpenScreenPacket { +pub struct ClientboundOpenScreen { #[var] pub container_id: u32, pub menu_type: azalea_registry::MenuKind, diff --git a/azalea-protocol/src/packets/game/clientbound_open_sign_editor_packet.rs b/azalea-protocol/src/packets/game/c_open_sign_editor.rs similarity index 83% rename from azalea-protocol/src/packets/game/clientbound_open_sign_editor_packet.rs rename to azalea-protocol/src/packets/game/c_open_sign_editor.rs index 0b03cbe25..5652bed9b 100755 --- a/azalea-protocol/src/packets/game/clientbound_open_sign_editor_packet.rs +++ b/azalea-protocol/src/packets/game/c_open_sign_editor.rs @@ -3,7 +3,7 @@ use azalea_core::position::BlockPos; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundOpenSignEditorPacket { +pub struct ClientboundOpenSignEditor { pub pos: BlockPos, pub is_front_text: bool, } diff --git a/azalea-protocol/src/packets/game/clientbound_ping_packet.rs b/azalea-protocol/src/packets/game/c_ping.rs similarity index 80% rename from azalea-protocol/src/packets/game/clientbound_ping_packet.rs rename to azalea-protocol/src/packets/game/c_ping.rs index 0bd2c8c3a..44a8d9d60 100755 --- a/azalea-protocol/src/packets/game/clientbound_ping_packet.rs +++ b/azalea-protocol/src/packets/game/c_ping.rs @@ -2,6 +2,6 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundPingPacket { +pub struct ClientboundPing { pub id: u32, } diff --git a/azalea-protocol/src/packets/game/clientbound_place_ghost_recipe_packet.rs b/azalea-protocol/src/packets/game/c_place_ghost_recipe.rs similarity index 83% rename from azalea-protocol/src/packets/game/clientbound_place_ghost_recipe_packet.rs rename to azalea-protocol/src/packets/game/c_place_ghost_recipe.rs index 4d61a526c..fbdec4eda 100755 --- a/azalea-protocol/src/packets/game/clientbound_place_ghost_recipe_packet.rs +++ b/azalea-protocol/src/packets/game/c_place_ghost_recipe.rs @@ -3,7 +3,7 @@ use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundPlaceGhostRecipePacket { +pub struct ClientboundPlaceGhostRecipe { pub container_id: u8, pub recipe: ResourceLocation, } diff --git a/azalea-protocol/src/packets/game/clientbound_player_abilities_packet.rs b/azalea-protocol/src/packets/game/c_player_abilities.rs similarity index 96% rename from azalea-protocol/src/packets/game/clientbound_player_abilities_packet.rs rename to azalea-protocol/src/packets/game/c_player_abilities.rs index 48c8b41a7..a99714c34 100755 --- a/azalea-protocol/src/packets/game/clientbound_player_abilities_packet.rs +++ b/azalea-protocol/src/packets/game/c_player_abilities.rs @@ -6,7 +6,7 @@ use azalea_core::bitset::FixedBitSet; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundPlayerAbilitiesPacket { +pub struct ClientboundPlayerAbilities { pub flags: PlayerAbilitiesFlags, pub flying_speed: f32, /// Used for the fov diff --git a/azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs b/azalea-protocol/src/packets/game/c_player_chat.rs similarity index 97% rename from azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs rename to azalea-protocol/src/packets/game/c_player_chat.rs index 9cd20efcc..a3f445157 100644 --- a/azalea-protocol/src/packets/game/clientbound_player_chat_packet.rs +++ b/azalea-protocol/src/packets/game/c_player_chat.rs @@ -13,7 +13,7 @@ use azalea_protocol_macros::ClientboundGamePacket; use uuid::Uuid; #[derive(Clone, Debug, McBuf, ClientboundGamePacket, PartialEq)] -pub struct ClientboundPlayerChatPacket { +pub struct ClientboundPlayerChat { pub sender: Uuid, #[var] pub index: u32, @@ -87,10 +87,10 @@ pub struct MessageSignatureCache { // pub fn unpack(&self, unpacker: impl Fn(u32) -> Option) // {} } -impl ClientboundPlayerChatPacket { +impl ClientboundPlayerChat { /// Returns the content of the message. If you want to get the FormattedText /// for the whole message including the sender part, use - /// [`ClientboundPlayerChatPacket::message`]. + /// [`ClientboundPlayerChat::message`]. #[must_use] pub fn content(&self) -> FormattedText { self.unsigned_content @@ -197,6 +197,6 @@ mod tests { 105, 115, 97, 8, 0, 4, 116, 101, 120, 116, 0, 0, 0, 0, ][..], ); - let _packet = ClientboundPlayerChatPacket::read_from(&mut bytes).unwrap(); + let _packet = ClientboundPlayerChat::read_from(&mut bytes).unwrap(); } } diff --git a/azalea-protocol/src/packets/game/clientbound_player_chat_header_packet.rs b/azalea-protocol/src/packets/game/c_player_chat_header.rs similarity index 86% rename from azalea-protocol/src/packets/game/clientbound_player_chat_header_packet.rs rename to azalea-protocol/src/packets/game/c_player_chat_header.rs index 0e86a36dc..0964e6497 100755 --- a/azalea-protocol/src/packets/game/clientbound_player_chat_header_packet.rs +++ b/azalea-protocol/src/packets/game/c_player_chat_header.rs @@ -3,7 +3,7 @@ use azalea_crypto::{MessageSignature, SignedMessageHeader}; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundPlayerChatHeaderPacket { +pub struct ClientboundPlayerChatHeader { pub header: SignedMessageHeader, pub header_signature: MessageSignature, pub body_digest: Vec, diff --git a/azalea-protocol/src/packets/game/clientbound_player_combat_end_packet.rs b/azalea-protocol/src/packets/game/c_player_combat_end.rs similarity index 81% rename from azalea-protocol/src/packets/game/clientbound_player_combat_end_packet.rs rename to azalea-protocol/src/packets/game/c_player_combat_end.rs index dafb839fe..88b2f3a55 100755 --- a/azalea-protocol/src/packets/game/clientbound_player_combat_end_packet.rs +++ b/azalea-protocol/src/packets/game/c_player_combat_end.rs @@ -3,7 +3,7 @@ use azalea_protocol_macros::ClientboundGamePacket; /// Unused by the client in vanilla. #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundPlayerCombatEndPacket { +pub struct ClientboundPlayerCombatEnd { #[var] pub duration: u32, } diff --git a/azalea-protocol/src/packets/game/clientbound_player_combat_enter_packet.rs b/azalea-protocol/src/packets/game/c_player_combat_enter.rs similarity index 75% rename from azalea-protocol/src/packets/game/clientbound_player_combat_enter_packet.rs rename to azalea-protocol/src/packets/game/c_player_combat_enter.rs index 42ee1838e..046837955 100755 --- a/azalea-protocol/src/packets/game/clientbound_player_combat_enter_packet.rs +++ b/azalea-protocol/src/packets/game/c_player_combat_enter.rs @@ -3,4 +3,4 @@ use azalea_protocol_macros::ClientboundGamePacket; /// Unused in vanilla. #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundPlayerCombatEnterPacket {} +pub struct ClientboundPlayerCombatEnter {} diff --git a/azalea-protocol/src/packets/game/clientbound_player_combat_kill_packet.rs b/azalea-protocol/src/packets/game/c_player_combat_kill.rs similarity index 84% rename from azalea-protocol/src/packets/game/clientbound_player_combat_kill_packet.rs rename to azalea-protocol/src/packets/game/c_player_combat_kill.rs index c309342f7..f5d138fe1 100755 --- a/azalea-protocol/src/packets/game/clientbound_player_combat_kill_packet.rs +++ b/azalea-protocol/src/packets/game/c_player_combat_kill.rs @@ -4,7 +4,7 @@ use azalea_protocol_macros::ClientboundGamePacket; /// Used to send a respawn screen. #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundPlayerCombatKillPacket { +pub struct ClientboundPlayerCombatKill { #[var] pub player_id: u32, pub message: FormattedText, diff --git a/azalea-protocol/src/packets/game/clientbound_player_info_remove_packet.rs b/azalea-protocol/src/packets/game/c_player_info_remove.rs similarity index 79% rename from azalea-protocol/src/packets/game/clientbound_player_info_remove_packet.rs rename to azalea-protocol/src/packets/game/c_player_info_remove.rs index bb620272b..708e96e16 100644 --- a/azalea-protocol/src/packets/game/clientbound_player_info_remove_packet.rs +++ b/azalea-protocol/src/packets/game/c_player_info_remove.rs @@ -3,6 +3,6 @@ use azalea_protocol_macros::ClientboundGamePacket; use uuid::Uuid; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundPlayerInfoRemovePacket { +pub struct ClientboundPlayerInfoRemove { pub profile_ids: Vec, } diff --git a/azalea-protocol/src/packets/game/clientbound_player_info_update_packet.rs b/azalea-protocol/src/packets/game/c_player_info_update.rs similarity index 97% rename from azalea-protocol/src/packets/game/clientbound_player_info_update_packet.rs rename to azalea-protocol/src/packets/game/c_player_info_update.rs index 2b286e64b..d7de74836 100644 --- a/azalea-protocol/src/packets/game/clientbound_player_info_update_packet.rs +++ b/azalea-protocol/src/packets/game/c_player_info_update.rs @@ -12,10 +12,10 @@ use azalea_core::{bitset::FixedBitSet, game_type::GameMode}; use azalea_protocol_macros::ClientboundGamePacket; use uuid::Uuid; -use super::serverbound_chat_session_update_packet::RemoteChatSessionData; +use super::s_chat_session_update::RemoteChatSessionData; #[derive(Clone, Debug, ClientboundGamePacket)] -pub struct ClientboundPlayerInfoUpdatePacket { +pub struct ClientboundPlayerInfoUpdate { pub actions: ActionEnumSet, pub entries: Vec, } @@ -63,7 +63,7 @@ pub struct UpdateListOrderAction { pub list_order: i32, } -impl McBufReadable for ClientboundPlayerInfoUpdatePacket { +impl McBufReadable for ClientboundPlayerInfoUpdate { fn read_from(buf: &mut Cursor<&[u8]>) -> Result { let actions = ActionEnumSet::read_from(buf)?; let mut entries = Vec::new(); @@ -107,11 +107,11 @@ impl McBufReadable for ClientboundPlayerInfoUpdatePacket { entries.push(entry); } - Ok(ClientboundPlayerInfoUpdatePacket { actions, entries }) + Ok(ClientboundPlayerInfoUpdate { actions, entries }) } } -impl McBufWritable for ClientboundPlayerInfoUpdatePacket { +impl McBufWritable for ClientboundPlayerInfoUpdate { fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { self.actions.write_into(buf)?; diff --git a/azalea-protocol/src/packets/game/clientbound_player_look_at_packet.rs b/azalea-protocol/src/packets/game/c_player_look_at.rs similarity index 91% rename from azalea-protocol/src/packets/game/clientbound_player_look_at_packet.rs rename to azalea-protocol/src/packets/game/c_player_look_at.rs index 47c63d1f4..4acfbbb3b 100755 --- a/azalea-protocol/src/packets/game/clientbound_player_look_at_packet.rs +++ b/azalea-protocol/src/packets/game/c_player_look_at.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundPlayerLookAtPacket { +pub struct ClientboundPlayerLookAt { pub from_anchor: Anchor, pub x: f64, pub y: f64, diff --git a/azalea-protocol/src/packets/game/clientbound_player_position_packet.rs b/azalea-protocol/src/packets/game/c_player_position.rs similarity index 97% rename from azalea-protocol/src/packets/game/clientbound_player_position_packet.rs rename to azalea-protocol/src/packets/game/c_player_position.rs index 2a9cebc60..2f6993856 100755 --- a/azalea-protocol/src/packets/game/clientbound_player_position_packet.rs +++ b/azalea-protocol/src/packets/game/c_player_position.rs @@ -5,7 +5,7 @@ use azalea_core::{bitset::FixedBitSet, position::Vec3}; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundPlayerPositionPacket { +pub struct ClientboundPlayerPosition { #[var] pub id: u32, pub pos: Vec3, diff --git a/azalea-protocol/src/packets/game/clientbound_player_rotation_packet.rs b/azalea-protocol/src/packets/game/c_player_rotation.rs similarity index 79% rename from azalea-protocol/src/packets/game/clientbound_player_rotation_packet.rs rename to azalea-protocol/src/packets/game/c_player_rotation.rs index a1ad9bbe8..20570b27c 100755 --- a/azalea-protocol/src/packets/game/clientbound_player_rotation_packet.rs +++ b/azalea-protocol/src/packets/game/c_player_rotation.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundPlayerRotationPacket { +pub struct ClientboundPlayerRotation { pub y_rot: f32, pub x_rot: f32, } diff --git a/azalea-protocol/src/packets/game/clientbound_pong_response_packet.rs b/azalea-protocol/src/packets/game/c_pong_response.rs similarity index 77% rename from azalea-protocol/src/packets/game/clientbound_pong_response_packet.rs rename to azalea-protocol/src/packets/game/c_pong_response.rs index 0b48198e3..b9c3807eb 100755 --- a/azalea-protocol/src/packets/game/clientbound_pong_response_packet.rs +++ b/azalea-protocol/src/packets/game/c_pong_response.rs @@ -2,6 +2,6 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundPongResponsePacket { +pub struct ClientboundPongResponse { pub time: u64, } diff --git a/azalea-protocol/src/packets/game/clientbound_projectile_power_packet.rs b/azalea-protocol/src/packets/game/c_projectile_power.rs similarity index 79% rename from azalea-protocol/src/packets/game/clientbound_projectile_power_packet.rs rename to azalea-protocol/src/packets/game/c_projectile_power.rs index a665a2aa6..281442442 100644 --- a/azalea-protocol/src/packets/game/clientbound_projectile_power_packet.rs +++ b/azalea-protocol/src/packets/game/c_projectile_power.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundProjectilePowerPacket { +pub struct ClientboundProjectilePower { 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/c_recipe_book_add.rs similarity index 94% rename from azalea-protocol/src/packets/game/clientbound_recipe_book_add_packet.rs rename to azalea-protocol/src/packets/game/c_recipe_book_add.rs index e025da7dc..137d99d69 100755 --- a/azalea-protocol/src/packets/game/clientbound_recipe_book_add_packet.rs +++ b/azalea-protocol/src/packets/game/c_recipe_book_add.rs @@ -1,10 +1,10 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; -use super::clientbound_update_recipes_packet::{Ingredient, SlotDisplayData}; +use super::c_update_recipes::{Ingredient, SlotDisplayData}; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundRecipeBookAddPacket { +pub struct ClientboundRecipeBookAdd { pub entries: Vec, pub replace: bool, } diff --git a/azalea-protocol/src/packets/game/clientbound_recipe_book_remove_packet.rs b/azalea-protocol/src/packets/game/c_recipe_book_remove.rs similarity index 55% rename from azalea-protocol/src/packets/game/clientbound_recipe_book_remove_packet.rs rename to azalea-protocol/src/packets/game/c_recipe_book_remove.rs index 678537ca5..783bf8ae6 100755 --- a/azalea-protocol/src/packets/game/clientbound_recipe_book_remove_packet.rs +++ b/azalea-protocol/src/packets/game/c_recipe_book_remove.rs @@ -1,13 +1,10 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; -use super::{ - clientbound_entity_position_sync_packet::PositionMoveRotation, - clientbound_player_position_packet::RelativeMovements, -}; +use super::{c_entity_position_sync::PositionMoveRotation, c_player_position::RelativeMovements}; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundRecipeBookRemovePacket { +pub struct ClientboundRecipeBookRemove { #[var] pub id: u32, pub change: PositionMoveRotation, diff --git a/azalea-protocol/src/packets/game/clientbound_recipe_book_settings_packet.rs b/azalea-protocol/src/packets/game/c_recipe_book_settings.rs similarity index 91% rename from azalea-protocol/src/packets/game/clientbound_recipe_book_settings_packet.rs rename to azalea-protocol/src/packets/game/c_recipe_book_settings.rs index 1180bd261..e2b768cdf 100755 --- a/azalea-protocol/src/packets/game/clientbound_recipe_book_settings_packet.rs +++ b/azalea-protocol/src/packets/game/c_recipe_book_settings.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundRecipeBookSettingsPacket { +pub struct ClientboundRecipeBookSettings { pub book_settings: RecipeBookSettings, } diff --git a/azalea-protocol/src/packets/game/clientbound_remove_entities_packet.rs b/azalea-protocol/src/packets/game/c_remove_entities.rs similarity index 79% rename from azalea-protocol/src/packets/game/clientbound_remove_entities_packet.rs rename to azalea-protocol/src/packets/game/c_remove_entities.rs index 7b192333a..8ad2fe290 100755 --- a/azalea-protocol/src/packets/game/clientbound_remove_entities_packet.rs +++ b/azalea-protocol/src/packets/game/c_remove_entities.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundRemoveEntitiesPacket { +pub struct ClientboundRemoveEntities { #[var] pub entity_ids: Vec, } diff --git a/azalea-protocol/src/packets/game/clientbound_remove_mob_effect_packet.rs b/azalea-protocol/src/packets/game/c_remove_mob_effect.rs similarity index 82% rename from azalea-protocol/src/packets/game/clientbound_remove_mob_effect_packet.rs rename to azalea-protocol/src/packets/game/c_remove_mob_effect.rs index 87bf81bdc..d2ea7994e 100755 --- a/azalea-protocol/src/packets/game/clientbound_remove_mob_effect_packet.rs +++ b/azalea-protocol/src/packets/game/c_remove_mob_effect.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundRemoveMobEffectPacket { +pub struct ClientboundRemoveMobEffect { #[var] pub entity_id: u32, pub effect: azalea_registry::MobEffect, diff --git a/azalea-protocol/src/packets/game/clientbound_reset_score_packet.rs b/azalea-protocol/src/packets/game/c_reset_score.rs similarity index 82% rename from azalea-protocol/src/packets/game/clientbound_reset_score_packet.rs rename to azalea-protocol/src/packets/game/c_reset_score.rs index 8b24bbdf2..8c1aae118 100644 --- a/azalea-protocol/src/packets/game/clientbound_reset_score_packet.rs +++ b/azalea-protocol/src/packets/game/c_reset_score.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundResetScorePacket { +pub struct ClientboundResetScore { pub owner: String, pub objective_name: Option, } diff --git a/azalea-protocol/src/packets/game/clientbound_resource_pack_pop_packet.rs b/azalea-protocol/src/packets/game/c_resource_pack_pop.rs similarity index 78% rename from azalea-protocol/src/packets/game/clientbound_resource_pack_pop_packet.rs rename to azalea-protocol/src/packets/game/c_resource_pack_pop.rs index 34836c852..c989be881 100644 --- a/azalea-protocol/src/packets/game/clientbound_resource_pack_pop_packet.rs +++ b/azalea-protocol/src/packets/game/c_resource_pack_pop.rs @@ -3,6 +3,6 @@ use azalea_protocol_macros::ClientboundGamePacket; use uuid::Uuid; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundResourcePackPopPacket { +pub struct ClientboundResourcePackPop { pub id: Option, } diff --git a/azalea-protocol/src/packets/game/clientbound_resource_pack_push_packet.rs b/azalea-protocol/src/packets/game/c_resource_pack_push.rs similarity index 86% rename from azalea-protocol/src/packets/game/clientbound_resource_pack_push_packet.rs rename to azalea-protocol/src/packets/game/c_resource_pack_push.rs index 1d5e00b1f..b454fb869 100644 --- a/azalea-protocol/src/packets/game/clientbound_resource_pack_push_packet.rs +++ b/azalea-protocol/src/packets/game/c_resource_pack_push.rs @@ -4,7 +4,7 @@ use azalea_protocol_macros::ClientboundGamePacket; use uuid::Uuid; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundResourcePackPushPacket { +pub struct ClientboundResourcePackPush { pub id: Uuid, pub url: String, pub hash: String, diff --git a/azalea-protocol/src/packets/game/clientbound_respawn_packet.rs b/azalea-protocol/src/packets/game/c_respawn.rs similarity index 86% rename from azalea-protocol/src/packets/game/clientbound_respawn_packet.rs rename to azalea-protocol/src/packets/game/c_respawn.rs index 7e20a8430..ddb03e675 100755 --- a/azalea-protocol/src/packets/game/clientbound_respawn_packet.rs +++ b/azalea-protocol/src/packets/game/c_respawn.rs @@ -4,7 +4,7 @@ use azalea_protocol_macros::ClientboundGamePacket; use crate::packets::common::CommonPlayerSpawnInfo; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundRespawnPacket { +pub struct ClientboundRespawn { pub common: CommonPlayerSpawnInfo, pub data_to_keep: u8, } diff --git a/azalea-protocol/src/packets/game/clientbound_rotate_head_packet.rs b/azalea-protocol/src/packets/game/c_rotate_head.rs similarity index 82% rename from azalea-protocol/src/packets/game/clientbound_rotate_head_packet.rs rename to azalea-protocol/src/packets/game/c_rotate_head.rs index 2bc775401..c2aba5485 100755 --- a/azalea-protocol/src/packets/game/clientbound_rotate_head_packet.rs +++ b/azalea-protocol/src/packets/game/c_rotate_head.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundRotateHeadPacket { +pub struct ClientboundRotateHead { #[var] pub entity_id: u32, pub y_head_rot: i8, diff --git a/azalea-protocol/src/packets/game/clientbound_section_blocks_update_packet.rs b/azalea-protocol/src/packets/game/c_section_blocks_update.rs similarity index 96% rename from azalea-protocol/src/packets/game/clientbound_section_blocks_update_packet.rs rename to azalea-protocol/src/packets/game/c_section_blocks_update.rs index e92ca422d..fdadd2ef5 100755 --- a/azalea-protocol/src/packets/game/clientbound_section_blocks_update_packet.rs +++ b/azalea-protocol/src/packets/game/c_section_blocks_update.rs @@ -8,7 +8,7 @@ use azalea_core::position::{ChunkSectionBlockPos, ChunkSectionPos}; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSectionBlocksUpdatePacket { +pub struct ClientboundSectionBlocksUpdate { pub section_pos: ChunkSectionPos, pub states: Vec, } diff --git a/azalea-protocol/src/packets/game/clientbound_select_advancements_tab_packet.rs b/azalea-protocol/src/packets/game/c_select_advancements_tab.rs similarity index 81% rename from azalea-protocol/src/packets/game/clientbound_select_advancements_tab_packet.rs rename to azalea-protocol/src/packets/game/c_select_advancements_tab.rs index c0d5f2ee7..34a5901af 100755 --- a/azalea-protocol/src/packets/game/clientbound_select_advancements_tab_packet.rs +++ b/azalea-protocol/src/packets/game/c_select_advancements_tab.rs @@ -3,6 +3,6 @@ use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSelectAdvancementsTabPacket { +pub struct ClientboundSelectAdvancementsTab { pub tab: Option, } diff --git a/azalea-protocol/src/packets/game/clientbound_server_data_packet.rs b/azalea-protocol/src/packets/game/c_server_data.rs similarity index 84% rename from azalea-protocol/src/packets/game/clientbound_server_data_packet.rs rename to azalea-protocol/src/packets/game/c_server_data.rs index a70a0aec5..d59f989db 100755 --- a/azalea-protocol/src/packets/game/clientbound_server_data_packet.rs +++ b/azalea-protocol/src/packets/game/c_server_data.rs @@ -3,7 +3,7 @@ use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundServerDataPacket { +pub struct ClientboundServerData { pub motd: FormattedText, pub icon_bytes: Option>, } diff --git a/azalea-protocol/src/packets/game/clientbound_server_links_packet.rs b/azalea-protocol/src/packets/game/c_server_links.rs similarity index 93% rename from azalea-protocol/src/packets/game/clientbound_server_links_packet.rs rename to azalea-protocol/src/packets/game/c_server_links.rs index 4b24a5196..a4f85c775 100644 --- a/azalea-protocol/src/packets/game/clientbound_server_links_packet.rs +++ b/azalea-protocol/src/packets/game/c_server_links.rs @@ -3,7 +3,7 @@ use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundServerLinksPacket { +pub struct ClientboundServerLinks { pub links: Vec, } diff --git a/azalea-protocol/src/packets/game/clientbound_set_title_text_packet.rs b/azalea-protocol/src/packets/game/c_set_action_bar_text.rs similarity index 81% rename from azalea-protocol/src/packets/game/clientbound_set_title_text_packet.rs rename to azalea-protocol/src/packets/game/c_set_action_bar_text.rs index fb00a4e51..224ef06ec 100755 --- a/azalea-protocol/src/packets/game/clientbound_set_title_text_packet.rs +++ b/azalea-protocol/src/packets/game/c_set_action_bar_text.rs @@ -3,6 +3,6 @@ use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetTitleTextPacket { +pub struct ClientboundSetActionBarText { pub text: FormattedText, } diff --git a/azalea-protocol/src/packets/game/clientbound_set_border_center_packet.rs b/azalea-protocol/src/packets/game/c_set_border_center.rs similarity index 80% rename from azalea-protocol/src/packets/game/clientbound_set_border_center_packet.rs rename to azalea-protocol/src/packets/game/c_set_border_center.rs index d210b0ce6..94aece4a6 100755 --- a/azalea-protocol/src/packets/game/clientbound_set_border_center_packet.rs +++ b/azalea-protocol/src/packets/game/c_set_border_center.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetBorderCenterPacket { +pub struct ClientboundSetBorderCenter { pub new_center_x: f64, pub new_center_z: f64, } diff --git a/azalea-protocol/src/packets/game/clientbound_set_border_lerp_size_packet.rs b/azalea-protocol/src/packets/game/c_set_border_lerp_size.rs similarity index 81% rename from azalea-protocol/src/packets/game/clientbound_set_border_lerp_size_packet.rs rename to azalea-protocol/src/packets/game/c_set_border_lerp_size.rs index 5c80e897c..b1a73a670 100755 --- a/azalea-protocol/src/packets/game/clientbound_set_border_lerp_size_packet.rs +++ b/azalea-protocol/src/packets/game/c_set_border_lerp_size.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetBorderLerpSizePacket { +pub struct ClientboundSetBorderLerpSize { pub old_size: f64, pub new_size: f64, #[var] diff --git a/azalea-protocol/src/packets/game/clientbound_set_border_size_packet.rs b/azalea-protocol/src/packets/game/c_set_border_size.rs similarity index 77% rename from azalea-protocol/src/packets/game/clientbound_set_border_size_packet.rs rename to azalea-protocol/src/packets/game/c_set_border_size.rs index 3a86a720d..f135b09aa 100755 --- a/azalea-protocol/src/packets/game/clientbound_set_border_size_packet.rs +++ b/azalea-protocol/src/packets/game/c_set_border_size.rs @@ -2,6 +2,6 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetBorderSizePacket { +pub struct ClientboundSetBorderSize { pub size: f64, } diff --git a/azalea-protocol/src/packets/game/clientbound_set_border_warning_delay_packet.rs b/azalea-protocol/src/packets/game/c_set_border_warning_delay.rs similarity index 76% rename from azalea-protocol/src/packets/game/clientbound_set_border_warning_delay_packet.rs rename to azalea-protocol/src/packets/game/c_set_border_warning_delay.rs index 4bf794ac6..c07cfb7ec 100755 --- a/azalea-protocol/src/packets/game/clientbound_set_border_warning_delay_packet.rs +++ b/azalea-protocol/src/packets/game/c_set_border_warning_delay.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetBorderWarningDelayPacket { +pub struct ClientboundSetBorderWarningDelay { #[var] pub warning_delay: u32, } diff --git a/azalea-protocol/src/packets/game/clientbound_set_border_warning_distance_packet.rs b/azalea-protocol/src/packets/game/c_set_border_warning_distance.rs similarity index 75% rename from azalea-protocol/src/packets/game/clientbound_set_border_warning_distance_packet.rs rename to azalea-protocol/src/packets/game/c_set_border_warning_distance.rs index ef1b6e17e..4314cac21 100755 --- a/azalea-protocol/src/packets/game/clientbound_set_border_warning_distance_packet.rs +++ b/azalea-protocol/src/packets/game/c_set_border_warning_distance.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetBorderWarningDistancePacket { +pub struct ClientboundSetBorderWarningDistance { #[var] pub warning_blocks: u32, } diff --git a/azalea-protocol/src/packets/game/clientbound_set_camera_packet.rs b/azalea-protocol/src/packets/game/c_set_camera.rs similarity index 80% rename from azalea-protocol/src/packets/game/clientbound_set_camera_packet.rs rename to azalea-protocol/src/packets/game/c_set_camera.rs index 9da75dc7b..3637591d7 100755 --- a/azalea-protocol/src/packets/game/clientbound_set_camera_packet.rs +++ b/azalea-protocol/src/packets/game/c_set_camera.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetCameraPacket { +pub struct ClientboundSetCamera { #[var] pub camera_id: u32, } diff --git a/azalea-protocol/src/packets/game/clientbound_set_chunk_cache_center_packet.rs b/azalea-protocol/src/packets/game/c_set_chunk_cache_center.rs similarity index 78% rename from azalea-protocol/src/packets/game/clientbound_set_chunk_cache_center_packet.rs rename to azalea-protocol/src/packets/game/c_set_chunk_cache_center.rs index e9aecba9e..fe55e319c 100755 --- a/azalea-protocol/src/packets/game/clientbound_set_chunk_cache_center_packet.rs +++ b/azalea-protocol/src/packets/game/c_set_chunk_cache_center.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetChunkCacheCenterPacket { +pub struct ClientboundSetChunkCacheCenter { #[var] pub x: i32, #[var] diff --git a/azalea-protocol/src/packets/game/clientbound_set_chunk_cache_radius_packet.rs b/azalea-protocol/src/packets/game/c_set_chunk_cache_radius.rs similarity index 76% rename from azalea-protocol/src/packets/game/clientbound_set_chunk_cache_radius_packet.rs rename to azalea-protocol/src/packets/game/c_set_chunk_cache_radius.rs index 9718ca567..22e3a4873 100755 --- a/azalea-protocol/src/packets/game/clientbound_set_chunk_cache_radius_packet.rs +++ b/azalea-protocol/src/packets/game/c_set_chunk_cache_radius.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetChunkCacheRadiusPacket { +pub struct ClientboundSetChunkCacheRadius { #[var] pub radius: u32, } diff --git a/azalea-protocol/src/packets/game/clientbound_set_cursor_item_packet.rs b/azalea-protocol/src/packets/game/c_set_cursor_item.rs similarity index 81% rename from azalea-protocol/src/packets/game/clientbound_set_cursor_item_packet.rs rename to azalea-protocol/src/packets/game/c_set_cursor_item.rs index 6a67b71ce..f72cff058 100644 --- a/azalea-protocol/src/packets/game/clientbound_set_cursor_item_packet.rs +++ b/azalea-protocol/src/packets/game/c_set_cursor_item.rs @@ -3,6 +3,6 @@ use azalea_inventory::ItemSlot; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetCursorItemPacket { +pub struct ClientboundSetCursorItem { pub contents: Option, } diff --git a/azalea-protocol/src/packets/game/clientbound_set_default_spawn_position_packet.rs b/azalea-protocol/src/packets/game/c_set_default_spawn_position.rs similarity index 79% rename from azalea-protocol/src/packets/game/clientbound_set_default_spawn_position_packet.rs rename to azalea-protocol/src/packets/game/c_set_default_spawn_position.rs index b45b645de..7edbe3c4d 100755 --- a/azalea-protocol/src/packets/game/clientbound_set_default_spawn_position_packet.rs +++ b/azalea-protocol/src/packets/game/c_set_default_spawn_position.rs @@ -3,7 +3,7 @@ use azalea_core::position::BlockPos; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetDefaultSpawnPositionPacket { +pub struct ClientboundSetDefaultSpawnPosition { pub pos: BlockPos, pub angle: f32, } diff --git a/azalea-protocol/src/packets/game/clientbound_set_display_chat_preview_packet.rs b/azalea-protocol/src/packets/game/c_set_display_chat_preview.rs similarity index 74% rename from azalea-protocol/src/packets/game/clientbound_set_display_chat_preview_packet.rs rename to azalea-protocol/src/packets/game/c_set_display_chat_preview.rs index 5aee614e7..b4994f3d3 100755 --- a/azalea-protocol/src/packets/game/clientbound_set_display_chat_preview_packet.rs +++ b/azalea-protocol/src/packets/game/c_set_display_chat_preview.rs @@ -2,6 +2,6 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetDisplayChatPreviewPacket { +pub struct ClientboundSetDisplayChatPreview { pub enabled: bool, } diff --git a/azalea-protocol/src/packets/game/clientbound_set_display_objective_packet.rs b/azalea-protocol/src/packets/game/c_set_display_objective.rs similarity index 91% rename from azalea-protocol/src/packets/game/clientbound_set_display_objective_packet.rs rename to azalea-protocol/src/packets/game/c_set_display_objective.rs index 7e5ed3171..27ce402a0 100755 --- a/azalea-protocol/src/packets/game/clientbound_set_display_objective_packet.rs +++ b/azalea-protocol/src/packets/game/c_set_display_objective.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetDisplayObjectivePacket { +pub struct ClientboundSetDisplayObjective { pub slot: DisplaySlot, pub objective_name: String, } diff --git a/azalea-protocol/src/packets/game/clientbound_set_entity_data_packet.rs b/azalea-protocol/src/packets/game/c_set_entity_data.rs similarity index 84% rename from azalea-protocol/src/packets/game/clientbound_set_entity_data_packet.rs rename to azalea-protocol/src/packets/game/c_set_entity_data.rs index 7d869650d..4f4e9db13 100755 --- a/azalea-protocol/src/packets/game/clientbound_set_entity_data_packet.rs +++ b/azalea-protocol/src/packets/game/c_set_entity_data.rs @@ -3,7 +3,7 @@ use azalea_entity::EntityMetadataItems; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetEntityDataPacket { +pub struct ClientboundSetEntityData { #[var] pub id: u32, pub packed_items: EntityMetadataItems, diff --git a/azalea-protocol/src/packets/game/clientbound_set_entity_link_packet.rs b/azalea-protocol/src/packets/game/c_set_entity_link.rs similarity index 80% rename from azalea-protocol/src/packets/game/clientbound_set_entity_link_packet.rs rename to azalea-protocol/src/packets/game/c_set_entity_link.rs index ac9dd9447..c06d7c270 100755 --- a/azalea-protocol/src/packets/game/clientbound_set_entity_link_packet.rs +++ b/azalea-protocol/src/packets/game/c_set_entity_link.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetEntityLinkPacket { +pub struct ClientboundSetEntityLink { pub source_id: u32, pub dest_id: u32, } diff --git a/azalea-protocol/src/packets/game/clientbound_set_entity_motion_packet.rs b/azalea-protocol/src/packets/game/c_set_entity_motion.rs similarity index 82% rename from azalea-protocol/src/packets/game/clientbound_set_entity_motion_packet.rs rename to azalea-protocol/src/packets/game/c_set_entity_motion.rs index 4dcd807db..4538be471 100755 --- a/azalea-protocol/src/packets/game/clientbound_set_entity_motion_packet.rs +++ b/azalea-protocol/src/packets/game/c_set_entity_motion.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetEntityMotionPacket { +pub struct ClientboundSetEntityMotion { #[var] pub id: u32, pub xa: i16, diff --git a/azalea-protocol/src/packets/game/clientbound_set_equipment_packet.rs b/azalea-protocol/src/packets/game/c_set_equipment.rs similarity index 98% rename from azalea-protocol/src/packets/game/clientbound_set_equipment_packet.rs rename to azalea-protocol/src/packets/game/c_set_equipment.rs index 165d05dbf..7b0a4a196 100755 --- a/azalea-protocol/src/packets/game/clientbound_set_equipment_packet.rs +++ b/azalea-protocol/src/packets/game/c_set_equipment.rs @@ -6,7 +6,7 @@ use azalea_inventory::ItemSlot; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetEquipmentPacket { +pub struct ClientboundSetEquipment { #[var] pub entity_id: u32, pub slots: EquipmentSlots, diff --git a/azalea-protocol/src/packets/game/clientbound_set_experience_packet.rs b/azalea-protocol/src/packets/game/c_set_experience.rs similarity index 84% rename from azalea-protocol/src/packets/game/clientbound_set_experience_packet.rs rename to azalea-protocol/src/packets/game/c_set_experience.rs index f9590e264..ef89a0e96 100755 --- a/azalea-protocol/src/packets/game/clientbound_set_experience_packet.rs +++ b/azalea-protocol/src/packets/game/c_set_experience.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetExperiencePacket { +pub struct ClientboundSetExperience { pub experience_progress: f32, #[var] pub experience_level: u32, diff --git a/azalea-protocol/src/packets/game/clientbound_set_health_packet.rs b/azalea-protocol/src/packets/game/c_set_health.rs similarity index 83% rename from azalea-protocol/src/packets/game/clientbound_set_health_packet.rs rename to azalea-protocol/src/packets/game/c_set_health.rs index 72b7554d9..063677e90 100755 --- a/azalea-protocol/src/packets/game/clientbound_set_health_packet.rs +++ b/azalea-protocol/src/packets/game/c_set_health.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetHealthPacket { +pub struct ClientboundSetHealth { pub health: f32, #[var] pub food: u32, diff --git a/azalea-protocol/src/packets/game/clientbound_set_held_slot_packet.rs b/azalea-protocol/src/packets/game/c_set_held_slot.rs similarity index 78% rename from azalea-protocol/src/packets/game/clientbound_set_held_slot_packet.rs rename to azalea-protocol/src/packets/game/c_set_held_slot.rs index a83ae3cbe..58ccae98c 100644 --- a/azalea-protocol/src/packets/game/clientbound_set_held_slot_packet.rs +++ b/azalea-protocol/src/packets/game/c_set_held_slot.rs @@ -2,6 +2,6 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetHeldSlotPacket { +pub struct ClientboundSetHeldSlot { pub slot: u8, } diff --git a/azalea-protocol/src/packets/game/clientbound_set_objective_packet.rs b/azalea-protocol/src/packets/game/c_set_objective.rs similarity index 98% rename from azalea-protocol/src/packets/game/clientbound_set_objective_packet.rs rename to azalea-protocol/src/packets/game/c_set_objective.rs index a9481ad15..cb84d1a70 100755 --- a/azalea-protocol/src/packets/game/clientbound_set_objective_packet.rs +++ b/azalea-protocol/src/packets/game/c_set_objective.rs @@ -6,7 +6,7 @@ use azalea_core::objectives::ObjectiveCriteria; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetObjectivePacket { +pub struct ClientboundSetObjective { pub objective_name: String, pub method: Method, } diff --git a/azalea-protocol/src/packets/game/clientbound_set_passengers_packet.rs b/azalea-protocol/src/packets/game/c_set_passengers.rs similarity index 82% rename from azalea-protocol/src/packets/game/clientbound_set_passengers_packet.rs rename to azalea-protocol/src/packets/game/c_set_passengers.rs index ac337d6e6..21f7a71a8 100755 --- a/azalea-protocol/src/packets/game/clientbound_set_passengers_packet.rs +++ b/azalea-protocol/src/packets/game/c_set_passengers.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetPassengersPacket { +pub struct ClientboundSetPassengers { #[var] pub vehicle: u32, #[var] diff --git a/azalea-protocol/src/packets/game/clientbound_set_player_inventory_packet.rs b/azalea-protocol/src/packets/game/c_set_player_inventory.rs similarity index 82% rename from azalea-protocol/src/packets/game/clientbound_set_player_inventory_packet.rs rename to azalea-protocol/src/packets/game/c_set_player_inventory.rs index c17fd3105..8bf6f1748 100644 --- a/azalea-protocol/src/packets/game/clientbound_set_player_inventory_packet.rs +++ b/azalea-protocol/src/packets/game/c_set_player_inventory.rs @@ -3,7 +3,7 @@ use azalea_inventory::ItemSlot; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetPlayerInventoryPacket { +pub struct ClientboundSetPlayerInventory { #[var] pub slot: i32, pub contents: Option, diff --git a/azalea-protocol/src/packets/game/clientbound_set_player_team_packet.rs b/azalea-protocol/src/packets/game/c_set_player_team.rs similarity index 98% rename from azalea-protocol/src/packets/game/clientbound_set_player_team_packet.rs rename to azalea-protocol/src/packets/game/c_set_player_team.rs index 724b86aa8..c9ded1b7b 100755 --- a/azalea-protocol/src/packets/game/clientbound_set_player_team_packet.rs +++ b/azalea-protocol/src/packets/game/c_set_player_team.rs @@ -5,7 +5,7 @@ use azalea_chat::{style::ChatFormatting, FormattedText}; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetPlayerTeamPacket { +pub struct ClientboundSetPlayerTeam { pub name: String, pub method: Method, } diff --git a/azalea-protocol/src/packets/game/clientbound_set_score_packet.rs b/azalea-protocol/src/packets/game/c_set_score.rs similarity index 90% rename from azalea-protocol/src/packets/game/clientbound_set_score_packet.rs rename to azalea-protocol/src/packets/game/c_set_score.rs index 6de53f749..80dc9c8f8 100755 --- a/azalea-protocol/src/packets/game/clientbound_set_score_packet.rs +++ b/azalea-protocol/src/packets/game/c_set_score.rs @@ -3,7 +3,7 @@ use azalea_chat::{numbers::NumberFormat, FormattedText}; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetScorePacket { +pub struct ClientboundSetScore { pub owner: String, pub objective_name: String, #[var] diff --git a/azalea-protocol/src/packets/game/clientbound_set_simulation_distance_packet.rs b/azalea-protocol/src/packets/game/c_set_simulation_distance.rs similarity index 77% rename from azalea-protocol/src/packets/game/clientbound_set_simulation_distance_packet.rs rename to azalea-protocol/src/packets/game/c_set_simulation_distance.rs index 3efd1fa6d..7fad59f51 100755 --- a/azalea-protocol/src/packets/game/clientbound_set_simulation_distance_packet.rs +++ b/azalea-protocol/src/packets/game/c_set_simulation_distance.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetSimulationDistancePacket { +pub struct ClientboundSetSimulationDistance { #[var] pub simulation_distance: u32, } diff --git a/azalea-protocol/src/packets/game/clientbound_set_subtitle_text_packet.rs b/azalea-protocol/src/packets/game/c_set_subtitle_text.rs similarity index 80% rename from azalea-protocol/src/packets/game/clientbound_set_subtitle_text_packet.rs rename to azalea-protocol/src/packets/game/c_set_subtitle_text.rs index 9b25ac057..06fdb4665 100755 --- a/azalea-protocol/src/packets/game/clientbound_set_subtitle_text_packet.rs +++ b/azalea-protocol/src/packets/game/c_set_subtitle_text.rs @@ -3,6 +3,6 @@ use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetSubtitleTextPacket { +pub struct ClientboundSetSubtitleText { pub text: FormattedText, } diff --git a/azalea-protocol/src/packets/game/clientbound_set_time_packet.rs b/azalea-protocol/src/packets/game/c_set_time.rs similarity index 84% rename from azalea-protocol/src/packets/game/clientbound_set_time_packet.rs rename to azalea-protocol/src/packets/game/c_set_time.rs index b73f082dd..6ac069756 100755 --- a/azalea-protocol/src/packets/game/clientbound_set_time_packet.rs +++ b/azalea-protocol/src/packets/game/c_set_time.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetTimePacket { +pub struct ClientboundSetTime { pub game_time: u64, pub day_time: u64, pub tick_day_time: bool, diff --git a/azalea-protocol/src/packets/game/clientbound_set_action_bar_text_packet.rs b/azalea-protocol/src/packets/game/c_set_title_text.rs similarity index 80% rename from azalea-protocol/src/packets/game/clientbound_set_action_bar_text_packet.rs rename to azalea-protocol/src/packets/game/c_set_title_text.rs index 60b80fe9b..9cbcfd4c5 100755 --- a/azalea-protocol/src/packets/game/clientbound_set_action_bar_text_packet.rs +++ b/azalea-protocol/src/packets/game/c_set_title_text.rs @@ -3,6 +3,6 @@ use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetActionBarTextPacket { +pub struct ClientboundSetTitleText { pub text: FormattedText, } diff --git a/azalea-protocol/src/packets/game/clientbound_set_titles_animation_packet.rs b/azalea-protocol/src/packets/game/c_set_titles_animation.rs similarity index 79% rename from azalea-protocol/src/packets/game/clientbound_set_titles_animation_packet.rs rename to azalea-protocol/src/packets/game/c_set_titles_animation.rs index 06faeb3c6..6ef0da8e6 100755 --- a/azalea-protocol/src/packets/game/clientbound_set_titles_animation_packet.rs +++ b/azalea-protocol/src/packets/game/c_set_titles_animation.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSetTitlesAnimationPacket { +pub struct ClientboundSetTitlesAnimation { pub fade_in: u32, pub stay: u32, pub fade_out: u32, diff --git a/azalea-protocol/src/packets/game/clientbound_sound_packet.rs b/azalea-protocol/src/packets/game/c_sound.rs similarity index 93% rename from azalea-protocol/src/packets/game/clientbound_sound_packet.rs rename to azalea-protocol/src/packets/game/c_sound.rs index 4d2493ede..b7dec932a 100755 --- a/azalea-protocol/src/packets/game/clientbound_sound_packet.rs +++ b/azalea-protocol/src/packets/game/c_sound.rs @@ -3,7 +3,7 @@ use azalea_protocol_macros::ClientboundGamePacket; use azalea_registry::SoundEvent; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSoundPacket { +pub struct ClientboundSound { pub sound: SoundEvent, pub source: SoundSource, pub x: i32, diff --git a/azalea-protocol/src/packets/game/clientbound_sound_entity_packet.rs b/azalea-protocol/src/packets/game/c_sound_entity.rs similarity index 92% rename from azalea-protocol/src/packets/game/clientbound_sound_entity_packet.rs rename to azalea-protocol/src/packets/game/c_sound_entity.rs index 2e9252ae7..241f2770c 100755 --- a/azalea-protocol/src/packets/game/clientbound_sound_entity_packet.rs +++ b/azalea-protocol/src/packets/game/c_sound_entity.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundSoundEntityPacket { +pub struct ClientboundSoundEntity { pub source: SoundSource, #[var] pub id: u32, diff --git a/azalea-protocol/src/packets/game/clientbound_start_configuration_packet.rs b/azalea-protocol/src/packets/game/c_start_configuration.rs similarity index 72% rename from azalea-protocol/src/packets/game/clientbound_start_configuration_packet.rs rename to azalea-protocol/src/packets/game/c_start_configuration.rs index b6ad9615d..4723d9cd9 100644 --- a/azalea-protocol/src/packets/game/clientbound_start_configuration_packet.rs +++ b/azalea-protocol/src/packets/game/c_start_configuration.rs @@ -2,4 +2,4 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundStartConfigurationPacket {} +pub struct ClientboundStartConfiguration {} diff --git a/azalea-protocol/src/packets/game/clientbound_stop_sound_packet.rs b/azalea-protocol/src/packets/game/c_stop_sound.rs similarity index 86% rename from azalea-protocol/src/packets/game/clientbound_stop_sound_packet.rs rename to azalea-protocol/src/packets/game/c_stop_sound.rs index 48c802371..33ea9e12f 100755 --- a/azalea-protocol/src/packets/game/clientbound_stop_sound_packet.rs +++ b/azalea-protocol/src/packets/game/c_stop_sound.rs @@ -4,15 +4,15 @@ use azalea_buf::{BufReadError, McBufReadable, McBufWritable}; use azalea_core::{bitset::FixedBitSet, resource_location::ResourceLocation}; use azalea_protocol_macros::ClientboundGamePacket; -use super::clientbound_sound_packet::SoundSource; +use super::c_sound::SoundSource; #[derive(Clone, Debug, ClientboundGamePacket)] -pub struct ClientboundStopSoundPacket { +pub struct ClientboundStopSound { pub source: Option, pub name: Option, } -impl McBufReadable for ClientboundStopSoundPacket { +impl McBufReadable for ClientboundStopSound { fn read_from(buf: &mut Cursor<&[u8]>) -> Result { let set = FixedBitSet::<2>::read_from(buf)?; let source = if set.index(0) { @@ -30,7 +30,7 @@ impl McBufReadable for ClientboundStopSoundPacket { } } -impl McBufWritable for ClientboundStopSoundPacket { +impl McBufWritable for ClientboundStopSound { fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut set = FixedBitSet::<2>::new(); if self.source.is_some() { diff --git a/azalea-protocol/src/packets/game/clientbound_store_cookie_packet.rs b/azalea-protocol/src/packets/game/c_store_cookie.rs similarity index 85% rename from azalea-protocol/src/packets/game/clientbound_store_cookie_packet.rs rename to azalea-protocol/src/packets/game/c_store_cookie.rs index 1c8ada282..7593e8b78 100644 --- a/azalea-protocol/src/packets/game/clientbound_store_cookie_packet.rs +++ b/azalea-protocol/src/packets/game/c_store_cookie.rs @@ -3,7 +3,7 @@ use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundStoreCookiePacket { +pub struct ClientboundStoreCookie { pub key: ResourceLocation, pub payload: Vec, } diff --git a/azalea-protocol/src/packets/game/clientbound_system_chat_packet.rs b/azalea-protocol/src/packets/game/c_system_chat.rs similarity index 92% rename from azalea-protocol/src/packets/game/clientbound_system_chat_packet.rs rename to azalea-protocol/src/packets/game/c_system_chat.rs index 691a62a15..70088a315 100755 --- a/azalea-protocol/src/packets/game/clientbound_system_chat_packet.rs +++ b/azalea-protocol/src/packets/game/c_system_chat.rs @@ -3,7 +3,7 @@ use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket, PartialEq)] -pub struct ClientboundSystemChatPacket { +pub struct ClientboundSystemChat { pub content: FormattedText, pub overlay: bool, } @@ -17,13 +17,13 @@ mod tests { use super::*; #[test] - fn test_clientbound_system_chat_packet() { + fn test_c_system_chat_packet() { #[rustfmt::skip] let bytes = [ 10, 9, 0, 4, 119, 105, 116, 104, 10, 0, 0, 0, 2, 10, 0, 10, 104, 111, 118, 101, 114, 69, 118, 101, 110, 116, 10, 0, 8, 99, 111, 110, 116, 101, 110, 116, 115, 8, 0, 4, 110, 97, 109, 101, 0, 3, 112, 121, 53, 11, 0, 2, 105, 100, 0, 0, 0, 4, 101, 54, 191, 237, 134, 149, 72, 253, 131, 161, 236, 210, 76, 242, 160, 253, 8, 0, 4, 116, 121, 112, 101, 0, 16, 109, 105, 110, 101, 99, 114, 97, 102, 116, 58, 112, 108, 97, 121, 101, 114, 0, 8, 0, 6, 97, 99, 116, 105, 111, 110, 0, 11, 115, 104, 111, 119, 95, 101, 110, 116, 105, 116, 121, 0, 10, 0, 10, 99, 108, 105, 99, 107, 69, 118, 101, 110, 116, 8, 0, 6, 97, 99, 116, 105, 111, 110, 0, 15, 115, 117, 103, 103, 101, 115, 116, 95, 99, 111, 109, 109, 97, 110, 100, 8, 0, 5, 118, 97, 108, 117, 101, 0, 10, 47, 116, 101, 108, 108, 32, 112, 121, 53, 32, 0, 8, 0, 9, 105, 110, 115, 101, 114, 116, 105, 111, 110, 0, 3, 112, 121, 53, 8, 0, 4, 116, 101, 120, 116, 0, 3, 112, 121, 53, 0, 9, 0, 4, 119, 105, 116, 104, 10, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 1, 0, 10, 0, 10, 104, 111, 118, 101, 114, 69, 118, 101, 110, 116, 10, 0, 8, 99, 111, 110, 116, 101, 110, 116, 115, 8, 0, 2, 105, 100, 0, 25, 109, 105, 110, 101, 99, 114, 97, 102, 116, 58, 100, 105, 97, 109, 111, 110, 100, 95, 112, 105, 99, 107, 97, 120, 101, 8, 0, 3, 116, 97, 103, 0, 10, 123, 68, 97, 109, 97, 103, 101, 58, 48, 125, 0, 8, 0, 6, 97, 99, 116, 105, 111, 110, 0, 9, 115, 104, 111, 119, 95, 105, 116, 101, 109, 0, 9, 0, 4, 119, 105, 116, 104, 10, 0, 0, 0, 1, 9, 0, 5, 101, 120, 116, 114, 97, 10, 0, 0, 0, 1, 8, 0, 9, 116, 114, 97, 110, 115, 108, 97, 116, 101, 0, 30, 105, 116, 101, 109, 46, 109, 105, 110, 101, 99, 114, 97, 102, 116, 46, 100, 105, 97, 109, 111, 110, 100, 95, 112, 105, 99, 107, 97, 120, 101, 0, 8, 0, 4, 116, 101, 120, 116, 0, 0, 0, 8, 0, 5, 99, 111, 108, 111, 114, 0, 5, 119, 104, 105, 116, 101, 8, 0, 9, 116, 114, 97, 110, 115, 108, 97, 116, 101, 0, 20, 99, 104, 97, 116, 46, 115, 113, 117, 97, 114, 101, 95, 98, 114, 97, 99, 107, 101, 116, 115, 0, 10, 0, 10, 104, 111, 118, 101, 114, 69, 118, 101, 110, 116, 10, 0, 8, 99, 111, 110, 116, 101, 110, 116, 115, 8, 0, 4, 110, 97, 109, 101, 0, 3, 112, 121, 53, 11, 0, 2, 105, 100, 0, 0, 0, 4, 101, 54, 191, 237, 134, 149, 72, 253, 131, 161, 236, 210, 76, 242, 160, 253, 8, 0, 4, 116, 121, 112, 101, 0, 16, 109, 105, 110, 101, 99, 114, 97, 102, 116, 58, 112, 108, 97, 121, 101, 114, 0, 8, 0, 6, 97, 99, 116, 105, 111, 110, 0, 11, 115, 104, 111, 119, 95, 101, 110, 116, 105, 116, 121, 0, 10, 0, 10, 99, 108, 105, 99, 107, 69, 118, 101, 110, 116, 8, 0, 6, 97, 99, 116, 105, 111, 110, 0, 15, 115, 117, 103, 103, 101, 115, 116, 95, 99, 111, 109, 109, 97, 110, 100, 8, 0, 5, 118, 97, 108, 117, 101, 0, 10, 47, 116, 101, 108, 108, 32, 112, 121, 53, 32, 0, 8, 0, 9, 105, 110, 115, 101, 114, 116, 105, 111, 110, 0, 3, 112, 121, 53, 8, 0, 4, 116, 101, 120, 116, 0, 3, 112, 121, 53, 0, 8, 0, 9, 116, 114, 97, 110, 115, 108, 97, 116, 101, 0, 28, 99, 111, 109, 109, 97, 110, 100, 115, 46, 103, 105, 118, 101, 46, 115, 117, 99, 99, 101, 115, 115, 46, 115, 105, 110, 103, 108, 101, 0, 8, 0, 5, 99, 111, 108, 111, 114, 0, 4, 103, 114, 97, 121, 1, 0, 6, 105, 116, 97, 108, 105, 99, 1, 8, 0, 9, 116, 114, 97, 110, 115, 108, 97, 116, 101, 0, 15, 99, 104, 97, 116, 46, 116, 121, 112, 101, 46, 97, 100, 109, 105, 110, 0, 0 ]; - let packet = ClientboundSystemChatPacket::read_from(&mut Cursor::new(&bytes)).unwrap(); + let packet = ClientboundSystemChat::read_from(&mut Cursor::new(&bytes)).unwrap(); assert_eq!( packet.content.to_string(), "[py5: Gave 1 [Diamond Pickaxe] to py5]".to_string() @@ -31,12 +31,12 @@ mod tests { } #[test] - fn test_translate_with_string_array_clientbound_system_chat_packet() { + fn test_translate_with_string_array_c_system_chat_packet() { #[rustfmt::skip] let bytes = [ 10, 9, 0, 4, 119, 105, 116, 104, 8, 0, 0, 0, 1, 0, 14, 109, 105, 110, 101, 99, 114, 97, 102, 116, 58, 100, 117, 115, 116, 8, 0, 9, 116, 114, 97, 110, 115, 108, 97, 116, 101, 0, 25, 99, 111, 109, 109, 97, 110, 100, 115, 46, 112, 97, 114, 116, 105, 99, 108, 101, 46, 115, 117, 99, 99, 101, 115, 115, 0, 0 ]; - let packet = ClientboundSystemChatPacket::read_from(&mut Cursor::new(&bytes)).unwrap(); + let packet = ClientboundSystemChat::read_from(&mut Cursor::new(&bytes)).unwrap(); assert_eq!( packet.content.to_string(), "Displaying particle minecraft:dust".to_string() diff --git a/azalea-protocol/src/packets/game/clientbound_tab_list_packet.rs b/azalea-protocol/src/packets/game/c_tab_list.rs similarity index 97% rename from azalea-protocol/src/packets/game/clientbound_tab_list_packet.rs rename to azalea-protocol/src/packets/game/c_tab_list.rs index 03557f5aa..3d23bf628 100755 --- a/azalea-protocol/src/packets/game/clientbound_tab_list_packet.rs +++ b/azalea-protocol/src/packets/game/c_tab_list.rs @@ -3,7 +3,7 @@ use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundTabListPacket { +pub struct ClientboundTabList { pub header: FormattedText, pub footer: FormattedText, } diff --git a/azalea-protocol/src/packets/game/clientbound_tag_query_packet.rs b/azalea-protocol/src/packets/game/c_tag_query.rs similarity index 84% rename from azalea-protocol/src/packets/game/clientbound_tag_query_packet.rs rename to azalea-protocol/src/packets/game/c_tag_query.rs index d1073cd59..41de799d1 100755 --- a/azalea-protocol/src/packets/game/clientbound_tag_query_packet.rs +++ b/azalea-protocol/src/packets/game/c_tag_query.rs @@ -3,7 +3,7 @@ use azalea_protocol_macros::ClientboundGamePacket; use simdnbt::owned::NbtTag; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundTagQueryPacket { +pub struct ClientboundTagQuery { #[var] pub transaction_id: u32, pub tag: NbtTag, diff --git a/azalea-protocol/src/packets/game/clientbound_take_item_entity_packet.rs b/azalea-protocol/src/packets/game/c_take_item_entity.rs similarity index 83% rename from azalea-protocol/src/packets/game/clientbound_take_item_entity_packet.rs rename to azalea-protocol/src/packets/game/c_take_item_entity.rs index 9e29a0fe8..93d636ee6 100755 --- a/azalea-protocol/src/packets/game/clientbound_take_item_entity_packet.rs +++ b/azalea-protocol/src/packets/game/c_take_item_entity.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundTakeItemEntityPacket { +pub struct ClientboundTakeItemEntity { #[var] pub item_id: u32, #[var] diff --git a/azalea-protocol/src/packets/game/clientbound_teleport_entity_packet.rs b/azalea-protocol/src/packets/game/c_teleport_entity.rs similarity index 86% rename from azalea-protocol/src/packets/game/clientbound_teleport_entity_packet.rs rename to azalea-protocol/src/packets/game/c_teleport_entity.rs index c8fbc7180..53fdf9fb9 100755 --- a/azalea-protocol/src/packets/game/clientbound_teleport_entity_packet.rs +++ b/azalea-protocol/src/packets/game/c_teleport_entity.rs @@ -3,7 +3,7 @@ use azalea_core::position::Vec3; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundTeleportEntityPacket { +pub struct ClientboundTeleportEntity { #[var] pub id: u32, pub position: Vec3, diff --git a/azalea-protocol/src/packets/game/clientbound_ticking_state_packet.rs b/azalea-protocol/src/packets/game/c_ticking_state.rs similarity index 80% rename from azalea-protocol/src/packets/game/clientbound_ticking_state_packet.rs rename to azalea-protocol/src/packets/game/c_ticking_state.rs index a85429a2c..f262fa290 100644 --- a/azalea-protocol/src/packets/game/clientbound_ticking_state_packet.rs +++ b/azalea-protocol/src/packets/game/c_ticking_state.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundTickingStatePacket { +pub struct ClientboundTickingState { pub tick_rate: f32, pub is_frozen: bool, } diff --git a/azalea-protocol/src/packets/game/clientbound_ticking_step_packet.rs b/azalea-protocol/src/packets/game/c_ticking_step.rs similarity index 79% rename from azalea-protocol/src/packets/game/clientbound_ticking_step_packet.rs rename to azalea-protocol/src/packets/game/c_ticking_step.rs index 5a5e64406..d238cd01e 100644 --- a/azalea-protocol/src/packets/game/clientbound_ticking_step_packet.rs +++ b/azalea-protocol/src/packets/game/c_ticking_step.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundTickingStepPacket { +pub struct ClientboundTickingStep { #[var] pub tick_steps: u32, } diff --git a/azalea-protocol/src/packets/game/clientbound_transfer_packet.rs b/azalea-protocol/src/packets/game/c_transfer.rs similarity index 82% rename from azalea-protocol/src/packets/game/clientbound_transfer_packet.rs rename to azalea-protocol/src/packets/game/c_transfer.rs index dbce36e04..1942c6d97 100644 --- a/azalea-protocol/src/packets/game/clientbound_transfer_packet.rs +++ b/azalea-protocol/src/packets/game/c_transfer.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundTransferPacket { +pub struct ClientboundTransfer { pub host: String, #[var] pub port: u32, diff --git a/azalea-protocol/src/packets/game/clientbound_update_advancements_packet.rs b/azalea-protocol/src/packets/game/c_update_advancements.rs similarity index 96% rename from azalea-protocol/src/packets/game/clientbound_update_advancements_packet.rs rename to azalea-protocol/src/packets/game/c_update_advancements.rs index 5934b4436..1d717e6eb 100755 --- a/azalea-protocol/src/packets/game/clientbound_update_advancements_packet.rs +++ b/azalea-protocol/src/packets/game/c_update_advancements.rs @@ -8,7 +8,7 @@ use azalea_inventory::ItemSlot; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundUpdateAdvancementsPacket { +pub struct ClientboundUpdateAdvancements { pub reset: bool, pub added: Vec, pub removed: Vec, @@ -124,7 +124,7 @@ mod tests { #[test] fn test() { - let packet = ClientboundUpdateAdvancementsPacket { + let packet = ClientboundUpdateAdvancements { reset: true, added: [AdvancementHolder { id: ResourceLocation::new("minecraft:test"), @@ -167,7 +167,7 @@ mod tests { packet.write_into(&mut data).unwrap(); let mut buf: Cursor<&[u8]> = Cursor::new(&data); - let read_packet = ClientboundUpdateAdvancementsPacket::read_from(&mut buf).unwrap(); + let read_packet = ClientboundUpdateAdvancements::read_from(&mut buf).unwrap(); assert_eq!(packet.reset, read_packet.reset); assert_eq!(packet.removed, read_packet.removed); diff --git a/azalea-protocol/src/packets/game/clientbound_update_attributes_packet.rs b/azalea-protocol/src/packets/game/c_update_attributes.rs similarity index 90% rename from azalea-protocol/src/packets/game/clientbound_update_attributes_packet.rs rename to azalea-protocol/src/packets/game/c_update_attributes.rs index 19d4a7159..1692e936d 100755 --- a/azalea-protocol/src/packets/game/clientbound_update_attributes_packet.rs +++ b/azalea-protocol/src/packets/game/c_update_attributes.rs @@ -4,7 +4,7 @@ use azalea_protocol_macros::ClientboundGamePacket; use azalea_registry::Attribute; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundUpdateAttributesPacket { +pub struct ClientboundUpdateAttributes { #[var] pub entity_id: u32, pub values: Vec, diff --git a/azalea-protocol/src/packets/game/clientbound_update_enabled_features_packet.rs b/azalea-protocol/src/packets/game/c_update_enabled_features.rs similarity index 81% rename from azalea-protocol/src/packets/game/clientbound_update_enabled_features_packet.rs rename to azalea-protocol/src/packets/game/c_update_enabled_features.rs index e08358f77..6a4b71826 100644 --- a/azalea-protocol/src/packets/game/clientbound_update_enabled_features_packet.rs +++ b/azalea-protocol/src/packets/game/c_update_enabled_features.rs @@ -3,6 +3,6 @@ use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundUpdateEnabledFeaturesPacket { +pub struct ClientboundUpdateEnabledFeatures { pub features: Vec, } diff --git a/azalea-protocol/src/packets/game/clientbound_update_mob_effect_packet.rs b/azalea-protocol/src/packets/game/c_update_mob_effect.rs similarity index 87% rename from azalea-protocol/src/packets/game/clientbound_update_mob_effect_packet.rs rename to azalea-protocol/src/packets/game/c_update_mob_effect.rs index 5c7abf3ae..1b8446e60 100755 --- a/azalea-protocol/src/packets/game/clientbound_update_mob_effect_packet.rs +++ b/azalea-protocol/src/packets/game/c_update_mob_effect.rs @@ -3,7 +3,7 @@ use azalea_protocol_macros::ClientboundGamePacket; use azalea_registry::MobEffect; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundUpdateMobEffectPacket { +pub struct ClientboundUpdateMobEffect { #[var] pub entity_id: u32, pub mob_effect: MobEffect, diff --git a/azalea-protocol/src/packets/game/clientbound_update_recipes_packet.rs b/azalea-protocol/src/packets/game/c_update_recipes.rs similarity index 97% rename from azalea-protocol/src/packets/game/clientbound_update_recipes_packet.rs rename to azalea-protocol/src/packets/game/c_update_recipes.rs index 4c950f90a..9f6ca0da2 100755 --- a/azalea-protocol/src/packets/game/clientbound_update_recipes_packet.rs +++ b/azalea-protocol/src/packets/game/c_update_recipes.rs @@ -7,7 +7,7 @@ use azalea_protocol_macros::ClientboundGamePacket; use azalea_registry::HolderSet; #[derive(Clone, Debug, PartialEq, McBuf, ClientboundGamePacket)] -pub struct ClientboundUpdateRecipesPacket { +pub struct ClientboundUpdateRecipes { pub item_sets: HashMap, pub stonecutter_recipes: Vec, } diff --git a/azalea-protocol/src/packets/game/clientbound_update_tags_packet.rs b/azalea-protocol/src/packets/game/c_update_tags.rs similarity index 98% rename from azalea-protocol/src/packets/game/clientbound_update_tags_packet.rs rename to azalea-protocol/src/packets/game/c_update_tags.rs index bcdef64a9..79b596f3c 100755 --- a/azalea-protocol/src/packets/game/clientbound_update_tags_packet.rs +++ b/azalea-protocol/src/packets/game/c_update_tags.rs @@ -8,7 +8,7 @@ use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] -pub struct ClientboundUpdateTagsPacket { +pub struct ClientboundUpdateTags { pub tags: TagMap, } diff --git a/azalea-protocol/src/packets/game/mod.rs b/azalea-protocol/src/packets/game/mod.rs index 55d6faaff..8599fb3b9 100755 --- a/azalea-protocol/src/packets/game/mod.rs +++ b/azalea-protocol/src/packets/game/mod.rs @@ -1,194 +1,194 @@ -pub mod clientbound_add_entity_packet; -pub mod clientbound_add_experience_orb_packet; -pub mod clientbound_animate_packet; -pub mod clientbound_award_stats_packet; -pub mod clientbound_block_changed_ack_packet; -pub mod clientbound_block_destruction_packet; -pub mod clientbound_block_entity_data_packet; -pub mod clientbound_block_event_packet; -pub mod clientbound_block_update_packet; -pub mod clientbound_boss_event_packet; -pub mod clientbound_bundle_packet; -pub mod clientbound_change_difficulty_packet; -pub mod clientbound_chunk_batch_finished_packet; -pub mod clientbound_chunk_batch_start_packet; -pub mod clientbound_chunks_biomes_packet; -pub mod clientbound_clear_titles_packet; -pub mod clientbound_command_suggestions_packet; -pub mod clientbound_commands_packet; -pub mod clientbound_container_close_packet; -pub mod clientbound_container_set_content_packet; -pub mod clientbound_container_set_data_packet; -pub mod clientbound_container_set_slot_packet; -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; -pub mod clientbound_horse_screen_open_packet; -pub mod clientbound_hurt_animation_packet; -pub mod clientbound_initialize_border_packet; -pub mod clientbound_keep_alive_packet; -pub mod clientbound_level_chunk_with_light_packet; -pub mod clientbound_level_event_packet; -pub mod clientbound_level_particles_packet; -pub mod clientbound_light_update_packet; -pub mod clientbound_login_packet; -pub mod clientbound_map_item_data_packet; -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; -pub mod clientbound_open_sign_editor_packet; -pub mod clientbound_ping_packet; -pub mod clientbound_place_ghost_recipe_packet; -pub mod clientbound_player_abilities_packet; -pub mod clientbound_player_chat_packet; -pub mod clientbound_player_combat_end_packet; -pub mod clientbound_player_combat_enter_packet; -pub mod clientbound_player_combat_kill_packet; -pub mod clientbound_player_info_remove_packet; -pub mod clientbound_player_info_update_packet; -pub mod clientbound_player_look_at_packet; -pub mod clientbound_player_position_packet; -pub mod clientbound_player_rotation_packet; -pub mod clientbound_pong_response_packet; -pub mod clientbound_projectile_power_packet; -pub mod clientbound_recipe_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; -pub mod clientbound_resource_pack_pop_packet; -pub mod clientbound_resource_pack_push_packet; -pub mod clientbound_respawn_packet; -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; -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_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; -pub mod clientbound_set_entity_link_packet; -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; -pub mod clientbound_set_subtitle_text_packet; -pub mod clientbound_set_time_packet; -pub mod clientbound_set_title_text_packet; -pub mod clientbound_set_titles_animation_packet; -pub mod clientbound_sound_entity_packet; -pub mod clientbound_sound_packet; -pub mod clientbound_start_configuration_packet; -pub mod clientbound_stop_sound_packet; -pub mod clientbound_store_cookie_packet; -pub mod clientbound_system_chat_packet; -pub mod clientbound_tab_list_packet; -pub mod clientbound_tag_query_packet; -pub mod clientbound_take_item_entity_packet; -pub mod clientbound_teleport_entity_packet; -pub mod clientbound_ticking_state_packet; -pub mod clientbound_ticking_step_packet; -pub mod clientbound_transfer_packet; -pub mod clientbound_update_advancements_packet; -pub mod clientbound_update_attributes_packet; -pub mod clientbound_update_mob_effect_packet; -pub mod clientbound_update_recipes_packet; -pub mod clientbound_update_tags_packet; -pub mod serverbound_accept_teleportation_packet; -pub mod serverbound_block_entity_tag_query_packet; -pub mod serverbound_change_difficulty_packet; -pub mod serverbound_chat_ack_packet; -pub mod serverbound_chat_command_packet; -pub mod serverbound_chat_command_signed_packet; -pub mod serverbound_chat_packet; -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; -pub mod serverbound_container_click_packet; -pub mod serverbound_container_close_packet; -pub mod serverbound_container_slot_state_changed_packet; -pub mod serverbound_cookie_response_packet; -pub mod serverbound_custom_payload_packet; -pub mod serverbound_debug_sample_subscription; -pub mod serverbound_edit_book_packet; -pub mod serverbound_entity_tag_query_packet; -pub mod serverbound_interact_packet; -pub mod serverbound_jigsaw_generate_packet; -pub mod serverbound_keep_alive_packet; -pub mod serverbound_lock_difficulty_packet; -pub mod serverbound_move_player_pos_packet; -pub mod serverbound_move_player_pos_rot_packet; -pub mod serverbound_move_player_rot_packet; -pub mod serverbound_move_player_status_only_packet; -pub mod serverbound_move_vehicle_packet; -pub mod serverbound_paddle_boat_packet; -pub mod serverbound_pick_item_packet; -pub mod serverbound_ping_request_packet; -pub mod serverbound_place_recipe_packet; -pub mod serverbound_player_abilities_packet; -pub mod serverbound_player_action_packet; -pub mod serverbound_player_command_packet; -pub mod serverbound_player_input_packet; -pub mod serverbound_pong_packet; -pub mod serverbound_recipe_book_change_settings_packet; -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; -pub mod serverbound_set_command_block_packet; -pub mod serverbound_set_command_minecart_packet; -pub mod serverbound_set_creative_mode_slot_packet; -pub mod serverbound_set_jigsaw_block_packet; -pub mod serverbound_set_structure_block_packet; -pub mod serverbound_sign_update_packet; -pub mod serverbound_swing_packet; -pub mod serverbound_teleport_to_entity_packet; -pub mod serverbound_use_item_on_packet; -pub mod serverbound_use_item_packet; +pub mod c_add_entity; +pub mod c_add_experience_orb; +pub mod c_animate; +pub mod c_award_stats; +pub mod c_block_changed_ack; +pub mod c_block_destruction; +pub mod c_block_entity_data; +pub mod c_block_event; +pub mod c_block_update; +pub mod c_boss_event; +pub mod c_bundle; +pub mod c_change_difficulty; +pub mod c_chunk_batch_finished; +pub mod c_chunk_batch_start; +pub mod c_chunks_biomes; +pub mod c_clear_titles; +pub mod c_command_suggestions; +pub mod c_commands; +pub mod c_container_close; +pub mod c_container_set_content; +pub mod c_container_set_data; +pub mod c_container_set_slot; +pub mod c_cookie_request; +pub mod c_cooldown; +pub mod c_custom_chat_completions; +pub mod c_custom_payload; +pub mod c_custom_report_details; +pub mod c_damage_event; +pub mod c_debug_sample; +pub mod c_delete_chat; +pub mod c_disconnect; +pub mod c_disguised_chat; +pub mod c_entity_event; +pub mod c_entity_position_sync; +pub mod c_explode; +pub mod c_forget_level_chunk; +pub mod c_game_event; +pub mod c_horse_screen_open; +pub mod c_hurt_animation; +pub mod c_initialize_border; +pub mod c_keep_alive; +pub mod c_level_chunk_with_light; +pub mod c_level_event; +pub mod c_level_particles; +pub mod c_light_update; +pub mod c_login; +pub mod c_map_item_data; +pub mod c_merchant_offers; +pub mod c_move_entity_pos; +pub mod c_move_entity_pos_rot; +pub mod c_move_entity_rot; +pub mod c_move_minecart; +pub mod c_move_vehicle; +pub mod c_open_book; +pub mod c_open_screen; +pub mod c_open_sign_editor; +pub mod c_ping; +pub mod c_place_ghost_recipe; +pub mod c_player_abilities; +pub mod c_player_chat; +pub mod c_player_combat_end; +pub mod c_player_combat_enter; +pub mod c_player_combat_kill; +pub mod c_player_info_remove; +pub mod c_player_info_update; +pub mod c_player_look_at; +pub mod c_player_position; +pub mod c_player_rotation; +pub mod c_pong_response; +pub mod c_projectile_power; +pub mod c_recipe_book_add; +pub mod c_recipe_book_remove; +pub mod c_recipe_book_settings; +pub mod c_remove_entities; +pub mod c_remove_mob_effect; +pub mod c_reset_score; +pub mod c_resource_pack_pop; +pub mod c_resource_pack_push; +pub mod c_respawn; +pub mod c_rotate_head; +pub mod c_section_blocks_update; +pub mod c_select_advancements_tab; +pub mod c_server_data; +pub mod c_server_links; +pub mod c_set_action_bar_text; +pub mod c_set_border_center; +pub mod c_set_border_lerp_size; +pub mod c_set_border_size; +pub mod c_set_border_warning_delay; +pub mod c_set_border_warning_distance; +pub mod c_set_camera; +pub mod c_set_chunk_cache_center; +pub mod c_set_chunk_cache_radius; +pub mod c_set_cursor_item; +pub mod c_set_default_spawn_position; +pub mod c_set_display_objective; +pub mod c_set_entity_data; +pub mod c_set_entity_link; +pub mod c_set_entity_motion; +pub mod c_set_equipment; +pub mod c_set_experience; +pub mod c_set_health; +pub mod c_set_held_slot; +pub mod c_set_objective; +pub mod c_set_passengers; +pub mod c_set_player_inventory; +pub mod c_set_player_team; +pub mod c_set_score; +pub mod c_set_simulation_distance; +pub mod c_set_subtitle_text; +pub mod c_set_time; +pub mod c_set_title_text; +pub mod c_set_titles_animation; +pub mod c_sound; +pub mod c_sound_entity; +pub mod c_start_configuration; +pub mod c_stop_sound; +pub mod c_store_cookie; +pub mod c_system_chat; +pub mod c_tab_list; +pub mod c_tag_query; +pub mod c_take_item_entity; +pub mod c_teleport_entity; +pub mod c_ticking_state; +pub mod c_ticking_step; +pub mod c_transfer; +pub mod c_update_advancements; +pub mod c_update_attributes; +pub mod c_update_mob_effect; +pub mod c_update_recipes; +pub mod c_update_tags; +pub mod s_accept_teleportation; +pub mod s_block_entity_tag_query; +pub mod s_change_difficulty; +pub mod s_chat; +pub mod s_chat_ack; +pub mod s_chat_command; +pub mod s_chat_command_signed; +pub mod s_chat_session_update; +pub mod s_chunk_batch_received; +pub mod s_client_command; +pub mod s_client_information; +pub mod s_client_tick_end; +pub mod s_command_suggestion; +pub mod s_configuration_acknowledged; +pub mod s_container_button_click; +pub mod s_container_click; +pub mod s_container_close; +pub mod s_container_slot_state_changed; +pub mod s_cookie_response; +pub mod s_custom_payload; +pub mod s_debug_sample_subscription; +pub mod s_edit_book; +pub mod s_entity_tag_query; +pub mod s_interact; +pub mod s_jigsaw_generate; +pub mod s_keep_alive; +pub mod s_lock_difficulty; +pub mod s_move_player_pos; +pub mod s_move_player_pos_rot; +pub mod s_move_player_rot; +pub mod s_move_player_status_only; +pub mod s_move_vehicle; +pub mod s_paddle_boat; +pub mod s_pick_item; +pub mod s_ping_request; +pub mod s_place_recipe; +pub mod s_player_abilities; +pub mod s_player_action; +pub mod s_player_command; +pub mod s_player_input; +pub mod s_pong; +pub mod s_recipe_book_change_settings; +pub mod s_recipe_book_seen_recipe; +pub mod s_rename_item; +pub mod s_resource_pack; +pub mod s_seen_advancements; +pub mod s_select_bundle_item; +pub mod s_select_trade; +pub mod s_set_beacon; +pub mod s_set_carried_item; +pub mod s_set_command_block; +pub mod s_set_command_minecart; +pub mod s_set_creative_mode_slot; +pub mod s_set_jigsaw_block; +pub mod s_set_structure_block; +pub mod s_sign_update; +pub mod s_swing; +pub mod s_teleport_to_entity; +pub mod s_use_item; +pub mod s_use_item_on; use azalea_protocol_macros::declare_state_packets; @@ -197,198 +197,198 @@ use azalea_protocol_macros::declare_state_packets; declare_state_packets!( GamePacket, Serverbound => { - 0x00: serverbound_accept_teleportation_packet::ServerboundAcceptTeleportationPacket, - 0x01: serverbound_block_entity_tag_query_packet::ServerboundBlockEntityTagQueryPacket, - 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, + 0x00: s_accept_teleportation::ServerboundAcceptTeleportation, + 0x01: s_block_entity_tag_query::ServerboundBlockEntityTagQuery, + 0x02: s_select_bundle_item::ServerboundSelectBundleItem, + 0x03: s_change_difficulty::ServerboundChangeDifficulty, + 0x04: s_chat_ack::ServerboundChatAck, + 0x05: s_chat_command::ServerboundChatCommand, + 0x06: s_chat_command_signed::ServerboundChatCommandSigned, + 0x07: s_chat::ServerboundChat, + 0x08: s_chat_session_update::ServerboundChatSessionUpdate, + 0x09: s_chunk_batch_received::ServerboundChunkBatchReceived, + 0x0a: s_client_command::ServerboundClientCommand, + 0x0b: s_client_tick_end::ServerboundTickEnd, + 0x0c: s_client_information::ServerboundClientInformation, + 0x0d: s_command_suggestion::ServerboundCommandSuggestion, + 0x0e: s_configuration_acknowledged::ServerboundConfigurationAcknowledged, + 0x0f: s_container_button_click::ServerboundContainerButtonClick, + 0x10: s_container_click::ServerboundContainerClick, + 0x11: s_container_close::ServerboundContainerClose, + 0x12: s_container_slot_state_changed::ServerboundContainerSlotStateChanged, + 0x13: s_cookie_response::ServerboundCookieResponse, + 0x14: s_custom_payload::ServerboundCustomPayload, + 0x15: s_debug_sample_subscription::ServerboundDebugSampleSubscription, + 0x16: s_edit_book::ServerboundEditBook, + 0x17: s_entity_tag_query::ServerboundEntityTagQuery, + 0x18: s_interact::ServerboundInteract, + 0x19: s_jigsaw_generate::ServerboundJigsawGenerate, + 0x1a: s_keep_alive::ServerboundKeepAlive, + 0x1b: s_lock_difficulty::ServerboundLockDifficulty, + 0x1c: s_move_player_pos::ServerboundMovePlayerPos, + 0x1d: s_move_player_pos_rot::ServerboundMovePlayerPosRot, + 0x1e: s_move_player_rot::ServerboundMovePlayerRot, + 0x1f: s_move_player_status_only::ServerboundMovePlayerStatusOnly, + 0x20: s_move_vehicle::ServerboundMoveVehicle, + 0x21: s_paddle_boat::ServerboundPaddleBoat, + 0x22: s_pick_item::ServerboundPickItem, + 0x23: s_ping_request::ServerboundPingRequest, + 0x24: s_place_recipe::ServerboundPlaceRecipe, + 0x25: s_player_abilities::ServerboundPlayerAbilities, + 0x26: s_player_action::ServerboundPlayerAction, + 0x27: s_player_command::ServerboundPlayerCommand, + 0x28: s_player_input::ServerboundPlayerInput, + 0x29: s_pong::ServerboundPong, + 0x2a: s_recipe_book_change_settings::ServerboundRecipeBookChangeSettings, + 0x2b: s_recipe_book_seen_recipe::ServerboundRecipeBookSeenRecipe, + 0x2c: s_rename_item::ServerboundRenameItem, + 0x2d: s_resource_pack::ServerboundResourcePack, + 0x2e: s_seen_advancements::ServerboundSeenAdvancements, + 0x2f: s_select_trade::ServerboundSelectTrade, + 0x30: s_set_beacon::ServerboundSetBeacon, + 0x31: s_set_carried_item::ServerboundSetCarriedItem, + 0x32: s_set_command_block::ServerboundSetCommandBlock, + 0x33: s_set_command_minecart::ServerboundSetCommandMinecart, + 0x34: s_set_creative_mode_slot::ServerboundSetCreativeModeSlot, + 0x35: s_set_jigsaw_block::ServerboundSetJigsawBlock, + 0x36: s_set_structure_block::ServerboundSetStructureBlock, + 0x37: s_sign_update::ServerboundSignUpdate, + 0x38: s_swing::ServerboundSwing, + 0x39: s_teleport_to_entity::ServerboundTeleportToEntity, + 0x3a: s_use_item_on::ServerboundUseItemOn, + 0x3b: s_use_item::ServerboundUseItem, }, Clientbound => { - 0x00: clientbound_bundle_packet::ClientboundBundlePacket, - 0x01: clientbound_add_entity_packet::ClientboundAddEntityPacket, - 0x02: clientbound_add_experience_orb_packet::ClientboundAddExperienceOrbPacket, - 0x03: clientbound_animate_packet::ClientboundAnimatePacket, - 0x04: clientbound_award_stats_packet::ClientboundAwardStatsPacket, - 0x05: clientbound_block_changed_ack_packet::ClientboundBlockChangedAckPacket, - 0x06: clientbound_block_destruction_packet::ClientboundBlockDestructionPacket, - 0x07: clientbound_block_entity_data_packet::ClientboundBlockEntityDataPacket, - 0x08: clientbound_block_event_packet::ClientboundBlockEventPacket, - 0x09: clientbound_block_update_packet::ClientboundBlockUpdatePacket, - 0x0a: clientbound_boss_event_packet::ClientboundBossEventPacket, - 0x0b: clientbound_change_difficulty_packet::ClientboundChangeDifficultyPacket, - 0x0c: clientbound_chunk_batch_finished_packet::ClientboundChunkBatchFinishedPacket, - 0x0d: clientbound_chunk_batch_start_packet::ClientboundChunkBatchStartPacket, - 0x0e: clientbound_chunks_biomes_packet::ClientboundChunksBiomesPacket, - 0x0f: clientbound_clear_titles_packet::ClientboundClearTitlesPacket, - 0x10: clientbound_command_suggestions_packet::ClientboundCommandSuggestionsPacket, - 0x11: clientbound_commands_packet::ClientboundCommandsPacket, - 0x12: clientbound_container_close_packet::ClientboundContainerClosePacket, - 0x13: clientbound_container_set_content_packet::ClientboundContainerSetContentPacket, - 0x14: clientbound_container_set_data_packet::ClientboundContainerSetDataPacket, - 0x15: clientbound_container_set_slot_packet::ClientboundContainerSetSlotPacket, - 0x16: clientbound_cookie_request_packet::ClientboundCookieRequestPacket, - 0x17: clientbound_cooldown_packet::ClientboundCooldownPacket, - 0x18: clientbound_custom_chat_completions_packet::ClientboundCustomChatCompletionsPacket, - 0x19: clientbound_custom_payload_packet::ClientboundCustomPayloadPacket, - 0x1a: clientbound_damage_event_packet::ClientboundDamageEventPacket, - 0x1b: clientbound_debug_sample_packet::ClientboundDebugSamplePacket, - 0x1c: clientbound_delete_chat_packet::ClientboundDeleteChatPacket, - 0x1d: clientbound_disconnect_packet::ClientboundDisconnectPacket, - 0x1e: clientbound_disguised_chat_packet::ClientboundDisguisedChatPacket, - 0x1f: clientbound_entity_event_packet::ClientboundEntityEventPacket, - 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 + 0x00: c_bundle::ClientboundBundle, + 0x01: c_add_entity::ClientboundAddEntity, + 0x02: c_add_experience_orb::ClientboundAddExperienceOrb, + 0x03: c_animate::ClientboundAnimate, + 0x04: c_award_stats::ClientboundAwardStats, + 0x05: c_block_changed_ack::ClientboundBlockChangedAck, + 0x06: c_block_destruction::ClientboundBlockDestruction, + 0x07: c_block_entity_data::ClientboundBlockEntityData, + 0x08: c_block_event::ClientboundBlockEvent, + 0x09: c_block_update::ClientboundBlockUpdate, + 0x0a: c_boss_event::ClientboundBossEvent, + 0x0b: c_change_difficulty::ClientboundChangeDifficulty, + 0x0c: c_chunk_batch_finished::ClientboundChunkBatchFinished, + 0x0d: c_chunk_batch_start::ClientboundChunkBatchStart, + 0x0e: c_chunks_biomes::ClientboundChunksBiomes, + 0x0f: c_clear_titles::ClientboundClearTitles, + 0x10: c_command_suggestions::ClientboundCommandSuggestions, + 0x11: c_commands::ClientboundCommands, + 0x12: c_container_close::ClientboundContainerClose, + 0x13: c_container_set_content::ClientboundContainerSetContent, + 0x14: c_container_set_data::ClientboundContainerSetData, + 0x15: c_container_set_slot::ClientboundContainerSetSlot, + 0x16: c_cookie_request::ClientboundCookieRequest, + 0x17: c_cooldown::ClientboundCooldown, + 0x18: c_custom_chat_completions::ClientboundCustomChatCompletions, + 0x19: c_custom_payload::ClientboundCustomPayload, + 0x1a: c_damage_event::ClientboundDamageEvent, + 0x1b: c_debug_sample::ClientboundDebugSample, + 0x1c: c_delete_chat::ClientboundDeleteChat, + 0x1d: c_disconnect::ClientboundDisconnect, + 0x1e: c_disguised_chat::ClientboundDisguisedChat, + 0x1f: c_entity_event::ClientboundEntityEvent, + 0x20: c_entity_position_sync::ClientboundEntityPositionSync, + 0x21: c_explode::ClientboundExplode, + 0x22: c_forget_level_chunk::ClientboundForgetLevelChunk, + 0x23: c_game_event::ClientboundGameEvent, + 0x24: c_horse_screen_open::ClientboundHorseScreenOpen, + 0x25: c_hurt_animation::ClientboundHurtAnimation, + 0x26: c_initialize_border::ClientboundInitializeBorder, + 0x27: c_keep_alive::ClientboundKeepAlive, + 0x28: c_level_chunk_with_light::ClientboundLevelChunkWithLight, + 0x29: c_level_event::ClientboundLevelEvent, + 0x2a: c_level_particles::ClientboundLevelParticles, + 0x2b: c_light_update::ClientboundLightUpdate, + 0x2c: c_login::ClientboundLogin, + 0x2d: c_map_item_data::ClientboundMapItemData, + 0x2e: c_merchant_offers::ClientboundMerchantOffers, + 0x2f: c_move_entity_pos::ClientboundMoveEntityPos, + 0x30: c_move_entity_pos_rot::ClientboundMoveEntityPosRot, + 0x31: c_move_minecart::ClientboundMoveMinecart, + 0x32: c_move_entity_rot::ClientboundMoveEntityRot, + 0x33: c_move_vehicle::ClientboundMoveVehicle, + 0x34: c_open_book::ClientboundOpenBook, + 0x35: c_open_screen::ClientboundOpenScreen, + 0x36: c_open_sign_editor::ClientboundOpenSignEditor, + 0x37: c_ping::ClientboundPing, + 0x38: c_pong_response::ClientboundPongResponse, + 0x39: c_place_ghost_recipe::ClientboundPlaceGhostRecipe, + 0x3a: c_player_abilities::ClientboundPlayerAbilities, + 0x3b: c_player_chat::ClientboundPlayerChat, + 0x3c: c_player_combat_end::ClientboundPlayerCombatEnd, + 0x3d: c_player_combat_enter::ClientboundPlayerCombatEnter, + 0x3e: c_player_combat_kill::ClientboundPlayerCombatKill, + 0x3f: c_player_info_remove::ClientboundPlayerInfoRemove, + 0x40: c_player_info_update::ClientboundPlayerInfoUpdate, + 0x41: c_player_look_at::ClientboundPlayerLookAt, + 0x42: c_player_position::ClientboundPlayerPosition, + 0x43: c_player_rotation::ClientboundPlayerRotation, + 0x44: c_recipe_book_add::ClientboundRecipeBookAdd, + 0x45: c_recipe_book_remove::ClientboundRecipeBookRemove, + 0x46: c_recipe_book_settings::ClientboundRecipeBookSettings, + 0x47: c_remove_entities::ClientboundRemoveEntities, + 0x48: c_remove_mob_effect::ClientboundRemoveMobEffect, + 0x49: c_reset_score::ClientboundResetScore, + 0x4a: c_resource_pack_pop::ClientboundResourcePackPop, + 0x4b: c_resource_pack_push::ClientboundResourcePackPush, + 0x4c: c_respawn::ClientboundRespawn, + 0x4d: c_rotate_head::ClientboundRotateHead, + 0x4e: c_section_blocks_update::ClientboundSectionBlocksUpdate, + 0x4f: c_select_advancements_tab::ClientboundSelectAdvancementsTab, + 0x50: c_server_data::ClientboundServerData, + 0x51: c_set_action_bar_text::ClientboundSetActionBarText, + 0x52: c_set_border_center::ClientboundSetBorderCenter, + 0x53: c_set_border_lerp_size::ClientboundSetBorderLerpSize, + 0x54: c_set_border_size::ClientboundSetBorderSize, + 0x55: c_set_border_warning_delay::ClientboundSetBorderWarningDelay, + 0x56: c_set_border_warning_distance::ClientboundSetBorderWarningDistance, + 0x57: c_set_camera::ClientboundSetCamera, + 0x58: c_set_chunk_cache_center::ClientboundSetChunkCacheCenter, + 0x59: c_set_chunk_cache_radius::ClientboundSetChunkCacheRadius, + 0x5a: c_set_cursor_item::ClientboundSetCursorItem, + 0x5b: c_set_default_spawn_position::ClientboundSetDefaultSpawnPosition, + 0x5c: c_set_display_objective::ClientboundSetDisplayObjective, + 0x5d: c_set_entity_data::ClientboundSetEntityData, + 0x5e: c_set_entity_link::ClientboundSetEntityLink, + 0x5f: c_set_entity_motion::ClientboundSetEntityMotion, + 0x60: c_set_equipment::ClientboundSetEquipment, + 0x61: c_set_experience::ClientboundSetExperience, + 0x62: c_set_health::ClientboundSetHealth, + 0x63: c_set_held_slot::ClientboundSetHeldSlot, + 0x64: c_set_objective::ClientboundSetObjective, + 0x65: c_set_passengers::ClientboundSetPassengers, + 0x66: c_set_player_inventory::ClientboundSetPlayerInventory, + 0x67: c_set_player_team::ClientboundSetPlayerTeam, + 0x68: c_set_score::ClientboundSetScore, + 0x69: c_set_simulation_distance::ClientboundSetSimulationDistance, + 0x6a: c_set_subtitle_text::ClientboundSetSubtitleText, + 0x6b: c_set_time::ClientboundSetTime, + 0x6c: c_set_title_text::ClientboundSetTitleText, + 0x6d: c_set_titles_animation::ClientboundSetTitlesAnimation, + 0x6e: c_sound_entity::ClientboundSoundEntity, + 0x6f: c_sound::ClientboundSound, + 0x70: c_start_configuration::ClientboundStartConfiguration, + 0x71: c_stop_sound::ClientboundStopSound, + 0x72: c_store_cookie::ClientboundStoreCookie, + 0x73: c_system_chat::ClientboundSystemChat, + 0x74: c_tab_list::ClientboundTabList, + 0x75: c_tag_query::ClientboundTagQuery, + 0x76: c_take_item_entity::ClientboundTakeItemEntity, + 0x77: c_teleport_entity::ClientboundTeleportEntity, + 0x78: c_ticking_state::ClientboundTickingState, + 0x79: c_ticking_step::ClientboundTickingStep, + 0x7a: c_transfer::ClientboundTransfer, + 0x7b: c_update_advancements::ClientboundUpdateAdvancements, + 0x7c: c_update_attributes::ClientboundUpdateAttributes, + 0x7d: c_update_mob_effect::ClientboundUpdateMobEffect, + 0x7e: c_update_recipes::ClientboundUpdateRecipes, + 0x7f: c_update_tags::ClientboundUpdateTags, + 0x80: c_projectile_power::ClientboundProjectilePower, + 0x81: c_custom_report_details::ClientboundCustomReportDetails, + 0x82: c_server_links::ClientboundServerLinks } ); diff --git a/azalea-protocol/src/packets/game/serverbound_accept_teleportation_packet.rs b/azalea-protocol/src/packets/game/s_accept_teleportation.rs similarity index 76% rename from azalea-protocol/src/packets/game/serverbound_accept_teleportation_packet.rs rename to azalea-protocol/src/packets/game/s_accept_teleportation.rs index 85311e489..7d18be5c2 100755 --- a/azalea-protocol/src/packets/game/serverbound_accept_teleportation_packet.rs +++ b/azalea-protocol/src/packets/game/s_accept_teleportation.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundAcceptTeleportationPacket { +pub struct ServerboundAcceptTeleportation { #[var] pub id: u32, } diff --git a/azalea-protocol/src/packets/game/serverbound_block_entity_tag_query.rs b/azalea-protocol/src/packets/game/s_block_entity_tag_query.rs old mode 100755 new mode 100644 similarity index 89% rename from azalea-protocol/src/packets/game/serverbound_block_entity_tag_query.rs rename to azalea-protocol/src/packets/game/s_block_entity_tag_query.rs index 4b396a677..b66f2d89f --- a/azalea-protocol/src/packets/game/serverbound_block_entity_tag_query.rs +++ b/azalea-protocol/src/packets/game/s_block_entity_tag_query.rs @@ -5,6 +5,6 @@ use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] pub struct ServerboundBlockEntityTagQuery { #[var] - pub transaction_id: i32, + pub transaction_id: u32, pub pos: BlockPos, } diff --git a/azalea-protocol/src/packets/game/serverbound_change_difficulty_packet.rs b/azalea-protocol/src/packets/game/s_change_difficulty.rs similarity index 81% rename from azalea-protocol/src/packets/game/serverbound_change_difficulty_packet.rs rename to azalea-protocol/src/packets/game/s_change_difficulty.rs index 460de5b25..f991e4b4e 100755 --- a/azalea-protocol/src/packets/game/serverbound_change_difficulty_packet.rs +++ b/azalea-protocol/src/packets/game/s_change_difficulty.rs @@ -3,6 +3,6 @@ use azalea_core::difficulty::Difficulty; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundChangeDifficultyPacket { +pub struct ServerboundChangeDifficulty { pub difficulty: Difficulty, } diff --git a/azalea-protocol/src/packets/game/serverbound_chat_packet.rs b/azalea-protocol/src/packets/game/s_chat.rs similarity index 93% rename from azalea-protocol/src/packets/game/serverbound_chat_packet.rs rename to azalea-protocol/src/packets/game/s_chat.rs index e0a1726c7..4e2210818 100755 --- a/azalea-protocol/src/packets/game/serverbound_chat_packet.rs +++ b/azalea-protocol/src/packets/game/s_chat.rs @@ -4,7 +4,7 @@ use azalea_crypto::MessageSignature; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundChatPacket { +pub struct ServerboundChat { pub message: String, pub timestamp: u64, pub salt: u64, diff --git a/azalea-protocol/src/packets/game/serverbound_chat_ack_packet.rs b/azalea-protocol/src/packets/game/s_chat_ack.rs similarity index 81% rename from azalea-protocol/src/packets/game/serverbound_chat_ack_packet.rs rename to azalea-protocol/src/packets/game/s_chat_ack.rs index eaf285cbe..96477ff20 100755 --- a/azalea-protocol/src/packets/game/serverbound_chat_ack_packet.rs +++ b/azalea-protocol/src/packets/game/s_chat_ack.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundChatAckPacket { +pub struct ServerboundChatAck { #[var] pub messages: u32, } diff --git a/azalea-protocol/src/packets/game/serverbound_chat_command_packet.rs b/azalea-protocol/src/packets/game/s_chat_command.rs similarity index 78% rename from azalea-protocol/src/packets/game/serverbound_chat_command_packet.rs rename to azalea-protocol/src/packets/game/s_chat_command.rs index 23a796d89..84035ffcb 100755 --- a/azalea-protocol/src/packets/game/serverbound_chat_command_packet.rs +++ b/azalea-protocol/src/packets/game/s_chat_command.rs @@ -2,6 +2,6 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundChatCommandPacket { +pub struct ServerboundChatCommand { pub command: String, } diff --git a/azalea-protocol/src/packets/game/serverbound_chat_command_signed_packet.rs b/azalea-protocol/src/packets/game/s_chat_command_signed.rs similarity index 81% rename from azalea-protocol/src/packets/game/serverbound_chat_command_signed_packet.rs rename to azalea-protocol/src/packets/game/s_chat_command_signed.rs index f64b79ccf..9b5bf5f0f 100755 --- a/azalea-protocol/src/packets/game/serverbound_chat_command_signed_packet.rs +++ b/azalea-protocol/src/packets/game/s_chat_command_signed.rs @@ -2,10 +2,10 @@ use azalea_buf::McBuf; use azalea_crypto::MessageSignature; use azalea_protocol_macros::ServerboundGamePacket; -use super::serverbound_chat_packet::LastSeenMessagesUpdate; +use super::s_chat::LastSeenMessagesUpdate; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundChatCommandSignedPacket { +pub struct ServerboundChatCommandSigned { pub command: String, pub timestamp: u64, pub salt: u64, diff --git a/azalea-protocol/src/packets/game/serverbound_chat_preview_packet.rs b/azalea-protocol/src/packets/game/s_chat_preview.rs similarity index 80% rename from azalea-protocol/src/packets/game/serverbound_chat_preview_packet.rs rename to azalea-protocol/src/packets/game/s_chat_preview.rs index 50b447288..688c19b4f 100755 --- a/azalea-protocol/src/packets/game/serverbound_chat_preview_packet.rs +++ b/azalea-protocol/src/packets/game/s_chat_preview.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundChatPreviewPacket { +pub struct ServerboundChatPreview { pub query_id: i32, pub query: String, } diff --git a/azalea-protocol/src/packets/game/serverbound_chat_session_update_packet.rs b/azalea-protocol/src/packets/game/s_chat_session_update.rs similarity index 91% rename from azalea-protocol/src/packets/game/serverbound_chat_session_update_packet.rs rename to azalea-protocol/src/packets/game/s_chat_session_update.rs index e56d2bc62..6da67e378 100644 --- a/azalea-protocol/src/packets/game/serverbound_chat_session_update_packet.rs +++ b/azalea-protocol/src/packets/game/s_chat_session_update.rs @@ -3,7 +3,7 @@ use azalea_protocol_macros::ServerboundGamePacket; use uuid::Uuid; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundChatSessionUpdatePacket { +pub struct ServerboundChatSessionUpdate { pub chat_session: RemoteChatSessionData, } diff --git a/azalea-protocol/src/packets/game/serverbound_chunk_batch_received_packet.rs b/azalea-protocol/src/packets/game/s_chunk_batch_received.rs similarity index 77% rename from azalea-protocol/src/packets/game/serverbound_chunk_batch_received_packet.rs rename to azalea-protocol/src/packets/game/s_chunk_batch_received.rs index 9f18f9673..d8aa35648 100644 --- a/azalea-protocol/src/packets/game/serverbound_chunk_batch_received_packet.rs +++ b/azalea-protocol/src/packets/game/s_chunk_batch_received.rs @@ -2,6 +2,6 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundChunkBatchReceivedPacket { +pub struct ServerboundChunkBatchReceived { pub desired_chunks_per_tick: f32, } diff --git a/azalea-protocol/src/packets/game/serverbound_client_command_packet.rs b/azalea-protocol/src/packets/game/s_client_command.rs similarity index 85% rename from azalea-protocol/src/packets/game/serverbound_client_command_packet.rs rename to azalea-protocol/src/packets/game/s_client_command.rs index 2f360cb94..3a8d30249 100755 --- a/azalea-protocol/src/packets/game/serverbound_client_command_packet.rs +++ b/azalea-protocol/src/packets/game/s_client_command.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundClientCommandPacket { +pub struct ServerboundClientCommand { pub action: Action, } diff --git a/azalea-protocol/src/packets/game/serverbound_client_information_packet.rs b/azalea-protocol/src/packets/game/s_client_information.rs similarity index 54% rename from azalea-protocol/src/packets/game/serverbound_client_information_packet.rs rename to azalea-protocol/src/packets/game/s_client_information.rs index 37a101f5d..722a42715 100755 --- a/azalea-protocol/src/packets/game/serverbound_client_information_packet.rs +++ b/azalea-protocol/src/packets/game/s_client_information.rs @@ -1,9 +1,9 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; -use crate::packets::configuration::serverbound_client_information_packet::ClientInformation; +use crate::common::ClientInformation; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundClientInformationPacket { +pub struct ServerboundClientInformation { pub information: ClientInformation, } diff --git a/azalea-protocol/src/packets/game/serverbound_client_tick_end_packet.rs b/azalea-protocol/src/packets/game/s_client_tick_end.rs similarity index 76% rename from azalea-protocol/src/packets/game/serverbound_client_tick_end_packet.rs rename to azalea-protocol/src/packets/game/s_client_tick_end.rs index c843066ed..4338f452e 100644 --- a/azalea-protocol/src/packets/game/serverbound_client_tick_end_packet.rs +++ b/azalea-protocol/src/packets/game/s_client_tick_end.rs @@ -2,4 +2,4 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundTickEndPacket {} +pub struct ServerboundTickEnd {} diff --git a/azalea-protocol/src/packets/game/serverbound_command_suggestion_packet.rs b/azalea-protocol/src/packets/game/s_command_suggestion.rs similarity index 79% rename from azalea-protocol/src/packets/game/serverbound_command_suggestion_packet.rs rename to azalea-protocol/src/packets/game/s_command_suggestion.rs index 0cca3ceb1..6bcbf7394 100755 --- a/azalea-protocol/src/packets/game/serverbound_command_suggestion_packet.rs +++ b/azalea-protocol/src/packets/game/s_command_suggestion.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundCommandSuggestionPacket { +pub struct ServerboundCommandSuggestion { #[var] pub id: u32, pub command: String, diff --git a/azalea-protocol/src/packets/game/serverbound_configuration_acknowledged_packet.rs b/azalea-protocol/src/packets/game/s_configuration_acknowledged.rs similarity index 69% rename from azalea-protocol/src/packets/game/serverbound_configuration_acknowledged_packet.rs rename to azalea-protocol/src/packets/game/s_configuration_acknowledged.rs index c790972aa..72539acb1 100644 --- a/azalea-protocol/src/packets/game/serverbound_configuration_acknowledged_packet.rs +++ b/azalea-protocol/src/packets/game/s_configuration_acknowledged.rs @@ -2,4 +2,4 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundConfigurationAcknowledgedPacket {} +pub struct ServerboundConfigurationAcknowledged {} diff --git a/azalea-protocol/src/packets/game/serverbound_container_button_click_packet.rs b/azalea-protocol/src/packets/game/s_container_button_click.rs similarity index 77% rename from azalea-protocol/src/packets/game/serverbound_container_button_click_packet.rs rename to azalea-protocol/src/packets/game/s_container_button_click.rs index 739e73905..834a16a5b 100755 --- a/azalea-protocol/src/packets/game/serverbound_container_button_click_packet.rs +++ b/azalea-protocol/src/packets/game/s_container_button_click.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundContainerButtonClickPacket { +pub struct ServerboundContainerButtonClick { pub container_id: u8, pub button_id: u8, } diff --git a/azalea-protocol/src/packets/game/serverbound_container_click_packet.rs b/azalea-protocol/src/packets/game/s_container_click.rs similarity index 90% rename from azalea-protocol/src/packets/game/serverbound_container_click_packet.rs rename to azalea-protocol/src/packets/game/s_container_click.rs index e29547205..72aed7f1e 100755 --- a/azalea-protocol/src/packets/game/serverbound_container_click_packet.rs +++ b/azalea-protocol/src/packets/game/s_container_click.rs @@ -5,7 +5,7 @@ use azalea_inventory::{operations::ClickType, ItemSlot}; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundContainerClickPacket { +pub struct ServerboundContainerClick { pub container_id: u8, #[var] pub state_id: u32, diff --git a/azalea-protocol/src/packets/game/serverbound_container_close_packet.rs b/azalea-protocol/src/packets/game/s_container_close.rs similarity index 77% rename from azalea-protocol/src/packets/game/serverbound_container_close_packet.rs rename to azalea-protocol/src/packets/game/s_container_close.rs index dbaf59f3f..5314753f1 100755 --- a/azalea-protocol/src/packets/game/serverbound_container_close_packet.rs +++ b/azalea-protocol/src/packets/game/s_container_close.rs @@ -2,6 +2,6 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundContainerClosePacket { +pub struct ServerboundContainerClose { pub container_id: u8, } diff --git a/azalea-protocol/src/packets/game/serverbound_container_slot_state_changed_packet.rs b/azalea-protocol/src/packets/game/s_container_slot_state_changed.rs similarity index 80% rename from azalea-protocol/src/packets/game/serverbound_container_slot_state_changed_packet.rs rename to azalea-protocol/src/packets/game/s_container_slot_state_changed.rs index 8a83f4e2c..46124c1be 100644 --- a/azalea-protocol/src/packets/game/serverbound_container_slot_state_changed_packet.rs +++ b/azalea-protocol/src/packets/game/s_container_slot_state_changed.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundContainerSlotStateChangedPacket { +pub struct ServerboundContainerSlotStateChanged { #[var] pub slot_id: u32, #[var] diff --git a/azalea-protocol/src/packets/game/serverbound_cookie_response_packet.rs b/azalea-protocol/src/packets/game/s_cookie_response.rs similarity index 84% rename from azalea-protocol/src/packets/game/serverbound_cookie_response_packet.rs rename to azalea-protocol/src/packets/game/s_cookie_response.rs index 8ad0f07ee..7f18248ce 100644 --- a/azalea-protocol/src/packets/game/serverbound_cookie_response_packet.rs +++ b/azalea-protocol/src/packets/game/s_cookie_response.rs @@ -3,7 +3,7 @@ use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundCookieResponsePacket { +pub struct ServerboundCookieResponse { pub key: ResourceLocation, pub payload: Option>, } diff --git a/azalea-protocol/src/packets/game/serverbound_custom_payload_packet.rs b/azalea-protocol/src/packets/game/s_custom_payload.rs similarity index 86% rename from azalea-protocol/src/packets/game/serverbound_custom_payload_packet.rs rename to azalea-protocol/src/packets/game/s_custom_payload.rs index d5d46627b..fd7510624 100755 --- a/azalea-protocol/src/packets/game/serverbound_custom_payload_packet.rs +++ b/azalea-protocol/src/packets/game/s_custom_payload.rs @@ -4,7 +4,7 @@ use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundCustomPayloadPacket { +pub struct ServerboundCustomPayload { pub identifier: ResourceLocation, pub data: UnsizedByteArray, } diff --git a/azalea-protocol/src/packets/game/serverbound_debug_sample_subscription.rs b/azalea-protocol/src/packets/game/s_debug_sample_subscription.rs old mode 100755 new mode 100644 similarity index 100% rename from azalea-protocol/src/packets/game/serverbound_debug_sample_subscription.rs rename to azalea-protocol/src/packets/game/s_debug_sample_subscription.rs diff --git a/azalea-protocol/src/packets/game/serverbound_edit_book_packet.rs b/azalea-protocol/src/packets/game/s_edit_book.rs similarity index 84% rename from azalea-protocol/src/packets/game/serverbound_edit_book_packet.rs rename to azalea-protocol/src/packets/game/s_edit_book.rs index 62d4b3182..3edafebd8 100755 --- a/azalea-protocol/src/packets/game/serverbound_edit_book_packet.rs +++ b/azalea-protocol/src/packets/game/s_edit_book.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundEditBookPacket { +pub struct ServerboundEditBook { #[var] pub slot: u32, pub pages: Vec, diff --git a/azalea-protocol/src/packets/game/serverbound_entity_tag_query.rs b/azalea-protocol/src/packets/game/s_entity_tag_query.rs old mode 100755 new mode 100644 similarity index 100% rename from azalea-protocol/src/packets/game/serverbound_entity_tag_query.rs rename to azalea-protocol/src/packets/game/s_entity_tag_query.rs diff --git a/azalea-protocol/src/packets/game/serverbound_interact_packet.rs b/azalea-protocol/src/packets/game/s_interact.rs similarity index 98% rename from azalea-protocol/src/packets/game/serverbound_interact_packet.rs rename to azalea-protocol/src/packets/game/s_interact.rs index e393920c9..bef47aa29 100755 --- a/azalea-protocol/src/packets/game/serverbound_interact_packet.rs +++ b/azalea-protocol/src/packets/game/s_interact.rs @@ -7,7 +7,7 @@ use azalea_protocol_macros::ServerboundGamePacket; use crate::packets::BufReadError; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundInteractPacket { +pub struct ServerboundInteract { #[var] pub entity_id: u32, pub action: ActionType, diff --git a/azalea-protocol/src/packets/game/serverbound_jigsaw_generate_packet.rs b/azalea-protocol/src/packets/game/s_jigsaw_generate.rs similarity index 84% rename from azalea-protocol/src/packets/game/serverbound_jigsaw_generate_packet.rs rename to azalea-protocol/src/packets/game/s_jigsaw_generate.rs index 34fd5985c..9e2915d89 100755 --- a/azalea-protocol/src/packets/game/serverbound_jigsaw_generate_packet.rs +++ b/azalea-protocol/src/packets/game/s_jigsaw_generate.rs @@ -3,7 +3,7 @@ use azalea_core::position::BlockPos; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundJigsawGeneratePacket { +pub struct ServerboundJigsawGenerate { pub pos: BlockPos, #[var] pub levels: u32, diff --git a/azalea-protocol/src/packets/game/serverbound_keep_alive_packet.rs b/azalea-protocol/src/packets/game/s_keep_alive.rs similarity index 78% rename from azalea-protocol/src/packets/game/serverbound_keep_alive_packet.rs rename to azalea-protocol/src/packets/game/s_keep_alive.rs index 7485e11ec..4e8ab8a80 100755 --- a/azalea-protocol/src/packets/game/serverbound_keep_alive_packet.rs +++ b/azalea-protocol/src/packets/game/s_keep_alive.rs @@ -2,6 +2,6 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundKeepAlivePacket { +pub struct ServerboundKeepAlive { pub id: u64, } diff --git a/azalea-protocol/src/packets/game/serverbound_lock_difficulty_packet.rs b/azalea-protocol/src/packets/game/s_lock_difficulty.rs similarity index 77% rename from azalea-protocol/src/packets/game/serverbound_lock_difficulty_packet.rs rename to azalea-protocol/src/packets/game/s_lock_difficulty.rs index 3c54a16a8..e71773a89 100755 --- a/azalea-protocol/src/packets/game/serverbound_lock_difficulty_packet.rs +++ b/azalea-protocol/src/packets/game/s_lock_difficulty.rs @@ -2,6 +2,6 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundLockDifficultyPacket { +pub struct ServerboundLockDifficulty { pub locked: bool, } diff --git a/azalea-protocol/src/packets/game/serverbound_move_player_pos_packet.rs b/azalea-protocol/src/packets/game/s_move_player_pos.rs similarity index 82% rename from azalea-protocol/src/packets/game/serverbound_move_player_pos_packet.rs rename to azalea-protocol/src/packets/game/s_move_player_pos.rs index 4e3face43..d3b52ca60 100755 --- a/azalea-protocol/src/packets/game/serverbound_move_player_pos_packet.rs +++ b/azalea-protocol/src/packets/game/s_move_player_pos.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundMovePlayerPosPacket { +pub struct ServerboundMovePlayerPos { pub x: f64, pub y: f64, pub z: f64, diff --git a/azalea-protocol/src/packets/game/serverbound_move_player_pos_rot_packet.rs b/azalea-protocol/src/packets/game/s_move_player_pos_rot.rs similarity index 83% rename from azalea-protocol/src/packets/game/serverbound_move_player_pos_rot_packet.rs rename to azalea-protocol/src/packets/game/s_move_player_pos_rot.rs index 0ab9c885e..5d385a922 100755 --- a/azalea-protocol/src/packets/game/serverbound_move_player_pos_rot_packet.rs +++ b/azalea-protocol/src/packets/game/s_move_player_pos_rot.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundMovePlayerPosRotPacket { +pub struct ServerboundMovePlayerPosRot { pub x: f64, pub y: f64, pub z: f64, diff --git a/azalea-protocol/src/packets/game/serverbound_move_player_rot_packet.rs b/azalea-protocol/src/packets/game/s_move_player_rot.rs similarity index 81% rename from azalea-protocol/src/packets/game/serverbound_move_player_rot_packet.rs rename to azalea-protocol/src/packets/game/s_move_player_rot.rs index 11a77e734..a0fd02647 100755 --- a/azalea-protocol/src/packets/game/serverbound_move_player_rot_packet.rs +++ b/azalea-protocol/src/packets/game/s_move_player_rot.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundMovePlayerRotPacket { +pub struct ServerboundMovePlayerRot { pub y_rot: f32, pub x_rot: f32, pub on_ground: bool, diff --git a/azalea-protocol/src/packets/game/serverbound_move_player_status_only_packet.rs b/azalea-protocol/src/packets/game/s_move_player_status_only.rs similarity index 75% rename from azalea-protocol/src/packets/game/serverbound_move_player_status_only_packet.rs rename to azalea-protocol/src/packets/game/s_move_player_status_only.rs index fc91cacaf..f82441812 100755 --- a/azalea-protocol/src/packets/game/serverbound_move_player_status_only_packet.rs +++ b/azalea-protocol/src/packets/game/s_move_player_status_only.rs @@ -2,6 +2,6 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundMovePlayerStatusOnlyPacket { +pub struct ServerboundMovePlayerStatusOnly { pub on_ground: bool, } diff --git a/azalea-protocol/src/packets/game/serverbound_move_vehicle_packet.rs b/azalea-protocol/src/packets/game/s_move_vehicle.rs similarity index 83% rename from azalea-protocol/src/packets/game/serverbound_move_vehicle_packet.rs rename to azalea-protocol/src/packets/game/s_move_vehicle.rs index 929ba7989..832babd19 100755 --- a/azalea-protocol/src/packets/game/serverbound_move_vehicle_packet.rs +++ b/azalea-protocol/src/packets/game/s_move_vehicle.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundMoveVehiclePacket { +pub struct ServerboundMoveVehicle { pub x: f64, pub y: f64, pub z: f64, diff --git a/azalea-protocol/src/packets/game/serverbound_paddle_boat_packet.rs b/azalea-protocol/src/packets/game/s_paddle_boat.rs similarity index 80% rename from azalea-protocol/src/packets/game/serverbound_paddle_boat_packet.rs rename to azalea-protocol/src/packets/game/s_paddle_boat.rs index 2db9ef2e5..bf90ab3fc 100755 --- a/azalea-protocol/src/packets/game/serverbound_paddle_boat_packet.rs +++ b/azalea-protocol/src/packets/game/s_paddle_boat.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundPaddleBoatPacket { +pub struct ServerboundPaddleBoat { pub left: bool, pub right: bool, } diff --git a/azalea-protocol/src/packets/game/serverbound_pick_item_packet.rs b/azalea-protocol/src/packets/game/s_pick_item.rs similarity index 80% rename from azalea-protocol/src/packets/game/serverbound_pick_item_packet.rs rename to azalea-protocol/src/packets/game/s_pick_item.rs index 508e710b2..1d6b476f1 100755 --- a/azalea-protocol/src/packets/game/serverbound_pick_item_packet.rs +++ b/azalea-protocol/src/packets/game/s_pick_item.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundPickItemPacket { +pub struct ServerboundPickItem { #[var] pub slot: u32, } diff --git a/azalea-protocol/src/packets/game/serverbound_ping_request_packet.rs b/azalea-protocol/src/packets/game/s_ping_request.rs similarity index 78% rename from azalea-protocol/src/packets/game/serverbound_ping_request_packet.rs rename to azalea-protocol/src/packets/game/s_ping_request.rs index 0966e9416..1887e720d 100755 --- a/azalea-protocol/src/packets/game/serverbound_ping_request_packet.rs +++ b/azalea-protocol/src/packets/game/s_ping_request.rs @@ -2,6 +2,6 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundPingRequestPacket { +pub struct ServerboundPingRequest { pub time: u64, } diff --git a/azalea-protocol/src/packets/game/serverbound_place_recipe_packet.rs b/azalea-protocol/src/packets/game/s_place_recipe.rs similarity index 86% rename from azalea-protocol/src/packets/game/serverbound_place_recipe_packet.rs rename to azalea-protocol/src/packets/game/s_place_recipe.rs index 03dd833b2..a3a5001b8 100755 --- a/azalea-protocol/src/packets/game/serverbound_place_recipe_packet.rs +++ b/azalea-protocol/src/packets/game/s_place_recipe.rs @@ -3,7 +3,7 @@ use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundPlaceRecipePacket { +pub struct ServerboundPlaceRecipe { pub container_id: u8, pub recipe: ResourceLocation, pub shift_down: bool, diff --git a/azalea-protocol/src/packets/game/serverbound_player_abilities_packet.rs b/azalea-protocol/src/packets/game/s_player_abilities.rs similarity index 81% rename from azalea-protocol/src/packets/game/serverbound_player_abilities_packet.rs rename to azalea-protocol/src/packets/game/s_player_abilities.rs index 900d18247..a64ff2614 100755 --- a/azalea-protocol/src/packets/game/serverbound_player_abilities_packet.rs +++ b/azalea-protocol/src/packets/game/s_player_abilities.rs @@ -7,11 +7,11 @@ use azalea_protocol_macros::ServerboundGamePacket; use crate::packets::BufReadError; #[derive(Clone, Debug, ServerboundGamePacket)] -pub struct ServerboundPlayerAbilitiesPacket { +pub struct ServerboundPlayerAbilities { pub is_flying: bool, } -impl McBufReadable for ServerboundPlayerAbilitiesPacket { +impl McBufReadable for ServerboundPlayerAbilities { fn read_from(buf: &mut Cursor<&[u8]>) -> Result { let set = FixedBitSet::<2>::read_from(buf)?; Ok(Self { @@ -20,7 +20,7 @@ impl McBufReadable for ServerboundPlayerAbilitiesPacket { } } -impl McBufWritable for ServerboundPlayerAbilitiesPacket { +impl McBufWritable for ServerboundPlayerAbilities { fn write_into(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { let mut set = FixedBitSet::<2>::new(); if self.is_flying { diff --git a/azalea-protocol/src/packets/game/serverbound_player_action_packet.rs b/azalea-protocol/src/packets/game/s_player_action.rs similarity index 92% rename from azalea-protocol/src/packets/game/serverbound_player_action_packet.rs rename to azalea-protocol/src/packets/game/s_player_action.rs index 6719202f7..dfdb7ab74 100755 --- a/azalea-protocol/src/packets/game/serverbound_player_action_packet.rs +++ b/azalea-protocol/src/packets/game/s_player_action.rs @@ -4,7 +4,7 @@ use azalea_core::position::BlockPos; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundPlayerActionPacket { +pub struct ServerboundPlayerAction { pub action: Action, pub pos: BlockPos, pub direction: Direction, diff --git a/azalea-protocol/src/packets/game/serverbound_player_command_packet.rs b/azalea-protocol/src/packets/game/s_player_command.rs similarity index 91% rename from azalea-protocol/src/packets/game/serverbound_player_command_packet.rs rename to azalea-protocol/src/packets/game/s_player_command.rs index d7688092a..a8a86e753 100755 --- a/azalea-protocol/src/packets/game/serverbound_player_command_packet.rs +++ b/azalea-protocol/src/packets/game/s_player_command.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundPlayerCommandPacket { +pub struct ServerboundPlayerCommand { #[var] pub id: u32, pub action: Action, diff --git a/azalea-protocol/src/packets/game/serverbound_player_input_packet.rs b/azalea-protocol/src/packets/game/s_player_input.rs similarity index 90% rename from azalea-protocol/src/packets/game/serverbound_player_input_packet.rs rename to azalea-protocol/src/packets/game/s_player_input.rs index a461ddf50..74fe3d6e7 100755 --- a/azalea-protocol/src/packets/game/serverbound_player_input_packet.rs +++ b/azalea-protocol/src/packets/game/s_player_input.rs @@ -6,7 +6,7 @@ use azalea_core::bitset::FixedBitSet; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, ServerboundGamePacket)] -pub struct ServerboundPlayerInputPacket { +pub struct ServerboundPlayerInput { pub forward: bool, pub backward: bool, pub left: bool, @@ -16,7 +16,7 @@ pub struct ServerboundPlayerInputPacket { pub sprint: bool, } -impl McBufReadable for ServerboundPlayerInputPacket { +impl McBufReadable for ServerboundPlayerInput { fn read_from(buf: &mut Cursor<&[u8]>) -> Result { let set = FixedBitSet::<7>::read_from(buf)?; Ok(Self { @@ -31,7 +31,7 @@ impl McBufReadable for ServerboundPlayerInputPacket { } } -impl McBufWritable for ServerboundPlayerInputPacket { +impl McBufWritable for ServerboundPlayerInput { fn write_into(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { let mut set = FixedBitSet::<7>::new(); if self.forward { diff --git a/azalea-protocol/src/packets/game/serverbound_pong_packet.rs b/azalea-protocol/src/packets/game/s_pong.rs similarity index 80% rename from azalea-protocol/src/packets/game/serverbound_pong_packet.rs rename to azalea-protocol/src/packets/game/s_pong.rs index 17f1ac81e..0a82c48c1 100755 --- a/azalea-protocol/src/packets/game/serverbound_pong_packet.rs +++ b/azalea-protocol/src/packets/game/s_pong.rs @@ -2,6 +2,6 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundPongPacket { +pub struct ServerboundPong { pub id: u32, } diff --git a/azalea-protocol/src/packets/game/serverbound_recipe_book_change_settings_packet.rs b/azalea-protocol/src/packets/game/s_recipe_book_change_settings.rs similarity index 86% rename from azalea-protocol/src/packets/game/serverbound_recipe_book_change_settings_packet.rs rename to azalea-protocol/src/packets/game/s_recipe_book_change_settings.rs index 6b3f015b3..515131be9 100755 --- a/azalea-protocol/src/packets/game/serverbound_recipe_book_change_settings_packet.rs +++ b/azalea-protocol/src/packets/game/s_recipe_book_change_settings.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundRecipeBookChangeSettingsPacket { +pub struct ServerboundRecipeBookChangeSettings { pub book_type: RecipeBookType, pub is_open: bool, pub is_filtering: bool, diff --git a/azalea-protocol/src/packets/game/serverbound_recipe_book_seen_recipe_packet.rs b/azalea-protocol/src/packets/game/s_recipe_book_seen_recipe.rs similarity index 81% rename from azalea-protocol/src/packets/game/serverbound_recipe_book_seen_recipe_packet.rs rename to azalea-protocol/src/packets/game/s_recipe_book_seen_recipe.rs index 9923e3a6f..622e5a9b3 100755 --- a/azalea-protocol/src/packets/game/serverbound_recipe_book_seen_recipe_packet.rs +++ b/azalea-protocol/src/packets/game/s_recipe_book_seen_recipe.rs @@ -3,6 +3,6 @@ use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundRecipeBookSeenRecipePacket { +pub struct ServerboundRecipeBookSeenRecipe { pub recipe: ResourceLocation, } diff --git a/azalea-protocol/src/packets/game/serverbound_rename_item_packet.rs b/azalea-protocol/src/packets/game/s_rename_item.rs similarity index 78% rename from azalea-protocol/src/packets/game/serverbound_rename_item_packet.rs rename to azalea-protocol/src/packets/game/s_rename_item.rs index 8308ac319..e63790cda 100755 --- a/azalea-protocol/src/packets/game/serverbound_rename_item_packet.rs +++ b/azalea-protocol/src/packets/game/s_rename_item.rs @@ -2,6 +2,6 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundRenameItemPacket { +pub struct ServerboundRenameItem { pub name: String, } diff --git a/azalea-protocol/src/packets/game/serverbound_resource_pack_packet.rs b/azalea-protocol/src/packets/game/s_resource_pack.rs similarity index 90% rename from azalea-protocol/src/packets/game/serverbound_resource_pack_packet.rs rename to azalea-protocol/src/packets/game/s_resource_pack.rs index f285707b2..80bf9e612 100755 --- a/azalea-protocol/src/packets/game/serverbound_resource_pack_packet.rs +++ b/azalea-protocol/src/packets/game/s_resource_pack.rs @@ -3,7 +3,7 @@ use azalea_protocol_macros::ServerboundGamePacket; use uuid::Uuid; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundResourcePackPacket { +pub struct ServerboundResourcePack { pub id: Uuid, pub action: Action, } diff --git a/azalea-protocol/src/packets/game/serverbound_seen_advancements_packet.rs b/azalea-protocol/src/packets/game/s_seen_advancements.rs similarity index 85% rename from azalea-protocol/src/packets/game/serverbound_seen_advancements_packet.rs rename to azalea-protocol/src/packets/game/s_seen_advancements.rs index 54fd4cc9f..78a92dc78 100755 --- a/azalea-protocol/src/packets/game/serverbound_seen_advancements_packet.rs +++ b/azalea-protocol/src/packets/game/s_seen_advancements.rs @@ -7,7 +7,7 @@ use azalea_protocol_macros::ServerboundGamePacket; use crate::packets::BufReadError; #[derive(Clone, Debug, ServerboundGamePacket)] -pub struct ServerboundSeenAdvancementsPacket { +pub struct ServerboundSeenAdvancements { pub action: Action, pub tab: Option, } @@ -18,7 +18,7 @@ pub enum Action { ClosedScreen = 1, } -impl McBufReadable for ServerboundSeenAdvancementsPacket { +impl McBufReadable for ServerboundSeenAdvancements { fn read_from(buf: &mut Cursor<&[u8]>) -> Result { let action = Action::read_from(buf)?; let tab = if action == Action::OpenedTab { @@ -30,7 +30,7 @@ impl McBufReadable for ServerboundSeenAdvancementsPacket { } } -impl McBufWritable for ServerboundSeenAdvancementsPacket { +impl McBufWritable for ServerboundSeenAdvancements { fn write_into(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { self.action.write_into(buf)?; if let Some(tab) = &self.tab { diff --git a/azalea-protocol/src/packets/game/serverbound_select_bundle_item_packet.rs b/azalea-protocol/src/packets/game/s_select_bundle_item.rs similarity index 81% rename from azalea-protocol/src/packets/game/serverbound_select_bundle_item_packet.rs rename to azalea-protocol/src/packets/game/s_select_bundle_item.rs index 3a315183a..682bbaf54 100644 --- a/azalea-protocol/src/packets/game/serverbound_select_bundle_item_packet.rs +++ b/azalea-protocol/src/packets/game/s_select_bundle_item.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundSelectBundleItemPacket { +pub struct ServerboundSelectBundleItem { #[var] pub slot_id: i32, #[var] diff --git a/azalea-protocol/src/packets/game/serverbound_select_trade_packet.rs b/azalea-protocol/src/packets/game/s_select_trade.rs similarity index 79% rename from azalea-protocol/src/packets/game/serverbound_select_trade_packet.rs rename to azalea-protocol/src/packets/game/s_select_trade.rs index b13e30d54..2968a33da 100755 --- a/azalea-protocol/src/packets/game/serverbound_select_trade_packet.rs +++ b/azalea-protocol/src/packets/game/s_select_trade.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundSelectTradePacket { +pub struct ServerboundSelectTrade { #[var] pub item: u32, } diff --git a/azalea-protocol/src/packets/game/serverbound_set_beacon_packet.rs b/azalea-protocol/src/packets/game/s_set_beacon.rs similarity index 84% rename from azalea-protocol/src/packets/game/serverbound_set_beacon_packet.rs rename to azalea-protocol/src/packets/game/s_set_beacon.rs index db76cb9c5..0c21c486f 100755 --- a/azalea-protocol/src/packets/game/serverbound_set_beacon_packet.rs +++ b/azalea-protocol/src/packets/game/s_set_beacon.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundSetBeaconPacket { +pub struct ServerboundSetBeacon { #[var] pub primary: Option, #[var] diff --git a/azalea-protocol/src/packets/game/serverbound_set_carried_item_packet.rs b/azalea-protocol/src/packets/game/s_set_carried_item.rs similarity index 76% rename from azalea-protocol/src/packets/game/serverbound_set_carried_item_packet.rs rename to azalea-protocol/src/packets/game/s_set_carried_item.rs index 044cdeb03..afa764166 100755 --- a/azalea-protocol/src/packets/game/serverbound_set_carried_item_packet.rs +++ b/azalea-protocol/src/packets/game/s_set_carried_item.rs @@ -2,6 +2,6 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundSetCarriedItemPacket { +pub struct ServerboundSetCarriedItem { pub slot: u16, } diff --git a/azalea-protocol/src/packets/game/serverbound_set_command_block_packet.rs b/azalea-protocol/src/packets/game/s_set_command_block.rs similarity index 90% rename from azalea-protocol/src/packets/game/serverbound_set_command_block_packet.rs rename to azalea-protocol/src/packets/game/s_set_command_block.rs index db6557fd3..606bb49a9 100755 --- a/azalea-protocol/src/packets/game/serverbound_set_command_block_packet.rs +++ b/azalea-protocol/src/packets/game/s_set_command_block.rs @@ -7,7 +7,7 @@ use azalea_protocol_macros::ServerboundGamePacket; use crate::packets::McBufWritable; #[derive(Clone, Debug, ServerboundGamePacket)] -pub struct ServerboundSetCommandBlockPacket { +pub struct ServerboundSetCommandBlock { pub pos: BlockPos, pub command: String, pub mode: Mode, @@ -24,7 +24,7 @@ pub enum Mode { Redstone = 2, } -impl McBufReadable for ServerboundSetCommandBlockPacket { +impl McBufReadable for ServerboundSetCommandBlock { fn read_from(buf: &mut Cursor<&[u8]>) -> Result { let pos = BlockPos::read_from(buf)?; let command = String::read_from(buf)?; @@ -42,7 +42,7 @@ impl McBufReadable for ServerboundSetCommandBlockPacket { } } -impl McBufWritable for ServerboundSetCommandBlockPacket { +impl McBufWritable for ServerboundSetCommandBlock { fn write_into(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { self.pos.write_into(buf)?; self.command.write_into(buf)?; diff --git a/azalea-protocol/src/packets/game/serverbound_set_command_minecart_packet.rs b/azalea-protocol/src/packets/game/s_set_command_minecart.rs similarity index 81% rename from azalea-protocol/src/packets/game/serverbound_set_command_minecart_packet.rs rename to azalea-protocol/src/packets/game/s_set_command_minecart.rs index 7756c9240..7fefa5854 100755 --- a/azalea-protocol/src/packets/game/serverbound_set_command_minecart_packet.rs +++ b/azalea-protocol/src/packets/game/s_set_command_minecart.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundSetCommandMinecartPacket { +pub struct ServerboundSetCommandMinecart { #[var] pub entity: u32, pub command: String, diff --git a/azalea-protocol/src/packets/game/serverbound_set_creative_mode_slot_packet.rs b/azalea-protocol/src/packets/game/s_set_creative_mode_slot.rs similarity index 81% rename from azalea-protocol/src/packets/game/serverbound_set_creative_mode_slot_packet.rs rename to azalea-protocol/src/packets/game/s_set_creative_mode_slot.rs index 7730bf5af..9a6cc877c 100755 --- a/azalea-protocol/src/packets/game/serverbound_set_creative_mode_slot_packet.rs +++ b/azalea-protocol/src/packets/game/s_set_creative_mode_slot.rs @@ -3,7 +3,7 @@ use azalea_inventory::ItemSlot; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundSetCreativeModeSlotPacket { +pub struct ServerboundSetCreativeModeSlot { pub slot_num: u16, pub item_stack: ItemSlot, } diff --git a/azalea-protocol/src/packets/game/serverbound_set_jigsaw_block_packet.rs b/azalea-protocol/src/packets/game/s_set_jigsaw_block.rs similarity index 96% rename from azalea-protocol/src/packets/game/serverbound_set_jigsaw_block_packet.rs rename to azalea-protocol/src/packets/game/s_set_jigsaw_block.rs index 33a823112..0632bae3c 100755 --- a/azalea-protocol/src/packets/game/serverbound_set_jigsaw_block_packet.rs +++ b/azalea-protocol/src/packets/game/s_set_jigsaw_block.rs @@ -11,7 +11,7 @@ use crate::packets::BufReadError; use crate::packets::McBufWritable; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundSetJigsawBlockPacket { +pub struct ServerboundSetJigsawBlock { pub pos: BlockPos, pub name: ResourceLocation, pub target: ResourceLocation, diff --git a/azalea-protocol/src/packets/game/serverbound_set_structure_block_packet.rs b/azalea-protocol/src/packets/game/s_set_structure_block.rs similarity index 97% rename from azalea-protocol/src/packets/game/serverbound_set_structure_block_packet.rs rename to azalea-protocol/src/packets/game/s_set_structure_block.rs index c2872812b..9a0b20e94 100755 --- a/azalea-protocol/src/packets/game/serverbound_set_structure_block_packet.rs +++ b/azalea-protocol/src/packets/game/s_set_structure_block.rs @@ -8,7 +8,7 @@ use azalea_protocol_macros::ServerboundGamePacket; use crate::packets::BufReadError; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundSetStructureBlockPacket { +pub struct ServerboundSetStructureBlock { pub pos: BlockPos, pub update_type: UpdateType, pub mode: StructureMode, diff --git a/azalea-protocol/src/packets/game/serverbound_sign_update_packet.rs b/azalea-protocol/src/packets/game/s_sign_update.rs similarity index 85% rename from azalea-protocol/src/packets/game/serverbound_sign_update_packet.rs rename to azalea-protocol/src/packets/game/s_sign_update.rs index 0547c7838..177f2419c 100755 --- a/azalea-protocol/src/packets/game/serverbound_sign_update_packet.rs +++ b/azalea-protocol/src/packets/game/s_sign_update.rs @@ -3,7 +3,7 @@ use azalea_core::position::BlockPos; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundSignUpdatePacket { +pub struct ServerboundSignUpdate { pub pos: BlockPos, pub is_front_text: bool, pub lines: [String; 4], diff --git a/azalea-protocol/src/packets/game/serverbound_swing_packet.rs b/azalea-protocol/src/packets/game/s_swing.rs similarity index 60% rename from azalea-protocol/src/packets/game/serverbound_swing_packet.rs rename to azalea-protocol/src/packets/game/s_swing.rs index 53b4a6c18..bca4a9724 100755 --- a/azalea-protocol/src/packets/game/serverbound_swing_packet.rs +++ b/azalea-protocol/src/packets/game/s_swing.rs @@ -1,9 +1,9 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; -use crate::packets::game::serverbound_interact_packet::InteractionHand; +use crate::packets::game::s_interact::InteractionHand; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundSwingPacket { +pub struct ServerboundSwing { pub hand: InteractionHand, } diff --git a/azalea-protocol/src/packets/game/serverbound_teleport_to_entity_packet.rs b/azalea-protocol/src/packets/game/s_teleport_to_entity.rs similarity index 78% rename from azalea-protocol/src/packets/game/serverbound_teleport_to_entity_packet.rs rename to azalea-protocol/src/packets/game/s_teleport_to_entity.rs index a7190ea5a..c7a385c0e 100755 --- a/azalea-protocol/src/packets/game/serverbound_teleport_to_entity_packet.rs +++ b/azalea-protocol/src/packets/game/s_teleport_to_entity.rs @@ -3,6 +3,6 @@ use azalea_protocol_macros::ServerboundGamePacket; use uuid::Uuid; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundTeleportToEntityPacket { +pub struct ServerboundTeleportToEntity { pub uuid: Uuid, } diff --git a/azalea-protocol/src/packets/game/serverbound_use_item_packet.rs b/azalea-protocol/src/packets/game/s_use_item.rs similarity index 68% rename from azalea-protocol/src/packets/game/serverbound_use_item_packet.rs rename to azalea-protocol/src/packets/game/s_use_item.rs index b9f12f238..7db59eb3c 100755 --- a/azalea-protocol/src/packets/game/serverbound_use_item_packet.rs +++ b/azalea-protocol/src/packets/game/s_use_item.rs @@ -1,10 +1,10 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundGamePacket; -use crate::packets::game::serverbound_interact_packet::InteractionHand; +use crate::packets::game::s_interact::InteractionHand; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundUseItemPacket { +pub struct ServerboundUseItem { pub hand: InteractionHand, #[var] pub sequence: u32, diff --git a/azalea-protocol/src/packets/game/serverbound_use_item_on_packet.rs b/azalea-protocol/src/packets/game/s_use_item_on.rs similarity index 95% rename from azalea-protocol/src/packets/game/serverbound_use_item_on_packet.rs rename to azalea-protocol/src/packets/game/s_use_item_on.rs index 660483271..3af2ce44c 100755 --- a/azalea-protocol/src/packets/game/serverbound_use_item_on_packet.rs +++ b/azalea-protocol/src/packets/game/s_use_item_on.rs @@ -7,10 +7,10 @@ use azalea_core::{ }; use azalea_protocol_macros::ServerboundGamePacket; -use crate::packets::game::serverbound_interact_packet::InteractionHand; +use crate::packets::game::s_interact::InteractionHand; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundUseItemOnPacket { +pub struct ServerboundUseItemOn { pub hand: InteractionHand, pub block_hit: BlockHit, #[var] diff --git a/azalea-protocol/src/packets/game/serverbound_block_entity_tag_query_packet.rs b/azalea-protocol/src/packets/game/serverbound_block_entity_tag_query_packet.rs deleted file mode 100644 index d88566472..000000000 --- a/azalea-protocol/src/packets/game/serverbound_block_entity_tag_query_packet.rs +++ /dev/null @@ -1,10 +0,0 @@ -use azalea_buf::McBuf; -use azalea_core::position::BlockPos; -use azalea_protocol_macros::ServerboundGamePacket; - -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundBlockEntityTagQueryPacket { - #[var] - pub transaction_id: u32, - pub pos: BlockPos, -} diff --git a/azalea-protocol/src/packets/game/serverbound_entity_tag_query_packet.rs b/azalea-protocol/src/packets/game/serverbound_entity_tag_query_packet.rs deleted file mode 100644 index d40a59a67..000000000 --- a/azalea-protocol/src/packets/game/serverbound_entity_tag_query_packet.rs +++ /dev/null @@ -1,10 +0,0 @@ -use azalea_buf::McBuf; -use azalea_protocol_macros::ServerboundGamePacket; - -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] -pub struct ServerboundEntityTagQueryPacket { - #[var] - pub transaction_id: u32, - #[var] - pub entity_id: u32, -} diff --git a/azalea-protocol/src/packets/handshaking/mod.rs b/azalea-protocol/src/packets/handshake/mod.rs similarity index 61% rename from azalea-protocol/src/packets/handshaking/mod.rs rename to azalea-protocol/src/packets/handshake/mod.rs index f2e8810ed..dae42694e 100755 --- a/azalea-protocol/src/packets/handshaking/mod.rs +++ b/azalea-protocol/src/packets/handshake/mod.rs @@ -1,11 +1,11 @@ -pub mod client_intention_packet; +pub mod s_client_intention; use azalea_protocol_macros::declare_state_packets; declare_state_packets!( HandshakePacket, Serverbound => { - 0x00: client_intention_packet::ClientIntentionPacket, + 0x00: s_client_intention::ServerboundClientIntention, }, Clientbound => {} ); diff --git a/azalea-protocol/src/packets/handshaking/client_intention_packet.rs b/azalea-protocol/src/packets/handshake/s_client_intention.rs similarity index 89% rename from azalea-protocol/src/packets/handshaking/client_intention_packet.rs rename to azalea-protocol/src/packets/handshake/s_client_intention.rs index c0b694c8a..b41fbd98c 100755 --- a/azalea-protocol/src/packets/handshaking/client_intention_packet.rs +++ b/azalea-protocol/src/packets/handshake/s_client_intention.rs @@ -6,7 +6,7 @@ use azalea_protocol_macros::ServerboundHandshakePacket; use crate::packets::ClientIntention; #[derive(Hash, Clone, Debug, McBuf, ServerboundHandshakePacket)] -pub struct ClientIntentionPacket { +pub struct ServerboundClientIntention { #[var] pub protocol_version: i32, pub hostname: String, diff --git a/azalea-protocol/src/packets/login/clientbound_cookie_request_packet.rs b/azalea-protocol/src/packets/login/c_cookie_request.rs similarity index 81% rename from azalea-protocol/src/packets/login/clientbound_cookie_request_packet.rs rename to azalea-protocol/src/packets/login/c_cookie_request.rs index 27ea0c09c..cfe801ddb 100755 --- a/azalea-protocol/src/packets/login/clientbound_cookie_request_packet.rs +++ b/azalea-protocol/src/packets/login/c_cookie_request.rs @@ -3,6 +3,6 @@ use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundLoginPacket; #[derive(Clone, Debug, McBuf, ClientboundLoginPacket)] -pub struct ClientboundCookieRequestPacket { +pub struct ClientboundCookieRequest { pub key: FormattedText, } diff --git a/azalea-protocol/src/packets/login/clientbound_custom_query_packet.rs b/azalea-protocol/src/packets/login/c_custom_query.rs similarity index 89% rename from azalea-protocol/src/packets/login/clientbound_custom_query_packet.rs rename to azalea-protocol/src/packets/login/c_custom_query.rs index 75993fd9d..bf9a84df9 100755 --- a/azalea-protocol/src/packets/login/clientbound_custom_query_packet.rs +++ b/azalea-protocol/src/packets/login/c_custom_query.rs @@ -5,7 +5,7 @@ use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundLoginPacket; #[derive(Hash, Clone, Debug, McBuf, ClientboundLoginPacket)] -pub struct ClientboundCustomQueryPacket { +pub struct ClientboundCustomQuery { #[var] pub transaction_id: u32, pub identifier: ResourceLocation, diff --git a/azalea-protocol/src/packets/login/clientbound_hello_packet.rs b/azalea-protocol/src/packets/login/c_hello.rs similarity index 89% rename from azalea-protocol/src/packets/login/clientbound_hello_packet.rs rename to azalea-protocol/src/packets/login/c_hello.rs index 9beb499cd..4bd08d68d 100755 --- a/azalea-protocol/src/packets/login/clientbound_hello_packet.rs +++ b/azalea-protocol/src/packets/login/c_hello.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundLoginPacket; #[derive(Clone, Debug, McBuf, ClientboundLoginPacket)] -pub struct ClientboundHelloPacket { +pub struct ClientboundHello { // TODO: make this len thing work // #[len(20)] pub server_id: String, diff --git a/azalea-protocol/src/packets/login/clientbound_login_compression_packet.rs b/azalea-protocol/src/packets/login/c_login_compression.rs similarity index 81% rename from azalea-protocol/src/packets/login/clientbound_login_compression_packet.rs rename to azalea-protocol/src/packets/login/c_login_compression.rs index 4b8fb0c8b..d16e30679 100755 --- a/azalea-protocol/src/packets/login/clientbound_login_compression_packet.rs +++ b/azalea-protocol/src/packets/login/c_login_compression.rs @@ -4,7 +4,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundLoginPacket; #[derive(Hash, Clone, Debug, ClientboundLoginPacket, McBuf)] -pub struct ClientboundLoginCompressionPacket { +pub struct ClientboundLoginCompression { #[var] pub compression_threshold: i32, } diff --git a/azalea-protocol/src/packets/login/clientbound_login_disconnect_packet.rs b/azalea-protocol/src/packets/login/c_login_disconnect.rs similarity index 71% rename from azalea-protocol/src/packets/login/clientbound_login_disconnect_packet.rs rename to azalea-protocol/src/packets/login/c_login_disconnect.rs index 416ec63b4..09f539f50 100755 --- a/azalea-protocol/src/packets/login/clientbound_login_disconnect_packet.rs +++ b/azalea-protocol/src/packets/login/c_login_disconnect.rs @@ -6,24 +6,22 @@ use azalea_protocol_macros::ClientboundLoginPacket; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, ClientboundLoginPacket)] -pub struct ClientboundLoginDisconnectPacket { +pub struct ClientboundLoginDisconnect { pub reason: FormattedText, } -impl McBufReadable for ClientboundLoginDisconnectPacket { - fn read_from( - buf: &mut Cursor<&[u8]>, - ) -> Result { +impl McBufReadable for ClientboundLoginDisconnect { + fn read_from(buf: &mut Cursor<&[u8]>) -> Result { let disconnect_string = String::read_from(buf)?; let disconnect_json: serde_json::Value = serde_json::from_str(disconnect_string.as_str())?; - Ok(ClientboundLoginDisconnectPacket { + Ok(ClientboundLoginDisconnect { reason: FormattedText::deserialize(disconnect_json)?, }) } } -impl McBufWritable for ClientboundLoginDisconnectPacket { +impl McBufWritable for ClientboundLoginDisconnect { fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let status_string = FormattedText::serialize(&self.reason, serde_json::value::Serializer) .unwrap() diff --git a/azalea-protocol/src/packets/login/clientbound_login_finished_packet.rs b/azalea-protocol/src/packets/login/c_login_finished.rs similarity index 82% rename from azalea-protocol/src/packets/login/clientbound_login_finished_packet.rs rename to azalea-protocol/src/packets/login/c_login_finished.rs index f885f67ff..dbc9dd55d 100755 --- a/azalea-protocol/src/packets/login/clientbound_login_finished_packet.rs +++ b/azalea-protocol/src/packets/login/c_login_finished.rs @@ -3,6 +3,6 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundLoginPacket; #[derive(Clone, Debug, McBuf, ClientboundLoginPacket)] -pub struct ClientboundLoginFinishedPacket { +pub struct ClientboundLoginFinished { pub game_profile: GameProfile, } diff --git a/azalea-protocol/src/packets/login/mod.rs b/azalea-protocol/src/packets/login/mod.rs index 3d218cc12..bba565cd0 100755 --- a/azalea-protocol/src/packets/login/mod.rs +++ b/azalea-protocol/src/packets/login/mod.rs @@ -1,32 +1,32 @@ -pub mod clientbound_cookie_request_packet; -pub mod clientbound_custom_query_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; -pub mod serverbound_key_packet; -pub mod serverbound_login_acknowledged_packet; +pub mod c_cookie_request; +pub mod c_custom_query; +pub mod c_hello; +pub mod c_login_compression; +pub mod c_login_disconnect; +pub mod c_login_finished; +pub mod s_cookie_response; +pub mod s_custom_query_answer; +pub mod s_hello; +pub mod s_key; +pub mod s_login_acknowledged; use azalea_protocol_macros::declare_state_packets; declare_state_packets!( LoginPacket, Serverbound => { - 0x00: serverbound_hello_packet::ServerboundHelloPacket, - 0x01: serverbound_key_packet::ServerboundKeyPacket, - 0x02: serverbound_custom_query_answer_packet::ServerboundCustomQueryAnswerPacket, - 0x03: serverbound_login_acknowledged_packet::ServerboundLoginAcknowledgedPacket, - 0x04: serverbound_cookie_response_packet::ServerboundCookieResponsePacket, + 0x00: s_hello::ServerboundHello, + 0x01: s_key::ServerboundKey, + 0x02: s_custom_query_answer::ServerboundCustomQueryAnswer, + 0x03: s_login_acknowledged::ServerboundLoginAcknowledged, + 0x04: s_cookie_response::ServerboundCookieResponse, }, Clientbound => { - 0x00: clientbound_login_disconnect_packet::ClientboundLoginDisconnectPacket, - 0x01: clientbound_hello_packet::ClientboundHelloPacket, - 0x02: clientbound_login_finished_packet::ClientboundLoginFinishedPacket, - 0x03: clientbound_login_compression_packet::ClientboundLoginCompressionPacket, - 0x04: clientbound_custom_query_packet::ClientboundCustomQueryPacket, - 0x05: clientbound_cookie_request_packet::ClientboundCookieRequestPacket, + 0x00: c_login_disconnect::ClientboundLoginDisconnect, + 0x01: c_hello::ClientboundHello, + 0x02: c_login_finished::ClientboundLoginFinished, + 0x03: c_login_compression::ClientboundLoginCompression, + 0x04: c_custom_query::ClientboundCustomQuery, + 0x05: c_cookie_request::ClientboundCookieRequest, } ); diff --git a/azalea-protocol/src/packets/login/serverbound_cookie_response_packet.rs b/azalea-protocol/src/packets/login/s_cookie_response.rs similarity index 84% rename from azalea-protocol/src/packets/login/serverbound_cookie_response_packet.rs rename to azalea-protocol/src/packets/login/s_cookie_response.rs index 2074e2e71..1c381d6f1 100755 --- a/azalea-protocol/src/packets/login/serverbound_cookie_response_packet.rs +++ b/azalea-protocol/src/packets/login/s_cookie_response.rs @@ -3,7 +3,7 @@ use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ServerboundLoginPacket; #[derive(Clone, Debug, McBuf, ServerboundLoginPacket)] -pub struct ServerboundCookieResponsePacket { +pub struct ServerboundCookieResponse { pub key: ResourceLocation, pub payload: Option>, } diff --git a/azalea-protocol/src/packets/login/serverbound_custom_query_packet.rs b/azalea-protocol/src/packets/login/s_custom_query.rs similarity index 84% rename from azalea-protocol/src/packets/login/serverbound_custom_query_packet.rs rename to azalea-protocol/src/packets/login/s_custom_query.rs index 1d1885cf6..67648ce83 100755 --- a/azalea-protocol/src/packets/login/serverbound_custom_query_packet.rs +++ b/azalea-protocol/src/packets/login/s_custom_query.rs @@ -2,7 +2,7 @@ use azalea_buf::{McBuf, UnsizedByteArray}; use azalea_protocol_macros::ServerboundLoginPacket; #[derive(Clone, Debug, McBuf, ServerboundLoginPacket)] -pub struct ServerboundCustomQueryPacket { +pub struct ServerboundCustomQuery { #[var] pub transaction_id: u32, pub data: Option, diff --git a/azalea-protocol/src/packets/login/serverbound_custom_query_answer_packet.rs b/azalea-protocol/src/packets/login/s_custom_query_answer.rs similarity index 84% rename from azalea-protocol/src/packets/login/serverbound_custom_query_answer_packet.rs rename to azalea-protocol/src/packets/login/s_custom_query_answer.rs index fe9460a24..dc8f5778f 100644 --- a/azalea-protocol/src/packets/login/serverbound_custom_query_answer_packet.rs +++ b/azalea-protocol/src/packets/login/s_custom_query_answer.rs @@ -4,7 +4,7 @@ use azalea_buf::{McBuf, UnsizedByteArray}; use azalea_protocol_macros::ServerboundLoginPacket; #[derive(Hash, Clone, Debug, McBuf, ServerboundLoginPacket)] -pub struct ServerboundCustomQueryAnswerPacket { +pub struct ServerboundCustomQueryAnswer { #[var] pub transaction_id: u32, pub data: Option, diff --git a/azalea-protocol/src/packets/login/serverbound_hello_packet.rs b/azalea-protocol/src/packets/login/s_hello.rs similarity index 77% rename from azalea-protocol/src/packets/login/serverbound_hello_packet.rs rename to azalea-protocol/src/packets/login/s_hello.rs index 51ff18306..48d4e3e66 100755 --- a/azalea-protocol/src/packets/login/serverbound_hello_packet.rs +++ b/azalea-protocol/src/packets/login/s_hello.rs @@ -3,7 +3,7 @@ use azalea_protocol_macros::ServerboundLoginPacket; use uuid::Uuid; #[derive(Clone, Debug, PartialEq, Eq, McBuf, ServerboundLoginPacket)] -pub struct ServerboundHelloPacket { +pub struct ServerboundHello { pub name: String, pub profile_id: Uuid, } @@ -18,13 +18,13 @@ mod tests { #[test] fn test_read_write() { - let packet = ServerboundHelloPacket { + let packet = ServerboundHello { name: "test".to_string(), profile_id: Uuid::nil(), }; let mut buf: Vec = Vec::new(); packet.write_into(&mut buf).unwrap(); - let packet2 = ServerboundHelloPacket::read_from(&mut Cursor::new(&buf)).unwrap(); + let packet2 = ServerboundHello::read_from(&mut Cursor::new(&buf)).unwrap(); assert_eq!(packet, packet2); } } diff --git a/azalea-protocol/src/packets/login/serverbound_key_packet.rs b/azalea-protocol/src/packets/login/s_key.rs similarity index 85% rename from azalea-protocol/src/packets/login/serverbound_key_packet.rs rename to azalea-protocol/src/packets/login/s_key.rs index dc0abeac3..515c2ef4a 100755 --- a/azalea-protocol/src/packets/login/serverbound_key_packet.rs +++ b/azalea-protocol/src/packets/login/s_key.rs @@ -2,7 +2,7 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundLoginPacket; #[derive(Clone, Debug, McBuf, ServerboundLoginPacket)] -pub struct ServerboundKeyPacket { +pub struct ServerboundKey { pub key_bytes: Vec, pub encrypted_challenge: Vec, } diff --git a/azalea-protocol/src/packets/login/serverbound_login_acknowledged_packet.rs b/azalea-protocol/src/packets/login/s_login_acknowledged.rs similarity index 72% rename from azalea-protocol/src/packets/login/serverbound_login_acknowledged_packet.rs rename to azalea-protocol/src/packets/login/s_login_acknowledged.rs index c242a494f..963e58c06 100644 --- a/azalea-protocol/src/packets/login/serverbound_login_acknowledged_packet.rs +++ b/azalea-protocol/src/packets/login/s_login_acknowledged.rs @@ -2,4 +2,4 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundLoginPacket; #[derive(Clone, Debug, McBuf, ServerboundLoginPacket)] -pub struct ServerboundLoginAcknowledgedPacket {} +pub struct ServerboundLoginAcknowledged {} diff --git a/azalea-protocol/src/packets/mod.rs b/azalea-protocol/src/packets/mod.rs index d17e5c73d..0a5aab98a 100755 --- a/azalea-protocol/src/packets/mod.rs +++ b/azalea-protocol/src/packets/mod.rs @@ -1,7 +1,7 @@ pub mod common; -pub mod configuration; +pub mod config; pub mod game; -pub mod handshaking; +pub mod handshake; pub mod login; pub mod status; @@ -11,8 +11,8 @@ use azalea_buf::{BufReadError, McBufVarReadable, McBufVarWritable, McBufWritable use crate::read::ReadPacketError; -// TODO: rename the packet files to just like clientbound_add_entity instead of -// clientbound_add_entity_packet +// TODO: rename the packet files to just like c_add_entity instead of +// c_add_entity_packet pub const PROTOCOL_VERSION: i32 = 1073742049; diff --git a/azalea-protocol/src/packets/status/clientbound_pong_response_packet.rs b/azalea-protocol/src/packets/status/c_pong_response.rs similarity index 78% rename from azalea-protocol/src/packets/status/clientbound_pong_response_packet.rs rename to azalea-protocol/src/packets/status/c_pong_response.rs index 8c8a7bb13..6886e9515 100755 --- a/azalea-protocol/src/packets/status/clientbound_pong_response_packet.rs +++ b/azalea-protocol/src/packets/status/c_pong_response.rs @@ -2,6 +2,6 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ClientboundStatusPacket; #[derive(Clone, Debug, McBuf, ClientboundStatusPacket)] -pub struct ClientboundPongResponsePacket { +pub struct ClientboundPongResponse { pub time: u64, } diff --git a/azalea-protocol/src/packets/status/clientbound_status_response_packet.rs b/azalea-protocol/src/packets/status/c_status_response.rs similarity index 81% rename from azalea-protocol/src/packets/status/clientbound_status_response_packet.rs rename to azalea-protocol/src/packets/status/c_status_response.rs index 1316894ed..41f0ab1a0 100755 --- a/azalea-protocol/src/packets/status/clientbound_status_response_packet.rs +++ b/azalea-protocol/src/packets/status/c_status_response.rs @@ -28,7 +28,7 @@ pub struct Players { // the entire packet is just json, which is why it has deserialize #[derive(Clone, Debug, Serialize, Deserialize, ClientboundStatusPacket)] -pub struct ClientboundStatusResponsePacket { +pub struct ClientboundStatusResponse { pub description: FormattedText, #[serde(default)] #[serde(skip_serializing_if = "Option::is_none")] @@ -41,18 +41,18 @@ pub struct ClientboundStatusResponsePacket { pub enforces_secure_chat: Option, } -impl McBufReadable for ClientboundStatusResponsePacket { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { +impl McBufReadable for ClientboundStatusResponse { + fn read_from(buf: &mut Cursor<&[u8]>) -> Result { let status_string = String::read_from(buf)?; let status_json: serde_json::Value = serde_json::from_str(status_string.as_str())?; - Ok(ClientboundStatusResponsePacket::deserialize(status_json)?) + Ok(ClientboundStatusResponse::deserialize(status_json)?) } } -impl McBufWritable for ClientboundStatusResponsePacket { +impl McBufWritable for ClientboundStatusResponse { fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - let status_string = ClientboundStatusResponsePacket::serialize(self, Serializer) + let status_string = ClientboundStatusResponse::serialize(self, Serializer) .unwrap() .to_string(); status_string.write_into(buf)?; diff --git a/azalea-protocol/src/packets/status/mod.rs b/azalea-protocol/src/packets/status/mod.rs index 3c70c9b10..b22cebf0f 100755 --- a/azalea-protocol/src/packets/status/mod.rs +++ b/azalea-protocol/src/packets/status/mod.rs @@ -1,18 +1,18 @@ -pub mod clientbound_pong_response_packet; -pub mod clientbound_status_response_packet; -pub mod serverbound_ping_request_packet; -pub mod serverbound_status_request_packet; +pub mod c_pong_response; +pub mod c_status_response; +pub mod s_ping_request; +pub mod s_status_request; use azalea_protocol_macros::declare_state_packets; declare_state_packets!( StatusPacket, Serverbound => { - 0x00: serverbound_status_request_packet::ServerboundStatusRequestPacket, - 0x01: serverbound_ping_request_packet::ServerboundPingRequestPacket, + 0x00: s_status_request::ServerboundStatusRequest, + 0x01: s_ping_request::ServerboundPingRequest, }, Clientbound => { - 0x00: clientbound_status_response_packet::ClientboundStatusResponsePacket, - 0x01: clientbound_pong_response_packet::ClientboundPongResponsePacket, + 0x00: c_status_response::ClientboundStatusResponse, + 0x01: c_pong_response::ClientboundPongResponse, } ); diff --git a/azalea-protocol/src/packets/status/serverbound_ping_request_packet.rs b/azalea-protocol/src/packets/status/s_ping_request.rs similarity index 78% rename from azalea-protocol/src/packets/status/serverbound_ping_request_packet.rs rename to azalea-protocol/src/packets/status/s_ping_request.rs index c546081c5..cf38f4fc7 100755 --- a/azalea-protocol/src/packets/status/serverbound_ping_request_packet.rs +++ b/azalea-protocol/src/packets/status/s_ping_request.rs @@ -2,6 +2,6 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundStatusPacket; #[derive(Clone, Debug, McBuf, ServerboundStatusPacket)] -pub struct ServerboundPingRequestPacket { +pub struct ServerboundPingRequest { pub time: u64, } diff --git a/azalea-protocol/src/packets/status/serverbound_status_request_packet.rs b/azalea-protocol/src/packets/status/s_status_request.rs similarity index 74% rename from azalea-protocol/src/packets/status/serverbound_status_request_packet.rs rename to azalea-protocol/src/packets/status/s_status_request.rs index 27fce3bfe..101d1efb3 100755 --- a/azalea-protocol/src/packets/status/serverbound_status_request_packet.rs +++ b/azalea-protocol/src/packets/status/s_status_request.rs @@ -2,4 +2,4 @@ use azalea_buf::McBuf; use azalea_protocol_macros::ServerboundStatusPacket; #[derive(Clone, Debug, McBuf, ServerboundStatusPacket)] -pub struct ServerboundStatusRequestPacket {} +pub struct ServerboundStatusRequest {} diff --git a/azalea/examples/testbot/commands.rs b/azalea/examples/testbot/commands.rs index 9cdb3cb79..0e5e0f9c2 100644 --- a/azalea/examples/testbot/commands.rs +++ b/azalea/examples/testbot/commands.rs @@ -3,7 +3,7 @@ pub mod debug; pub mod movement; use azalea::brigadier::prelude::*; -use azalea::chat::ChatPacket; +use azalea::chat::Chat; use azalea::ecs::prelude::*; use azalea::entity::metadata::Player; use azalea::Client; @@ -17,7 +17,7 @@ pub type Ctx = CommandContext>; pub struct CommandSource { pub bot: Client, pub state: State, - pub chat: ChatPacket, + pub chat: Chat, } impl CommandSource { diff --git a/azalea/src/accept_resource_packs.rs b/azalea/src/accept_resource_packs.rs index c9765c77e..dbed9e55d 100644 --- a/azalea/src/accept_resource_packs.rs +++ b/azalea/src/accept_resource_packs.rs @@ -3,9 +3,7 @@ use azalea_client::inventory::InventorySet; use azalea_client::packet_handling::game::SendPacketEvent; use azalea_client::packet_handling::{death_event_on_0_health, game::ResourcePackEvent}; use azalea_client::respawn::perform_respawn; -use azalea_protocol::packets::game::serverbound_resource_pack_packet::{ - self, ServerboundResourcePackPacket, -}; +use azalea_protocol::packets::game::s_resource_pack::{self, ServerboundResourcePack}; use bevy_app::Update; use bevy_ecs::prelude::*; @@ -34,17 +32,17 @@ fn accept_resource_pack( for event in events.read() { send_packet_events.send(SendPacketEvent { entity: event.entity, - packet: ServerboundResourcePackPacket { + packet: ServerboundResourcePack { id: event.id, - action: serverbound_resource_pack_packet::Action::Accepted, + action: s_resource_pack::Action::Accepted, } .get(), }); send_packet_events.send(SendPacketEvent { entity: event.entity, - packet: ServerboundResourcePackPacket { + packet: ServerboundResourcePack { id: event.id, - action: serverbound_resource_pack_packet::Action::SuccessfullyLoaded, + action: s_resource_pack::Action::SuccessfullyLoaded, } .get(), }); diff --git a/azalea/src/swarm/chat.rs b/azalea/src/swarm/chat.rs index cf01c60b3..f768734aa 100644 --- a/azalea/src/swarm/chat.rs +++ b/azalea/src/swarm/chat.rs @@ -15,7 +15,7 @@ use std::collections::VecDeque; -use azalea_client::chat::{ChatPacket, ChatReceivedEvent}; +use azalea_client::chat::{Chat, ChatReceivedEvent}; use bevy_app::{App, Plugin, Update}; use bevy_ecs::prelude::Event; @@ -50,11 +50,11 @@ pub struct ClientChatState { /// A chat message that no other bots have seen yet was received by a bot. #[derive(Event, Debug)] -pub struct NewChatMessageEvent(ChatPacket); +pub struct NewChatMessageEvent(Chat); #[derive(Resource)] pub struct GlobalChatState { - pub chat_queue: VecDeque, + pub chat_queue: VecDeque, pub chat_min_index: usize, } @@ -176,7 +176,7 @@ mod tests { app } - fn drain_events(ecs: &mut World) -> Vec { + fn drain_events(ecs: &mut World) -> Vec { let mut system_state: SystemState>> = SystemState::new(ecs); let mut events = system_state.get_mut(ecs); @@ -193,12 +193,12 @@ mod tests { app.world.send_event(ChatReceivedEvent { entity: bot0, - packet: ChatPacket::new("a"), + packet: Chat::new("a"), }); app.update(); // the swarm should get the event immediately after the bot gets it - assert_eq!(drain_events(&mut app.world), vec![ChatPacket::new("a")]); + assert_eq!(drain_events(&mut app.world), vec![Chat::new("a")]); assert_eq!( app.world.get::(bot0).unwrap().chat_index, 1 @@ -206,7 +206,7 @@ mod tests { // and a second bot sending the event shouldn't do anything app.world.send_event(ChatReceivedEvent { entity: bot1, - packet: ChatPacket::new("a"), + packet: Chat::new("a"), }); app.update(); assert_eq!(drain_events(&mut app.world), vec![]); @@ -218,19 +218,19 @@ mod tests { // but if the first one gets it again, it should sent it again app.world.send_event(ChatReceivedEvent { entity: bot0, - packet: ChatPacket::new("a"), + packet: Chat::new("a"), }); app.update(); - assert_eq!(drain_events(&mut app.world), vec![ChatPacket::new("a")]); + assert_eq!(drain_events(&mut app.world), vec![Chat::new("a")]); // alright and now the second bot got a different chat message and it should be // sent app.world.send_event(ChatReceivedEvent { entity: bot1, - packet: ChatPacket::new("b"), + packet: Chat::new("b"), }); app.update(); - assert_eq!(drain_events(&mut app.world), vec![ChatPacket::new("b")]); + assert_eq!(drain_events(&mut app.world), vec![Chat::new("b")]); } #[tokio::test] @@ -242,16 +242,16 @@ mod tests { // bot0 gets a chat message app.world.send_event(ChatReceivedEvent { entity: bot0, - packet: ChatPacket::new("a"), + packet: Chat::new("a"), }); app.update(); - assert_eq!(drain_events(&mut app.world), vec![ChatPacket::new("a")]); + assert_eq!(drain_events(&mut app.world), vec![Chat::new("a")]); let bot1 = app.world.spawn_empty().id(); app.world.send_event(ChatReceivedEvent { entity: bot1, - packet: ChatPacket::new("b"), + packet: Chat::new("b"), }); app.update(); - assert_eq!(drain_events(&mut app.world), vec![ChatPacket::new("b")]); + assert_eq!(drain_events(&mut app.world), vec![Chat::new("b")]); } } diff --git a/azalea/src/swarm/mod.rs b/azalea/src/swarm/mod.rs index 31f018cf6..83fba1027 100644 --- a/azalea/src/swarm/mod.rs +++ b/azalea/src/swarm/mod.rs @@ -7,7 +7,7 @@ pub mod prelude; use std::{collections::HashMap, future::Future, net::SocketAddr, sync::Arc, time::Duration}; use azalea_client::{ - chat::ChatPacket, start_ecs_runner, Account, Client, DefaultPlugins, Event, JoinError, + chat::Chat, start_ecs_runner, Account, Client, DefaultPlugins, Event, JoinError, StartClientOpts, }; use azalea_protocol::{resolver, ServerAddress}; @@ -495,7 +495,7 @@ pub enum SwarmEvent { /// with the account and options from this event. Disconnect(Box, JoinOpts), /// At least one bot received a chat message. - Chat(ChatPacket), + Chat(Chat), } pub type SwarmHandleFn = fn(Swarm, SwarmEvent, SS) -> Fut; diff --git a/codegen/azprotorefactor.py b/codegen/azprotorefactor.py new file mode 100644 index 000000000..d698929fa --- /dev/null +++ b/codegen/azprotorefactor.py @@ -0,0 +1,18 @@ +import os + +path = 'azalea-protocol/src/packets/status' + +# rename all the files from like "c_ping_packet.rs" to "c_ping.rs" + +for filename in os.listdir(path): + if filename.endswith('_packet.rs'): + new_filename = filename.replace('c_', 'c_').replace('s_', 's_').replace('_packet', '') + print(filename, new_filename) + os.rename(os.path.join(path, filename), os.path.join(path, new_filename)) + + with open(os.path.join(path, new_filename), 'r') as f: + contents = f.read() + contents = contents.replace('Packet {', ' {') + with open(os.path.join(path, new_filename), 'w') as f: + f.write(contents) + diff --git a/codegen/lib/code/packet.py b/codegen/lib/code/packet.py index b34d3455f..67a063a1d 100755 --- a/codegen/lib/code/packet.py +++ b/codegen/lib/code/packet.py @@ -170,7 +170,7 @@ def set_packets(packet_ids: list[int], packet_class_names: list[str], direction: if not ignore_lines: new_mod_rs.append(line) - # 0x00: clientbound_status_response_packet::ClientboundStatusResponsePacket, + # 0x00: c_status_response::ClientboundStatusResponsePacket, if line.strip().startswith('0x'): required_modules.append( line.strip().split(':')[1].split('::')[0].strip()) From eabb329085d67321b1a76c089f869121d154517b Mon Sep 17 00:00:00 2001 From: mat Date: Tue, 26 Nov 2024 22:08:35 +0000 Subject: [PATCH 04/18] ItemSlot -> ItemStack for more consistency with mojmap --- azalea-client/src/interact.rs | 6 +- azalea-client/src/inventory.rs | 58 +++++++------- azalea-client/src/mining.rs | 6 +- azalea-entity/src/data.rs | 4 +- azalea-entity/src/metadata.rs | 38 ++++----- azalea-entity/src/particle.rs | 4 +- .../azalea-inventory-macros/src/menu_enum.rs | 12 +-- .../azalea-inventory-macros/src/menu_impl.rs | 16 ++-- azalea-inventory/src/components.rs | 10 +-- azalea-inventory/src/item/mod.rs | 4 +- azalea-inventory/src/lib.rs | 10 +-- azalea-inventory/src/operations.rs | 24 +++--- azalea-inventory/src/slot.rs | 78 +++++++++---------- azalea-physics/src/clip.rs | 4 +- .../src/packets/game/c_commands.rs | 4 +- .../packets/game/c_container_set_content.rs | 6 +- .../src/packets/game/c_container_set_slot.rs | 4 +- .../src/packets/game/c_merchant_offers.rs | 8 +- .../src/packets/game/c_set_cursor_item.rs | 4 +- .../src/packets/game/c_set_equipment.rs | 6 +- .../packets/game/c_set_player_inventory.rs | 4 +- .../src/packets/game/c_update_advancements.rs | 6 +- .../src/packets/game/c_update_recipes.rs | 8 +- .../src/packets/game/s_container_click.rs | 6 +- .../packets/game/s_set_creative_mode_slot.rs | 4 +- azalea-registry/src/lib.rs | 4 +- azalea/examples/steal.rs | 4 +- azalea/src/auto_tool.rs | 8 +- azalea/src/container.rs | 6 +- codegen/lib/code/entity.py | 4 +- 30 files changed, 180 insertions(+), 180 deletions(-) diff --git a/azalea-client/src/interact.rs b/azalea-client/src/interact.rs index bfa05cdc1..b8aa83206 100644 --- a/azalea-client/src/interact.rs +++ b/azalea-client/src/interact.rs @@ -10,7 +10,7 @@ use azalea_core::{ use azalea_entity::{ clamp_look_direction, view_vector, Attributes, EyeHeight, LocalEntity, LookDirection, Position, }; -use azalea_inventory::{ItemSlot, ItemSlotData}; +use azalea_inventory::{ItemStack, ItemStackData}; use azalea_physics::clip::{BlockShapeType, ClipContext, FluidPickType}; use azalea_protocol::packets::game::{ s_interact::InteractionHand, @@ -245,7 +245,7 @@ pub fn check_is_interaction_restricted( // way of modifying that let held_item = inventory.held_item(); - if let ItemSlot::Present(item) = &held_item { + if let ItemStack::Present(item) = &held_item { let block = instance.chunks.get_block_state(block_pos); let Some(block) = block else { // block isn't loaded so just say that it is restricted @@ -263,7 +263,7 @@ pub fn check_is_interaction_restricted( /// Check if the item has the `CanDestroy` tag for the block. pub fn check_block_can_be_broken_by_item_in_adventure_mode( - item: &ItemSlotData, + item: &ItemStackData, _block: &BlockState, ) -> bool { // minecraft caches the last checked block but that's kind of an unnecessary diff --git a/azalea-client/src/inventory.rs b/azalea-client/src/inventory.rs index 194153d56..d68572ad7 100644 --- a/azalea-client/src/inventory.rs +++ b/azalea-client/src/inventory.rs @@ -97,7 +97,7 @@ pub struct Inventory { /// /// This is different from [`Self::selected_hotbar_slot`], which is the /// item that's selected in the hotbar. - pub carried: ItemSlot, + pub carried: ItemStack, /// An identifier used by the server to track client inventory desyncs. This /// is sent on every container click, and it's only ever updated when the /// server sends a new container update. @@ -182,7 +182,7 @@ impl Inventory { if let QuickCraftStatus::Add { slot } = quick_craft.status { let slot_item = self.menu().slot(slot as usize); if let Some(slot_item) = slot_item { - if let ItemSlot::Present(carried) = &self.carried { + if let ItemStack::Present(carried) = &self.carried { // minecraft also checks slot.may_place(carried) and // menu.can_drag_to(slot) // but they always return true so they're not relevant for us @@ -221,7 +221,7 @@ impl Inventory { return; } - let ItemSlot::Present(mut carried) = self.carried.clone() else { + let ItemStack::Present(mut carried) = self.carried.clone() else { // this should never happen return self.reset_quick_craft(); }; @@ -230,14 +230,14 @@ impl Inventory { let mut quick_craft_slots_iter = self.quick_craft_slots.iter(); loop { - let mut slot: &ItemSlot; + let mut slot: &ItemStack; let mut slot_index: u16; - let mut item_stack: &ItemSlot; + let mut item_stack: &ItemStack; loop { let Some(&next_slot) = quick_craft_slots_iter.next() else { carried.count = carried_count; - self.carried = ItemSlot::Present(carried); + self.carried = ItemStack::Present(carried); return self.reset_quick_craft(); }; @@ -258,8 +258,8 @@ impl Inventory { } } - // get the ItemSlotData for the slot - let ItemSlot::Present(slot) = slot else { + // get the ItemStackData for the slot + let ItemStack::Present(slot) = slot else { unreachable!("the loop above requires the slot to be present to break") }; @@ -292,7 +292,7 @@ impl Inventory { &mut self.inventory_menu }; *menu.slot_mut(slot_index as usize).unwrap() = - ItemSlot::Present(new_carried); + ItemStack::Present(new_carried); } } } else { @@ -315,7 +315,7 @@ impl Inventory { // implementation // player.drop(self.carried, true); - self.carried = ItemSlot::Empty; + self.carried = ItemStack::Empty; } } ClickOperation::Pickup(PickupClick::Right { slot: None }) => { @@ -335,8 +335,8 @@ impl Inventory { // here // i don't understand it so i didn't implement it match slot_item { - ItemSlot::Empty => if carried.is_present() {}, - ItemSlot::Present(_) => todo!(), + ItemStack::Empty => if carried.is_present() {}, + ItemStack::Present(_) => todo!(), } } ClickOperation::QuickMove( @@ -373,7 +373,7 @@ impl Inventory { *target_slot = source_slot; } } else if source_slot.is_empty() { - let ItemSlot::Present(target_item) = target_slot else { + let ItemStack::Present(target_item) = target_slot else { unreachable!("target slot is not empty but is not present"); }; if self.menu().may_place(source_slot_index, target_item) { @@ -385,7 +385,7 @@ impl Inventory { *self.menu_mut().slot_mut(source_slot_index).unwrap() = new_source_slot; } } else if self.menu().may_pickup(source_slot_index) { - let ItemSlot::Present(target_item) = target_slot else { + let ItemStack::Present(target_item) = target_slot else { unreachable!("target slot is not empty but is not present"); }; if self.menu().may_place(source_slot_index, target_item) { @@ -420,12 +420,12 @@ impl Inventory { let Some(source_slot) = self.menu().slot(*slot as usize) else { return; }; - let ItemSlot::Present(source_item) = source_slot else { + let ItemStack::Present(source_item) = source_slot else { return; }; let mut new_carried = source_item.clone(); new_carried.count = new_carried.kind.max_stack_size(); - self.carried = ItemSlot::Present(new_carried); + self.carried = ItemStack::Present(new_carried); } ClickOperation::Throw(c) => { if self.carried.is_present() { @@ -439,7 +439,7 @@ impl Inventory { let Some(slot) = self.menu_mut().slot_mut(slot_index) else { return; }; - let ItemSlot::Present(slot_item) = slot else { + let ItemStack::Present(slot_item) = slot else { return; }; @@ -466,7 +466,7 @@ impl Inventory { return; } - let ItemSlot::Present(target_slot_item) = &target_slot else { + let ItemStack::Present(target_slot_item) = &target_slot else { unreachable!("target slot is not empty but is not present"); }; @@ -480,7 +480,7 @@ impl Inventory { for i in iterator { if target_slot_item.count < target_slot_item.kind.max_stack_size() { let checking_slot = self.menu().slot(i).unwrap(); - if let ItemSlot::Present(checking_item) = checking_slot { + if let ItemStack::Present(checking_item) = checking_slot { if can_item_quick_replace(checking_slot, &target_slot, true) && self.menu().may_pickup(i) && (round != 0 @@ -495,7 +495,7 @@ impl Inventory { // now extend the carried item let target_slot = &mut self.carried; - let ItemSlot::Present(target_slot_item) = target_slot else { + let ItemStack::Present(target_slot_item) = target_slot else { unreachable!("target slot is not empty but is not present"); }; target_slot_item.count += taken_item.count(); @@ -515,7 +515,7 @@ impl Inventory { } /// Get the item in the player's hotbar that is currently being held. - pub fn held_item(&self) -> ItemSlot { + pub fn held_item(&self) -> ItemStack { let inventory = &self.inventory_menu; let hotbar_items = &inventory.slots()[inventory.hotbar_slots_range()]; hotbar_items[self.selected_hotbar_slot as usize].clone() @@ -523,14 +523,14 @@ impl Inventory { } fn can_item_quick_replace( - target_slot: &ItemSlot, - item: &ItemSlot, + target_slot: &ItemStack, + item: &ItemStack, ignore_item_count: bool, ) -> bool { - let ItemSlot::Present(target_slot) = target_slot else { + let ItemStack::Present(target_slot) = target_slot else { return false; }; - let ItemSlot::Present(item) = item else { + let ItemStack::Present(item) = item else { // i *think* this is what vanilla does // not 100% sure lol probably doesn't matter though return false; @@ -551,7 +551,7 @@ fn can_item_quick_replace( fn get_quick_craft_slot_count( quick_craft_slots: &HashSet, quick_craft_kind: &QuickCraftKind, - item: &mut ItemSlotData, + item: &mut ItemStackData, slot_item_count: i32, ) { item.count = match quick_craft_kind { @@ -569,7 +569,7 @@ impl Default for Inventory { id: 0, container_menu: None, container_menu_title: None, - carried: ItemSlot::Empty, + carried: ItemStack::Empty, state_id: 0, quick_craft_status: QuickCraftStatusKind::Start, quick_craft_kind: QuickCraftKind::Middle, @@ -687,7 +687,7 @@ pub fn handle_container_click_event( // see which slots changed after clicking and put them in the hashmap // the server uses this to check if we desynced - let mut changed_slots: HashMap = HashMap::new(); + let mut changed_slots: HashMap = HashMap::new(); for (slot_index, old_slot) in old_slots.iter().enumerate() { let new_slot = &menu.slots()[slot_index]; if old_slot != new_slot { @@ -716,7 +716,7 @@ pub fn handle_container_click_event( #[derive(Event)] pub struct SetContainerContentEvent { pub entity: Entity, - pub slots: Vec, + pub slots: Vec, pub container_id: u8, } fn handle_set_container_content_event( diff --git a/azalea-client/src/mining.rs b/azalea-client/src/mining.rs index dfa08e14d..9eb00013f 100644 --- a/azalea-client/src/mining.rs +++ b/azalea-client/src/mining.rs @@ -1,7 +1,7 @@ use azalea_block::{Block, BlockState, FluidState}; use azalea_core::{direction::Direction, game_type::GameMode, position::BlockPos, tick::GameTick}; use azalea_entity::{mining::get_mine_progress, FluidOnEyes, Physics}; -use azalea_inventory::ItemSlot; +use azalea_inventory::ItemStack; use azalea_physics::PhysicsSet; use azalea_protocol::packets::game::s_player_action::{self, ServerboundPlayerAction}; use azalea_world::{InstanceContainer, InstanceName}; @@ -405,9 +405,9 @@ pub struct MineTicks(pub f32); pub struct MineBlockPos(pub Option); /// A component that contains the item we're currently using to mine. If we're -/// not mining anything, it'll be [`ItemSlot::Empty`]. +/// not mining anything, it'll be [`ItemStack::Empty`]. #[derive(Component, Clone, Debug, Default, Deref, DerefMut)] -pub struct MineItem(pub ItemSlot); +pub struct MineItem(pub ItemStack); /// Sent when we completed mining a block. #[derive(Event)] diff --git a/azalea-entity/src/data.rs b/azalea-entity/src/data.rs index 533bb49af..bda73b5b7 100755 --- a/azalea-entity/src/data.rs +++ b/azalea-entity/src/data.rs @@ -10,7 +10,7 @@ use azalea_core::{ direction::Direction, position::{BlockPos, GlobalPos, Vec3}, }; -use azalea_inventory::ItemSlot; +use azalea_inventory::ItemStack; use bevy_ecs::component::Component; use derive_more::Deref; use enum_as_inner::EnumAsInner; @@ -73,7 +73,7 @@ pub enum EntityDataValue { String(String), FormattedText(FormattedText), OptionalFormattedText(Option), - ItemStack(ItemSlot), + ItemStack(ItemStack), Boolean(bool), Rotations(Rotations), BlockPos(BlockPos), diff --git a/azalea-entity/src/metadata.rs b/azalea-entity/src/metadata.rs index c32b7cf4b..a70d853d3 100644 --- a/azalea-entity/src/metadata.rs +++ b/azalea-entity/src/metadata.rs @@ -8,7 +8,7 @@ use azalea_core::{ direction::Direction, position::{BlockPos, Vec3}, }; -use azalea_inventory::ItemSlot; +use azalea_inventory::ItemStack; use bevy_ecs::{bundle::Bundle, component::Component}; use derive_more::{Deref, DerefMut}; use thiserror::Error; @@ -3242,7 +3242,7 @@ impl Default for DrownedMetadataBundle { } #[derive(Component, Deref, DerefMut, Clone)] -pub struct EggItemStack(pub ItemSlot); +pub struct EggItemStack(pub ItemStack); #[derive(Component)] pub struct Egg; impl Egg { @@ -3499,7 +3499,7 @@ impl Default for EnderDragonMetadataBundle { } #[derive(Component, Deref, DerefMut, Clone)] -pub struct EnderPearlItemStack(pub ItemSlot); +pub struct EnderPearlItemStack(pub ItemStack); #[derive(Component)] pub struct EnderPearl; impl EnderPearl { @@ -3835,7 +3835,7 @@ impl Default for EvokerFangsMetadataBundle { } #[derive(Component, Deref, DerefMut, Clone)] -pub struct ExperienceBottleItemStack(pub ItemSlot); +pub struct ExperienceBottleItemStack(pub ItemStack); #[derive(Component)] pub struct ExperienceBottle; impl ExperienceBottle { @@ -3932,7 +3932,7 @@ impl Default for ExperienceOrbMetadataBundle { } #[derive(Component, Deref, DerefMut, Clone)] -pub struct EyeOfEnderItemStack(pub ItemSlot); +pub struct EyeOfEnderItemStack(pub ItemStack); #[derive(Component)] pub struct EyeOfEnder; impl EyeOfEnder { @@ -4036,7 +4036,7 @@ impl Default for FallingBlockMetadataBundle { } #[derive(Component, Deref, DerefMut, Clone)] -pub struct FireballItemStack(pub ItemSlot); +pub struct FireballItemStack(pub ItemStack); #[derive(Component)] pub struct Fireball; impl Fireball { @@ -4088,7 +4088,7 @@ impl Default for FireballMetadataBundle { } #[derive(Component, Deref, DerefMut, Clone)] -pub struct FireworksItem(pub ItemSlot); +pub struct FireworksItem(pub ItemStack); #[derive(Component, Deref, DerefMut, Clone)] pub struct AttachedToTarget(pub OptionalUnsignedInt); #[derive(Component, Deref, DerefMut, Clone)] @@ -4623,7 +4623,7 @@ impl Default for GiantMetadataBundle { } #[derive(Component, Deref, DerefMut, Clone)] -pub struct ItemFrameItem(pub ItemSlot); +pub struct ItemFrameItem(pub ItemStack); #[derive(Component, Deref, DerefMut, Clone)] pub struct Rotation(pub i32); #[derive(Component)] @@ -4669,7 +4669,7 @@ impl Default for GlowItemFrameMetadataBundle { pose: Pose::default(), ticks_frozen: TicksFrozen(Default::default()), }, - item_frame_item: ItemFrameItem(ItemSlot::Empty), + item_frame_item: ItemFrameItem(ItemStack::Empty), rotation: Rotation(0), }, } @@ -5462,7 +5462,7 @@ impl Default for IronGolemMetadataBundle { } #[derive(Component, Deref, DerefMut, Clone)] -pub struct ItemItem(pub ItemSlot); +pub struct ItemItem(pub ItemStack); #[derive(Component)] pub struct Item; impl Item { @@ -5508,7 +5508,7 @@ impl Default for ItemMetadataBundle { pose: Pose::default(), ticks_frozen: TicksFrozen(Default::default()), }, - item_item: ItemItem(ItemSlot::Empty), + item_item: ItemItem(ItemStack::Empty), } } } @@ -5544,7 +5544,7 @@ pub struct ItemDisplayHeight(pub f32); #[derive(Component, Deref, DerefMut, Clone)] pub struct ItemDisplayGlowColorOverride(pub i32); #[derive(Component, Deref, DerefMut, Clone)] -pub struct ItemDisplayItemStack(pub ItemSlot); +pub struct ItemDisplayItemStack(pub ItemStack); #[derive(Component, Deref, DerefMut, Clone)] pub struct ItemDisplayItemDisplay(pub u8); #[derive(Component)] @@ -5699,7 +5699,7 @@ impl Default for ItemDisplayMetadataBundle { 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_stack: ItemDisplayItemStack(ItemStack::Empty), item_display_item_display: ItemDisplayItemDisplay(Default::default()), } } @@ -5754,7 +5754,7 @@ impl Default for ItemFrameMetadataBundle { pose: Pose::default(), ticks_frozen: TicksFrozen(Default::default()), }, - item_frame_item: ItemFrameItem(ItemSlot::Empty), + item_frame_item: ItemFrameItem(ItemStack::Empty), rotation: Rotation(0), } } @@ -6974,7 +6974,7 @@ impl Default for OcelotMetadataBundle { } #[derive(Component, Deref, DerefMut, Clone)] -pub struct OminousItemSpawnerItem(pub ItemSlot); +pub struct OminousItemSpawnerItem(pub ItemStack); #[derive(Component)] pub struct OminousItemSpawner; impl OminousItemSpawner { @@ -7020,7 +7020,7 @@ impl Default for OminousItemSpawnerMetadataBundle { pose: Pose::default(), ticks_frozen: TicksFrozen(Default::default()), }, - ominous_item_spawner_item: OminousItemSpawnerItem(ItemSlot::Empty), + ominous_item_spawner_item: OminousItemSpawnerItem(ItemStack::Empty), } } } @@ -8052,7 +8052,7 @@ impl Default for PolarBearMetadataBundle { } #[derive(Component, Deref, DerefMut, Clone)] -pub struct PotionItemStack(pub ItemSlot); +pub struct PotionItemStack(pub ItemStack); #[derive(Component)] pub struct Potion; impl Potion { @@ -8937,7 +8937,7 @@ impl Default for SlimeMetadataBundle { } #[derive(Component, Deref, DerefMut, Clone)] -pub struct SmallFireballItemStack(pub ItemSlot); +pub struct SmallFireballItemStack(pub ItemStack); #[derive(Component)] pub struct SmallFireball; impl SmallFireball { @@ -9148,7 +9148,7 @@ impl Default for SnowGolemMetadataBundle { } #[derive(Component, Deref, DerefMut, Clone)] -pub struct SnowballItemStack(pub ItemSlot); +pub struct SnowballItemStack(pub ItemStack); #[derive(Component)] pub struct Snowball; impl Snowball { diff --git a/azalea-entity/src/particle.rs b/azalea-entity/src/particle.rs index dca4c821c..202f6f1d8 100755 --- a/azalea-entity/src/particle.rs +++ b/azalea-entity/src/particle.rs @@ -1,6 +1,6 @@ use azalea_buf::McBuf; use azalea_core::position::BlockPos; -use azalea_inventory::ItemSlot; +use azalea_inventory::ItemStack; use azalea_registry::ParticleKind; use bevy_ecs::component::Component; @@ -286,7 +286,7 @@ pub struct DustColorTransitionParticle { #[derive(Debug, Clone, McBuf, Default)] pub struct ItemParticle { - pub item: ItemSlot, + pub item: ItemStack, } #[derive(Debug, Clone, McBuf, Default)] diff --git a/azalea-inventory/azalea-inventory-macros/src/menu_enum.rs b/azalea-inventory/azalea-inventory-macros/src/menu_enum.rs index 2b31f86c8..f2236ded0 100644 --- a/azalea-inventory/azalea-inventory-macros/src/menu_enum.rs +++ b/azalea-inventory/azalea-inventory-macros/src/menu_enum.rs @@ -34,11 +34,11 @@ pub fn generate(input: &DeclareMenus) -> TokenStream { } /// Player { -/// craft_result: ItemSlot, -/// craft: [ItemSlot; 4], -/// armor: [ItemSlot; 4], -/// inventory: [ItemSlot; 36], -/// offhand: ItemSlot, +/// craft_result: ItemStack, +/// craft: [ItemStack; 4], +/// armor: [ItemStack; 4], +/// inventory: [ItemStack; 36], +/// offhand: ItemStack, /// }, fn generate_variant_for_menu(menu: &Menu) -> TokenStream { let name = &menu.name; @@ -56,7 +56,7 @@ fn generate_fields(fields: &[Field], public: bool) -> TokenStream { for field in fields { let field_length = field.length; let field_type = if field.length == 1 { - quote! { ItemSlot } + quote! { ItemStack } } else { quote! { SlotList<#field_length> } }; diff --git a/azalea-inventory/azalea-inventory-macros/src/menu_impl.rs b/azalea-inventory/azalea-inventory-macros/src/menu_impl.rs index f3cc5d5ce..4840f84c5 100644 --- a/azalea-inventory/azalea-inventory-macros/src/menu_impl.rs +++ b/azalea-inventory/azalea-inventory-macros/src/menu_impl.rs @@ -95,11 +95,11 @@ pub fn generate(input: &DeclareMenus) -> TokenStream { impl Menu { #menu_consts - /// Get a mutable reference to the [`ItemSlot`] at the given protocol index. + /// Get a mutable reference to the [`ItemStack`] at the given protocol index. /// /// If you're trying to get an item in a menu without caring about /// protocol indexes, you should just `match` it and index the - /// [`ItemSlot`] you get. + /// [`ItemStack`] you get. /// /// Use [`Menu::slot`] if you don't need a mutable reference to the slot. /// @@ -107,24 +107,24 @@ pub fn generate(input: &DeclareMenus) -> TokenStream { /// /// Returns `None` if the index is out of bounds. #[inline] - pub fn slot_mut(&mut self, i: usize) -> Option<&mut ItemSlot> { + pub fn slot_mut(&mut self, i: usize) -> Option<&mut ItemStack> { Some(match self { #slot_mut_match_variants }) } - /// Get a reference to the [`ItemSlot`] at the given protocol index. + /// Get a reference to the [`ItemStack`] at the given protocol index. /// /// If you're trying to get an item in a menu without caring about /// protocol indexes, you should just `match` it and index the - /// [`ItemSlot`] you get. + /// [`ItemStack`] you get. /// /// Use [`Menu::slot_mut`] if you need a mutable reference to the slot. /// /// # Errors /// /// Returns `None` if the index is out of bounds. - pub fn slot(&self, i: usize) -> Option<&ItemSlot> { + pub fn slot(&self, i: usize) -> Option<&ItemStack> { Some(match self { #slot_match_variants }) @@ -153,7 +153,7 @@ pub fn generate(input: &DeclareMenus) -> TokenStream { /// /// If you *only* want to include the players inventory, then you can filter by only /// using the slots in [`Self::player_slots_range`]. - pub fn slots(&self) -> Vec { + pub fn slots(&self) -> Vec { match self { #slots_match_variants } @@ -162,7 +162,7 @@ pub fn generate(input: &DeclareMenus) -> TokenStream { /// Return the contents of the menu, not including the player's inventory. /// /// If you want to include the player's inventory, use [`Menu::slots`] instead. - pub fn contents(&self) -> Vec { + pub fn contents(&self) -> Vec { match self { #contents_match_variants } diff --git a/azalea-inventory/src/components.rs b/azalea-inventory/src/components.rs index d7adf2c90..2ceaef507 100644 --- a/azalea-inventory/src/components.rs +++ b/azalea-inventory/src/components.rs @@ -11,7 +11,7 @@ use azalea_registry::{ use simdnbt::owned::{Nbt, NbtCompound}; use uuid::Uuid; -use crate::ItemSlot; +use crate::ItemStack; pub trait DataComponent: Send + Sync + Any {} @@ -427,13 +427,13 @@ impl DataComponent for MapPostProcessing {} #[derive(Clone, PartialEq, McBuf)] pub struct ChargedProjectiles { - pub items: Vec, + pub items: Vec, } impl DataComponent for ChargedProjectiles {} #[derive(Clone, PartialEq, McBuf)] pub struct BundleContents { - pub items: Vec, + pub items: Vec, } impl DataComponent for BundleContents {} @@ -629,7 +629,7 @@ impl DataComponent for PotDecorations {} #[derive(Clone, PartialEq, McBuf)] pub struct Container { - pub items: Vec, + pub items: Vec, } impl DataComponent for Container {} @@ -699,7 +699,7 @@ pub enum ItemUseAnimation { #[derive(Clone, PartialEq, McBuf)] pub struct UseRemainder { - pub convert_into: ItemSlot, + pub convert_into: ItemStack, } impl DataComponent for UseRemainder {} diff --git a/azalea-inventory/src/item/mod.rs b/azalea-inventory/src/item/mod.rs index 862cd20e1..7f077c6a8 100644 --- a/azalea-inventory/src/item/mod.rs +++ b/azalea-inventory/src/item/mod.rs @@ -2,9 +2,9 @@ pub trait MaxStackSizeExt { /// Get the maximum stack size for this item. /// /// This is a signed integer to be consistent with the `count` field of - /// [`ItemSlotData`]. + /// [`ItemStackData`]. /// - /// [`ItemSlotData`]: crate::ItemSlotData + /// [`ItemStackData`]: crate::ItemStackData fn max_stack_size(&self) -> i32; /// Whether this item can be stacked with other items. diff --git a/azalea-inventory/src/lib.rs b/azalea-inventory/src/lib.rs index 930c1a5d9..3f9ba2376 100644 --- a/azalea-inventory/src/lib.rs +++ b/azalea-inventory/src/lib.rs @@ -9,17 +9,17 @@ mod slot; use std::ops::{Deref, DerefMut, RangeInclusive}; use azalea_inventory_macros::declare_menus; -pub use slot::{DataComponentPatch, ItemSlot, ItemSlotData}; +pub use slot::{DataComponentPatch, ItemStack, ItemStackData}; // TODO: remove this here and in azalea-inventory-macros when rust makes // Default be implemented for all array sizes // https://github.com/rust-lang/rust/issues/61415 -/// A fixed-size list of [`ItemSlot`]s. +/// A fixed-size list of [`ItemStack`]s. #[derive(Debug, Clone)] -pub struct SlotList([ItemSlot; N]); +pub struct SlotList([ItemStack; N]); impl Deref for SlotList { - type Target = [ItemSlot; N]; + type Target = [ItemStack; N]; fn deref(&self) -> &Self::Target { &self.0 } @@ -31,7 +31,7 @@ impl DerefMut for SlotList { } impl Default for SlotList { fn default() -> Self { - SlotList([(); N].map(|_| ItemSlot::Empty)) + SlotList([(); N].map(|_| ItemStack::Empty)) } } diff --git a/azalea-inventory/src/operations.rs b/azalea-inventory/src/operations.rs index 652d19004..0f73d877e 100644 --- a/azalea-inventory/src/operations.rs +++ b/azalea-inventory/src/operations.rs @@ -8,7 +8,7 @@ use crate::{ CraftingMenuLocation, EnchantmentMenuLocation, FurnaceMenuLocation, Generic3x3MenuLocation, Generic9x1MenuLocation, Generic9x2MenuLocation, Generic9x3MenuLocation, Generic9x4MenuLocation, Generic9x5MenuLocation, Generic9x6MenuLocation, GrindstoneMenuLocation, HopperMenuLocation, - ItemSlot, ItemSlotData, LecternMenuLocation, LoomMenuLocation, Menu, MenuLocation, + ItemStack, ItemStackData, LecternMenuLocation, LoomMenuLocation, Menu, MenuLocation, MerchantMenuLocation, Player, PlayerMenuLocation, ShulkerBoxMenuLocation, SmithingMenuLocation, SmokerMenuLocation, StonecutterMenuLocation, }; @@ -266,10 +266,10 @@ impl Menu { /// /// Keep in mind that this doesn't send any packets to the server, it just /// mutates this specific `Menu`. - pub fn quick_move_stack(&mut self, slot_index: usize) -> ItemSlot { + pub fn quick_move_stack(&mut self, slot_index: usize) -> ItemStack { let slot = self.slot(slot_index); if slot.is_none() { - return ItemSlot::Empty; + return ItemStack::Empty; }; let slot_location = self @@ -587,7 +587,7 @@ impl Menu { }, } - ItemSlot::Empty + ItemStack::Empty } fn try_move_item_to_slots_or_toggle_hotbar( @@ -610,7 +610,7 @@ impl Menu { /// Whether the given item could be placed in this menu. /// /// TODO: right now this always returns true - pub fn may_place(&self, _target_slot_index: usize, _item: &ItemSlotData) -> bool { + pub fn may_place(&self, _target_slot_index: usize, _item: &ItemStackData) -> bool { true } @@ -662,14 +662,14 @@ impl Menu { /// slot is present and the same item. fn move_item_to_slot_if_stackable( &mut self, - item_slot: &mut ItemSlot, + item_slot: &mut ItemStack, target_slot_index: usize, ) { - let ItemSlot::Present(item) = item_slot else { + let ItemStack::Present(item) = item_slot else { return; }; let target_slot = self.slot(target_slot_index).unwrap(); - if let ItemSlot::Present(target_item) = target_slot { + if let ItemStack::Present(target_item) = target_slot { // the target slot is empty, so we can just move the item there if self.may_place(target_slot_index, item) && target_item.is_same_item_and_components(item) @@ -679,15 +679,15 @@ impl Menu { // get the target slot again but mut this time so we can update it let target_slot = self.slot_mut(target_slot_index).unwrap(); - *target_slot = ItemSlot::Present(new_target_slot_data); + *target_slot = ItemStack::Present(new_target_slot_data); item_slot.update_empty(); } } } - fn move_item_to_slot_if_empty(&mut self, item_slot: &mut ItemSlot, target_slot_index: usize) { - let ItemSlot::Present(item) = item_slot else { + fn move_item_to_slot_if_empty(&mut self, item_slot: &mut ItemStack, target_slot_index: usize) { + let ItemStack::Present(item) = item_slot else { return; }; let target_slot = self.slot(target_slot_index).unwrap(); @@ -696,7 +696,7 @@ impl Menu { let new_target_slot_data = item.split(u32::min(slot_item_limit, item.count as u32)); let target_slot = self.slot_mut(target_slot_index).unwrap(); - *target_slot = ItemSlot::Present(new_target_slot_data); + *target_slot = ItemStack::Present(new_target_slot_data); item_slot.update_empty(); } } diff --git a/azalea-inventory/src/slot.rs b/azalea-inventory/src/slot.rs index 601c28e28..968809c2e 100644 --- a/azalea-inventory/src/slot.rs +++ b/azalea-inventory/src/slot.rs @@ -11,27 +11,27 @@ use crate::components::{self}; /// Either an item in an inventory or nothing. #[derive(Debug, Clone, Default, PartialEq)] -pub enum ItemSlot { +pub enum ItemStack { #[default] Empty, - Present(ItemSlotData), + Present(ItemStackData), } -impl ItemSlot { - /// Check if the slot is ItemSlot::Empty, if the count is <= 0, or if the +impl ItemStack { + /// Check if the slot is ItemStack::Empty, if the count is <= 0, or if the /// item is air. /// - /// This is the opposite of [`ItemSlot::is_present`]. + /// This is the opposite of [`ItemStack::is_present`]. pub fn is_empty(&self) -> bool { match self { - ItemSlot::Empty => true, - ItemSlot::Present(item) => item.is_empty(), + ItemStack::Empty => true, + ItemStack::Present(item) => item.is_empty(), } } - /// Check if the slot is not ItemSlot::Empty, if the count is > 0, and if + /// Check if the slot is not ItemStack::Empty, if the count is > 0, and if /// the item is not air. /// - /// This is the opposite of [`ItemSlot::is_empty`]. + /// This is the opposite of [`ItemStack::is_empty`]. pub fn is_present(&self) -> bool { !self.is_empty() } @@ -42,21 +42,21 @@ impl ItemSlot { /// slot is present. pub fn count(&self) -> i32 { match self { - ItemSlot::Empty => 0, - ItemSlot::Present(i) => i.count, + ItemStack::Empty => 0, + ItemStack::Present(i) => i.count, } } /// Remove `count` items from this slot, returning the removed items. - pub fn split(&mut self, count: u32) -> ItemSlot { + pub fn split(&mut self, count: u32) -> ItemStack { match self { - ItemSlot::Empty => ItemSlot::Empty, - ItemSlot::Present(i) => { + ItemStack::Empty => ItemStack::Empty, + ItemStack::Present(i) => { let returning = i.split(count); if i.is_empty() { - *self = ItemSlot::Empty; + *self = ItemStack::Empty; } - ItemSlot::Present(returning) + ItemStack::Present(returning) } } } @@ -65,33 +65,33 @@ impl ItemSlot { /// [`azalea_registry::Item::Air`] pub fn kind(&self) -> azalea_registry::Item { match self { - ItemSlot::Empty => azalea_registry::Item::Air, - ItemSlot::Present(i) => i.kind, + ItemStack::Empty => azalea_registry::Item::Air, + ItemStack::Present(i) => i.kind, } } /// Update whether this slot is empty, based on the count. pub fn update_empty(&mut self) { - if let ItemSlot::Present(i) = self { + if let ItemStack::Present(i) = self { if i.is_empty() { - *self = ItemSlot::Empty; + *self = ItemStack::Empty; } } } - /// Convert this slot into an [`ItemSlotData`], if it's present. - pub fn as_present(&self) -> Option<&ItemSlotData> { + /// Convert this slot into an [`ItemStackData`], if it's present. + pub fn as_present(&self) -> Option<&ItemStackData> { match self { - ItemSlot::Empty => None, - ItemSlot::Present(i) => Some(i), + ItemStack::Empty => None, + ItemStack::Present(i) => Some(i), } } } -/// An item in an inventory, with a count and NBT. Usually you want [`ItemSlot`] -/// or [`azalea_registry::Item`] instead. +/// An item in an inventory, with a count and NBT. Usually you want +/// [`ItemStack`] or [`azalea_registry::Item`] instead. #[derive(Debug, Clone, PartialEq)] -pub struct ItemSlotData { +pub struct ItemStackData { /// The amount of the item in this slot. /// /// The count can be zero or negative, but this is rare. @@ -100,9 +100,9 @@ pub struct ItemSlotData { pub components: DataComponentPatch, } -impl ItemSlotData { +impl ItemStackData { /// Remove `count` items from this slot, returning the removed items. - pub fn split(&mut self, count: u32) -> ItemSlotData { + pub fn split(&mut self, count: u32) -> ItemStackData { let returning_count = i32::min(count as i32, self.count); let mut returning = self.clone(); returning.count = returning_count; @@ -118,14 +118,14 @@ impl ItemSlotData { /// Whether this item is the same as another item, ignoring the count. /// /// ``` - /// # use azalea_inventory::ItemSlotData; + /// # use azalea_inventory::ItemStackData; /// # use azalea_registry::Item; - /// let mut a = ItemSlotData { + /// let mut a = ItemStackData { /// kind: Item::Stone, /// count: 1, /// components: Default::default(), /// }; - /// let mut b = ItemSlotData { + /// let mut b = ItemStackData { /// kind: Item::Stone, /// count: 2, /// components: Default::default(), @@ -135,20 +135,20 @@ impl ItemSlotData { /// b.kind = Item::Dirt; /// assert!(!a.is_same_item_and_components(&b)); /// ``` - pub fn is_same_item_and_components(&self, other: &ItemSlotData) -> bool { + pub fn is_same_item_and_components(&self, other: &ItemStackData) -> bool { self.kind == other.kind && self.components == other.components } } -impl McBufReadable for ItemSlot { +impl McBufReadable for ItemStack { fn read_from(buf: &mut Cursor<&[u8]>) -> Result { let count = i32::var_read_from(buf)?; if count <= 0 { - Ok(ItemSlot::Empty) + Ok(ItemStack::Empty) } else { let kind = azalea_registry::Item::read_from(buf)?; let components = DataComponentPatch::read_from(buf)?; - Ok(ItemSlot::Present(ItemSlotData { + Ok(ItemStack::Present(ItemStackData { count, kind, components, @@ -157,11 +157,11 @@ impl McBufReadable for ItemSlot { } } -impl McBufWritable for ItemSlot { +impl McBufWritable for ItemStack { fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { match self { - ItemSlot::Empty => 0.var_write_into(buf)?, - ItemSlot::Present(i) => { + ItemStack::Empty => 0.var_write_into(buf)?, + ItemStack::Present(i) => { i.count.var_write_into(buf)?; i.kind.write_into(buf)?; i.components.write_into(buf)?; diff --git a/azalea-physics/src/clip.rs b/azalea-physics/src/clip.rs index 30b46a8e8..b68574b7d 100644 --- a/azalea-physics/src/clip.rs +++ b/azalea-physics/src/clip.rs @@ -5,7 +5,7 @@ use azalea_core::{ math::{self, lerp, EPSILON}, position::{BlockPos, Vec3}, }; -use azalea_inventory::ItemSlot; +use azalea_inventory::ItemStack; use azalea_world::ChunkStorage; use bevy_ecs::entity::Entity; @@ -52,7 +52,7 @@ pub enum FluidPickType { pub struct EntityCollisionContext { pub descending: bool, pub entity_bottom: f64, - pub held_item: ItemSlot, + pub held_item: ItemStack, // pub can_stand_on_fluid: Box bool>, pub entity: Entity, } diff --git a/azalea-protocol/src/packets/game/c_commands.rs b/azalea-protocol/src/packets/game/c_commands.rs index e772dc0dc..52ca5a51c 100755 --- a/azalea-protocol/src/packets/game/c_commands.rs +++ b/azalea-protocol/src/packets/game/c_commands.rs @@ -128,8 +128,8 @@ pub enum BrigadierParser { ScoreHolder { allows_multiple: bool }, Swizzle, Team, - ItemSlot, - ItemSlots, + ItemStack, + ItemStacks, ResourceLocation, Function, EntityAnchor, diff --git a/azalea-protocol/src/packets/game/c_container_set_content.rs b/azalea-protocol/src/packets/game/c_container_set_content.rs index b79fe6bfb..2a10489b5 100755 --- a/azalea-protocol/src/packets/game/c_container_set_content.rs +++ b/azalea-protocol/src/packets/game/c_container_set_content.rs @@ -1,5 +1,5 @@ use azalea_buf::McBuf; -use azalea_inventory::ItemSlot; +use azalea_inventory::ItemStack; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] @@ -7,6 +7,6 @@ pub struct ClientboundContainerSetContent { pub container_id: i8, #[var] pub state_id: u32, - pub items: Vec, - pub carried_item: ItemSlot, + pub items: Vec, + pub carried_item: ItemStack, } diff --git a/azalea-protocol/src/packets/game/c_container_set_slot.rs b/azalea-protocol/src/packets/game/c_container_set_slot.rs index 3750e5487..32250cd5f 100755 --- a/azalea-protocol/src/packets/game/c_container_set_slot.rs +++ b/azalea-protocol/src/packets/game/c_container_set_slot.rs @@ -1,5 +1,5 @@ use azalea_buf::McBuf; -use azalea_inventory::ItemSlot; +use azalea_inventory::ItemStack; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] @@ -8,5 +8,5 @@ pub struct ClientboundContainerSetSlot { #[var] pub state_id: u32, pub slot: u16, - pub item_stack: ItemSlot, + pub item_stack: ItemStack, } diff --git a/azalea-protocol/src/packets/game/c_merchant_offers.rs b/azalea-protocol/src/packets/game/c_merchant_offers.rs index 510e8e3ce..00a376a42 100755 --- a/azalea-protocol/src/packets/game/c_merchant_offers.rs +++ b/azalea-protocol/src/packets/game/c_merchant_offers.rs @@ -1,5 +1,5 @@ use azalea_buf::McBuf; -use azalea_inventory::ItemSlot; +use azalea_inventory::ItemStack; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] @@ -17,9 +17,9 @@ pub struct ClientboundMerchantOffers { #[derive(Clone, Debug, McBuf)] pub struct MerchantOffer { - pub base_cost_a: ItemSlot, - pub result: ItemSlot, - pub cost_b: ItemSlot, + pub base_cost_a: ItemStack, + pub result: ItemStack, + pub cost_b: ItemStack, pub out_of_stock: bool, pub uses: u32, pub max_uses: u32, diff --git a/azalea-protocol/src/packets/game/c_set_cursor_item.rs b/azalea-protocol/src/packets/game/c_set_cursor_item.rs index f72cff058..a68a9cb2f 100644 --- a/azalea-protocol/src/packets/game/c_set_cursor_item.rs +++ b/azalea-protocol/src/packets/game/c_set_cursor_item.rs @@ -1,8 +1,8 @@ use azalea_buf::McBuf; -use azalea_inventory::ItemSlot; +use azalea_inventory::ItemStack; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] pub struct ClientboundSetCursorItem { - pub contents: Option, + pub contents: Option, } diff --git a/azalea-protocol/src/packets/game/c_set_equipment.rs b/azalea-protocol/src/packets/game/c_set_equipment.rs index 7b0a4a196..f043544b2 100755 --- a/azalea-protocol/src/packets/game/c_set_equipment.rs +++ b/azalea-protocol/src/packets/game/c_set_equipment.rs @@ -2,7 +2,7 @@ use std::io::Cursor; use azalea_buf::{BufReadError, McBuf}; use azalea_buf::{McBufReadable, McBufWritable}; -use azalea_inventory::ItemSlot; +use azalea_inventory::ItemStack; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] @@ -14,7 +14,7 @@ pub struct ClientboundSetEquipment { #[derive(Clone, Debug)] pub struct EquipmentSlots { - pub slots: Vec<(EquipmentSlot, ItemSlot)>, + pub slots: Vec<(EquipmentSlot, ItemStack)>, } impl McBufReadable for EquipmentSlots { @@ -29,7 +29,7 @@ impl McBufReadable for EquipmentSlots { id: equipment_byte.into(), } })?; - let item = ItemSlot::read_from(buf)?; + let item = ItemStack::read_from(buf)?; slots.push((equipment_slot, item)); if equipment_byte & 128 == 0 { break; diff --git a/azalea-protocol/src/packets/game/c_set_player_inventory.rs b/azalea-protocol/src/packets/game/c_set_player_inventory.rs index 8bf6f1748..2549fc0c4 100644 --- a/azalea-protocol/src/packets/game/c_set_player_inventory.rs +++ b/azalea-protocol/src/packets/game/c_set_player_inventory.rs @@ -1,10 +1,10 @@ use azalea_buf::McBuf; -use azalea_inventory::ItemSlot; +use azalea_inventory::ItemStack; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] pub struct ClientboundSetPlayerInventory { #[var] pub slot: i32, - pub contents: Option, + pub contents: Option, } diff --git a/azalea-protocol/src/packets/game/c_update_advancements.rs b/azalea-protocol/src/packets/game/c_update_advancements.rs index 1d717e6eb..3a048b554 100755 --- a/azalea-protocol/src/packets/game/c_update_advancements.rs +++ b/azalea-protocol/src/packets/game/c_update_advancements.rs @@ -4,7 +4,7 @@ use std::io::Cursor; use azalea_buf::McBuf; use azalea_chat::FormattedText; use azalea_core::resource_location::ResourceLocation; -use azalea_inventory::ItemSlot; +use azalea_inventory::ItemStack; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] @@ -27,7 +27,7 @@ pub struct Advancement { pub struct DisplayInfo { pub title: FormattedText, pub description: FormattedText, - pub icon: ItemSlot, + pub icon: ItemStack, pub frame: FrameType, pub show_toast: bool, pub hidden: bool, @@ -133,7 +133,7 @@ mod tests { display: Some(DisplayInfo { title: FormattedText::from("title".to_string()), description: FormattedText::from("description".to_string()), - icon: ItemSlot::Empty, + icon: ItemStack::Empty, frame: FrameType::Task, show_toast: true, hidden: false, diff --git a/azalea-protocol/src/packets/game/c_update_recipes.rs b/azalea-protocol/src/packets/game/c_update_recipes.rs index 9f6ca0da2..5a57d803c 100755 --- a/azalea-protocol/src/packets/game/c_update_recipes.rs +++ b/azalea-protocol/src/packets/game/c_update_recipes.rs @@ -2,7 +2,7 @@ use std::collections::HashMap; use azalea_buf::McBuf; use azalea_core::resource_location::ResourceLocation; -use azalea_inventory::ItemSlot; +use azalea_inventory::ItemStack; use azalea_protocol_macros::ClientboundGamePacket; use azalea_registry::HolderSet; @@ -27,7 +27,7 @@ pub struct SelectableRecipe { pub enum SlotDisplayData { Empty, AnyFuel, - Item(ItemSlotDisplay), + Item(ItemStackDisplay), ItemStack(ItemStackSlotDisplay), Tag(ResourceLocation), SmithingTrim(Box), @@ -36,12 +36,12 @@ pub enum SlotDisplayData { } #[derive(Clone, Debug, PartialEq, McBuf)] -pub struct ItemSlotDisplay { +pub struct ItemStackDisplay { pub item: azalea_registry::Item, } #[derive(Clone, Debug, PartialEq, McBuf)] pub struct ItemStackSlotDisplay { - pub stack: ItemSlot, + pub stack: ItemStack, } #[derive(Clone, Debug, PartialEq, McBuf)] pub struct TagSlotDisplay { diff --git a/azalea-protocol/src/packets/game/s_container_click.rs b/azalea-protocol/src/packets/game/s_container_click.rs index 72aed7f1e..5470f8f54 100755 --- a/azalea-protocol/src/packets/game/s_container_click.rs +++ b/azalea-protocol/src/packets/game/s_container_click.rs @@ -1,7 +1,7 @@ use std::collections::HashMap; use azalea_buf::McBuf; -use azalea_inventory::{operations::ClickType, ItemSlot}; +use azalea_inventory::{operations::ClickType, ItemStack}; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] @@ -12,6 +12,6 @@ pub struct ServerboundContainerClick { pub slot_num: i16, pub button_num: u8, pub click_type: ClickType, - pub changed_slots: HashMap, - pub carried_item: ItemSlot, + pub changed_slots: HashMap, + pub carried_item: ItemStack, } diff --git a/azalea-protocol/src/packets/game/s_set_creative_mode_slot.rs b/azalea-protocol/src/packets/game/s_set_creative_mode_slot.rs index 9a6cc877c..99bf7a1de 100755 --- a/azalea-protocol/src/packets/game/s_set_creative_mode_slot.rs +++ b/azalea-protocol/src/packets/game/s_set_creative_mode_slot.rs @@ -1,9 +1,9 @@ use azalea_buf::McBuf; -use azalea_inventory::ItemSlot; +use azalea_inventory::ItemStack; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] pub struct ServerboundSetCreativeModeSlot { pub slot_num: u16, - pub item_stack: ItemSlot, + pub item_stack: ItemStack, } diff --git a/azalea-registry/src/lib.rs b/azalea-registry/src/lib.rs index e9c26c03a..a50b6a880 100755 --- a/azalea-registry/src/lib.rs +++ b/azalea-registry/src/lib.rs @@ -1504,8 +1504,8 @@ enum CommandArgumentKind { ScoreHolder => "minecraft:score_holder", Swizzle => "minecraft:swizzle", Team => "minecraft:team", - ItemSlot => "minecraft:item_slot", - ItemSlots => "minecraft:item_slots", + ItemStack => "minecraft:item_slot", + ItemStacks => "minecraft:item_slots", ResourceLocation => "minecraft:resource_location", Function => "minecraft:function", EntityAnchor => "minecraft:entity_anchor", diff --git a/azalea/examples/steal.rs b/azalea/examples/steal.rs index b0586f19c..f64fb8f38 100644 --- a/azalea/examples/steal.rs +++ b/azalea/examples/steal.rs @@ -4,7 +4,7 @@ use std::sync::Arc; use azalea::{prelude::*, BlockPos}; use azalea_inventory::operations::QuickMoveClick; -use azalea_inventory::ItemSlot; +use azalea_inventory::ItemStack; use parking_lot::Mutex; #[tokio::main] @@ -59,7 +59,7 @@ async fn handle(mut bot: Client, event: Event, state: State) -> anyhow::Result<( .enumerate() { println!("Checking slot {index}: {slot:?}"); - if let ItemSlot::Present(item) = slot { + if let ItemStack::Present(item) = slot { if item.kind == azalea::registry::Item::Diamond { println!("clicking slot ^"); chest.click(QuickMoveClick::Left { slot: index as u16 }); diff --git a/azalea/src/auto_tool.rs b/azalea/src/auto_tool.rs index e5a627ba0..441f97917 100644 --- a/azalea/src/auto_tool.rs +++ b/azalea/src/auto_tool.rs @@ -1,7 +1,7 @@ use azalea_block::{Block, BlockState}; use azalea_client::{inventory::Inventory, Client}; use azalea_entity::{FluidOnEyes, Physics}; -use azalea_inventory::{ItemSlot, Menu}; +use azalea_inventory::{ItemStack, Menu}; use azalea_registry::{DataComponentKind, Fluid}; #[derive(Debug)] @@ -80,7 +80,7 @@ pub fn accurate_best_tool_in_hotbar_for_block( for (i, item_slot) in hotbar_slots.iter().enumerate() { let this_item_speed; match item_slot { - ItemSlot::Empty => { + ItemStack::Empty => { this_item_speed = Some(azalea_entity::mining::get_mine_progress( block.as_ref(), azalea_registry::Item::Air, @@ -89,7 +89,7 @@ pub fn accurate_best_tool_in_hotbar_for_block( physics, )); } - ItemSlot::Present(item_slot) => { + ItemStack::Present(item_slot) => { // lazy way to avoid checking durability since azalea doesn't have durability // data yet if item_slot @@ -119,7 +119,7 @@ pub fn accurate_best_tool_in_hotbar_for_block( // now check every item for (i, item_slot) in hotbar_slots.iter().enumerate() { - if let ItemSlot::Present(item_slot) = item_slot { + if let ItemStack::Present(item_slot) = item_slot { let this_item_speed = azalea_entity::mining::get_mine_progress( block.as_ref(), item_slot.kind, diff --git a/azalea/src/container.rs b/azalea/src/container.rs index 980210aea..df020dbec 100644 --- a/azalea/src/container.rs +++ b/azalea/src/container.rs @@ -7,7 +7,7 @@ use azalea_client::{ Client, }; use azalea_core::position::BlockPos; -use azalea_inventory::{operations::ClickOperation, ItemSlot, Menu}; +use azalea_inventory::{operations::ClickOperation, ItemStack, Menu}; use azalea_protocol::packets::game::ClientboundGamePacket; use bevy_app::{App, Plugin, Update}; use bevy_ecs::{component::Component, prelude::EventReader, system::Commands}; @@ -168,7 +168,7 @@ impl ContainerHandleRef { /// Returns the item slots in the container, not including the player's /// inventory. If the container is closed, this will return `None`. - pub fn contents(&self) -> Option> { + pub fn contents(&self) -> Option> { self.menu().map(|menu| menu.contents()) } @@ -222,7 +222,7 @@ impl ContainerHandle { /// Returns the item slots in the container, not including the player's /// inventory. If the container is closed, this will return `None`. - pub fn contents(&self) -> Option> { + pub fn contents(&self) -> Option> { self.0.contents() } diff --git a/codegen/lib/code/entity.py b/codegen/lib/code/entity.py index 5f0bc3d9e..a380d3d9a 100644 --- a/codegen/lib/code/entity.py +++ b/codegen/lib/code/entity.py @@ -111,7 +111,7 @@ def generate_entity_metadata(burger_entities_data: dict, mappings: Mappings): direction::Direction, position::{BlockPos, Vec3}, }; -use azalea_inventory::ItemSlot; +use azalea_inventory::ItemStack; use bevy_ecs::{bundle::Bundle, component::Component}; use derive_more::{Deref, DerefMut}; use thiserror::Error; @@ -428,7 +428,7 @@ def generate_fields(this_entity_id: str): elif type_name == 'OptionalUnsignedInt': default = f'OptionalUnsignedInt(Some({default}))' if default != 'Empty' else 'OptionalUnsignedInt(None)' elif type_name == 'ItemStack': - default = f'ItemSlot::Present({default})' if default != 'Empty' else 'ItemSlot::Empty' + default = f'ItemStack::Present({default})' if default != 'Empty' else 'ItemStack::Empty' elif type_name == 'BlockState': default = f'{default}' if default != 'Empty' else 'azalea_block::BlockState::AIR' elif type_name == 'OptionalBlockState': From 68e3d0104b4f3bced2222b080ac267f8aa1cdcf2 Mon Sep 17 00:00:00 2001 From: mat Date: Tue, 26 Nov 2024 22:44:23 +0000 Subject: [PATCH 05/18] .get() -> .into_packet() --- azalea-client/src/attack.rs | 2 +- azalea-client/src/chat.rs | 4 +- azalea-client/src/chunks.rs | 2 +- azalea-client/src/client.rs | 11 ++-- azalea-client/src/configuration.rs | 4 +- azalea-client/src/interact.rs | 4 +- azalea-client/src/inventory.rs | 6 +-- azalea-client/src/mining.rs | 10 ++-- azalea-client/src/movement.rs | 10 ++-- .../src/packet_handling/configuration.rs | 10 ++-- azalea-client/src/packet_handling/game.rs | 12 ++--- azalea-client/src/packet_handling/login.rs | 2 +- azalea-client/src/ping.rs | 5 +- azalea-client/src/respawn.rs | 2 +- azalea-physics/src/lib.rs | 16 +++--- .../azalea-protocol-macros/src/lib.rs | 11 ++-- azalea-protocol/examples/handshake_proxy.rs | 12 ++--- azalea-protocol/src/common.rs | 48 ++++++++++++++++++ azalea-protocol/src/connect.rs | 8 +-- azalea-protocol/src/lib.rs | 22 ++++---- .../packets/config/s_client_information.rs | 50 ------------------- .../src/packets/game/c_commands.rs | 4 +- azalea-protocol/src/packets/game/c_explode.rs | 2 +- .../packets/game/c_level_chunk_with_light.rs | 3 +- .../src/packets/game/c_level_particles.rs | 2 +- .../src/packets/game/c_player_info_update.rs | 2 +- .../src/packets/game/c_tab_list.rs | 2 +- azalea-registry/src/lib.rs | 4 +- azalea/src/accept_resource_packs.rs | 4 +- 29 files changed, 139 insertions(+), 135 deletions(-) diff --git a/azalea-client/src/attack.rs b/azalea-client/src/attack.rs index 233f85275..7854206eb 100644 --- a/azalea-client/src/attack.rs +++ b/azalea-client/src/attack.rs @@ -90,7 +90,7 @@ pub fn handle_attack_event( action: s_interact::ActionType::Attack, using_secondary_action: **sneaking, } - .get(), + .into_variant(), }); // we can't attack if we're in spectator mode but it still sends the attack diff --git a/azalea-client/src/chat.rs b/azalea-client/src/chat.rs index 5a2071aff..340c991c8 100755 --- a/azalea-client/src/chat.rs +++ b/azalea-client/src/chat.rs @@ -274,10 +274,10 @@ pub fn handle_send_chat_kind_event( signature: None, last_seen_messages: LastSeenMessagesUpdate::default(), } - .get(), + .into_variant(), ChatKind::Command => { // TODO: chat signing - ServerboundChatCommand { command: content }.get() + ServerboundChatCommand { command: content }.into_variant() } }; diff --git a/azalea-client/src/chunks.rs b/azalea-client/src/chunks.rs index b86d00f2e..184732c4c 100644 --- a/azalea-client/src/chunks.rs +++ b/azalea-client/src/chunks.rs @@ -164,7 +164,7 @@ pub fn handle_chunk_batch_finished_event( packet: ServerboundChunkBatchReceived { desired_chunks_per_tick, } - .get(), + .into_variant(), }); } } diff --git a/azalea-client/src/client.rs b/azalea-client/src/client.rs index 482402b38..96fe8255a 100644 --- a/azalea-client/src/client.rs +++ b/azalea-client/src/client.rs @@ -356,7 +356,7 @@ impl Client { port: address.port, intention: ClientIntention::Login, } - .get(), + .into_variant(), ) .await?; let mut conn = conn.login(); @@ -377,7 +377,7 @@ impl Client { // Uuid::default() profile_id: account.uuid.unwrap_or_default(), } - .get(), + .into_variant(), ) .await?; @@ -443,7 +443,7 @@ impl Client { key_bytes: e.encrypted_public_key, encrypted_challenge: e.encrypted_challenge, } - .get(), + .into_variant(), ) .await?; @@ -458,7 +458,8 @@ impl Client { "Got profile {:?}. handshake is finished and we're now switching to the configuration state", p.game_profile ); - conn.write(ServerboundLoginAcknowledged {}.get()).await?; + conn.write(ServerboundLoginAcknowledged {}.into_variant()) + .await?; break (conn.configuration(), p.game_profile); } ClientboundLoginPacket::LoginDisconnect(p) => { @@ -600,7 +601,7 @@ impl Client { "Sending client information (already logged in): {:?}", client_information ); - self.write_packet(azalea_protocol::packets::game::s_client_information::ServerboundClientInformation { information: client_information.clone() }.get())?; + self.write_packet(azalea_protocol::packets::game::s_client_information::ServerboundClientInformation { information: client_information.clone() }.into_variant())?; } Ok(()) diff --git a/azalea-client/src/configuration.rs b/azalea-client/src/configuration.rs index c03fde788..c69653aa7 100644 --- a/azalea-client/src/configuration.rs +++ b/azalea-client/src/configuration.rs @@ -37,7 +37,7 @@ fn handle_in_configuration_state( identifier: ResourceLocation::new("brand"), data: brand_data.into(), } - .get(), + .into_variant(), }); send_packet_events.send(SendConfigurationEvent { @@ -45,7 +45,7 @@ fn handle_in_configuration_state( packet: ServerboundClientInformation { information: client_information.clone(), } - .get(), + .into_variant(), }); } } diff --git a/azalea-client/src/interact.rs b/azalea-client/src/interact.rs index b8aa83206..ee665a447 100644 --- a/azalea-client/src/interact.rs +++ b/azalea-client/src/interact.rs @@ -155,7 +155,7 @@ pub fn handle_block_interact_event( block_hit, sequence: sequence_number.0, } - .get(), + .into_variant(), }); } } @@ -307,7 +307,7 @@ pub fn handle_swing_arm_event( packet: ServerboundSwing { hand: InteractionHand::MainHand, } - .get(), + .into_variant(), }); } } diff --git a/azalea-client/src/inventory.rs b/azalea-client/src/inventory.rs index d68572ad7..e2fbd0280 100644 --- a/azalea-client/src/inventory.rs +++ b/azalea-client/src/inventory.rs @@ -632,7 +632,7 @@ fn handle_container_close_event( packet: ServerboundContainerClose { container_id: inventory.id, } - .get(), + .into_variant(), }); client_side_events.send(ClientSideCloseContainerEvent { entity: event.entity, @@ -706,7 +706,7 @@ pub fn handle_container_click_event( changed_slots, carried_item: inventory.carried.clone(), } - .get(), + .into_variant(), }); } } @@ -768,7 +768,7 @@ fn handle_set_selected_hotbar_slot_event( packet: ServerboundSetCarriedItem { slot: event.slot as u16, } - .get(), + .into_variant(), }); } } diff --git a/azalea-client/src/mining.rs b/azalea-client/src/mining.rs index 9eb00013f..e3e67e2b4 100644 --- a/azalea-client/src/mining.rs +++ b/azalea-client/src/mining.rs @@ -260,7 +260,7 @@ fn handle_start_mining_block_with_direction_event( direction: event.direction, sequence: 0, } - .get(), + .into_variant(), }); } @@ -332,7 +332,7 @@ fn handle_start_mining_block_with_direction_event( direction: event.direction, sequence: **sequence_number, } - .get(), + .into_variant(), }); } } @@ -502,7 +502,7 @@ pub fn handle_stop_mining_block_event( direction: Direction::Down, sequence: 0, } - .get(), + .into_variant(), }); commands.entity(event.entity).remove::(); **mine_progress = 0.; @@ -576,7 +576,7 @@ pub fn continue_mining_block( direction: mining.dir, sequence: **sequence_number, } - .get(), + .into_variant(), }); swing_arm_events.send(SwingArmEvent { entity }); } else if is_same_mining_target( @@ -622,7 +622,7 @@ pub fn continue_mining_block( direction: mining.dir, sequence: **sequence_number, } - .get(), + .into_variant(), }); **mine_progress = 0.; **mine_ticks = 0.; diff --git a/azalea-client/src/movement.rs b/azalea-client/src/movement.rs index 99b9e0dd3..f08af3519 100644 --- a/azalea-client/src/movement.rs +++ b/azalea-client/src/movement.rs @@ -196,7 +196,7 @@ pub fn send_position( y_rot: direction.y_rot, on_ground: physics.on_ground, } - .get(), + .into_variant(), ) } else if sending_position { Some( @@ -206,7 +206,7 @@ pub fn send_position( z: position.z, on_ground: physics.on_ground, } - .get(), + .into_variant(), ) } else if sending_direction { Some( @@ -215,14 +215,14 @@ pub fn send_position( y_rot: direction.y_rot, on_ground: physics.on_ground, } - .get(), + .into_variant(), ) } else if physics.last_on_ground != physics.on_ground { Some( ServerboundMovePlayerStatusOnly { on_ground: physics.on_ground, } - .get(), + .into_variant(), ) } else { None @@ -268,7 +268,7 @@ fn send_sprinting_if_needed( action: sprinting_action, data: 0, } - .get(), + .into_variant(), }); physics_state.was_sprinting = **sprinting; } diff --git a/azalea-client/src/packet_handling/configuration.rs b/azalea-client/src/packet_handling/configuration.rs index d23c15b35..924c56749 100644 --- a/azalea-client/src/packet_handling/configuration.rs +++ b/azalea-client/src/packet_handling/configuration.rs @@ -107,7 +107,7 @@ pub fn process_packet_events(ecs: &mut World) { let mut raw_connection = query.get_mut(player_entity).unwrap(); raw_connection - .write_packet(ServerboundFinishConfiguration {}.get()) + .write_packet(ServerboundFinishConfiguration {}.into_variant()) .expect( "we should be in the right state and encoding this packet shouldn't fail", ); @@ -150,7 +150,7 @@ pub fn process_packet_events(ecs: &mut World) { id: p.id, }); raw_connection - .write_packet(ServerboundKeepAlive { id: p.id }.get()) + .write_packet(ServerboundKeepAlive { id: p.id }.into_variant()) .unwrap(); } ClientboundConfigPacket::Ping(p) => { @@ -161,7 +161,7 @@ pub fn process_packet_events(ecs: &mut World) { let raw_connection = query.get_mut(player_entity).unwrap(); raw_connection - .write_packet(config::s_pong::ServerboundPong { id: p.id }.get()) + .write_packet(config::s_pong::ServerboundPong { id: p.id }.into_variant()) .unwrap(); } ClientboundConfigPacket::ResourcePackPush(p) => { @@ -178,7 +178,7 @@ pub fn process_packet_events(ecs: &mut World) { id: p.id, action: config::s_resource_pack::Action::Accepted, } - .get(), + .into_variant(), ) .unwrap(); } @@ -216,7 +216,7 @@ pub fn process_packet_events(ecs: &mut World) { ServerboundSelectKnownPacks { known_packs: vec![], } - .get(), + .into_variant(), ) .unwrap(); } diff --git a/azalea-client/src/packet_handling/game.rs b/azalea-client/src/packet_handling/game.rs index 2b87a91fa..e71938e55 100644 --- a/azalea-client/src/packet_handling/game.rs +++ b/azalea-client/src/packet_handling/game.rs @@ -340,7 +340,7 @@ pub fn process_packet_events(ecs: &mut World) { ); send_packet_events.send(SendPacketEvent { entity: player_entity, - packet: azalea_protocol::packets::game::s_client_information::ServerboundClientInformation { information: client_information.clone() }.get(), + packet: azalea_protocol::packets::game::s_client_information::ServerboundClientInformation { information: client_information.clone() }.into_variant(), }); system_state.apply(ecs); @@ -493,7 +493,7 @@ pub fn process_packet_events(ecs: &mut World) { send_packet_events.send(SendPacketEvent { entity: player_entity, - packet: ServerboundAcceptTeleportation { id: p.id }.get(), + packet: ServerboundAcceptTeleportation { id: p.id }.into_variant(), }); send_packet_events.send(SendPacketEvent { entity: player_entity, @@ -506,7 +506,7 @@ pub fn process_packet_events(ecs: &mut World) { // this is always false on_ground: false, } - .get(), + .into_variant(), }); } ClientboundGamePacket::PlayerInfoUpdate(p) => { @@ -983,7 +983,7 @@ pub fn process_packet_events(ecs: &mut World) { }); send_packet_events.send(SendPacketEvent { entity: player_entity, - packet: ServerboundKeepAlive { id: p.id }.get(), + packet: ServerboundKeepAlive { id: p.id }.into_variant(), }); } ClientboundGamePacket::RemoveEntities(p) => { @@ -1279,7 +1279,7 @@ pub fn process_packet_events(ecs: &mut World) { send_packet_events.send(SendPacketEvent { entity: player_entity, - packet: ServerboundPong { id: p.id }.get(), + packet: ServerboundPong { id: p.id }.into_variant(), }); } ClientboundGamePacket::PlaceGhostRecipe(_) => {} @@ -1423,7 +1423,7 @@ pub fn process_packet_events(ecs: &mut World) { packet_events.send(SendPacketEvent { entity: player_entity, - packet: ServerboundConfigurationAcknowledged {}.get(), + packet: ServerboundConfigurationAcknowledged {}.into_variant(), }); commands diff --git a/azalea-client/src/packet_handling/login.rs b/azalea-client/src/packet_handling/login.rs index d2719c938..90b21c6ff 100644 --- a/azalea-client/src/packet_handling/login.rs +++ b/azalea-client/src/packet_handling/login.rs @@ -92,7 +92,7 @@ pub fn process_packet_events(ecs: &mut World) { transaction_id: p.transaction_id, data: None, } - .get(), + .into_variant(), }); } _ => {} diff --git a/azalea-client/src/ping.rs b/azalea-client/src/ping.rs index be0409705..99485eed4 100755 --- a/azalea-client/src/ping.rs +++ b/azalea-client/src/ping.rs @@ -81,13 +81,14 @@ pub async fn ping_server_with_connection( port: address.port, intention: ClientIntention::Status, } - .get(), + .into_variant(), ) .await?; let mut conn = conn.status(); // send the empty status request packet - conn.write(ServerboundStatusRequest {}.get()).await?; + conn.write(ServerboundStatusRequest {}.into_variant()) + .await?; let packet = conn.read().await?; diff --git a/azalea-client/src/respawn.rs b/azalea-client/src/respawn.rs index 9f61e2646..aa641979c 100644 --- a/azalea-client/src/respawn.rs +++ b/azalea-client/src/respawn.rs @@ -29,7 +29,7 @@ pub fn perform_respawn( packet: ServerboundClientCommand { action: s_client_command::Action::PerformRespawn, } - .get(), + .into_variant(), }); } } diff --git a/azalea-physics/src/lib.rs b/azalea-physics/src/lib.rs index 702603960..998fb300d 100644 --- a/azalea-physics/src/lib.rs +++ b/azalea-physics/src/lib.rs @@ -699,10 +699,10 @@ mod tests { let block_state = world_lock.write().chunks.set_block_state( &BlockPos { x: 0, y: 69, z: 0 }, azalea_block::blocks::CobblestoneWall { - east: azalea_block::properties::EastWall::Low, - north: azalea_block::properties::NorthWall::Low, - south: azalea_block::properties::SouthWall::Low, - west: azalea_block::properties::WestWall::Low, + east: azalea_block::properties::WallEast::Low, + north: azalea_block::properties::WallNorth::Low, + south: azalea_block::properties::WallSouth::Low, + west: azalea_block::properties::WallWest::Low, up: false, waterlogged: false, } @@ -761,10 +761,10 @@ mod tests { z: -8, }, azalea_block::blocks::CobblestoneWall { - east: azalea_block::properties::EastWall::Low, - north: azalea_block::properties::NorthWall::Low, - south: azalea_block::properties::SouthWall::Low, - west: azalea_block::properties::WestWall::Low, + east: azalea_block::properties::WallEast::Low, + north: azalea_block::properties::WallNorth::Low, + south: azalea_block::properties::WallSouth::Low, + west: azalea_block::properties::WallWest::Low, up: false, waterlogged: false, } diff --git a/azalea-protocol/azalea-protocol-macros/src/lib.rs b/azalea-protocol/azalea-protocol-macros/src/lib.rs index 962646aae..291851659 100755 --- a/azalea-protocol/azalea-protocol-macros/src/lib.rs +++ b/azalea-protocol/azalea-protocol-macros/src/lib.rs @@ -20,10 +20,6 @@ fn as_packet_derive(input: TokenStream, state: proc_macro2::TokenStream) -> Toke let contents = quote! { impl #ident { - pub fn get(self) -> #state { - #state::#variant_name(self) - } - pub fn write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { azalea_buf::McBufWritable::write_into(self, buf) } @@ -32,7 +28,12 @@ fn as_packet_derive(input: TokenStream, state: proc_macro2::TokenStream) -> Toke buf: &mut std::io::Cursor<&[u8]>, ) -> Result<#state, azalea_buf::BufReadError> { use azalea_buf::McBufReadable; - Ok(Self::read_from(buf)?.get()) + Ok(Self::read_from(buf)?.into_variant()) + } + + /// Convert this packet into an variant for the enum of the state and direction. + pub fn into_variant(self) -> #state { + #state::#variant_name(self) } } }; diff --git a/azalea-protocol/examples/handshake_proxy.rs b/azalea-protocol/examples/handshake_proxy.rs index aa998f268..fa48fcd53 100644 --- a/azalea-protocol/examples/handshake_proxy.rs +++ b/azalea-protocol/examples/handshake_proxy.rs @@ -7,7 +7,7 @@ use azalea_protocol::{ connect::Connection, packets::{ handshake::{ - client_intention::ClientIntention, ClientboundHandshakePacket, + s_client_intention::ServerboundClientIntention, ClientboundHandshakePacket, ServerboundHandshakePacket, }, login::{s_hello::ServerboundHello, ServerboundLoginPacket}, @@ -108,12 +108,12 @@ async fn handle_connection(stream: TcpStream) -> anyhow::Result<()> { version: PROXY_VERSION.clone(), enforces_secure_chat: PROXY_SECURE_CHAT, } - .get(), + .into_variant(), ) .await?; } ServerboundStatusPacket::PingRequest(p) => { - conn.write(ClientboundPongResponse { time: p.time }.get()) + conn.write(ClientboundPongResponse { time: p.time }.into_variant()) .await?; break; } @@ -178,7 +178,7 @@ async fn handle_connection(stream: TcpStream) -> anyhow::Result<()> { async fn transfer( mut inbound: TcpStream, - intent: ClientIntention, + intent: ServerboundClientIntention, hello: ServerboundHello, ) -> Result<(), Box> { let outbound = TcpStream::connect(PROXY_ADDR).await?; @@ -189,10 +189,10 @@ async fn transfer( // received earlier to the proxy target let mut outbound_conn: Connection = Connection::wrap(outbound); - outbound_conn.write(intent.get()).await?; + outbound_conn.write(intent.into_variant()).await?; let mut outbound_conn = outbound_conn.login(); - outbound_conn.write(hello.get()).await?; + outbound_conn.write(hello.into_variant()).await?; let mut outbound = outbound_conn.unwrap()?; diff --git a/azalea-protocol/src/common.rs b/azalea-protocol/src/common.rs index a63844c96..800914726 100644 --- a/azalea-protocol/src/common.rs +++ b/azalea-protocol/src/common.rs @@ -139,3 +139,51 @@ impl McBufWritable for ModelCustomization { set.write_into(buf) } } + +#[cfg(test)] +mod tests { + use std::io::Cursor; + + use azalea_buf::{McBufReadable, McBufWritable}; + + use super::*; + + #[test] + fn test_client_information() { + { + let data = ClientInformation::default(); + let mut buf = Vec::new(); + data.write_into(&mut buf).unwrap(); + let mut data_cursor: Cursor<&[u8]> = Cursor::new(&buf); + + let read_data = ClientInformation::read_from(&mut data_cursor).unwrap(); + assert_eq!(read_data, data); + } + + let data = ClientInformation { + language: "en_gb".to_string(), + view_distance: 24, + chat_visibility: ChatVisibility::Hidden, + chat_colors: false, + model_customization: ModelCustomization { + cape: false, + jacket: false, + left_sleeve: true, + right_sleeve: false, + left_pants: true, + right_pants: false, + hat: true, + }, + 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(); + let mut data_cursor: Cursor<&[u8]> = Cursor::new(&buf); + + let read_data = ClientInformation::read_from(&mut data_cursor).unwrap(); + assert_eq!(read_data, data); + } +} diff --git a/azalea-protocol/src/connect.rs b/azalea-protocol/src/connect.rs index e041a0326..2576b0f5e 100755 --- a/azalea-protocol/src/connect.rs +++ b/azalea-protocol/src/connect.rs @@ -84,7 +84,7 @@ pub struct WriteConnection { /// port: resolved_address.port(), /// intention: ClientIntention::Login, /// } -/// .get(), +/// .into_variant(), /// ) /// .await?; /// @@ -96,7 +96,7 @@ pub struct WriteConnection { /// name: "bot".to_string(), /// profile_id: uuid::Uuid::nil(), /// } -/// .get(), +/// .into_variant(), /// ) /// .await?; /// @@ -111,7 +111,7 @@ pub struct WriteConnection { /// key_bytes: e.encrypted_public_key, /// encrypted_challenge: e.encrypted_challenge, /// } -/// .get(), +/// .into_variant(), /// ) /// .await?; /// conn.set_encryption_key(e.secret_key); @@ -414,7 +414,7 @@ impl Connection { /// ServerboundKeyPacket { /// key_bytes: e.encrypted_public_key, /// encrypted_challenge: e.encrypted_challenge, - /// }.get() + /// }.into_variant() /// ).await?; /// conn.set_encryption_key(e.secret_key); /// } diff --git a/azalea-protocol/src/lib.rs b/azalea-protocol/src/lib.rs index 33c12ff17..7afd461c2 100644 --- a/azalea-protocol/src/lib.rs +++ b/azalea-protocol/src/lib.rs @@ -122,7 +122,7 @@ mod tests { name: "test".to_string(), profile_id: Uuid::nil(), } - .get(); + .into_variant(); let mut stream = Vec::new(); write_packet(&packet, &mut stream, None, &mut None) .await @@ -130,10 +130,14 @@ mod tests { let mut stream = Cursor::new(stream); - let _ = - read::(&mut stream, &mut BytesMut::new(), None, &mut None) - .await - .unwrap(); + let _ = read_packet::( + &mut stream, + &mut BytesMut::new(), + None, + &mut None, + ) + .await + .unwrap(); } #[tokio::test] @@ -142,7 +146,7 @@ mod tests { name: "test".to_string(), profile_id: Uuid::nil(), } - .get(); + .into_variant(); let mut stream = Vec::new(); write_packet(&packet, &mut stream, None, &mut None) .await @@ -154,10 +158,10 @@ mod tests { let mut buffer = BytesMut::new(); - let _ = read::(&mut stream, &mut buffer, None, &mut None) + let _ = read_packet::(&mut stream, &mut buffer, None, &mut None) .await .unwrap(); - let _ = read::(&mut stream, &mut buffer, None, &mut None) + let _ = read_packet::(&mut stream, &mut buffer, None, &mut None) .await .unwrap(); } @@ -174,7 +178,7 @@ mod tests { signature: None, last_seen_messages: LastSeenMessagesUpdate::default(), } - .get(), + .into_variant(), ) .unwrap(); diff --git a/azalea-protocol/src/packets/config/s_client_information.rs b/azalea-protocol/src/packets/config/s_client_information.rs index 132207efb..efde4055e 100644 --- a/azalea-protocol/src/packets/config/s_client_information.rs +++ b/azalea-protocol/src/packets/config/s_client_information.rs @@ -7,53 +7,3 @@ use crate::common::ClientInformation; pub struct ServerboundClientInformation { pub information: ClientInformation, } - -#[cfg(test)] -mod tests { - use std::io::Cursor; - - use azalea_buf::{McBufReadable, McBufWritable}; - - use super::*; - - #[test] - fn test_client_information_packet() { - { - let data = ClientInformation::default(); - let mut buf = Vec::new(); - data.write_into(&mut buf).unwrap(); - let mut data_cursor: Cursor<&[u8]> = Cursor::new(&buf); - - let read_data = ClientInformation::read_from(&mut data_cursor).unwrap(); - assert_eq!(read_data, data); - } - - { - let data = ClientInformation { - language: "en_gb".to_string(), - view_distance: 24, - chat_visibility: ChatVisibility::Hidden, - chat_colors: false, - model_customization: ModelCustomization { - cape: false, - jacket: false, - left_sleeve: true, - right_sleeve: false, - left_pants: true, - right_pants: false, - hat: true, - }, - 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(); - let mut data_cursor: Cursor<&[u8]> = Cursor::new(&buf); - - let read_data = ClientInformation::read_from(&mut data_cursor).unwrap(); - assert_eq!(read_data, data); - } - } -} diff --git a/azalea-protocol/src/packets/game/c_commands.rs b/azalea-protocol/src/packets/game/c_commands.rs index 52ca5a51c..e772dc0dc 100755 --- a/azalea-protocol/src/packets/game/c_commands.rs +++ b/azalea-protocol/src/packets/game/c_commands.rs @@ -128,8 +128,8 @@ pub enum BrigadierParser { ScoreHolder { allows_multiple: bool }, Swizzle, Team, - ItemStack, - ItemStacks, + ItemSlot, + ItemSlots, ResourceLocation, Function, EntityAnchor, diff --git a/azalea-protocol/src/packets/game/c_explode.rs b/azalea-protocol/src/packets/game/c_explode.rs index e45c10714..7a4496ffb 100755 --- a/azalea-protocol/src/packets/game/c_explode.rs +++ b/azalea-protocol/src/packets/game/c_explode.rs @@ -160,7 +160,7 @@ mod tests { }; let mut buf = Vec::new(); packet.write_into(&mut buf).unwrap(); - let packet2 = ClientboundExplodePacket::read_from(&mut Cursor::new(&buf)).unwrap(); + let packet2 = ClientboundExplode::read_from(&mut Cursor::new(&buf)).unwrap(); assert_eq!(packet, packet2); } } diff --git a/azalea-protocol/src/packets/game/c_level_chunk_with_light.rs b/azalea-protocol/src/packets/game/c_level_chunk_with_light.rs index 1e0273772..da81871dd 100755 --- a/azalea-protocol/src/packets/game/c_level_chunk_with_light.rs +++ b/azalea-protocol/src/packets/game/c_level_chunk_with_light.rs @@ -45,8 +45,7 @@ mod tests { 255, 255, 255, 253, 0, 0, 0, 1, 10, 12, 0, 15, 77, 79, 84, 73, 79, 78, 95, 66, 76, 79, 67, 75, 73, 78, 71, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 240, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 195, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 33, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 170, 37, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 4, 2, 0, 137, 51, 128, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 16, 0, 0, 0, 0, 0, 0, 1, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 4, 2, 0, 137, 51, 128, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 16, 0, 0, 0, 0, 0, 0, 1, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 4, 128, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 128, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 32, 67, 101, 0, 0, 0, 0, 0, 32, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 16, 50, 84, 118, 152, 186, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 16, 50, 84, 118, 152, 186, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 16, 50, 84, 118, 152, 186, 0, 0, 33, 67, 101, 135, 169, 203, 0, 0, 16, 50, 84, 118, 152, 186, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 16, 50, 84, 118, 152, 186, 0, 0, 33, 67, 101, 135, 169, 203, 0, 0, 16, 50, 84, 118, 152, 186, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 16, 50, 84, 118, 152, 186, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 16, 50, 84, 118, 152, 186, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 128, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; - let packet = - ClientboundLevelChunkWithLightPacket::read_from(&mut Cursor::new(&bytes)).unwrap(); + let packet = ClientboundLevelChunkWithLight::read_from(&mut Cursor::new(&bytes)).unwrap(); let heightmaps_nbt = &packet.chunk_data.heightmaps; // necessary to make the unwrap_or work diff --git a/azalea-protocol/src/packets/game/c_level_particles.rs b/azalea-protocol/src/packets/game/c_level_particles.rs index 54a94d343..9d5c363b2 100755 --- a/azalea-protocol/src/packets/game/c_level_particles.rs +++ b/azalea-protocol/src/packets/game/c_level_particles.rs @@ -33,7 +33,7 @@ mod tests { ][..]; let mut bytes = Cursor::new(slice); - let _packet = ClientboundLevelParticlesPacket::read_from(&mut bytes).unwrap(); + let _packet = ClientboundLevelParticles::read_from(&mut bytes).unwrap(); assert_eq!(bytes.position(), slice.len() as u64); } } diff --git a/azalea-protocol/src/packets/game/c_player_info_update.rs b/azalea-protocol/src/packets/game/c_player_info_update.rs index d7de74836..8c2c94ddf 100644 --- a/azalea-protocol/src/packets/game/c_player_info_update.rs +++ b/azalea-protocol/src/packets/game/c_player_info_update.rs @@ -308,6 +308,6 @@ mod tests { 0, ][..], ); - let _packet = ClientboundPlayerInfoUpdatePacket::read_from(&mut bytes).unwrap(); + let _packet = ClientboundPlayerInfoUpdate::read_from(&mut bytes).unwrap(); } } diff --git a/azalea-protocol/src/packets/game/c_tab_list.rs b/azalea-protocol/src/packets/game/c_tab_list.rs index 3d23bf628..773716829 100755 --- a/azalea-protocol/src/packets/game/c_tab_list.rs +++ b/azalea-protocol/src/packets/game/c_tab_list.rs @@ -22,7 +22,7 @@ mod tests { let mut bytes = Cursor::new(&[ 10, 9, 0, 5, 101, 120, 116, 114, 97, 10, 0, 0, 0, 3, 1, 0, 4, 98, 111, 108, 100, 1, 8, 0, 4, 116, 101, 120, 116, 0, 16, 50, 66, 85, 73, 76, 68, 69, 82, 83, 50, 84, 79, 79, 76, 83, 10, 8, 0, 5, 99, 111, 108, 111, 114, 0, 4, 103, 114, 97, 121, 0, 8, 0, 0, 0, 1, 10, 0, 8, 0, 5, 99, 111, 108, 111, 114, 0, 4, 103, 111, 108, 100, 8, 0, 4, 116, 101, 120, 116, 0, 27, 80, 101, 110, 100, 105, 110, 103, 32, 99, 111, 110, 110, 101, 99, 116, 105, 111, 110, 32, 116, 111, 32, 50, 98, 50, 116, 10, 0, 8, 0, 4, 116, 101, 120, 116, 0, 1, 10, 0, 10, 9, 0, 5, 101, 120, 116, 114, 97, 10, 0, 0, 0, 1, 8, 0, 5, 99, 111, 108, 111, 114, 0, 4, 103, 111, 108, 100, 8, 0, 4, 116, 101, 120, 116, 0, 72, 84, 104, 105, 115, 32, 97, 99, 99, 111, 117, 110, 116, 32, 104, 97, 115, 32, 112, 114, 105, 111, 114, 105, 116, 121, 32, 115, 116, 97, 116, 117, 115, 32, 97, 110, 100, 32, 119, 105, 108, 108, 32, 98, 101, 32, 112, 108, 97, 99, 101, 100, 32, 105, 110, 32, 97, 32, 115, 104, 111, 114, 116, 101, 114, 32, 113, 117, 101, 117, 101, 46, 10, 0, 8, 0, 4, 116, 101, 120, 116, 0, 1, 10, 0 ][..]); - let _packet = ClientboundTabListPacket::read_from(&mut bytes).unwrap(); + let _packet = ClientboundTabList::read_from(&mut bytes).unwrap(); assert!(bytes.get_ref()[bytes.position() as usize..].is_empty()); } } diff --git a/azalea-registry/src/lib.rs b/azalea-registry/src/lib.rs index a50b6a880..e9c26c03a 100755 --- a/azalea-registry/src/lib.rs +++ b/azalea-registry/src/lib.rs @@ -1504,8 +1504,8 @@ enum CommandArgumentKind { ScoreHolder => "minecraft:score_holder", Swizzle => "minecraft:swizzle", Team => "minecraft:team", - ItemStack => "minecraft:item_slot", - ItemStacks => "minecraft:item_slots", + ItemSlot => "minecraft:item_slot", + ItemSlots => "minecraft:item_slots", ResourceLocation => "minecraft:resource_location", Function => "minecraft:function", EntityAnchor => "minecraft:entity_anchor", diff --git a/azalea/src/accept_resource_packs.rs b/azalea/src/accept_resource_packs.rs index dbed9e55d..080a4fc6a 100644 --- a/azalea/src/accept_resource_packs.rs +++ b/azalea/src/accept_resource_packs.rs @@ -36,7 +36,7 @@ fn accept_resource_pack( id: event.id, action: s_resource_pack::Action::Accepted, } - .get(), + .into_variant(), }); send_packet_events.send(SendPacketEvent { entity: event.entity, @@ -44,7 +44,7 @@ fn accept_resource_pack( id: event.id, action: s_resource_pack::Action::SuccessfullyLoaded, } - .get(), + .into_variant(), }); } } From e41d35c1c16f24acdf57d17b16bf5da9b3a8f3e3 Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 27 Nov 2024 01:36:20 +0000 Subject: [PATCH 06/18] simplify declare_state_packets by removing packet ids --- .../azalea-protocol-macros/src/lib.rs | 71 ++- azalea-protocol/src/packets/config/mod.rs | 78 +-- azalea-protocol/src/packets/game/mod.rs | 582 ++++++------------ azalea-protocol/src/packets/handshake/mod.rs | 10 +- azalea-protocol/src/packets/login/mod.rs | 42 +- azalea-protocol/src/packets/status/mod.rs | 21 +- codegen/azprotorefactor.py | 18 - 7 files changed, 286 insertions(+), 536 deletions(-) delete mode 100644 codegen/azprotorefactor.py diff --git a/azalea-protocol/azalea-protocol-macros/src/lib.rs b/azalea-protocol/azalea-protocol-macros/src/lib.rs index 291851659..bf35456aa 100755 --- a/azalea-protocol/azalea-protocol-macros/src/lib.rs +++ b/azalea-protocol/azalea-protocol-macros/src/lib.rs @@ -1,9 +1,9 @@ use proc_macro::TokenStream; use quote::quote; use syn::{ - braced, + bracketed, parse::{Parse, ParseStream, Result}, - parse_macro_input, DeriveInput, Ident, LitInt, Token, + parse_macro_input, DeriveInput, Ident, Token, }; fn as_packet_derive(input: TokenStream, state: proc_macro2::TokenStream) -> TokenStream { @@ -108,55 +108,43 @@ pub fn derive_c_config_packet(input: TokenStream) -> TokenStream { } #[derive(Debug)] -struct PacketIdPair { - id: u32, +struct PacketListItem { module: Ident, name: Ident, } #[derive(Debug)] -struct PacketIdMap { - packets: Vec, +struct PacketList { + packets: Vec, } -impl Parse for PacketIdMap { +impl Parse for PacketList { fn parse(input: ParseStream) -> Result { let mut packets = vec![]; // example: - // 0x0e: c_change_difficulty::ClientboundChangeDifficultyPacket, - - // 0x0e - while let Ok(packet_id) = input.parse::() { - let packet_id = packet_id.base10_parse::()?; - // : - input.parse::()?; - // c_change_difficulty_packet - let module: Ident = input.parse()?; - // :: + // c_change_difficulty::ClientboundChangeDifficultyPacket, + + // c_change_difficulty + while let Ok(module) = input.parse::() { input.parse::()?; // ClientboundChangeDifficultyPacket - let name: Ident = input.parse()?; - - packets.push(PacketIdPair { - id: packet_id, - module, - name, - }); + let name = input.parse::()?; + packets.push(PacketListItem { module, name }); if input.parse::().is_err() { break; } } - Ok(PacketIdMap { packets }) + Ok(PacketList { packets }) } } #[derive(Debug)] struct DeclareStatePackets { name: Ident, - serverbound: PacketIdMap, - clientbound: PacketIdMap, + serverbound: PacketList, + clientbound: PacketList, } impl Parse for DeclareStatePackets { @@ -170,7 +158,7 @@ impl Parse for DeclareStatePackets { } input.parse::]>()?; let content; - braced!(content in input); + bracketed!(content in input); let serverbound = content.parse()?; input.parse::()?; @@ -181,7 +169,7 @@ impl Parse for DeclareStatePackets { } input.parse::]>()?; let content; - braced!(content in input); + bracketed!(content in input); let clientbound = content.parse()?; Ok(DeclareStatePackets { @@ -203,6 +191,7 @@ pub fn declare_state_packets(input: TokenStream) -> TokenStream { let has_s_packets = !input.serverbound.packets.is_empty(); let has_c_packets = !input.clientbound.packets.is_empty(); + let mut mod_and_use_statements_contents = quote!(); let mut s_enum_contents = quote!(); let mut c_enum_contents = quote!(); let mut s_id_match_contents = quote!(); @@ -212,10 +201,16 @@ pub fn declare_state_packets(input: TokenStream) -> TokenStream { let mut s_read_match_contents = quote!(); let mut c_read_match_contents = quote!(); - for PacketIdPair { id, module, name } in input.serverbound.packets { - let variant_name = variant_name_from(&name); - + for (id, PacketListItem { module, name }) in input.serverbound.packets.iter().enumerate() { + let id = id as u32; let name_litstr = syn::LitStr::new(&name.to_string(), name.span()); + let variant_name = variant_name_from(name); + + mod_and_use_statements_contents.extend(quote! { + pub mod #module; + pub use #module::#name; + }); + s_enum_contents.extend(quote! { #variant_name(#module::#name), }); @@ -245,9 +240,15 @@ pub fn declare_state_packets(input: TokenStream) -> TokenStream { }, }); } - for PacketIdPair { id, module, name } in input.clientbound.packets { + for (id, PacketListItem { module, name }) in input.clientbound.packets.iter().enumerate() { + let id = id as u32; let name_litstr = syn::LitStr::new(&name.to_string(), name.span()); - let variant_name = variant_name_from(&name); + let variant_name = variant_name_from(name); + + mod_and_use_statements_contents.extend(quote! { + pub mod #module; + pub use #module::#name; + }); c_enum_contents.extend(quote! { #variant_name(#module::#name), @@ -304,6 +305,8 @@ pub fn declare_state_packets(input: TokenStream) -> TokenStream { } let mut contents = quote! { + #mod_and_use_statements_contents + #[derive(Clone, Debug)] pub enum #s_state_name where diff --git a/azalea-protocol/src/packets/config/mod.rs b/azalea-protocol/src/packets/config/mod.rs index 7c1d0b152..da7a14fad 100755 --- a/azalea-protocol/src/packets/config/mod.rs +++ b/azalea-protocol/src/packets/config/mod.rs @@ -1,56 +1,32 @@ -pub mod c_cookie_request; -pub mod c_custom_payload; -pub mod c_disconnect; -pub mod c_finish_configuration; -pub mod c_keep_alive; -pub mod c_ping; -pub mod c_registry_data; -pub mod c_reset_chat; -pub mod c_resource_pack_pop; -pub mod c_resource_pack_push; -pub mod c_select_known_packs; -pub mod c_store_cookie; -pub mod c_transfer; -pub mod c_update_enabled_features; -pub mod c_update_tags; -pub mod s_client_information; -pub mod s_cookie_response; -pub mod s_custom_payload; -pub mod s_finish_configuration; -pub mod s_keep_alive; -pub mod s_pong; -pub mod s_resource_pack; -pub mod s_select_known_packs; - use azalea_protocol_macros::declare_state_packets; declare_state_packets!( ConfigPacket, - Serverbound => { - 0x00: s_client_information::ServerboundClientInformation, - 0x01: s_cookie_response::ServerboundCookieResponse, - 0x02: s_custom_payload::ServerboundCustomPayload, - 0x03: s_finish_configuration::ServerboundFinishConfiguration, - 0x04: s_keep_alive::ServerboundKeepAlive, - 0x05: s_pong::ServerboundPong, - 0x06: s_resource_pack::ServerboundResourcePack, - 0x07: s_select_known_packs::ServerboundSelectKnownPacks, - }, - Clientbound => { - 0x00: c_cookie_request::ClientboundCookieRequest, - 0x01: c_custom_payload::ClientboundCustomPayload, - 0x02: c_disconnect::ClientboundDisconnect, - 0x03: c_finish_configuration::ClientboundFinishConfiguration, - 0x04: c_keep_alive::ClientboundKeepAlive, - 0x05: c_ping::ClientboundPing, - 0x06: c_reset_chat::ClientboundResetChat, - 0x07: c_registry_data::ClientboundRegistryData, - 0x08: c_resource_pack_pop::ClientboundResourcePackPop, - 0x09: c_resource_pack_push::ClientboundResourcePackPush, - 0x0a: c_store_cookie::ClientboundStoreCookie, - 0x0b: c_transfer::ClientboundTransfer, - 0x0c: c_update_enabled_features::ClientboundUpdateEnabledFeatures, - 0x0d: c_update_tags::ClientboundUpdateTags, - 0x0e: c_select_known_packs::ClientboundSelectKnownPacks, - } + Serverbound => [ + s_client_information::ServerboundClientInformation, + s_cookie_response::ServerboundCookieResponse, + s_custom_payload::ServerboundCustomPayload, + s_finish_configuration::ServerboundFinishConfiguration, + s_keep_alive::ServerboundKeepAlive, + s_pong::ServerboundPong, + s_resource_pack::ServerboundResourcePack, + s_select_known_packs::ServerboundSelectKnownPacks, + ], + Clientbound => [ + c_cookie_request::ClientboundCookieRequest, + c_custom_payload::ClientboundCustomPayload, + c_disconnect::ClientboundDisconnect, + c_finish_configuration::ClientboundFinishConfiguration, + c_keep_alive::ClientboundKeepAlive, + c_ping::ClientboundPing, + c_reset_chat::ClientboundResetChat, + c_registry_data::ClientboundRegistryData, + c_resource_pack_pop::ClientboundResourcePackPop, + c_resource_pack_push::ClientboundResourcePackPush, + c_store_cookie::ClientboundStoreCookie, + c_transfer::ClientboundTransfer, + c_update_enabled_features::ClientboundUpdateEnabledFeatures, + c_update_tags::ClientboundUpdateTags, + c_select_known_packs::ClientboundSelectKnownPacks, + ] ); diff --git a/azalea-protocol/src/packets/game/mod.rs b/azalea-protocol/src/packets/game/mod.rs index 8599fb3b9..a1b6505fe 100755 --- a/azalea-protocol/src/packets/game/mod.rs +++ b/azalea-protocol/src/packets/game/mod.rs @@ -1,394 +1,202 @@ -pub mod c_add_entity; -pub mod c_add_experience_orb; -pub mod c_animate; -pub mod c_award_stats; -pub mod c_block_changed_ack; -pub mod c_block_destruction; -pub mod c_block_entity_data; -pub mod c_block_event; -pub mod c_block_update; -pub mod c_boss_event; -pub mod c_bundle; -pub mod c_change_difficulty; -pub mod c_chunk_batch_finished; -pub mod c_chunk_batch_start; -pub mod c_chunks_biomes; -pub mod c_clear_titles; -pub mod c_command_suggestions; -pub mod c_commands; -pub mod c_container_close; -pub mod c_container_set_content; -pub mod c_container_set_data; -pub mod c_container_set_slot; -pub mod c_cookie_request; -pub mod c_cooldown; -pub mod c_custom_chat_completions; -pub mod c_custom_payload; -pub mod c_custom_report_details; -pub mod c_damage_event; -pub mod c_debug_sample; -pub mod c_delete_chat; -pub mod c_disconnect; -pub mod c_disguised_chat; -pub mod c_entity_event; -pub mod c_entity_position_sync; -pub mod c_explode; -pub mod c_forget_level_chunk; -pub mod c_game_event; -pub mod c_horse_screen_open; -pub mod c_hurt_animation; -pub mod c_initialize_border; -pub mod c_keep_alive; -pub mod c_level_chunk_with_light; -pub mod c_level_event; -pub mod c_level_particles; -pub mod c_light_update; -pub mod c_login; -pub mod c_map_item_data; -pub mod c_merchant_offers; -pub mod c_move_entity_pos; -pub mod c_move_entity_pos_rot; -pub mod c_move_entity_rot; -pub mod c_move_minecart; -pub mod c_move_vehicle; -pub mod c_open_book; -pub mod c_open_screen; -pub mod c_open_sign_editor; -pub mod c_ping; -pub mod c_place_ghost_recipe; -pub mod c_player_abilities; -pub mod c_player_chat; -pub mod c_player_combat_end; -pub mod c_player_combat_enter; -pub mod c_player_combat_kill; -pub mod c_player_info_remove; -pub mod c_player_info_update; -pub mod c_player_look_at; -pub mod c_player_position; -pub mod c_player_rotation; -pub mod c_pong_response; -pub mod c_projectile_power; -pub mod c_recipe_book_add; -pub mod c_recipe_book_remove; -pub mod c_recipe_book_settings; -pub mod c_remove_entities; -pub mod c_remove_mob_effect; -pub mod c_reset_score; -pub mod c_resource_pack_pop; -pub mod c_resource_pack_push; -pub mod c_respawn; -pub mod c_rotate_head; -pub mod c_section_blocks_update; -pub mod c_select_advancements_tab; -pub mod c_server_data; -pub mod c_server_links; -pub mod c_set_action_bar_text; -pub mod c_set_border_center; -pub mod c_set_border_lerp_size; -pub mod c_set_border_size; -pub mod c_set_border_warning_delay; -pub mod c_set_border_warning_distance; -pub mod c_set_camera; -pub mod c_set_chunk_cache_center; -pub mod c_set_chunk_cache_radius; -pub mod c_set_cursor_item; -pub mod c_set_default_spawn_position; -pub mod c_set_display_objective; -pub mod c_set_entity_data; -pub mod c_set_entity_link; -pub mod c_set_entity_motion; -pub mod c_set_equipment; -pub mod c_set_experience; -pub mod c_set_health; -pub mod c_set_held_slot; -pub mod c_set_objective; -pub mod c_set_passengers; -pub mod c_set_player_inventory; -pub mod c_set_player_team; -pub mod c_set_score; -pub mod c_set_simulation_distance; -pub mod c_set_subtitle_text; -pub mod c_set_time; -pub mod c_set_title_text; -pub mod c_set_titles_animation; -pub mod c_sound; -pub mod c_sound_entity; -pub mod c_start_configuration; -pub mod c_stop_sound; -pub mod c_store_cookie; -pub mod c_system_chat; -pub mod c_tab_list; -pub mod c_tag_query; -pub mod c_take_item_entity; -pub mod c_teleport_entity; -pub mod c_ticking_state; -pub mod c_ticking_step; -pub mod c_transfer; -pub mod c_update_advancements; -pub mod c_update_attributes; -pub mod c_update_mob_effect; -pub mod c_update_recipes; -pub mod c_update_tags; -pub mod s_accept_teleportation; -pub mod s_block_entity_tag_query; -pub mod s_change_difficulty; -pub mod s_chat; -pub mod s_chat_ack; -pub mod s_chat_command; -pub mod s_chat_command_signed; -pub mod s_chat_session_update; -pub mod s_chunk_batch_received; -pub mod s_client_command; -pub mod s_client_information; -pub mod s_client_tick_end; -pub mod s_command_suggestion; -pub mod s_configuration_acknowledged; -pub mod s_container_button_click; -pub mod s_container_click; -pub mod s_container_close; -pub mod s_container_slot_state_changed; -pub mod s_cookie_response; -pub mod s_custom_payload; -pub mod s_debug_sample_subscription; -pub mod s_edit_book; -pub mod s_entity_tag_query; -pub mod s_interact; -pub mod s_jigsaw_generate; -pub mod s_keep_alive; -pub mod s_lock_difficulty; -pub mod s_move_player_pos; -pub mod s_move_player_pos_rot; -pub mod s_move_player_rot; -pub mod s_move_player_status_only; -pub mod s_move_vehicle; -pub mod s_paddle_boat; -pub mod s_pick_item; -pub mod s_ping_request; -pub mod s_place_recipe; -pub mod s_player_abilities; -pub mod s_player_action; -pub mod s_player_command; -pub mod s_player_input; -pub mod s_pong; -pub mod s_recipe_book_change_settings; -pub mod s_recipe_book_seen_recipe; -pub mod s_rename_item; -pub mod s_resource_pack; -pub mod s_seen_advancements; -pub mod s_select_bundle_item; -pub mod s_select_trade; -pub mod s_set_beacon; -pub mod s_set_carried_item; -pub mod s_set_command_block; -pub mod s_set_command_minecart; -pub mod s_set_creative_mode_slot; -pub mod s_set_jigsaw_block; -pub mod s_set_structure_block; -pub mod s_sign_update; -pub mod s_swing; -pub mod s_teleport_to_entity; -pub mod s_use_item; -pub mod s_use_item_on; - use azalea_protocol_macros::declare_state_packets; // see GameProtocols.java in the decompiled vanilla source declare_state_packets!( GamePacket, - Serverbound => { - 0x00: s_accept_teleportation::ServerboundAcceptTeleportation, - 0x01: s_block_entity_tag_query::ServerboundBlockEntityTagQuery, - 0x02: s_select_bundle_item::ServerboundSelectBundleItem, - 0x03: s_change_difficulty::ServerboundChangeDifficulty, - 0x04: s_chat_ack::ServerboundChatAck, - 0x05: s_chat_command::ServerboundChatCommand, - 0x06: s_chat_command_signed::ServerboundChatCommandSigned, - 0x07: s_chat::ServerboundChat, - 0x08: s_chat_session_update::ServerboundChatSessionUpdate, - 0x09: s_chunk_batch_received::ServerboundChunkBatchReceived, - 0x0a: s_client_command::ServerboundClientCommand, - 0x0b: s_client_tick_end::ServerboundTickEnd, - 0x0c: s_client_information::ServerboundClientInformation, - 0x0d: s_command_suggestion::ServerboundCommandSuggestion, - 0x0e: s_configuration_acknowledged::ServerboundConfigurationAcknowledged, - 0x0f: s_container_button_click::ServerboundContainerButtonClick, - 0x10: s_container_click::ServerboundContainerClick, - 0x11: s_container_close::ServerboundContainerClose, - 0x12: s_container_slot_state_changed::ServerboundContainerSlotStateChanged, - 0x13: s_cookie_response::ServerboundCookieResponse, - 0x14: s_custom_payload::ServerboundCustomPayload, - 0x15: s_debug_sample_subscription::ServerboundDebugSampleSubscription, - 0x16: s_edit_book::ServerboundEditBook, - 0x17: s_entity_tag_query::ServerboundEntityTagQuery, - 0x18: s_interact::ServerboundInteract, - 0x19: s_jigsaw_generate::ServerboundJigsawGenerate, - 0x1a: s_keep_alive::ServerboundKeepAlive, - 0x1b: s_lock_difficulty::ServerboundLockDifficulty, - 0x1c: s_move_player_pos::ServerboundMovePlayerPos, - 0x1d: s_move_player_pos_rot::ServerboundMovePlayerPosRot, - 0x1e: s_move_player_rot::ServerboundMovePlayerRot, - 0x1f: s_move_player_status_only::ServerboundMovePlayerStatusOnly, - 0x20: s_move_vehicle::ServerboundMoveVehicle, - 0x21: s_paddle_boat::ServerboundPaddleBoat, - 0x22: s_pick_item::ServerboundPickItem, - 0x23: s_ping_request::ServerboundPingRequest, - 0x24: s_place_recipe::ServerboundPlaceRecipe, - 0x25: s_player_abilities::ServerboundPlayerAbilities, - 0x26: s_player_action::ServerboundPlayerAction, - 0x27: s_player_command::ServerboundPlayerCommand, - 0x28: s_player_input::ServerboundPlayerInput, - 0x29: s_pong::ServerboundPong, - 0x2a: s_recipe_book_change_settings::ServerboundRecipeBookChangeSettings, - 0x2b: s_recipe_book_seen_recipe::ServerboundRecipeBookSeenRecipe, - 0x2c: s_rename_item::ServerboundRenameItem, - 0x2d: s_resource_pack::ServerboundResourcePack, - 0x2e: s_seen_advancements::ServerboundSeenAdvancements, - 0x2f: s_select_trade::ServerboundSelectTrade, - 0x30: s_set_beacon::ServerboundSetBeacon, - 0x31: s_set_carried_item::ServerboundSetCarriedItem, - 0x32: s_set_command_block::ServerboundSetCommandBlock, - 0x33: s_set_command_minecart::ServerboundSetCommandMinecart, - 0x34: s_set_creative_mode_slot::ServerboundSetCreativeModeSlot, - 0x35: s_set_jigsaw_block::ServerboundSetJigsawBlock, - 0x36: s_set_structure_block::ServerboundSetStructureBlock, - 0x37: s_sign_update::ServerboundSignUpdate, - 0x38: s_swing::ServerboundSwing, - 0x39: s_teleport_to_entity::ServerboundTeleportToEntity, - 0x3a: s_use_item_on::ServerboundUseItemOn, - 0x3b: s_use_item::ServerboundUseItem, - }, - Clientbound => { - 0x00: c_bundle::ClientboundBundle, - 0x01: c_add_entity::ClientboundAddEntity, - 0x02: c_add_experience_orb::ClientboundAddExperienceOrb, - 0x03: c_animate::ClientboundAnimate, - 0x04: c_award_stats::ClientboundAwardStats, - 0x05: c_block_changed_ack::ClientboundBlockChangedAck, - 0x06: c_block_destruction::ClientboundBlockDestruction, - 0x07: c_block_entity_data::ClientboundBlockEntityData, - 0x08: c_block_event::ClientboundBlockEvent, - 0x09: c_block_update::ClientboundBlockUpdate, - 0x0a: c_boss_event::ClientboundBossEvent, - 0x0b: c_change_difficulty::ClientboundChangeDifficulty, - 0x0c: c_chunk_batch_finished::ClientboundChunkBatchFinished, - 0x0d: c_chunk_batch_start::ClientboundChunkBatchStart, - 0x0e: c_chunks_biomes::ClientboundChunksBiomes, - 0x0f: c_clear_titles::ClientboundClearTitles, - 0x10: c_command_suggestions::ClientboundCommandSuggestions, - 0x11: c_commands::ClientboundCommands, - 0x12: c_container_close::ClientboundContainerClose, - 0x13: c_container_set_content::ClientboundContainerSetContent, - 0x14: c_container_set_data::ClientboundContainerSetData, - 0x15: c_container_set_slot::ClientboundContainerSetSlot, - 0x16: c_cookie_request::ClientboundCookieRequest, - 0x17: c_cooldown::ClientboundCooldown, - 0x18: c_custom_chat_completions::ClientboundCustomChatCompletions, - 0x19: c_custom_payload::ClientboundCustomPayload, - 0x1a: c_damage_event::ClientboundDamageEvent, - 0x1b: c_debug_sample::ClientboundDebugSample, - 0x1c: c_delete_chat::ClientboundDeleteChat, - 0x1d: c_disconnect::ClientboundDisconnect, - 0x1e: c_disguised_chat::ClientboundDisguisedChat, - 0x1f: c_entity_event::ClientboundEntityEvent, - 0x20: c_entity_position_sync::ClientboundEntityPositionSync, - 0x21: c_explode::ClientboundExplode, - 0x22: c_forget_level_chunk::ClientboundForgetLevelChunk, - 0x23: c_game_event::ClientboundGameEvent, - 0x24: c_horse_screen_open::ClientboundHorseScreenOpen, - 0x25: c_hurt_animation::ClientboundHurtAnimation, - 0x26: c_initialize_border::ClientboundInitializeBorder, - 0x27: c_keep_alive::ClientboundKeepAlive, - 0x28: c_level_chunk_with_light::ClientboundLevelChunkWithLight, - 0x29: c_level_event::ClientboundLevelEvent, - 0x2a: c_level_particles::ClientboundLevelParticles, - 0x2b: c_light_update::ClientboundLightUpdate, - 0x2c: c_login::ClientboundLogin, - 0x2d: c_map_item_data::ClientboundMapItemData, - 0x2e: c_merchant_offers::ClientboundMerchantOffers, - 0x2f: c_move_entity_pos::ClientboundMoveEntityPos, - 0x30: c_move_entity_pos_rot::ClientboundMoveEntityPosRot, - 0x31: c_move_minecart::ClientboundMoveMinecart, - 0x32: c_move_entity_rot::ClientboundMoveEntityRot, - 0x33: c_move_vehicle::ClientboundMoveVehicle, - 0x34: c_open_book::ClientboundOpenBook, - 0x35: c_open_screen::ClientboundOpenScreen, - 0x36: c_open_sign_editor::ClientboundOpenSignEditor, - 0x37: c_ping::ClientboundPing, - 0x38: c_pong_response::ClientboundPongResponse, - 0x39: c_place_ghost_recipe::ClientboundPlaceGhostRecipe, - 0x3a: c_player_abilities::ClientboundPlayerAbilities, - 0x3b: c_player_chat::ClientboundPlayerChat, - 0x3c: c_player_combat_end::ClientboundPlayerCombatEnd, - 0x3d: c_player_combat_enter::ClientboundPlayerCombatEnter, - 0x3e: c_player_combat_kill::ClientboundPlayerCombatKill, - 0x3f: c_player_info_remove::ClientboundPlayerInfoRemove, - 0x40: c_player_info_update::ClientboundPlayerInfoUpdate, - 0x41: c_player_look_at::ClientboundPlayerLookAt, - 0x42: c_player_position::ClientboundPlayerPosition, - 0x43: c_player_rotation::ClientboundPlayerRotation, - 0x44: c_recipe_book_add::ClientboundRecipeBookAdd, - 0x45: c_recipe_book_remove::ClientboundRecipeBookRemove, - 0x46: c_recipe_book_settings::ClientboundRecipeBookSettings, - 0x47: c_remove_entities::ClientboundRemoveEntities, - 0x48: c_remove_mob_effect::ClientboundRemoveMobEffect, - 0x49: c_reset_score::ClientboundResetScore, - 0x4a: c_resource_pack_pop::ClientboundResourcePackPop, - 0x4b: c_resource_pack_push::ClientboundResourcePackPush, - 0x4c: c_respawn::ClientboundRespawn, - 0x4d: c_rotate_head::ClientboundRotateHead, - 0x4e: c_section_blocks_update::ClientboundSectionBlocksUpdate, - 0x4f: c_select_advancements_tab::ClientboundSelectAdvancementsTab, - 0x50: c_server_data::ClientboundServerData, - 0x51: c_set_action_bar_text::ClientboundSetActionBarText, - 0x52: c_set_border_center::ClientboundSetBorderCenter, - 0x53: c_set_border_lerp_size::ClientboundSetBorderLerpSize, - 0x54: c_set_border_size::ClientboundSetBorderSize, - 0x55: c_set_border_warning_delay::ClientboundSetBorderWarningDelay, - 0x56: c_set_border_warning_distance::ClientboundSetBorderWarningDistance, - 0x57: c_set_camera::ClientboundSetCamera, - 0x58: c_set_chunk_cache_center::ClientboundSetChunkCacheCenter, - 0x59: c_set_chunk_cache_radius::ClientboundSetChunkCacheRadius, - 0x5a: c_set_cursor_item::ClientboundSetCursorItem, - 0x5b: c_set_default_spawn_position::ClientboundSetDefaultSpawnPosition, - 0x5c: c_set_display_objective::ClientboundSetDisplayObjective, - 0x5d: c_set_entity_data::ClientboundSetEntityData, - 0x5e: c_set_entity_link::ClientboundSetEntityLink, - 0x5f: c_set_entity_motion::ClientboundSetEntityMotion, - 0x60: c_set_equipment::ClientboundSetEquipment, - 0x61: c_set_experience::ClientboundSetExperience, - 0x62: c_set_health::ClientboundSetHealth, - 0x63: c_set_held_slot::ClientboundSetHeldSlot, - 0x64: c_set_objective::ClientboundSetObjective, - 0x65: c_set_passengers::ClientboundSetPassengers, - 0x66: c_set_player_inventory::ClientboundSetPlayerInventory, - 0x67: c_set_player_team::ClientboundSetPlayerTeam, - 0x68: c_set_score::ClientboundSetScore, - 0x69: c_set_simulation_distance::ClientboundSetSimulationDistance, - 0x6a: c_set_subtitle_text::ClientboundSetSubtitleText, - 0x6b: c_set_time::ClientboundSetTime, - 0x6c: c_set_title_text::ClientboundSetTitleText, - 0x6d: c_set_titles_animation::ClientboundSetTitlesAnimation, - 0x6e: c_sound_entity::ClientboundSoundEntity, - 0x6f: c_sound::ClientboundSound, - 0x70: c_start_configuration::ClientboundStartConfiguration, - 0x71: c_stop_sound::ClientboundStopSound, - 0x72: c_store_cookie::ClientboundStoreCookie, - 0x73: c_system_chat::ClientboundSystemChat, - 0x74: c_tab_list::ClientboundTabList, - 0x75: c_tag_query::ClientboundTagQuery, - 0x76: c_take_item_entity::ClientboundTakeItemEntity, - 0x77: c_teleport_entity::ClientboundTeleportEntity, - 0x78: c_ticking_state::ClientboundTickingState, - 0x79: c_ticking_step::ClientboundTickingStep, - 0x7a: c_transfer::ClientboundTransfer, - 0x7b: c_update_advancements::ClientboundUpdateAdvancements, - 0x7c: c_update_attributes::ClientboundUpdateAttributes, - 0x7d: c_update_mob_effect::ClientboundUpdateMobEffect, - 0x7e: c_update_recipes::ClientboundUpdateRecipes, - 0x7f: c_update_tags::ClientboundUpdateTags, - 0x80: c_projectile_power::ClientboundProjectilePower, - 0x81: c_custom_report_details::ClientboundCustomReportDetails, - 0x82: c_server_links::ClientboundServerLinks - } + Serverbound => [ + s_accept_teleportation::ServerboundAcceptTeleportation, + s_block_entity_tag_query::ServerboundBlockEntityTagQuery, + s_select_bundle_item::ServerboundSelectBundleItem, + s_change_difficulty::ServerboundChangeDifficulty, + s_chat_ack::ServerboundChatAck, + s_chat_command::ServerboundChatCommand, + s_chat_command_signed::ServerboundChatCommandSigned, + s_chat::ServerboundChat, + s_chat_session_update::ServerboundChatSessionUpdate, + s_chunk_batch_received::ServerboundChunkBatchReceived, + s_client_command::ServerboundClientCommand, + s_client_tick_end::ServerboundTickEnd, + s_client_information::ServerboundClientInformation, + s_command_suggestion::ServerboundCommandSuggestion, + s_configuration_acknowledged::ServerboundConfigurationAcknowledged, + s_container_button_click::ServerboundContainerButtonClick, + s_container_click::ServerboundContainerClick, + s_container_close::ServerboundContainerClose, + s_container_slot_state_changed::ServerboundContainerSlotStateChanged, + s_cookie_response::ServerboundCookieResponse, + s_custom_payload::ServerboundCustomPayload, + s_debug_sample_subscription::ServerboundDebugSampleSubscription, + s_edit_book::ServerboundEditBook, + s_entity_tag_query::ServerboundEntityTagQuery, + s_interact::ServerboundInteract, + s_jigsaw_generate::ServerboundJigsawGenerate, + s_keep_alive::ServerboundKeepAlive, + s_lock_difficulty::ServerboundLockDifficulty, + s_move_player_pos::ServerboundMovePlayerPos, + s_move_player_pos_rot::ServerboundMovePlayerPosRot, + s_move_player_rot::ServerboundMovePlayerRot, + s_move_player_status_only::ServerboundMovePlayerStatusOnly, + s_move_vehicle::ServerboundMoveVehicle, + s_paddle_boat::ServerboundPaddleBoat, + s_pick_item::ServerboundPickItem, + s_ping_request::ServerboundPingRequest, + s_place_recipe::ServerboundPlaceRecipe, + s_player_abilities::ServerboundPlayerAbilities, + s_player_action::ServerboundPlayerAction, + s_player_command::ServerboundPlayerCommand, + s_player_input::ServerboundPlayerInput, + s_pong::ServerboundPong, + s_recipe_book_change_settings::ServerboundRecipeBookChangeSettings, + s_recipe_book_seen_recipe::ServerboundRecipeBookSeenRecipe, + s_rename_item::ServerboundRenameItem, + s_resource_pack::ServerboundResourcePack, + s_seen_advancements::ServerboundSeenAdvancements, + s_select_trade::ServerboundSelectTrade, + s_set_beacon::ServerboundSetBeacon, + s_set_carried_item::ServerboundSetCarriedItem, + s_set_command_block::ServerboundSetCommandBlock, + s_set_command_minecart::ServerboundSetCommandMinecart, + s_set_creative_mode_slot::ServerboundSetCreativeModeSlot, + s_set_jigsaw_block::ServerboundSetJigsawBlock, + s_set_structure_block::ServerboundSetStructureBlock, + s_sign_update::ServerboundSignUpdate, + s_swing::ServerboundSwing, + s_teleport_to_entity::ServerboundTeleportToEntity, + s_use_item_on::ServerboundUseItemOn, + s_use_item::ServerboundUseItem, + ], + Clientbound => [ + c_bundle::ClientboundBundle, + c_add_entity::ClientboundAddEntity, + c_add_experience_orb::ClientboundAddExperienceOrb, + c_animate::ClientboundAnimate, + c_award_stats::ClientboundAwardStats, + c_block_changed_ack::ClientboundBlockChangedAck, + c_block_destruction::ClientboundBlockDestruction, + c_block_entity_data::ClientboundBlockEntityData, + c_block_event::ClientboundBlockEvent, + c_block_update::ClientboundBlockUpdate, + c_boss_event::ClientboundBossEvent, + c_change_difficulty::ClientboundChangeDifficulty, + c_chunk_batch_finished::ClientboundChunkBatchFinished, + c_chunk_batch_start::ClientboundChunkBatchStart, + c_chunks_biomes::ClientboundChunksBiomes, + c_clear_titles::ClientboundClearTitles, + c_command_suggestions::ClientboundCommandSuggestions, + c_commands::ClientboundCommands, + c_container_close::ClientboundContainerClose, + c_container_set_content::ClientboundContainerSetContent, + c_container_set_data::ClientboundContainerSetData, + c_container_set_slot::ClientboundContainerSetSlot, + c_cookie_request::ClientboundCookieRequest, + c_cooldown::ClientboundCooldown, + c_custom_chat_completions::ClientboundCustomChatCompletions, + c_custom_payload::ClientboundCustomPayload, + c_damage_event::ClientboundDamageEvent, + c_debug_sample::ClientboundDebugSample, + c_delete_chat::ClientboundDeleteChat, + c_disconnect::ClientboundDisconnect, + c_disguised_chat::ClientboundDisguisedChat, + c_entity_event::ClientboundEntityEvent, + c_entity_position_sync::ClientboundEntityPositionSync, + c_explode::ClientboundExplode, + c_forget_level_chunk::ClientboundForgetLevelChunk, + c_game_event::ClientboundGameEvent, + c_horse_screen_open::ClientboundHorseScreenOpen, + c_hurt_animation::ClientboundHurtAnimation, + c_initialize_border::ClientboundInitializeBorder, + c_keep_alive::ClientboundKeepAlive, + c_level_chunk_with_light::ClientboundLevelChunkWithLight, + c_level_event::ClientboundLevelEvent, + c_level_particles::ClientboundLevelParticles, + c_light_update::ClientboundLightUpdate, + c_login::ClientboundLogin, + c_map_item_data::ClientboundMapItemData, + c_merchant_offers::ClientboundMerchantOffers, + c_move_entity_pos::ClientboundMoveEntityPos, + c_move_entity_pos_rot::ClientboundMoveEntityPosRot, + c_move_minecart::ClientboundMoveMinecart, + c_move_entity_rot::ClientboundMoveEntityRot, + c_move_vehicle::ClientboundMoveVehicle, + c_open_book::ClientboundOpenBook, + c_open_screen::ClientboundOpenScreen, + c_open_sign_editor::ClientboundOpenSignEditor, + c_ping::ClientboundPing, + c_pong_response::ClientboundPongResponse, + c_place_ghost_recipe::ClientboundPlaceGhostRecipe, + c_player_abilities::ClientboundPlayerAbilities, + c_player_chat::ClientboundPlayerChat, + c_player_combat_end::ClientboundPlayerCombatEnd, + c_player_combat_enter::ClientboundPlayerCombatEnter, + c_player_combat_kill::ClientboundPlayerCombatKill, + c_player_info_remove::ClientboundPlayerInfoRemove, + c_player_info_update::ClientboundPlayerInfoUpdate, + c_player_look_at::ClientboundPlayerLookAt, + c_player_position::ClientboundPlayerPosition, + c_player_rotation::ClientboundPlayerRotation, + c_recipe_book_add::ClientboundRecipeBookAdd, + c_recipe_book_remove::ClientboundRecipeBookRemove, + c_recipe_book_settings::ClientboundRecipeBookSettings, + c_remove_entities::ClientboundRemoveEntities, + c_remove_mob_effect::ClientboundRemoveMobEffect, + c_reset_score::ClientboundResetScore, + c_resource_pack_pop::ClientboundResourcePackPop, + c_resource_pack_push::ClientboundResourcePackPush, + c_respawn::ClientboundRespawn, + c_rotate_head::ClientboundRotateHead, + c_section_blocks_update::ClientboundSectionBlocksUpdate, + c_select_advancements_tab::ClientboundSelectAdvancementsTab, + c_server_data::ClientboundServerData, + c_set_action_bar_text::ClientboundSetActionBarText, + c_set_border_center::ClientboundSetBorderCenter, + c_set_border_lerp_size::ClientboundSetBorderLerpSize, + c_set_border_size::ClientboundSetBorderSize, + c_set_border_warning_delay::ClientboundSetBorderWarningDelay, + c_set_border_warning_distance::ClientboundSetBorderWarningDistance, + c_set_camera::ClientboundSetCamera, + c_set_chunk_cache_center::ClientboundSetChunkCacheCenter, + c_set_chunk_cache_radius::ClientboundSetChunkCacheRadius, + c_set_cursor_item::ClientboundSetCursorItem, + c_set_default_spawn_position::ClientboundSetDefaultSpawnPosition, + c_set_display_objective::ClientboundSetDisplayObjective, + c_set_entity_data::ClientboundSetEntityData, + c_set_entity_link::ClientboundSetEntityLink, + c_set_entity_motion::ClientboundSetEntityMotion, + c_set_equipment::ClientboundSetEquipment, + c_set_experience::ClientboundSetExperience, + c_set_health::ClientboundSetHealth, + c_set_held_slot::ClientboundSetHeldSlot, + c_set_objective::ClientboundSetObjective, + c_set_passengers::ClientboundSetPassengers, + c_set_player_inventory::ClientboundSetPlayerInventory, + c_set_player_team::ClientboundSetPlayerTeam, + c_set_score::ClientboundSetScore, + c_set_simulation_distance::ClientboundSetSimulationDistance, + c_set_subtitle_text::ClientboundSetSubtitleText, + c_set_time::ClientboundSetTime, + c_set_title_text::ClientboundSetTitleText, + c_set_titles_animation::ClientboundSetTitlesAnimation, + c_sound_entity::ClientboundSoundEntity, + c_sound::ClientboundSound, + c_start_configuration::ClientboundStartConfiguration, + c_stop_sound::ClientboundStopSound, + c_store_cookie::ClientboundStoreCookie, + c_system_chat::ClientboundSystemChat, + c_tab_list::ClientboundTabList, + c_tag_query::ClientboundTagQuery, + c_take_item_entity::ClientboundTakeItemEntity, + c_teleport_entity::ClientboundTeleportEntity, + c_ticking_state::ClientboundTickingState, + c_ticking_step::ClientboundTickingStep, + c_transfer::ClientboundTransfer, + c_update_advancements::ClientboundUpdateAdvancements, + c_update_attributes::ClientboundUpdateAttributes, + c_update_mob_effect::ClientboundUpdateMobEffect, + c_update_recipes::ClientboundUpdateRecipes, + c_update_tags::ClientboundUpdateTags, + c_projectile_power::ClientboundProjectilePower, + c_custom_report_details::ClientboundCustomReportDetails, + c_server_links::ClientboundServerLinks + ] ); diff --git a/azalea-protocol/src/packets/handshake/mod.rs b/azalea-protocol/src/packets/handshake/mod.rs index dae42694e..bb4e40f68 100755 --- a/azalea-protocol/src/packets/handshake/mod.rs +++ b/azalea-protocol/src/packets/handshake/mod.rs @@ -1,11 +1,9 @@ -pub mod s_client_intention; - use azalea_protocol_macros::declare_state_packets; declare_state_packets!( HandshakePacket, - Serverbound => { - 0x00: s_client_intention::ServerboundClientIntention, - }, - Clientbound => {} + Serverbound => [ + s_client_intention::ServerboundClientIntention, + ], + Clientbound => [] ); diff --git a/azalea-protocol/src/packets/login/mod.rs b/azalea-protocol/src/packets/login/mod.rs index bba565cd0..6d04b52f0 100755 --- a/azalea-protocol/src/packets/login/mod.rs +++ b/azalea-protocol/src/packets/login/mod.rs @@ -1,32 +1,20 @@ -pub mod c_cookie_request; -pub mod c_custom_query; -pub mod c_hello; -pub mod c_login_compression; -pub mod c_login_disconnect; -pub mod c_login_finished; -pub mod s_cookie_response; -pub mod s_custom_query_answer; -pub mod s_hello; -pub mod s_key; -pub mod s_login_acknowledged; - use azalea_protocol_macros::declare_state_packets; declare_state_packets!( LoginPacket, - Serverbound => { - 0x00: s_hello::ServerboundHello, - 0x01: s_key::ServerboundKey, - 0x02: s_custom_query_answer::ServerboundCustomQueryAnswer, - 0x03: s_login_acknowledged::ServerboundLoginAcknowledged, - 0x04: s_cookie_response::ServerboundCookieResponse, - }, - Clientbound => { - 0x00: c_login_disconnect::ClientboundLoginDisconnect, - 0x01: c_hello::ClientboundHello, - 0x02: c_login_finished::ClientboundLoginFinished, - 0x03: c_login_compression::ClientboundLoginCompression, - 0x04: c_custom_query::ClientboundCustomQuery, - 0x05: c_cookie_request::ClientboundCookieRequest, - } + Serverbound => [ + s_hello::ServerboundHello, + s_key::ServerboundKey, + s_custom_query_answer::ServerboundCustomQueryAnswer, + s_login_acknowledged::ServerboundLoginAcknowledged, + s_cookie_response::ServerboundCookieResponse, + ], + Clientbound => [ + c_login_disconnect::ClientboundLoginDisconnect, + c_hello::ClientboundHello, + c_login_finished::ClientboundLoginFinished, + c_login_compression::ClientboundLoginCompression, + c_custom_query::ClientboundCustomQuery, + c_cookie_request::ClientboundCookieRequest, + ] ); diff --git a/azalea-protocol/src/packets/status/mod.rs b/azalea-protocol/src/packets/status/mod.rs index b22cebf0f..d2e057acc 100755 --- a/azalea-protocol/src/packets/status/mod.rs +++ b/azalea-protocol/src/packets/status/mod.rs @@ -1,18 +1,13 @@ -pub mod c_pong_response; -pub mod c_status_response; -pub mod s_ping_request; -pub mod s_status_request; - use azalea_protocol_macros::declare_state_packets; declare_state_packets!( StatusPacket, - Serverbound => { - 0x00: s_status_request::ServerboundStatusRequest, - 0x01: s_ping_request::ServerboundPingRequest, - }, - Clientbound => { - 0x00: c_status_response::ClientboundStatusResponse, - 0x01: c_pong_response::ClientboundPongResponse, - } + Serverbound => [ + s_status_request::ServerboundStatusRequest, + s_ping_request::ServerboundPingRequest, + ], + Clientbound => [ + c_status_response::ClientboundStatusResponse, + c_pong_response::ClientboundPongResponse, + ] ); diff --git a/codegen/azprotorefactor.py b/codegen/azprotorefactor.py deleted file mode 100644 index d698929fa..000000000 --- a/codegen/azprotorefactor.py +++ /dev/null @@ -1,18 +0,0 @@ -import os - -path = 'azalea-protocol/src/packets/status' - -# rename all the files from like "c_ping_packet.rs" to "c_ping.rs" - -for filename in os.listdir(path): - if filename.endswith('_packet.rs'): - new_filename = filename.replace('c_', 'c_').replace('s_', 's_').replace('_packet', '') - print(filename, new_filename) - os.rename(os.path.join(path, filename), os.path.join(path, new_filename)) - - with open(os.path.join(path, new_filename), 'r') as f: - contents = f.read() - contents = contents.replace('Packet {', ' {') - with open(os.path.join(path, new_filename), 'w') as f: - f.write(contents) - From c69ab5cc9be5caf89740ca0ef0106d1b4d27c6cd Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 27 Nov 2024 01:41:02 +0000 Subject: [PATCH 07/18] rename read_from and write_into to azalea_read and azalea_write --- azalea-block/src/lib.rs | 8 +- azalea-brigadier/src/suggestion/mod.rs | 6 +- .../src/suggestion/suggestions.rs | 16 +- azalea-buf/azalea-buf-macros/src/read.rs | 20 +-- azalea-buf/azalea-buf-macros/src/write.rs | 22 +-- azalea-buf/src/lib.rs | 93 ++++++------ azalea-buf/src/read.rs | 112 +++++++------- azalea-buf/src/serializable_uuid.rs | 24 +-- azalea-buf/src/write.rs | 126 ++++++++-------- azalea-chat/src/component.rs | 4 +- azalea-chat/src/numbers.rs | 18 +-- azalea-client/src/configuration.rs | 2 +- azalea-core/src/bitset.rs | 8 +- azalea-core/src/difficulty.rs | 8 +- azalea-core/src/game_type.rs | 16 +- azalea-core/src/position.rs | 44 +++--- azalea-core/src/resource_location.rs | 12 +- azalea-crypto/src/signing.rs | 16 +- azalea-entity/src/data.rs | 24 +-- azalea-inventory/src/components.rs | 138 +++++++++--------- azalea-inventory/src/slot.rs | 40 ++--- .../azalea-protocol-macros/src/lib.rs | 4 +- azalea-protocol/src/common.rs | 16 +- .../src/packets/config/c_update_tags.rs | 30 ++-- .../src/packets/game/c_boss_event.rs | 46 +++--- .../src/packets/game/c_command_suggestions.rs | 4 +- .../src/packets/game/c_commands.rs | 80 +++++----- .../src/packets/game/c_damage_event.rs | 10 +- azalea-protocol/src/packets/game/c_explode.rs | 68 ++++----- .../packets/game/c_level_chunk_with_light.rs | 2 +- .../src/packets/game/c_level_particles.rs | 2 +- .../src/packets/game/c_map_item_data.rs | 12 +- .../src/packets/game/c_player_abilities.rs | 8 +- .../src/packets/game/c_player_chat.rs | 16 +- .../src/packets/game/c_player_info_update.rs | 56 +++---- .../src/packets/game/c_player_position.rs | 8 +- .../packets/game/c_section_blocks_update.rs | 8 +- .../src/packets/game/c_set_equipment.rs | 12 +- .../src/packets/game/c_set_objective.rs | 36 ++--- .../src/packets/game/c_set_player_team.rs | 34 ++--- .../src/packets/game/c_stop_sound.rs | 16 +- .../src/packets/game/c_system_chat.rs | 4 +- .../src/packets/game/c_tab_list.rs | 2 +- .../src/packets/game/c_update_advancements.rs | 40 ++--- .../src/packets/game/c_update_tags.rs | 30 ++-- .../src/packets/game/s_interact.rs | 32 ++-- .../src/packets/game/s_player_abilities.rs | 8 +- .../src/packets/game/s_player_input.rs | 8 +- .../src/packets/game/s_seen_advancements.rs | 12 +- .../src/packets/game/s_set_command_block.rs | 20 +-- .../src/packets/game/s_set_jigsaw_block.rs | 10 +- .../src/packets/game/s_set_structure_block.rs | 8 +- .../src/packets/game/s_use_item_on.rs | 28 ++-- .../src/packets/login/c_login_disconnect.rs | 8 +- azalea-protocol/src/packets/login/s_hello.rs | 4 +- azalea-protocol/src/packets/mod.rs | 8 +- .../src/packets/status/c_status_response.rs | 8 +- azalea-protocol/src/read.rs | 6 +- azalea-protocol/src/write.rs | 8 +- azalea-registry/src/lib.rs | 42 +++--- azalea-world/src/chunk_storage.rs | 18 +-- azalea-world/src/palette.rs | 26 ++-- codegen/genitemcomponents.py | 2 +- 63 files changed, 781 insertions(+), 776 deletions(-) diff --git a/azalea-block/src/lib.rs b/azalea-block/src/lib.rs index 7e6ccfaf6..59db15798 100755 --- a/azalea-block/src/lib.rs +++ b/azalea-block/src/lib.rs @@ -81,16 +81,16 @@ impl TryFrom for BlockState { } impl McBufReadable for BlockState { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let state_id = u32::var_read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let state_id = u32::azalea_read_var(buf)?; Self::try_from(state_id).map_err(|_| BufReadError::UnexpectedEnumVariant { id: state_id as i32, }) } } impl McBufWritable for BlockState { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - u32::var_write_into(&self.id, buf) + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + u32::azalea_write_var(&self.id, buf) } } diff --git a/azalea-brigadier/src/suggestion/mod.rs b/azalea-brigadier/src/suggestion/mod.rs index 753b1bc86..3cf9a426d 100755 --- a/azalea-brigadier/src/suggestion/mod.rs +++ b/azalea-brigadier/src/suggestion/mod.rs @@ -138,12 +138,12 @@ impl PartialOrd for SuggestionValue { #[cfg(feature = "azalea-buf")] impl McBufWritable for Suggestion { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - self.value.to_string().write_into(buf)?; + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + self.value.to_string().azalea_write(buf)?; self.tooltip .clone() .map(FormattedText::from) - .write_into(buf)?; + .azalea_write(buf)?; Ok(()) } } diff --git a/azalea-brigadier/src/suggestion/suggestions.rs b/azalea-brigadier/src/suggestion/suggestions.rs index 5941aa7db..4574d7fad 100755 --- a/azalea-brigadier/src/suggestion/suggestions.rs +++ b/azalea-brigadier/src/suggestion/suggestions.rs @@ -80,20 +80,20 @@ impl Suggestions { #[cfg(feature = "azalea-buf")] impl McBufReadable for Suggestions { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { #[derive(McBuf)] struct StandaloneSuggestion { pub text: String, pub tooltip: Option, } - let start = u32::var_read_from(buf)? as usize; - let length = u32::var_read_from(buf)? as usize; + let start = u32::azalea_read_var(buf)? as usize; + let length = u32::azalea_read_var(buf)? as usize; let range = StringRange::between(start, start + length); // the range of a Suggestion depends on the Suggestions containing it, // so we can't just `impl McBufReadable for Suggestion` - let mut suggestions = Vec::::read_from(buf)? + let mut suggestions = Vec::::azalea_read(buf)? .into_iter() .map(|s| Suggestion { value: SuggestionValue::Text(s.text), @@ -109,10 +109,10 @@ impl McBufReadable for Suggestions { #[cfg(feature = "azalea-buf")] impl McBufWritable for Suggestions { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - (self.range.start() as u32).var_write_into(buf)?; - (self.range.length() as u32).var_write_into(buf)?; - self.suggestions.write_into(buf)?; + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + (self.range.start() as u32).azalea_write_var(buf)?; + (self.range.length() as u32).azalea_write_var(buf)?; + self.suggestions.azalea_write(buf)?; Ok(()) } } diff --git a/azalea-buf/azalea-buf-macros/src/read.rs b/azalea-buf/azalea-buf-macros/src/read.rs index c5c484e77..acbe721cf 100644 --- a/azalea-buf/azalea-buf-macros/src/read.rs +++ b/azalea-buf/azalea-buf-macros/src/read.rs @@ -15,11 +15,11 @@ fn read_named_fields( syn::Type::Path(_) | syn::Type::Array(_) => { if f.attrs.iter().any(|a| a.path().is_ident("var")) { quote! { - let #field_name = azalea_buf::McBufVarReadable::var_read_from(buf)?; + let #field_name = azalea_buf::McBufVarReadable::azalea_read_var(buf)?; } } else { quote! { - let #field_name = azalea_buf::McBufReadable::read_from(buf)?; + let #field_name = azalea_buf::McBufReadable::azalea_read(buf)?; } } } @@ -44,7 +44,7 @@ pub fn create_impl_mcbufreadable(ident: &Ident, data: &Data) -> proc_macro2::Tok quote! { impl azalea_buf::McBufReadable for #ident { - fn read_from(buf: &mut std::io::Cursor<&[u8]>) -> Result { + fn azalea_read(buf: &mut std::io::Cursor<&[u8]>) -> Result { #(#read_fields)* Ok(Self { #(#read_field_names: #read_field_names),* @@ -56,7 +56,7 @@ pub fn create_impl_mcbufreadable(ident: &Ident, data: &Data) -> proc_macro2::Tok syn::Fields::Unit => { quote! { impl azalea_buf::McBufReadable for #ident { - fn read_from(buf: &mut std::io::Cursor<&[u8]>) -> Result { + fn azalea_read(buf: &mut std::io::Cursor<&[u8]>) -> Result { Ok(Self) } } @@ -110,11 +110,11 @@ pub fn create_impl_mcbufreadable(ident: &Ident, data: &Data) -> proc_macro2::Tok for f in &fields.unnamed { if f.attrs.iter().any(|attr| attr.path().is_ident("var")) { reader_code.extend(quote! { - Self::#variant_name(azalea_buf::McBufVarReadable::var_read_from(buf)?), + Self::#variant_name(azalea_buf::McBufVarReadable::azalea_read_var(buf)?), }); } else { reader_code.extend(quote! { - Self::#variant_name(azalea_buf::McBufReadable::read_from(buf)?), + Self::#variant_name(azalea_buf::McBufReadable::azalea_read(buf)?), }); } } @@ -140,14 +140,14 @@ pub fn create_impl_mcbufreadable(ident: &Ident, data: &Data) -> proc_macro2::Tok quote! { impl azalea_buf::McBufReadable for #ident { - fn read_from(buf: &mut std::io::Cursor<&[u8]>) -> Result { - let id = azalea_buf::McBufVarReadable::var_read_from(buf)?; - Self::read_from_id(buf, id) + fn azalea_read(buf: &mut std::io::Cursor<&[u8]>) -> Result { + let id = azalea_buf::McBufVarReadable::azalea_read_var(buf)?; + Self::azalea_read_id(buf, id) } } impl #ident { - pub fn read_from_id(buf: &mut std::io::Cursor<&[u8]>, id: u32) -> Result { + pub fn azalea_read_id(buf: &mut std::io::Cursor<&[u8]>, id: u32) -> Result { match id { #match_contents // you'd THINK this throws an error, but mojang decided to make it default for some reason diff --git a/azalea-buf/azalea-buf-macros/src/write.rs b/azalea-buf/azalea-buf-macros/src/write.rs index 4d31f39e8..5fe46bacf 100644 --- a/azalea-buf/azalea-buf-macros/src/write.rs +++ b/azalea-buf/azalea-buf-macros/src/write.rs @@ -19,11 +19,11 @@ fn write_named_fields( syn::Type::Path(_) | syn::Type::Array(_) => { if f.attrs.iter().any(|attr| attr.path().is_ident("var")) { quote! { - azalea_buf::McBufVarWritable::var_write_into(#ident_dot_field, buf)?; + azalea_buf::McBufVarWritable::azalea_write_var(#ident_dot_field, buf)?; } } else { quote! { - azalea_buf::McBufWritable::write_into(#ident_dot_field, buf)?; + azalea_buf::McBufWritable::azalea_write(#ident_dot_field, buf)?; } } } @@ -46,7 +46,7 @@ pub fn create_impl_mcbufwritable(ident: &Ident, data: &Data) -> proc_macro2::Tok quote! { impl azalea_buf::McBufWritable for #ident { - fn write_into(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { #write_fields Ok(()) } @@ -56,7 +56,7 @@ pub fn create_impl_mcbufwritable(ident: &Ident, data: &Data) -> proc_macro2::Tok syn::Fields::Unit => { quote! { impl azalea_buf::McBufWritable for #ident { - fn write_into(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { Ok(()) } } @@ -103,7 +103,7 @@ pub fn create_impl_mcbufwritable(ident: &Ident, data: &Data) -> proc_macro2::Tok // the variant number that we're going to write let write_the_variant = quote! { - azalea_buf::McBufVarWritable::var_write_into(&#variant_discrim, buf)?; + azalea_buf::McBufVarWritable::azalea_write_var(&#variant_discrim, buf)?; }; match &variant.fields { syn::Fields::Named(f) => { @@ -145,11 +145,11 @@ pub fn create_impl_mcbufwritable(ident: &Ident, data: &Data) -> proc_macro2::Tok params_code.extend(quote! { #param_ident, }); if f.attrs.iter().any(|attr| attr.path().is_ident("var")) { writers_code.extend(quote! { - azalea_buf::McBufVarWritable::var_write_into(#param_ident, buf)?; + azalea_buf::McBufVarWritable::azalea_write_var(#param_ident, buf)?; }); } else { writers_code.extend(quote! { - azalea_buf::McBufWritable::write_into(#param_ident, buf)?; + azalea_buf::McBufWritable::azalea_write(#param_ident, buf)?; }); } } @@ -161,7 +161,7 @@ pub fn create_impl_mcbufwritable(ident: &Ident, data: &Data) -> proc_macro2::Tok }); match_arms_without_id.extend(quote! { Self::#variant_name(data) => { - azalea_buf::McBufWritable::write_into(data, buf)?; + azalea_buf::McBufWritable::azalea_write(data, buf)?; } }); } @@ -170,7 +170,7 @@ pub fn create_impl_mcbufwritable(ident: &Ident, data: &Data) -> proc_macro2::Tok if is_data_enum { quote! { impl azalea_buf::McBufWritable for #ident { - fn write_into(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { match self { #match_arms } @@ -190,8 +190,8 @@ pub fn create_impl_mcbufwritable(ident: &Ident, data: &Data) -> proc_macro2::Tok // optimization: if it doesn't have data we can just do `as u32` quote! { impl azalea_buf::McBufWritable for #ident { - fn write_into(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { - azalea_buf::McBufVarWritable::var_write_into(&(*self as u32), buf) + fn azalea_write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { + azalea_buf::McBufVarWritable::azalea_write_var(&(*self as u32), buf) } } } diff --git a/azalea-buf/src/lib.rs b/azalea-buf/src/lib.rs index e1d1281fd..332031e69 100755 --- a/azalea-buf/src/lib.rs +++ b/azalea-buf/src/lib.rs @@ -27,110 +27,113 @@ mod tests { #[test] fn test_write_varint() { let mut buf = Vec::new(); - 0.var_write_into(&mut buf).unwrap(); + 0.azalea_write_var(&mut buf).unwrap(); assert_eq!(buf, vec![0]); let mut buf = Vec::new(); - 1.var_write_into(&mut buf).unwrap(); + 1.azalea_write_var(&mut buf).unwrap(); assert_eq!(buf, vec![1]); let mut buf = Vec::new(); - 2.var_write_into(&mut buf).unwrap(); + 2.azalea_write_var(&mut buf).unwrap(); assert_eq!(buf, vec![2]); let mut buf = Vec::new(); - 127.var_write_into(&mut buf).unwrap(); + 127.azalea_write_var(&mut buf).unwrap(); assert_eq!(buf, vec![127]); let mut buf = Vec::new(); - 128.var_write_into(&mut buf).unwrap(); + 128.azalea_write_var(&mut buf).unwrap(); assert_eq!(buf, vec![128, 1]); let mut buf = Vec::new(); - 255.var_write_into(&mut buf).unwrap(); + 255.azalea_write_var(&mut buf).unwrap(); assert_eq!(buf, vec![255, 1]); let mut buf = Vec::new(); - 25565.var_write_into(&mut buf).unwrap(); + 25565.azalea_write_var(&mut buf).unwrap(); assert_eq!(buf, vec![221, 199, 1]); let mut buf = Vec::new(); - 2097151.var_write_into(&mut buf).unwrap(); + 2097151.azalea_write_var(&mut buf).unwrap(); assert_eq!(buf, vec![255, 255, 127]); let mut buf = Vec::new(); - 2147483647.var_write_into(&mut buf).unwrap(); + 2147483647.azalea_write_var(&mut buf).unwrap(); assert_eq!(buf, vec![255, 255, 255, 255, 7]); let mut buf = Vec::new(); - (-1).var_write_into(&mut buf).unwrap(); + (-1).azalea_write_var(&mut buf).unwrap(); assert_eq!(buf, vec![255, 255, 255, 255, 15]); let mut buf = Vec::new(); - (-2147483648).var_write_into(&mut buf).unwrap(); + (-2147483648).azalea_write_var(&mut buf).unwrap(); assert_eq!(buf, vec![128, 128, 128, 128, 8]); } #[test] fn test_read_varint() { // let buf = &mut &vec![0][..]; - // assert_eq!(i32::var_read_from(buf).unwrap(), 0); + // assert_eq!(i32::azalea_read_var(buf).unwrap(), 0); let buf = vec![0]; - assert_eq!(i32::var_read_from(&mut Cursor::new(&buf)).unwrap(), 0); + assert_eq!(i32::azalea_read_var(&mut Cursor::new(&buf)).unwrap(), 0); // let buf = &mut &vec![1][..]; - // assert_eq!(i32::var_read_from(buf).unwrap(), 1); + // assert_eq!(i32::azalea_read_var(buf).unwrap(), 1); let buf = vec![1]; - assert_eq!(i32::var_read_from(&mut Cursor::new(&buf)).unwrap(), 1); + assert_eq!(i32::azalea_read_var(&mut Cursor::new(&buf)).unwrap(), 1); // let buf = &mut &vec![2][..]; - // assert_eq!(i32::var_read_from(buf).unwrap(), 2); + // assert_eq!(i32::azalea_read_var(buf).unwrap(), 2); let buf = vec![2]; - assert_eq!(i32::var_read_from(&mut Cursor::new(&buf)).unwrap(), 2); + assert_eq!(i32::azalea_read_var(&mut Cursor::new(&buf)).unwrap(), 2); // let buf = &mut &vec![127][..]; - // assert_eq!(i32::var_read_from(buf).unwrap(), 127); + // assert_eq!(i32::azalea_read_var(buf).unwrap(), 127); let buf = vec![127]; - assert_eq!(i32::var_read_from(&mut Cursor::new(&buf)).unwrap(), 127); + assert_eq!(i32::azalea_read_var(&mut Cursor::new(&buf)).unwrap(), 127); // let buf = &mut &vec![128, 1][..]; - // assert_eq!(i32::var_read_from(buf).unwrap(), 128); + // assert_eq!(i32::azalea_read_var(buf).unwrap(), 128); let buf = vec![128, 1]; - assert_eq!(i32::var_read_from(&mut Cursor::new(&buf)).unwrap(), 128); + assert_eq!(i32::azalea_read_var(&mut Cursor::new(&buf)).unwrap(), 128); // let buf = &mut &vec![255, 1][..]; - // assert_eq!(i32::var_read_from(buf).unwrap(), 255); + // assert_eq!(i32::azalea_read_var(buf).unwrap(), 255); let buf = vec![255, 1]; - assert_eq!(i32::var_read_from(&mut Cursor::new(&buf)).unwrap(), 255); + assert_eq!(i32::azalea_read_var(&mut Cursor::new(&buf)).unwrap(), 255); // let buf = &mut &vec![221, 199, 1][..]; - // assert_eq!(i32::var_read_from(buf).unwrap(), 25565); + // assert_eq!(i32::azalea_read_var(buf).unwrap(), 25565); let buf = vec![221, 199, 1]; - assert_eq!(i32::var_read_from(&mut Cursor::new(&buf)).unwrap(), 25565); + assert_eq!(i32::azalea_read_var(&mut Cursor::new(&buf)).unwrap(), 25565); // let buf = &mut &vec![255, 255, 127][..]; - // assert_eq!(i32::var_read_from(buf).unwrap(), 2097151); + // assert_eq!(i32::azalea_read_var(buf).unwrap(), 2097151); let buf = vec![255, 255, 127]; - assert_eq!(i32::var_read_from(&mut Cursor::new(&buf)).unwrap(), 2097151); + assert_eq!( + i32::azalea_read_var(&mut Cursor::new(&buf)).unwrap(), + 2097151 + ); // let buf = &mut &vec![255, 255, 255, 255, 7][..]; - // assert_eq!(i32::var_read_from(buf).unwrap(), 2147483647); + // assert_eq!(i32::azalea_read_var(buf).unwrap(), 2147483647); let buf = vec![255, 255, 255, 255, 7]; assert_eq!( - i32::var_read_from(&mut Cursor::new(&buf)).unwrap(), + i32::azalea_read_var(&mut Cursor::new(&buf)).unwrap(), 2147483647 ); // let buf = &mut &vec![255, 255, 255, 255, 15][..]; - // assert_eq!(i32::var_read_from(buf).unwrap(), -1); + // assert_eq!(i32::azalea_read_var(buf).unwrap(), -1); let buf = vec![255, 255, 255, 255, 15]; - assert_eq!(i32::var_read_from(&mut Cursor::new(&buf)).unwrap(), -1); + assert_eq!(i32::azalea_read_var(&mut Cursor::new(&buf)).unwrap(), -1); // let buf = &mut &vec![128, 128, 128, 128, 8][..]; - // assert_eq!(i32::var_read_from(buf).unwrap(), -2147483648); + // assert_eq!(i32::azalea_read_var(buf).unwrap(), -2147483648); let buf = vec![128, 128, 128, 128, 8]; assert_eq!( - i32::var_read_from(&mut Cursor::new(&buf)).unwrap(), + i32::azalea_read_var(&mut Cursor::new(&buf)).unwrap(), -2147483648 ); } @@ -138,21 +141,21 @@ mod tests { #[test] fn test_read_varint_longer() { let buf = vec![138, 56, 0, 135, 56, 123]; - assert_eq!(i32::var_read_from(&mut Cursor::new(&buf)).unwrap(), 7178); + assert_eq!(i32::azalea_read_var(&mut Cursor::new(&buf)).unwrap(), 7178); } #[test] fn test_write_varlong() { let mut buf = Vec::new(); - 0u64.var_write_into(&mut buf).unwrap(); + 0u64.azalea_write_var(&mut buf).unwrap(); assert_eq!(buf, vec![0]); let mut buf = Vec::new(); - 1u64.var_write_into(&mut buf).unwrap(); + 1u64.azalea_write_var(&mut buf).unwrap(); assert_eq!(buf, vec![1]); let mut buf = Vec::new(); - 9223372036854775807u64.var_write_into(&mut buf).unwrap(); + 9223372036854775807u64.azalea_write_var(&mut buf).unwrap(); assert_eq!(buf, vec![255, 255, 255, 255, 255, 255, 255, 255, 127]); } @@ -161,20 +164,20 @@ mod tests { let original_vec = vec!["a".to_string(), "bc".to_string(), "def".to_string()]; let mut buf = Vec::new(); - original_vec.write_into(&mut buf).unwrap(); + original_vec.azalea_write(&mut buf).unwrap(); dbg!(&buf); - let result = Vec::::read_from(&mut Cursor::new(&buf)).unwrap(); + let result = Vec::::azalea_read(&mut Cursor::new(&buf)).unwrap(); assert_eq!(result, original_vec); } #[test] fn test_int_id_list() { let mut buf = Vec::new(); - vec![1, 2, 3].var_write_into(&mut buf).unwrap(); + vec![1, 2, 3].azalea_write_var(&mut buf).unwrap(); - let result = Vec::::var_read_from(&mut Cursor::new(&buf)).unwrap(); + let result = Vec::::azalea_read_var(&mut Cursor::new(&buf)).unwrap(); assert_eq!(result, vec![1, 2, 3]); } @@ -186,9 +189,9 @@ mod tests { ("def".to_string(), 456), ]); let mut buf = Vec::new(); - original_map.var_write_into(&mut buf).unwrap(); + original_map.azalea_write_var(&mut buf).unwrap(); - let result = HashMap::::var_read_from(&mut Cursor::new(&buf)).unwrap(); + let result = HashMap::::azalea_read_var(&mut Cursor::new(&buf)).unwrap(); assert_eq!(result, original_map); } @@ -196,8 +199,8 @@ mod tests { #[test] fn test_long() { let mut buf: Vec = Vec::new(); - 123456u64.write_into(&mut buf).unwrap(); + 123456u64.azalea_write(&mut buf).unwrap(); - assert_eq!(u64::read_from(&mut Cursor::new(&buf)).unwrap(), 123456); + assert_eq!(u64::azalea_read(&mut Cursor::new(&buf)).unwrap(), 123456); } } diff --git a/azalea-buf/src/read.rs b/azalea-buf/src/read.rs index 8e406acb7..edae683e3 100755 --- a/azalea-buf/src/read.rs +++ b/azalea-buf/src/read.rs @@ -81,7 +81,7 @@ fn read_bytes<'a>(buf: &'a mut Cursor<&[u8]>, length: usize) -> Result<&'a [u8], } fn read_utf_with_len(buf: &mut Cursor<&[u8]>, max_length: u32) -> Result { - let length = u32::var_read_from(buf)?; + let length = u32::azalea_read_var(buf)?; // i don't know why it's multiplied by 4 but it's like that in mojang's code so if length > max_length * 4 { return Err(BufReadError::StringLengthTooLong { @@ -109,18 +109,18 @@ pub trait McBufReadable where Self: Sized, { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result; } pub trait McBufVarReadable where Self: Sized, { - fn var_read_from(buf: &mut Cursor<&[u8]>) -> Result; + fn azalea_read_var(buf: &mut Cursor<&[u8]>) -> Result; } impl McBufReadable for i32 { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { Ok(buf.read_i32::()?) } } @@ -128,7 +128,7 @@ impl McBufReadable for i32 { impl McBufVarReadable for i32 { // fast varints modified from https://github.com/luojia65/mc-varint/blob/master/src/lib.rs#L67 /// Read a single varint from the reader and return the value - fn var_read_from(buf: &mut Cursor<&[u8]>) -> Result { + fn azalea_read_var(buf: &mut Cursor<&[u8]>) -> Result { let mut buffer = [0]; let mut ans = 0; for i in 0..5 { @@ -144,7 +144,7 @@ impl McBufVarReadable for i32 { impl McBufVarReadable for i64 { // fast varints modified from https://github.com/luojia65/mc-varint/blob/master/src/lib.rs#L54 - fn var_read_from(buf: &mut Cursor<&[u8]>) -> Result { + fn azalea_read_var(buf: &mut Cursor<&[u8]>) -> Result { let mut buffer = [0]; let mut ans = 0; for i in 0..10 { @@ -159,13 +159,13 @@ impl McBufVarReadable for i64 { } } impl McBufVarReadable for u64 { - fn var_read_from(buf: &mut Cursor<&[u8]>) -> Result { - i64::var_read_from(buf).map(|i| i as u64) + fn azalea_read_var(buf: &mut Cursor<&[u8]>) -> Result { + i64::azalea_read_var(buf).map(|i| i as u64) } } impl McBufReadable for UnsizedByteArray { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { // read to end of the buffer let data = buf.get_ref()[buf.position() as usize..].to_vec(); buf.set_position((buf.position()) + data.len() as u64); @@ -174,23 +174,23 @@ impl McBufReadable for UnsizedByteArray { } impl McBufReadable for Vec { - default fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let length = u32::var_read_from(buf)? as usize; + default fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let length = u32::azalea_read_var(buf)? as usize; // we limit the capacity to not get exploited into allocating a bunch let mut contents = Vec::with_capacity(usize::min(length, 65536)); for _ in 0..length { - contents.push(T::read_from(buf)?); + contents.push(T::azalea_read(buf)?); } Ok(contents) } } impl McBufReadable for HashMap { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let length = i32::var_read_from(buf)? as usize; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let length = i32::azalea_read_var(buf)? as usize; let mut contents = HashMap::with_capacity(usize::min(length, 65536)); for _ in 0..length { - contents.insert(K::read_from(buf)?, V::read_from(buf)?); + contents.insert(K::azalea_read(buf)?, V::azalea_read(buf)?); } Ok(contents) } @@ -199,85 +199,85 @@ impl McBufReadable impl McBufVarReadable for HashMap { - fn var_read_from(buf: &mut Cursor<&[u8]>) -> Result { - let length = i32::var_read_from(buf)? as usize; + fn azalea_read_var(buf: &mut Cursor<&[u8]>) -> Result { + let length = i32::azalea_read_var(buf)? as usize; let mut contents = HashMap::with_capacity(usize::min(length, 65536)); for _ in 0..length { - contents.insert(K::read_from(buf)?, V::var_read_from(buf)?); + contents.insert(K::azalea_read(buf)?, V::azalea_read_var(buf)?); } Ok(contents) } } impl McBufReadable for Vec { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let length = i32::var_read_from(buf)? as usize; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let length = i32::azalea_read_var(buf)? as usize; read_bytes(buf, length).map(|b| b.to_vec()) } } impl McBufReadable for String { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { read_utf_with_len(buf, MAX_STRING_LENGTH.into()) } } impl McBufReadable for u32 { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - Ok(i32::read_from(buf)? as u32) + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + Ok(i32::azalea_read(buf)? as u32) } } impl McBufVarReadable for u32 { - fn var_read_from(buf: &mut Cursor<&[u8]>) -> Result { - Ok(i32::var_read_from(buf)? as u32) + fn azalea_read_var(buf: &mut Cursor<&[u8]>) -> Result { + Ok(i32::azalea_read_var(buf)? as u32) } } impl McBufReadable for u16 { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - i16::read_from(buf).map(|i| i as u16) + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + i16::azalea_read(buf).map(|i| i as u16) } } impl McBufReadable for i16 { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { Ok(buf.read_i16::()?) } } impl McBufVarReadable for u16 { - fn var_read_from(buf: &mut Cursor<&[u8]>) -> Result { - Ok(i32::var_read_from(buf)? as u16) + fn azalea_read_var(buf: &mut Cursor<&[u8]>) -> Result { + Ok(i32::azalea_read_var(buf)? as u16) } } impl McBufVarReadable for Vec { - fn var_read_from(buf: &mut Cursor<&[u8]>) -> Result { - let length = i32::var_read_from(buf)? as usize; + fn azalea_read_var(buf: &mut Cursor<&[u8]>) -> Result { + let length = i32::azalea_read_var(buf)? as usize; let mut contents = Vec::with_capacity(usize::min(length, 65536)); for _ in 0..length { - contents.push(T::var_read_from(buf)?); + contents.push(T::azalea_read_var(buf)?); } Ok(contents) } } impl McBufReadable for i64 { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { Ok(buf.read_i64::()?) } } impl McBufReadable for u64 { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - i64::read_from(buf).map(|i| i as u64) + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + i64::azalea_read(buf).map(|i| i as u64) } } impl McBufReadable for bool { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let byte = u8::read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let byte = u8::azalea_read(buf)?; if byte > 1 { warn!("Boolean value was not 0 or 1, but {}", byte); } @@ -286,34 +286,34 @@ impl McBufReadable for bool { } impl McBufReadable for u8 { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { Ok(buf.read_u8()?) } } impl McBufReadable for i8 { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - u8::read_from(buf).map(|i| i as i8) + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + u8::azalea_read(buf).map(|i| i as i8) } } impl McBufReadable for f32 { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { Ok(buf.read_f32::()?) } } impl McBufReadable for f64 { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { Ok(buf.read_f64::()?) } } impl McBufReadable for Option { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let present = bool::read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let present = bool::azalea_read(buf)?; Ok(if present { - Some(T::read_from(buf)?) + Some(T::azalea_read(buf)?) } else { None }) @@ -321,10 +321,10 @@ impl McBufReadable for Option { } impl McBufVarReadable for Option { - fn var_read_from(buf: &mut Cursor<&[u8]>) -> Result { - let present = bool::read_from(buf)?; + fn azalea_read_var(buf: &mut Cursor<&[u8]>) -> Result { + let present = bool::azalea_read(buf)?; Ok(if present { - Some(T::var_read_from(buf)?) + Some(T::azalea_read_var(buf)?) } else { None }) @@ -333,10 +333,10 @@ impl McBufVarReadable for Option { // [String; 4] impl McBufReadable for [T; N] { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let mut contents = Vec::with_capacity(N); for _ in 0..N { - contents.push(T::read_from(buf)?); + contents.push(T::azalea_read(buf)?); } contents.try_into().map_err(|_| { unreachable!("Panic is not possible since the Vec is the same size as the array") @@ -345,13 +345,13 @@ impl McBufReadable for [T; N] { } impl McBufReadable for simdnbt::owned::NbtTag { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { Ok(simdnbt::owned::read_tag(buf).map_err(simdnbt::Error::from)?) } } impl McBufReadable for simdnbt::owned::NbtCompound { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { match simdnbt::owned::read_tag(buf).map_err(simdnbt::Error::from)? { simdnbt::owned::NbtTag::Compound(compound) => Ok(compound), _ => Err(BufReadError::Custom("Expected compound tag".to_string())), @@ -360,7 +360,7 @@ impl McBufReadable for simdnbt::owned::NbtCompound { } impl McBufReadable for simdnbt::owned::Nbt { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { Ok(simdnbt::owned::read_unnamed(buf)?) } } @@ -369,7 +369,7 @@ impl McBufReadable for Box where T: McBufReadable, { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - Ok(Box::new(T::read_from(buf)?)) + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + Ok(Box::new(T::azalea_read(buf)?)) } } diff --git a/azalea-buf/src/serializable_uuid.rs b/azalea-buf/src/serializable_uuid.rs index d4ec0315f..8091548ef 100755 --- a/azalea-buf/src/serializable_uuid.rs +++ b/azalea-buf/src/serializable_uuid.rs @@ -35,23 +35,23 @@ impl SerializableUuid for Uuid { } impl McBufReadable for Uuid { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { Ok(Uuid::from_int_array([ - u32::read_from(buf)?, - u32::read_from(buf)?, - u32::read_from(buf)?, - u32::read_from(buf)?, + u32::azalea_read(buf)?, + u32::azalea_read(buf)?, + u32::azalea_read(buf)?, + u32::azalea_read(buf)?, ])) } } impl McBufWritable for Uuid { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let [a, b, c, d] = self.to_int_array(); - a.write_into(buf)?; - b.write_into(buf)?; - c.write_into(buf)?; - d.write_into(buf)?; + a.azalea_write(buf)?; + b.azalea_write(buf)?; + c.azalea_write(buf)?; + d.azalea_write(buf)?; Ok(()) } } @@ -79,10 +79,10 @@ mod tests { fn read_write() { let u = Uuid::parse_str("6536bfed-8695-48fd-83a1-ecd24cf2a0fd").unwrap(); let mut buf = Vec::new(); - u.write_into(&mut buf).unwrap(); + u.azalea_write(&mut buf).unwrap(); println!("{buf:?}"); assert_eq!(buf.len(), 16); - let u2 = Uuid::read_from(&mut Cursor::new(&buf)).unwrap(); + let u2 = Uuid::azalea_read(&mut Cursor::new(&buf)).unwrap(); assert_eq!(u, u2); } } diff --git a/azalea-buf/src/write.rs b/azalea-buf/src/write.rs index 49215a5af..b8e4039c3 100755 --- a/azalea-buf/src/write.rs +++ b/azalea-buf/src/write.rs @@ -16,26 +16,26 @@ fn write_utf_with_len( len ); } - string.as_bytes().to_vec().write_into(buf)?; + string.as_bytes().to_vec().azalea_write(buf)?; Ok(()) } pub trait McBufWritable { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error>; + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error>; } pub trait McBufVarWritable { - fn var_write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error>; + fn azalea_write_var(&self, buf: &mut impl Write) -> Result<(), std::io::Error>; } impl McBufWritable for i32 { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { WriteBytesExt::write_i32::(buf, *self) } } impl McBufVarWritable for i32 { - fn var_write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write_var(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut buffer = [0]; let mut value = *self; if value == 0 { @@ -54,33 +54,33 @@ impl McBufVarWritable for i32 { } impl McBufWritable for UnsizedByteArray { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { buf.write_all(self) } } impl McBufWritable for Vec { - default fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - self[..].write_into(buf) + default fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + self[..].azalea_write(buf) } } impl McBufWritable for [T] { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - (self.len() as u32).var_write_into(buf)?; + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + (self.len() as u32).azalea_write_var(buf)?; for item in self { - T::write_into(item, buf)?; + T::azalea_write(item, buf)?; } Ok(()) } } impl McBufWritable for HashMap { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - u32::var_write_into(&(self.len() as u32), buf)?; + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + u32::azalea_write_var(&(self.len() as u32), buf)?; for (key, value) in self { - key.write_into(buf)?; - value.write_into(buf)?; + key.azalea_write(buf)?; + value.azalea_write(buf)?; } Ok(()) @@ -88,11 +88,11 @@ impl McBufWritable for HashMap { } impl McBufVarWritable for HashMap { - fn var_write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - u32::var_write_into(&(self.len() as u32), buf)?; + fn azalea_write_var(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + u32::azalea_write_var(&(self.len() as u32), buf)?; for (key, value) in self { - key.write_into(buf)?; - value.var_write_into(buf)?; + key.azalea_write(buf)?; + value.azalea_write_var(buf)?; } Ok(()) @@ -100,38 +100,38 @@ impl McBufVarWritable for HashMap { } impl McBufWritable for Vec { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - (self.len() as u32).var_write_into(buf)?; + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + (self.len() as u32).azalea_write_var(buf)?; buf.write_all(self) } } impl McBufWritable for String { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { write_utf_with_len(buf, self, MAX_STRING_LENGTH.into()) } } impl McBufWritable for &str { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { write_utf_with_len(buf, self, MAX_STRING_LENGTH.into()) } } impl McBufWritable for u32 { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - i32::write_into(&(*self as i32), buf) + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + i32::azalea_write(&(*self as i32), buf) } } impl McBufVarWritable for u32 { - fn var_write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - i32::var_write_into(&(*self as i32), buf) + fn azalea_write_var(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + i32::azalea_write_var(&(*self as i32), buf) } } impl McBufVarWritable for i64 { - fn var_write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write_var(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut buffer = [0]; let mut value = *self; if value == 0 { @@ -150,101 +150,101 @@ impl McBufVarWritable for i64 { } impl McBufVarWritable for u64 { - fn var_write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - i64::var_write_into(&(*self as i64), buf) + fn azalea_write_var(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + i64::azalea_write_var(&(*self as i64), buf) } } impl McBufWritable for u16 { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - i16::write_into(&(*self as i16), buf) + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + i16::azalea_write(&(*self as i16), buf) } } impl McBufVarWritable for u16 { - fn var_write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - i32::var_write_into(&(*self as i32), buf) + fn azalea_write_var(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + i32::azalea_write_var(&(*self as i32), buf) } } impl McBufVarWritable for Vec { - fn var_write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - u32::var_write_into(&(self.len() as u32), buf)?; + fn azalea_write_var(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + u32::azalea_write_var(&(self.len() as u32), buf)?; for i in self { - i.var_write_into(buf)?; + i.azalea_write_var(buf)?; } Ok(()) } } impl McBufWritable for u8 { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { WriteBytesExt::write_u8(buf, *self) } } impl McBufWritable for i16 { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { WriteBytesExt::write_i16::(buf, *self) } } impl McBufWritable for i64 { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { WriteBytesExt::write_i64::(buf, *self) } } impl McBufWritable for u64 { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - i64::write_into(&(*self as i64), buf) + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + i64::azalea_write(&(*self as i64), buf) } } impl McBufWritable for bool { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let byte = u8::from(*self); - byte.write_into(buf) + byte.azalea_write(buf) } } impl McBufWritable for i8 { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - (*self as u8).write_into(buf) + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + (*self as u8).azalea_write(buf) } } impl McBufWritable for f32 { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { WriteBytesExt::write_f32::(buf, *self) } } impl McBufWritable for f64 { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { WriteBytesExt::write_f64::(buf, *self) } } impl McBufWritable for Option { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { if let Some(s) = self { - true.write_into(buf)?; - s.write_into(buf)?; + true.azalea_write(buf)?; + s.azalea_write(buf)?; } else { - false.write_into(buf)?; + false.azalea_write(buf)?; }; Ok(()) } } impl McBufVarWritable for Option { - fn var_write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write_var(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { if let Some(s) = self { - true.write_into(buf)?; - s.var_write_into(buf)?; + true.azalea_write(buf)?; + s.azalea_write_var(buf)?; } else { - false.write_into(buf)?; + false.azalea_write(buf)?; }; Ok(()) } @@ -252,16 +252,16 @@ impl McBufVarWritable for Option { // [T; N] impl McBufWritable for [T; N] { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { for i in self { - i.write_into(buf)?; + i.azalea_write(buf)?; } Ok(()) } } impl McBufWritable for simdnbt::owned::NbtTag { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut data = Vec::new(); self.write(&mut data); buf.write_all(&data) @@ -269,7 +269,7 @@ impl McBufWritable for simdnbt::owned::NbtTag { } impl McBufWritable for simdnbt::owned::NbtCompound { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut data = Vec::new(); simdnbt::owned::NbtTag::Compound(self.clone()).write(&mut data); buf.write_all(&data) @@ -277,7 +277,7 @@ impl McBufWritable for simdnbt::owned::NbtCompound { } impl McBufWritable for simdnbt::owned::Nbt { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut data = Vec::new(); self.write_unnamed(&mut data); buf.write_all(&data) @@ -288,7 +288,7 @@ impl McBufWritable for Box where T: McBufWritable, { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - T::write_into(&**self, buf) + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + T::azalea_write(&**self, buf) } } diff --git a/azalea-chat/src/component.rs b/azalea-chat/src/component.rs index 84b5ed170..f5ecd4c17 100755 --- a/azalea-chat/src/component.rs +++ b/azalea-chat/src/component.rs @@ -457,7 +457,7 @@ impl From<&simdnbt::Mutf8Str> for FormattedText { #[cfg(feature = "azalea-buf")] #[cfg(feature = "simdnbt")] impl McBufReadable for FormattedText { - fn read_from(buf: &mut std::io::Cursor<&[u8]>) -> Result { + fn azalea_read(buf: &mut std::io::Cursor<&[u8]>) -> Result { let nbt = simdnbt::borrow::read_optional_tag(buf)?; if let Some(nbt) = nbt { FormattedText::from_nbt_tag(nbt.as_tag()).ok_or(BufReadError::Custom( @@ -472,7 +472,7 @@ impl McBufReadable for FormattedText { #[cfg(feature = "azalea-buf")] #[cfg(feature = "simdnbt")] impl McBufWritable for FormattedText { - fn write_into(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { let mut out = Vec::new(); simdnbt::owned::BaseNbt::write_unnamed(&(self.clone().to_compound().into()), &mut out); buf.write_all(&out) diff --git a/azalea-chat/src/numbers.rs b/azalea-chat/src/numbers.rs index a5a88c4f9..87fdecc65 100644 --- a/azalea-chat/src/numbers.rs +++ b/azalea-chat/src/numbers.rs @@ -19,15 +19,15 @@ pub enum NumberFormat { #[cfg(feature = "azalea-buf")] impl McBufReadable for NumberFormat { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let kind = NumberFormatKind::read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let kind = NumberFormatKind::azalea_read(buf)?; match kind { NumberFormatKind::Blank => Ok(NumberFormat::Blank), NumberFormatKind::Styled => Ok(NumberFormat::Styled { style: simdnbt::owned::read(buf)?, }), NumberFormatKind::Fixed => Ok(NumberFormat::Fixed { - value: FormattedText::read_from(buf)?, + value: FormattedText::azalea_read(buf)?, }), } } @@ -35,16 +35,16 @@ impl McBufReadable for NumberFormat { #[cfg(feature = "azalea-buf")] impl McBufWritable for NumberFormat { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { match self { - NumberFormat::Blank => NumberFormatKind::Blank.write_into(buf)?, + NumberFormat::Blank => NumberFormatKind::Blank.azalea_write(buf)?, NumberFormat::Styled { style } => { - NumberFormatKind::Styled.write_into(buf)?; - style.write_into(buf)?; + NumberFormatKind::Styled.azalea_write(buf)?; + style.azalea_write(buf)?; } NumberFormat::Fixed { value } => { - NumberFormatKind::Fixed.write_into(buf)?; - value.write_into(buf)?; + NumberFormatKind::Fixed.azalea_write(buf)?; + value.azalea_write(buf)?; } } Ok(()) diff --git a/azalea-client/src/configuration.rs b/azalea-client/src/configuration.rs index c69653aa7..d94f39e68 100644 --- a/azalea-client/src/configuration.rs +++ b/azalea-client/src/configuration.rs @@ -30,7 +30,7 @@ fn handle_in_configuration_state( for (entity, client_information) in query.iter() { let mut brand_data = Vec::new(); // they don't have to know :) - "vanilla".write_into(&mut brand_data).unwrap(); + "vanilla".azalea_write(&mut brand_data).unwrap(); send_packet_events.send(SendConfigurationEvent { entity, packet: ServerboundCustomPayload { diff --git a/azalea-core/src/bitset.rs b/azalea-core/src/bitset.rs index 0be04a57b..7d6dee940 100755 --- a/azalea-core/src/bitset.rs +++ b/azalea-core/src/bitset.rs @@ -163,10 +163,10 @@ impl McBufReadable for FixedBitSet where [u8; N.div_ceil(8)]: Sized, { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let mut data = [0; N.div_ceil(8)]; for item in data.iter_mut().take(N.div_ceil(8)) { - *item = u8::read_from(buf)?; + *item = u8::azalea_read(buf)?; } Ok(FixedBitSet { data }) } @@ -175,9 +175,9 @@ impl McBufWritable for FixedBitSet where [u8; N.div_ceil(8)]: Sized, { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { for i in 0..N.div_ceil(8) { - self.data[i].write_into(buf)?; + self.data[i].azalea_write(buf)?; } Ok(()) } diff --git a/azalea-core/src/difficulty.rs b/azalea-core/src/difficulty.rs index 750cfe1f5..5bc1f5083 100755 --- a/azalea-core/src/difficulty.rs +++ b/azalea-core/src/difficulty.rs @@ -67,14 +67,14 @@ impl Difficulty { } impl McBufReadable for Difficulty { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - Ok(Difficulty::by_id(u8::read_from(buf)?)) + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + Ok(Difficulty::by_id(u8::azalea_read(buf)?)) } } impl McBufWritable for Difficulty { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - u8::write_into(&self.id(), buf) + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + u8::azalea_write(&self.id(), buf) } } diff --git a/azalea-core/src/game_type.rs b/azalea-core/src/game_type.rs index 1e4940351..d8230ead8 100644 --- a/azalea-core/src/game_type.rs +++ b/azalea-core/src/game_type.rs @@ -94,8 +94,8 @@ impl GameMode { } impl McBufReadable for GameMode { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let id = u32::var_read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let id = u32::azalea_read_var(buf)?; let id = id.try_into().unwrap_or_else(|_| { debug!("Unknown game mode id {id}, defaulting to survival"); 0 @@ -108,8 +108,8 @@ impl McBufReadable for GameMode { } impl McBufWritable for GameMode { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - u8::write_into(&self.to_id(), buf) + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + u8::azalea_write(&self.to_id(), buf) } } @@ -131,14 +131,14 @@ impl From for Option { } impl McBufReadable for OptionalGameType { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let id = i8::read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let id = i8::azalea_read(buf)?; GameMode::from_optional_id(id).ok_or(BufReadError::UnexpectedEnumVariant { id: id as i32 }) } } impl McBufWritable for OptionalGameType { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - GameMode::to_optional_id(*self).write_into(buf) + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + GameMode::to_optional_id(*self).azalea_write(buf) } } diff --git a/azalea-core/src/position.rs b/azalea-core/src/position.rs index de0276a32..b045269c5 100755 --- a/azalea-core/src/position.rs +++ b/azalea-core/src/position.rs @@ -316,14 +316,14 @@ impl From for ChunkPos { } } impl McBufReadable for ChunkPos { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let long = u64::read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let long = u64::azalea_read(buf)?; Ok(ChunkPos::from(long)) } } impl McBufWritable for ChunkPos { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - u64::from(*self).write_into(buf)?; + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + u64::from(*self).azalea_write(buf)?; Ok(()) } } @@ -587,8 +587,8 @@ const Z_OFFSET: u64 = PACKED_Y_LENGTH; const X_OFFSET: u64 = PACKED_Y_LENGTH + PACKED_Z_LENGTH; impl McBufReadable for BlockPos { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let val = i64::read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let val = i64::azalea_read(buf)?; let x = (val << (64 - X_OFFSET - PACKED_X_LENGTH) >> (64 - PACKED_X_LENGTH)) as i32; let y = (val << (64 - PACKED_Y_LENGTH) >> (64 - PACKED_Y_LENGTH)) as i32; let z = (val << (64 - Z_OFFSET - PACKED_Z_LENGTH) >> (64 - PACKED_Z_LENGTH)) as i32; @@ -597,17 +597,17 @@ impl McBufReadable for BlockPos { } impl McBufReadable for GlobalPos { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { Ok(GlobalPos { - world: ResourceLocation::read_from(buf)?, - pos: BlockPos::read_from(buf)?, + world: ResourceLocation::azalea_read(buf)?, + pos: BlockPos::azalea_read(buf)?, }) } } impl McBufReadable for ChunkSectionPos { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let long = i64::read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let long = i64::azalea_read(buf)?; Ok(ChunkSectionPos { x: (long >> 42) as i32, y: (long << 44 >> 44) as i32, @@ -617,30 +617,30 @@ impl McBufReadable for ChunkSectionPos { } impl McBufWritable for BlockPos { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut val: u64 = 0; val |= ((self.x as u64) & PACKED_X_MASK) << X_OFFSET; val |= (self.y as u64) & PACKED_Y_MASK; val |= ((self.z as u64) & PACKED_Z_MASK) << Z_OFFSET; - val.write_into(buf) + val.azalea_write(buf) } } impl McBufWritable for GlobalPos { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - ResourceLocation::write_into(&self.world, buf)?; - BlockPos::write_into(&self.pos, buf)?; + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + ResourceLocation::azalea_write(&self.world, buf)?; + BlockPos::azalea_write(&self.pos, buf)?; Ok(()) } } impl McBufWritable for ChunkSectionPos { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let long = (((self.x & 0x3FFFFF) as i64) << 42) | (self.y & 0xFFFFF) as i64 | (((self.z & 0x3FFFFF) as i64) << 20); - long.write_into(buf)?; + long.azalea_write(buf)?; Ok(()) } } @@ -733,9 +733,9 @@ mod tests { #[test] fn test_read_blockpos_from() { let mut buf = Vec::new(); - 13743895338965u64.write_into(&mut buf).unwrap(); + 13743895338965u64.azalea_write(&mut buf).unwrap(); let mut buf = Cursor::new(&buf[..]); - let block_pos = BlockPos::read_from(&mut buf).unwrap(); + let block_pos = BlockPos::azalea_read(&mut buf).unwrap(); assert_eq!(block_pos, BlockPos::new(49, -43, -3)); } @@ -751,9 +751,9 @@ mod tests { #[test] fn test_read_chunk_pos_from() { let mut buf = Vec::new(); - ChunkPos::new(2, -1).write_into(&mut buf).unwrap(); + ChunkPos::new(2, -1).azalea_write(&mut buf).unwrap(); let mut buf = Cursor::new(&buf[..]); - let chunk_pos = ChunkPos::from(u64::read_from(&mut buf).unwrap()); + let chunk_pos = ChunkPos::from(u64::azalea_read(&mut buf).unwrap()); assert_eq!(chunk_pos, ChunkPos::new(2, -1)); } } diff --git a/azalea-core/src/resource_location.rs b/azalea-core/src/resource_location.rs index 7e1e48fe0..25e54d86e 100755 --- a/azalea-core/src/resource_location.rs +++ b/azalea-core/src/resource_location.rs @@ -61,14 +61,14 @@ impl FromStr for ResourceLocation { } impl McBufReadable for ResourceLocation { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let location_string = String::read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let location_string = String::azalea_read(buf)?; Ok(ResourceLocation::new(&location_string)) } } impl McBufWritable for ResourceLocation { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - self.to_string().write_into(buf) + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + self.to_string().azalea_write(buf) } } @@ -145,13 +145,13 @@ mod tests { fn mcbuf_resource_location() { let mut buf = Vec::new(); ResourceLocation::new("minecraft:dirt") - .write_into(&mut buf) + .azalea_write(&mut buf) .unwrap(); let mut buf = Cursor::new(&buf[..]); assert_eq!( - ResourceLocation::read_from(&mut buf).unwrap(), + ResourceLocation::azalea_read(&mut buf).unwrap(), ResourceLocation::new("minecraft:dirt") ); } diff --git a/azalea-crypto/src/signing.rs b/azalea-crypto/src/signing.rs index 5ecafa46d..8ff7d7bf2 100755 --- a/azalea-crypto/src/signing.rs +++ b/azalea-crypto/src/signing.rs @@ -51,17 +51,17 @@ pub struct SignChatMessageOptions { pub fn sign_chat_message(opts: &SignChatMessageOptions) -> MessageSignature { let mut data_to_sign = Vec::new(); // always 1 for some reason - 1i32.write_into(&mut data_to_sign).unwrap(); + 1i32.azalea_write(&mut data_to_sign).unwrap(); // player uuid - opts.account_uuid.write_into(&mut data_to_sign).unwrap(); + opts.account_uuid.azalea_write(&mut data_to_sign).unwrap(); // chat session uuid opts.chat_session_uuid - .write_into(&mut data_to_sign) + .azalea_write(&mut data_to_sign) .unwrap(); // message index - opts.message_index.write_into(&mut data_to_sign).unwrap(); + opts.message_index.azalea_write(&mut data_to_sign).unwrap(); // salt - opts.salt.write_into(&mut data_to_sign).unwrap(); + opts.salt.azalea_write(&mut data_to_sign).unwrap(); // timestamp as seconds let seconds_since_epoch = opts @@ -69,16 +69,16 @@ pub fn sign_chat_message(opts: &SignChatMessageOptions) -> MessageSignature { .duration_since(UNIX_EPOCH) .expect("timestamp must be after epoch") .as_secs(); - seconds_since_epoch.write_into(&mut data_to_sign).unwrap(); + seconds_since_epoch.azalea_write(&mut data_to_sign).unwrap(); // message length as u32 let message_len: u32 = opts.message.len().try_into().unwrap(); - message_len.write_into(&mut data_to_sign).unwrap(); + message_len.azalea_write(&mut data_to_sign).unwrap(); // message bytes data_to_sign.extend_from_slice(opts.message.as_bytes()); // last seen messages length - 0i32.write_into(&mut data_to_sign).unwrap(); + 0i32.azalea_write(&mut data_to_sign).unwrap(); // signatures of last seen messages // ... not implemented yet diff --git a/azalea-entity/src/data.rs b/azalea-entity/src/data.rs index bda73b5b7..12558a54f 100755 --- a/azalea-entity/src/data.rs +++ b/azalea-entity/src/data.rs @@ -37,14 +37,14 @@ impl EntityMetadataItems { } impl McBufReadable for EntityMetadataItems { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let mut metadata = Vec::new(); loop { - let id = u8::read_from(buf)?; + let id = u8::azalea_read(buf)?; if id == 0xff { break; } - let value = EntityDataValue::read_from(buf)?; + let value = EntityDataValue::azalea_read(buf)?; metadata.push(EntityDataItem { index: id, value }); } Ok(EntityMetadataItems(metadata)) @@ -52,12 +52,12 @@ impl McBufReadable for EntityMetadataItems { } impl McBufWritable for EntityMetadataItems { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { for item in &self.0 { - item.index.write_into(buf)?; - item.value.write_into(buf)?; + item.index.azalea_write(buf)?; + item.value.azalea_write(buf)?; } - 0xffu8.write_into(buf)?; + 0xffu8.azalea_write(buf)?; Ok(()) } } @@ -123,8 +123,8 @@ pub enum ArmadilloStateKind { } impl McBufReadable for OptionalUnsignedInt { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let val = u32::var_read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let val = u32::azalea_read_var(buf)?; Ok(OptionalUnsignedInt(if val == 0 { None } else { @@ -133,10 +133,10 @@ impl McBufReadable for OptionalUnsignedInt { } } impl McBufWritable for OptionalUnsignedInt { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { match self.0 { - Some(val) => (val + 1).var_write_into(buf), - None => 0u32.var_write_into(buf), + Some(val) => (val + 1).azalea_write_var(buf), + None => 0u32.azalea_write_var(buf), } } } diff --git a/azalea-inventory/src/components.rs b/azalea-inventory/src/components.rs index 2ceaef507..42ac546cb 100644 --- a/azalea-inventory/src/components.rs +++ b/azalea-inventory/src/components.rs @@ -29,7 +29,7 @@ where T: DataComponent + Clone + McBufWritable + McBufReadable + PartialEq, { fn encode(&self, buf: &mut Vec) -> Result<(), std::io::Error> { - self.write_into(buf) + self.azalea_write(buf) } fn clone(&self) -> Box { let cloned = self.clone(); @@ -54,81 +54,83 @@ pub fn from_kind( // 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)?), - DataComponentKind::MaxDamage => Box::new(MaxDamage::read_from(buf)?), - DataComponentKind::Damage => Box::new(Damage::read_from(buf)?), - DataComponentKind::Unbreakable => Box::new(Unbreakable::read_from(buf)?), - DataComponentKind::CustomName => Box::new(CustomName::read_from(buf)?), - DataComponentKind::ItemName => Box::new(ItemName::read_from(buf)?), - DataComponentKind::Lore => Box::new(Lore::read_from(buf)?), - DataComponentKind::Rarity => Box::new(Rarity::read_from(buf)?), - DataComponentKind::Enchantments => Box::new(Enchantments::read_from(buf)?), - DataComponentKind::CanPlaceOn => Box::new(CanPlaceOn::read_from(buf)?), - DataComponentKind::CanBreak => Box::new(CanBreak::read_from(buf)?), - DataComponentKind::AttributeModifiers => Box::new(AttributeModifiers::read_from(buf)?), - DataComponentKind::CustomModelData => Box::new(CustomModelData::read_from(buf)?), + DataComponentKind::CustomData => Box::new(CustomData::azalea_read(buf)?), + DataComponentKind::MaxStackSize => Box::new(MaxStackSize::azalea_read(buf)?), + DataComponentKind::MaxDamage => Box::new(MaxDamage::azalea_read(buf)?), + DataComponentKind::Damage => Box::new(Damage::azalea_read(buf)?), + DataComponentKind::Unbreakable => Box::new(Unbreakable::azalea_read(buf)?), + DataComponentKind::CustomName => Box::new(CustomName::azalea_read(buf)?), + DataComponentKind::ItemName => Box::new(ItemName::azalea_read(buf)?), + DataComponentKind::Lore => Box::new(Lore::azalea_read(buf)?), + DataComponentKind::Rarity => Box::new(Rarity::azalea_read(buf)?), + DataComponentKind::Enchantments => Box::new(Enchantments::azalea_read(buf)?), + DataComponentKind::CanPlaceOn => Box::new(CanPlaceOn::azalea_read(buf)?), + DataComponentKind::CanBreak => Box::new(CanBreak::azalea_read(buf)?), + DataComponentKind::AttributeModifiers => Box::new(AttributeModifiers::azalea_read(buf)?), + DataComponentKind::CustomModelData => Box::new(CustomModelData::azalea_read(buf)?), DataComponentKind::HideAdditionalTooltip => { - Box::new(HideAdditionalTooltip::read_from(buf)?) + Box::new(HideAdditionalTooltip::azalea_read(buf)?) } - DataComponentKind::HideTooltip => Box::new(HideTooltip::read_from(buf)?), - DataComponentKind::RepairCost => Box::new(RepairCost::read_from(buf)?), - DataComponentKind::CreativeSlotLock => Box::new(CreativeSlotLock::read_from(buf)?), + DataComponentKind::HideTooltip => Box::new(HideTooltip::azalea_read(buf)?), + DataComponentKind::RepairCost => Box::new(RepairCost::azalea_read(buf)?), + DataComponentKind::CreativeSlotLock => Box::new(CreativeSlotLock::azalea_read(buf)?), DataComponentKind::EnchantmentGlintOverride => { - Box::new(EnchantmentGlintOverride::read_from(buf)?) + Box::new(EnchantmentGlintOverride::azalea_read(buf)?) } - DataComponentKind::IntangibleProjectile => Box::new(IntangibleProjectile::read_from(buf)?), - DataComponentKind::Food => Box::new(Food::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)?), - DataComponentKind::MapColor => Box::new(MapColor::read_from(buf)?), - DataComponentKind::MapId => Box::new(MapId::read_from(buf)?), - DataComponentKind::MapDecorations => Box::new(MapDecorations::read_from(buf)?), - DataComponentKind::MapPostProcessing => Box::new(MapPostProcessing::read_from(buf)?), - DataComponentKind::ChargedProjectiles => Box::new(ChargedProjectiles::read_from(buf)?), - DataComponentKind::BundleContents => Box::new(BundleContents::read_from(buf)?), - DataComponentKind::PotionContents => Box::new(PotionContents::read_from(buf)?), + DataComponentKind::IntangibleProjectile => { + Box::new(IntangibleProjectile::azalea_read(buf)?) + } + DataComponentKind::Food => Box::new(Food::azalea_read(buf)?), + DataComponentKind::Tool => Box::new(Tool::azalea_read(buf)?), + DataComponentKind::StoredEnchantments => Box::new(StoredEnchantments::azalea_read(buf)?), + DataComponentKind::DyedColor => Box::new(DyedColor::azalea_read(buf)?), + DataComponentKind::MapColor => Box::new(MapColor::azalea_read(buf)?), + DataComponentKind::MapId => Box::new(MapId::azalea_read(buf)?), + DataComponentKind::MapDecorations => Box::new(MapDecorations::azalea_read(buf)?), + DataComponentKind::MapPostProcessing => Box::new(MapPostProcessing::azalea_read(buf)?), + DataComponentKind::ChargedProjectiles => Box::new(ChargedProjectiles::azalea_read(buf)?), + DataComponentKind::BundleContents => Box::new(BundleContents::azalea_read(buf)?), + DataComponentKind::PotionContents => Box::new(PotionContents::azalea_read(buf)?), DataComponentKind::SuspiciousStewEffects => { - Box::new(SuspiciousStewEffects::read_from(buf)?) + Box::new(SuspiciousStewEffects::azalea_read(buf)?) } - DataComponentKind::WritableBookContent => Box::new(WritableBookContent::read_from(buf)?), - DataComponentKind::WrittenBookContent => Box::new(WrittenBookContent::read_from(buf)?), - DataComponentKind::Trim => Box::new(Trim::read_from(buf)?), - DataComponentKind::DebugStickState => Box::new(DebugStickState::read_from(buf)?), - DataComponentKind::EntityData => Box::new(EntityData::read_from(buf)?), - DataComponentKind::BucketEntityData => Box::new(BucketEntityData::read_from(buf)?), - DataComponentKind::BlockEntityData => Box::new(BlockEntityData::read_from(buf)?), - DataComponentKind::Instrument => Box::new(Instrument::read_from(buf)?), + DataComponentKind::WritableBookContent => Box::new(WritableBookContent::azalea_read(buf)?), + DataComponentKind::WrittenBookContent => Box::new(WrittenBookContent::azalea_read(buf)?), + DataComponentKind::Trim => Box::new(Trim::azalea_read(buf)?), + DataComponentKind::DebugStickState => Box::new(DebugStickState::azalea_read(buf)?), + DataComponentKind::EntityData => Box::new(EntityData::azalea_read(buf)?), + DataComponentKind::BucketEntityData => Box::new(BucketEntityData::azalea_read(buf)?), + DataComponentKind::BlockEntityData => Box::new(BlockEntityData::azalea_read(buf)?), + DataComponentKind::Instrument => Box::new(Instrument::azalea_read(buf)?), DataComponentKind::OminousBottleAmplifier => { - Box::new(OminousBottleAmplifier::read_from(buf)?) + Box::new(OminousBottleAmplifier::azalea_read(buf)?) } - DataComponentKind::Recipes => Box::new(Recipes::read_from(buf)?), - DataComponentKind::LodestoneTracker => Box::new(LodestoneTracker::read_from(buf)?), - DataComponentKind::FireworkExplosion => Box::new(FireworkExplosion::read_from(buf)?), - DataComponentKind::Fireworks => Box::new(Fireworks::read_from(buf)?), - DataComponentKind::Profile => Box::new(Profile::read_from(buf)?), - DataComponentKind::NoteBlockSound => Box::new(NoteBlockSound::read_from(buf)?), - DataComponentKind::BannerPatterns => Box::new(BannerPatterns::read_from(buf)?), - DataComponentKind::BaseColor => Box::new(BaseColor::read_from(buf)?), - DataComponentKind::PotDecorations => Box::new(PotDecorations::read_from(buf)?), - DataComponentKind::Container => Box::new(Container::read_from(buf)?), - DataComponentKind::BlockState => Box::new(BlockState::read_from(buf)?), - 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 => 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)?), + DataComponentKind::Recipes => Box::new(Recipes::azalea_read(buf)?), + DataComponentKind::LodestoneTracker => Box::new(LodestoneTracker::azalea_read(buf)?), + DataComponentKind::FireworkExplosion => Box::new(FireworkExplosion::azalea_read(buf)?), + DataComponentKind::Fireworks => Box::new(Fireworks::azalea_read(buf)?), + DataComponentKind::Profile => Box::new(Profile::azalea_read(buf)?), + DataComponentKind::NoteBlockSound => Box::new(NoteBlockSound::azalea_read(buf)?), + DataComponentKind::BannerPatterns => Box::new(BannerPatterns::azalea_read(buf)?), + DataComponentKind::BaseColor => Box::new(BaseColor::azalea_read(buf)?), + DataComponentKind::PotDecorations => Box::new(PotDecorations::azalea_read(buf)?), + DataComponentKind::Container => Box::new(Container::azalea_read(buf)?), + DataComponentKind::BlockState => Box::new(BlockState::azalea_read(buf)?), + DataComponentKind::Bees => Box::new(Bees::azalea_read(buf)?), + DataComponentKind::Lock => Box::new(Lock::azalea_read(buf)?), + DataComponentKind::ContainerLoot => Box::new(ContainerLoot::azalea_read(buf)?), + DataComponentKind::JukeboxPlayable => Box::new(JukeboxPlayable::azalea_read(buf)?), + DataComponentKind::Consumable => Box::new(Consumable::azalea_read(buf)?), + DataComponentKind::UseRemainder => Box::new(UseRemainder::azalea_read(buf)?), + DataComponentKind::UseCooldown => Box::new(UseCooldown::azalea_read(buf)?), + DataComponentKind::Enchantable => Box::new(Enchantable::azalea_read(buf)?), + DataComponentKind::Repairable => Box::new(Repairable::azalea_read(buf)?), + DataComponentKind::ItemModel => Box::new(ItemModel::azalea_read(buf)?), + DataComponentKind::DamageResistant => Box::new(DamageResistant::azalea_read(buf)?), + DataComponentKind::Equippable => Box::new(Equippable::azalea_read(buf)?), + DataComponentKind::Glider => Box::new(Glider::azalea_read(buf)?), + DataComponentKind::TooltipStyle => Box::new(TooltipStyle::azalea_read(buf)?), + DataComponentKind::DeathProtection => Box::new(DeathProtection::azalea_read(buf)?), }) } diff --git a/azalea-inventory/src/slot.rs b/azalea-inventory/src/slot.rs index 968809c2e..1a1a89f96 100644 --- a/azalea-inventory/src/slot.rs +++ b/azalea-inventory/src/slot.rs @@ -141,13 +141,13 @@ impl ItemStackData { } impl McBufReadable for ItemStack { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let count = i32::var_read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let count = i32::azalea_read_var(buf)?; if count <= 0 { Ok(ItemStack::Empty) } else { - let kind = azalea_registry::Item::read_from(buf)?; - let components = DataComponentPatch::read_from(buf)?; + let kind = azalea_registry::Item::azalea_read(buf)?; + let components = DataComponentPatch::azalea_read(buf)?; Ok(ItemStack::Present(ItemStackData { count, kind, @@ -158,13 +158,13 @@ impl McBufReadable for ItemStack { } impl McBufWritable for ItemStack { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { match self { - ItemStack::Empty => 0.var_write_into(buf)?, + ItemStack::Empty => 0.azalea_write_var(buf)?, ItemStack::Present(i) => { - i.count.var_write_into(buf)?; - i.kind.write_into(buf)?; - i.components.write_into(buf)?; + i.count.azalea_write_var(buf)?; + i.kind.azalea_write(buf)?; + i.components.azalea_write(buf)?; } }; Ok(()) @@ -183,9 +183,9 @@ impl DataComponentPatch { } impl McBufReadable for DataComponentPatch { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let components_with_data_count = u32::var_read_from(buf)?; - let components_without_data_count = u32::var_read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let components_with_data_count = u32::azalea_read_var(buf)?; + let components_without_data_count = u32::azalea_read_var(buf)?; if components_without_data_count == 0 && components_with_data_count == 0 { return Ok(DataComponentPatch::default()); @@ -193,13 +193,13 @@ impl McBufReadable for DataComponentPatch { let mut components = HashMap::new(); for _ in 0..components_with_data_count { - let component_kind = DataComponentKind::read_from(buf)?; + let component_kind = DataComponentKind::azalea_read(buf)?; let component_data = components::from_kind(component_kind, buf)?; components.insert(component_kind, Some(component_data)); } for _ in 0..components_without_data_count { - let component_kind = DataComponentKind::read_from(buf)?; + let component_kind = DataComponentKind::azalea_read(buf)?; components.insert(component_kind, None); } @@ -208,7 +208,7 @@ impl McBufReadable for DataComponentPatch { } impl McBufWritable for DataComponentPatch { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut components_with_data_count = 0; let mut components_without_data_count = 0; for component in self.components.values() { @@ -219,21 +219,21 @@ impl McBufWritable for DataComponentPatch { } } - components_with_data_count.write_into(buf)?; - components_without_data_count.write_into(buf)?; + components_with_data_count.azalea_write(buf)?; + components_without_data_count.azalea_write(buf)?; for (kind, component) in &self.components { if let Some(component) = component { - kind.write_into(buf)?; + kind.azalea_write(buf)?; let mut component_buf = Vec::new(); component.encode(&mut component_buf).unwrap(); - component_buf.write_into(buf)?; + component_buf.azalea_write(buf)?; } } for (kind, component) in &self.components { if component.is_none() { - kind.write_into(buf)?; + kind.azalea_write(buf)?; } } diff --git a/azalea-protocol/azalea-protocol-macros/src/lib.rs b/azalea-protocol/azalea-protocol-macros/src/lib.rs index bf35456aa..dde36d333 100755 --- a/azalea-protocol/azalea-protocol-macros/src/lib.rs +++ b/azalea-protocol/azalea-protocol-macros/src/lib.rs @@ -21,14 +21,14 @@ fn as_packet_derive(input: TokenStream, state: proc_macro2::TokenStream) -> Toke let contents = quote! { impl #ident { pub fn write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { - azalea_buf::McBufWritable::write_into(self, buf) + azalea_buf::McBufWritable::azalea_write(self, buf) } pub fn read( buf: &mut std::io::Cursor<&[u8]>, ) -> Result<#state, azalea_buf::BufReadError> { use azalea_buf::McBufReadable; - Ok(Self::read_from(buf)?.into_variant()) + Ok(Self::azalea_read(buf)?.into_variant()) } /// Convert this packet into an variant for the enum of the state and direction. diff --git a/azalea-protocol/src/common.rs b/azalea-protocol/src/common.rs index 800914726..d9f99b500 100644 --- a/azalea-protocol/src/common.rs +++ b/azalea-protocol/src/common.rs @@ -98,8 +98,8 @@ impl Default for ModelCustomization { } impl McBufReadable for ModelCustomization { - fn read_from(buf: &mut std::io::Cursor<&[u8]>) -> Result { - let set = FixedBitSet::<7>::read_from(buf)?; + fn azalea_read(buf: &mut std::io::Cursor<&[u8]>) -> Result { + let set = FixedBitSet::<7>::azalea_read(buf)?; Ok(Self { cape: set.index(0), jacket: set.index(1), @@ -113,7 +113,7 @@ impl McBufReadable for ModelCustomization { } impl McBufWritable for ModelCustomization { - fn write_into(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { let mut set = FixedBitSet::<7>::new(); if self.cape { set.set(0); @@ -136,7 +136,7 @@ impl McBufWritable for ModelCustomization { if self.hat { set.set(6); } - set.write_into(buf) + set.azalea_write(buf) } } @@ -153,10 +153,10 @@ mod tests { { let data = ClientInformation::default(); let mut buf = Vec::new(); - data.write_into(&mut buf).unwrap(); + data.azalea_write(&mut buf).unwrap(); let mut data_cursor: Cursor<&[u8]> = Cursor::new(&buf); - let read_data = ClientInformation::read_from(&mut data_cursor).unwrap(); + let read_data = ClientInformation::azalea_read(&mut data_cursor).unwrap(); assert_eq!(read_data, data); } @@ -180,10 +180,10 @@ mod tests { particle_status: ParticleStatus::Decreased, }; let mut buf = Vec::new(); - data.write_into(&mut buf).unwrap(); + data.azalea_write(&mut buf).unwrap(); let mut data_cursor: Cursor<&[u8]> = Cursor::new(&buf); - let read_data = ClientInformation::read_from(&mut data_cursor).unwrap(); + let read_data = ClientInformation::azalea_read(&mut data_cursor).unwrap(); assert_eq!(read_data, data); } } diff --git a/azalea-protocol/src/packets/config/c_update_tags.rs b/azalea-protocol/src/packets/config/c_update_tags.rs index c8548007b..83a97e38c 100644 --- a/azalea-protocol/src/packets/config/c_update_tags.rs +++ b/azalea-protocol/src/packets/config/c_update_tags.rs @@ -22,15 +22,15 @@ pub struct Tags { pub struct TagMap(pub HashMap>); impl McBufReadable for TagMap { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let length = u32::var_read_from(buf)? as usize; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let length = u32::azalea_read_var(buf)? as usize; let mut data = HashMap::with_capacity(length); for _ in 0..length { - let tag_type = ResourceLocation::read_from(buf)?; - let tags_count = i32::var_read_from(buf)? as usize; + let tag_type = ResourceLocation::azalea_read(buf)?; + let tags_count = i32::azalea_read_var(buf)? as usize; let mut tags_vec = Vec::with_capacity(tags_count); for _ in 0..tags_count { - let tags = Tags::read_from(buf)?; + let tags = Tags::azalea_read(buf)?; tags_vec.push(tags); } data.insert(tag_type, tags_vec); @@ -40,27 +40,27 @@ impl McBufReadable for TagMap { } impl McBufWritable for TagMap { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - (self.len() as u32).var_write_into(buf)?; + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + (self.len() as u32).azalea_write_var(buf)?; for (k, v) in &self.0 { - k.write_into(buf)?; - v.write_into(buf)?; + k.azalea_write(buf)?; + v.azalea_write(buf)?; } Ok(()) } } impl McBufReadable for Tags { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let name = ResourceLocation::read_from(buf)?; - let elements = Vec::::var_read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let name = ResourceLocation::azalea_read(buf)?; + let elements = Vec::::azalea_read_var(buf)?; Ok(Tags { name, elements }) } } impl McBufWritable for Tags { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - self.name.write_into(buf)?; - self.elements.var_write_into(buf)?; + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + self.name.azalea_write(buf)?; + self.elements.azalea_write_var(buf)?; Ok(()) } } diff --git a/azalea-protocol/src/packets/game/c_boss_event.rs b/azalea-protocol/src/packets/game/c_boss_event.rs index 058c5f217..2e292afe5 100755 --- a/azalea-protocol/src/packets/game/c_boss_event.rs +++ b/azalea-protocol/src/packets/game/c_boss_event.rs @@ -26,15 +26,15 @@ pub enum Operation { } impl McBufReadable for Operation { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let operation_id = u32::var_read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let operation_id = u32::azalea_read_var(buf)?; Ok(match operation_id { - 0 => Operation::Add(AddOperation::read_from(buf)?), + 0 => Operation::Add(AddOperation::azalea_read(buf)?), 1 => Operation::Remove, - 2 => Operation::UpdateProgress(f32::read_from(buf)?), - 3 => Operation::UpdateName(FormattedText::read_from(buf)?), - 4 => Operation::UpdateStyle(Style::read_from(buf)?), - 5 => Operation::UpdateProperties(Properties::read_from(buf)?), + 2 => Operation::UpdateProgress(f32::azalea_read(buf)?), + 3 => Operation::UpdateName(FormattedText::azalea_read(buf)?), + 4 => Operation::UpdateStyle(Style::azalea_read(buf)?), + 5 => Operation::UpdateProperties(Properties::azalea_read(buf)?), _ => { return Err(BufReadError::UnexpectedEnumVariant { id: operation_id as i32, @@ -45,30 +45,30 @@ impl McBufReadable for Operation { } impl McBufWritable for Operation { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { match self { Operation::Add(add) => { - 0u32.var_write_into(buf)?; - add.write_into(buf)?; + 0u32.azalea_write_var(buf)?; + add.azalea_write(buf)?; } Operation::Remove => { - 1u32.var_write_into(buf)?; + 1u32.azalea_write_var(buf)?; } Operation::UpdateProgress(progress) => { - 2u32.var_write_into(buf)?; - progress.write_into(buf)?; + 2u32.azalea_write_var(buf)?; + progress.azalea_write(buf)?; } Operation::UpdateName(name) => { - 3u32.var_write_into(buf)?; - name.write_into(buf)?; + 3u32.azalea_write_var(buf)?; + name.azalea_write(buf)?; } Operation::UpdateStyle(style) => { - 4u32.var_write_into(buf)?; - style.write_into(buf)?; + 4u32.azalea_write_var(buf)?; + style.azalea_write(buf)?; } Operation::UpdateProperties(properties) => { - 5u32.var_write_into(buf)?; - properties.write_into(buf)?; + 5u32.azalea_write_var(buf)?; + properties.azalea_write(buf)?; } } Ok(()) @@ -117,8 +117,8 @@ pub struct Properties { } impl McBufReadable for Properties { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let set = FixedBitSet::<3>::read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let set = FixedBitSet::<3>::azalea_read(buf)?; Ok(Self { darken_screen: set.index(0), play_music: set.index(1), @@ -128,7 +128,7 @@ impl McBufReadable for Properties { } impl McBufWritable for Properties { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut set = FixedBitSet::<3>::new(); if self.darken_screen { set.set(0); @@ -139,7 +139,7 @@ impl McBufWritable for Properties { if self.create_world_fog { set.set(2); } - set.write_into(buf)?; + set.azalea_write(buf)?; Ok(()) } } diff --git a/azalea-protocol/src/packets/game/c_command_suggestions.rs b/azalea-protocol/src/packets/game/c_command_suggestions.rs index 18da6f64b..ed8b42299 100755 --- a/azalea-protocol/src/packets/game/c_command_suggestions.rs +++ b/azalea-protocol/src/packets/game/c_command_suggestions.rs @@ -29,9 +29,9 @@ mod tests { )], ); let mut buf = Vec::new(); - suggestions.write_into(&mut buf).unwrap(); + suggestions.azalea_write(&mut buf).unwrap(); let mut cursor = Cursor::new(&buf[..]); - let suggestions = Suggestions::read_from(&mut cursor).unwrap(); + let suggestions = Suggestions::azalea_read(&mut cursor).unwrap(); assert_eq!(suggestions, suggestions); } } diff --git a/azalea-protocol/src/packets/game/c_commands.rs b/azalea-protocol/src/packets/game/c_commands.rs index e772dc0dc..e1a20e6a4 100755 --- a/azalea-protocol/src/packets/game/c_commands.rs +++ b/azalea-protocol/src/packets/game/c_commands.rs @@ -47,15 +47,15 @@ impl PartialEq for BrigadierNumber { } impl McBufReadable for BrigadierNumber { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let flags = FixedBitSet::<2>::read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let flags = FixedBitSet::<2>::azalea_read(buf)?; let min = if flags.index(0) { - Some(T::read_from(buf)?) + Some(T::azalea_read(buf)?) } else { None }; let max = if flags.index(1) { - Some(T::read_from(buf)?) + Some(T::azalea_read(buf)?) } else { None }; @@ -63,7 +63,7 @@ impl McBufReadable for BrigadierNumber { } } impl McBufWritable for BrigadierNumber { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut flags = FixedBitSet::<2>::new(); if self.min.is_some() { flags.set(0); @@ -71,12 +71,12 @@ impl McBufWritable for BrigadierNumber { if self.max.is_some() { flags.set(1); } - flags.write_into(buf)?; + flags.azalea_write(buf)?; if let Some(min) = &self.min { - min.write_into(buf)?; + min.azalea_write(buf)?; } if let Some(max) = &self.max { - max.write_into(buf)?; + max.azalea_write(buf)?; } Ok(()) } @@ -157,8 +157,8 @@ pub struct EntityParser { pub players_only: bool, } impl McBufReadable for EntityParser { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let flags = FixedBitSet::<2>::read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let flags = FixedBitSet::<2>::azalea_read(buf)?; Ok(EntityParser { single: flags.index(0), players_only: flags.index(1), @@ -166,7 +166,7 @@ impl McBufReadable for EntityParser { } } impl McBufWritable for EntityParser { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut flags = FixedBitSet::<2>::new(); if self.single { flags.set(0); @@ -174,15 +174,15 @@ impl McBufWritable for EntityParser { if self.players_only { flags.set(1); } - flags.write_into(buf)?; + flags.azalea_write(buf)?; Ok(()) } } // TODO: BrigadierNodeStub should have more stuff impl McBufReadable for BrigadierNodeStub { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let flags = FixedBitSet::<8>::read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let flags = FixedBitSet::<8>::azalea_read(buf)?; if flags.index(5) || flags.index(6) || flags.index(7) { warn!("Warning: The flags from a Brigadier node are over 31. This is probably a bug.",); } @@ -192,19 +192,19 @@ impl McBufReadable for BrigadierNodeStub { let has_redirect = flags.index(3); let has_suggestions_type = flags.index(4); - let children = Vec::::var_read_from(buf)?; + let children = Vec::::azalea_read_var(buf)?; let redirect_node = if has_redirect { - Some(u32::var_read_from(buf)?) + Some(u32::azalea_read_var(buf)?) } else { None }; // argument node if node_type == 2 { - let name = String::read_from(buf)?; - let parser = BrigadierParser::read_from(buf)?; + let name = String::azalea_read(buf)?; + let parser = BrigadierParser::azalea_read(buf)?; let suggestions_type = if has_suggestions_type { - Some(ResourceLocation::read_from(buf)?) + Some(ResourceLocation::azalea_read(buf)?) } else { None }; @@ -222,7 +222,7 @@ impl McBufReadable for BrigadierNodeStub { } // literal node else if node_type == 1 { - let name = String::read_from(buf)?; + let name = String::azalea_read(buf)?; return Ok(BrigadierNodeStub { is_executable, children, @@ -240,7 +240,7 @@ impl McBufReadable for BrigadierNodeStub { } impl McBufWritable for BrigadierNodeStub { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut flags = FixedBitSet::<4>::new(); if self.is_executable { flags.set(2); @@ -251,25 +251,25 @@ impl McBufWritable for BrigadierNodeStub { match &self.node_type { NodeType::Root => { - flags.write_into(buf)?; + flags.azalea_write(buf)?; - self.children.var_write_into(buf)?; + self.children.azalea_write_var(buf)?; if let Some(redirect) = self.redirect_node { - redirect.var_write_into(buf)?; + redirect.azalea_write_var(buf)?; } } NodeType::Literal { name } => { flags.set(0); - flags.write_into(buf)?; + flags.azalea_write(buf)?; - self.children.var_write_into(buf)?; + self.children.azalea_write_var(buf)?; if let Some(redirect) = self.redirect_node { - redirect.var_write_into(buf)?; + redirect.azalea_write_var(buf)?; } - name.write_into(buf)?; + name.azalea_write(buf)?; } NodeType::Argument { name, @@ -280,19 +280,19 @@ impl McBufWritable for BrigadierNodeStub { if suggestions_type.is_some() { flags.set(4); } - flags.write_into(buf)?; + flags.azalea_write(buf)?; - self.children.var_write_into(buf)?; + self.children.azalea_write_var(buf)?; if let Some(redirect) = self.redirect_node { - redirect.var_write_into(buf)?; + redirect.azalea_write_var(buf)?; } - name.write_into(buf)?; - parser.write_into(buf)?; + name.azalea_write(buf)?; + parser.azalea_write(buf)?; if let Some(suggestion) = suggestions_type { - suggestion.write_into(buf)?; + suggestion.azalea_write(buf)?; } } } @@ -336,9 +336,9 @@ mod tests { node_type: NodeType::Root, }; let mut buf = Vec::new(); - data.write_into(&mut buf).unwrap(); + data.azalea_write(&mut buf).unwrap(); let mut data_cursor: Cursor<&[u8]> = Cursor::new(&buf); - let read_data = BrigadierNodeStub::read_from(&mut data_cursor).unwrap(); + let read_data = BrigadierNodeStub::azalea_read(&mut data_cursor).unwrap(); assert_eq!(data, read_data); } @@ -353,9 +353,9 @@ mod tests { }, }; let mut buf = Vec::new(); - data.write_into(&mut buf).unwrap(); + data.azalea_write(&mut buf).unwrap(); let mut data_cursor: Cursor<&[u8]> = Cursor::new(&buf); - let read_data = BrigadierNodeStub::read_from(&mut data_cursor).unwrap(); + let read_data = BrigadierNodeStub::azalea_read(&mut data_cursor).unwrap(); assert_eq!(data, read_data); } @@ -372,9 +372,9 @@ mod tests { }, }; let mut buf = Vec::new(); - data.write_into(&mut buf).unwrap(); + data.azalea_write(&mut buf).unwrap(); let mut data_cursor: Cursor<&[u8]> = Cursor::new(&buf); - let read_data = BrigadierNodeStub::read_from(&mut data_cursor).unwrap(); + let read_data = BrigadierNodeStub::azalea_read(&mut data_cursor).unwrap(); assert_eq!(data, read_data); } } diff --git a/azalea-protocol/src/packets/game/c_damage_event.rs b/azalea-protocol/src/packets/game/c_damage_event.rs index 9b579ac9e..73ce307df 100644 --- a/azalea-protocol/src/packets/game/c_damage_event.rs +++ b/azalea-protocol/src/packets/game/c_damage_event.rs @@ -18,18 +18,18 @@ pub struct ClientboundDamageEvent { #[derive(Clone, Debug)] pub struct OptionalEntityId(pub Option); impl McBufReadable for OptionalEntityId { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - match u32::var_read_from(buf)? { + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + match u32::azalea_read_var(buf)? { 0 => Ok(OptionalEntityId(None)), id => Ok(OptionalEntityId(Some(id - 1))), } } } impl McBufWritable for OptionalEntityId { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { match self.0 { - Some(id) => (id + 1).var_write_into(buf), - None => 0u32.var_write_into(buf), + Some(id) => (id + 1).azalea_write_var(buf), + None => 0u32.azalea_write_var(buf), } } } diff --git a/azalea-protocol/src/packets/game/c_explode.rs b/azalea-protocol/src/packets/game/c_explode.rs index 7a4496ffb..705d32a42 100755 --- a/azalea-protocol/src/packets/game/c_explode.rs +++ b/azalea-protocol/src/packets/game/c_explode.rs @@ -35,35 +35,35 @@ pub enum BlockInteraction { } impl McBufReadable for ClientboundExplode { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let x = f64::read_from(buf)?; - let y = f64::read_from(buf)?; - let z = f64::read_from(buf)?; - let power = f32::read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let x = f64::azalea_read(buf)?; + let y = f64::azalea_read(buf)?; + let z = f64::azalea_read(buf)?; + let power = f32::azalea_read(buf)?; let x_floor = x.floor() as i32; let y_floor = y.floor() as i32; let z_floor = z.floor() as i32; - let to_blow_len = u32::var_read_from(buf)?; + let to_blow_len = u32::azalea_read_var(buf)?; let mut to_blow = Vec::with_capacity(to_blow_len as usize); for _ in 0..to_blow_len { // the bytes are offsets from the main x y z - let x = x_floor + i32::from(i8::read_from(buf)?); - let y = y_floor + i32::from(i8::read_from(buf)?); - let z = z_floor + i32::from(i8::read_from(buf)?); + let x = x_floor + i32::from(i8::azalea_read(buf)?); + let y = y_floor + i32::from(i8::azalea_read(buf)?); + let z = z_floor + i32::from(i8::azalea_read(buf)?); to_blow.push(BlockPos { x, y, z }); } - let knockback_x = f32::read_from(buf)?; - let knockback_y = f32::read_from(buf)?; - let knockback_z = f32::read_from(buf)?; + let knockback_x = f32::azalea_read(buf)?; + let knockback_y = f32::azalea_read(buf)?; + let knockback_z = f32::azalea_read(buf)?; - let block_interaction = BlockInteraction::read_from(buf)?; - let small_explosion_particles = ParticleKind::read_from(buf)?; - let large_explosion_particles = ParticleKind::read_from(buf)?; + let block_interaction = BlockInteraction::azalea_read(buf)?; + let small_explosion_particles = ParticleKind::azalea_read(buf)?; + let large_explosion_particles = ParticleKind::azalea_read(buf)?; - let sound_event_resource_location = ResourceLocation::read_from(buf)?.to_string(); + let sound_event_resource_location = ResourceLocation::azalea_read(buf)?.to_string(); let explosion_sound = SoundEvent::from_str(&sound_event_resource_location).map_err(|_| { BufReadError::UnexpectedStringEnumVariant { @@ -89,14 +89,14 @@ impl McBufReadable for ClientboundExplode { } impl McBufWritable for ClientboundExplode { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - self.x.write_into(buf)?; - self.y.write_into(buf)?; - self.z.write_into(buf)?; - self.power.write_into(buf)?; + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + self.x.azalea_write(buf)?; + self.y.azalea_write(buf)?; + self.z.azalea_write(buf)?; + self.power.azalea_write(buf)?; let to_blow_len = self.to_blow.len() as u32; - to_blow_len.var_write_into(buf)?; + to_blow_len.azalea_write_var(buf)?; let x_floor = self.x.floor() as i32; let y_floor = self.y.floor() as i32; @@ -106,22 +106,22 @@ impl McBufWritable for ClientboundExplode { let x = (pos.x - x_floor) as i8; let y = (pos.y - y_floor) as i8; let z = (pos.z - z_floor) as i8; - x.write_into(buf)?; - y.write_into(buf)?; - z.write_into(buf)?; + x.azalea_write(buf)?; + y.azalea_write(buf)?; + z.azalea_write(buf)?; } - self.knockback_x.write_into(buf)?; - self.knockback_y.write_into(buf)?; - self.knockback_z.write_into(buf)?; + self.knockback_x.azalea_write(buf)?; + self.knockback_y.azalea_write(buf)?; + self.knockback_z.azalea_write(buf)?; - self.block_interaction.write_into(buf)?; - self.small_explosion_particles.write_into(buf)?; - self.large_explosion_particles.write_into(buf)?; + self.block_interaction.azalea_write(buf)?; + self.small_explosion_particles.azalea_write(buf)?; + self.large_explosion_particles.azalea_write(buf)?; let sound_event_resource_location = ResourceLocation::new(&self.explosion_sound.to_string()); - sound_event_resource_location.write_into(buf)?; + sound_event_resource_location.azalea_write(buf)?; Ok(()) } @@ -159,8 +159,8 @@ mod tests { explosion_sound: SoundEvent::EntityGenericExplode, }; let mut buf = Vec::new(); - packet.write_into(&mut buf).unwrap(); - let packet2 = ClientboundExplode::read_from(&mut Cursor::new(&buf)).unwrap(); + packet.azalea_write(&mut buf).unwrap(); + let packet2 = ClientboundExplode::azalea_read(&mut Cursor::new(&buf)).unwrap(); assert_eq!(packet, packet2); } } diff --git a/azalea-protocol/src/packets/game/c_level_chunk_with_light.rs b/azalea-protocol/src/packets/game/c_level_chunk_with_light.rs index da81871dd..336cf1901 100755 --- a/azalea-protocol/src/packets/game/c_level_chunk_with_light.rs +++ b/azalea-protocol/src/packets/game/c_level_chunk_with_light.rs @@ -45,7 +45,7 @@ mod tests { 255, 255, 255, 253, 0, 0, 0, 1, 10, 12, 0, 15, 77, 79, 84, 73, 79, 78, 95, 66, 76, 79, 67, 75, 73, 78, 71, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 240, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 195, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 33, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 170, 37, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 4, 2, 0, 137, 51, 128, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 16, 0, 0, 0, 0, 0, 0, 1, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 4, 2, 0, 137, 51, 128, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 16, 0, 0, 0, 0, 0, 0, 1, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 1, 2, 140, 1, 1, 4, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 4, 128, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 128, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 32, 67, 101, 0, 0, 0, 0, 0, 32, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 16, 50, 84, 118, 152, 186, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 16, 50, 84, 118, 152, 186, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 16, 50, 84, 118, 152, 186, 0, 0, 33, 67, 101, 135, 169, 203, 0, 0, 16, 50, 84, 118, 152, 186, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 16, 50, 84, 118, 152, 186, 0, 0, 33, 67, 101, 135, 169, 203, 0, 0, 16, 50, 84, 118, 152, 186, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 16, 50, 84, 118, 152, 186, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 16, 50, 84, 118, 152, 186, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 33, 67, 101, 135, 169, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 16, 50, 84, 118, 152, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 33, 67, 101, 135, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 16, 50, 84, 118, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 33, 67, 101, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 128, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 16, 50, 84, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 16, 50, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; - let packet = ClientboundLevelChunkWithLight::read_from(&mut Cursor::new(&bytes)).unwrap(); + let packet = ClientboundLevelChunkWithLight::azalea_read(&mut Cursor::new(&bytes)).unwrap(); let heightmaps_nbt = &packet.chunk_data.heightmaps; // necessary to make the unwrap_or work diff --git a/azalea-protocol/src/packets/game/c_level_particles.rs b/azalea-protocol/src/packets/game/c_level_particles.rs index 9d5c363b2..d1c8bdb27 100755 --- a/azalea-protocol/src/packets/game/c_level_particles.rs +++ b/azalea-protocol/src/packets/game/c_level_particles.rs @@ -33,7 +33,7 @@ mod tests { ][..]; let mut bytes = Cursor::new(slice); - let _packet = ClientboundLevelParticles::read_from(&mut bytes).unwrap(); + let _packet = ClientboundLevelParticles::azalea_read(&mut bytes).unwrap(); assert_eq!(bytes.position(), slice.len() as u64); } } diff --git a/azalea-protocol/src/packets/game/c_map_item_data.rs b/azalea-protocol/src/packets/game/c_map_item_data.rs index 62d51db2b..6123c494b 100755 --- a/azalea-protocol/src/packets/game/c_map_item_data.rs +++ b/azalea-protocol/src/packets/game/c_map_item_data.rs @@ -27,22 +27,22 @@ pub struct MapDecoration { pub struct OptionalMapPatch(pub Option); impl McBufReadable for OptionalMapPatch { - fn read_from(buf: &mut std::io::Cursor<&[u8]>) -> Result { + fn azalea_read(buf: &mut std::io::Cursor<&[u8]>) -> Result { let pos = buf.position(); - Ok(Self(if u8::read_from(buf)? == 0 { + Ok(Self(if u8::azalea_read(buf)? == 0 { None } else { buf.set_position(pos); - Some(MapPatch::read_from(buf)?) + Some(MapPatch::azalea_read(buf)?) })) } } impl McBufWritable for OptionalMapPatch { - fn write_into(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { match &self.0 { - None => 0u8.write_into(buf), - Some(m) => m.write_into(buf), + None => 0u8.azalea_write(buf), + Some(m) => m.azalea_write(buf), } } } diff --git a/azalea-protocol/src/packets/game/c_player_abilities.rs b/azalea-protocol/src/packets/game/c_player_abilities.rs index a99714c34..0e21d3d6b 100755 --- a/azalea-protocol/src/packets/game/c_player_abilities.rs +++ b/azalea-protocol/src/packets/game/c_player_abilities.rs @@ -22,8 +22,8 @@ pub struct PlayerAbilitiesFlags { } impl McBufReadable for PlayerAbilitiesFlags { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let set = FixedBitSet::<4>::read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let set = FixedBitSet::<4>::azalea_read(buf)?; Ok(PlayerAbilitiesFlags { invulnerable: set.index(0), flying: set.index(1), @@ -34,7 +34,7 @@ impl McBufReadable for PlayerAbilitiesFlags { } impl McBufWritable for PlayerAbilitiesFlags { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut set = FixedBitSet::<4>::new(); if self.invulnerable { set.set(0); @@ -48,6 +48,6 @@ impl McBufWritable for PlayerAbilitiesFlags { if self.instant_break { set.set(3); } - set.write_into(buf) + set.azalea_write(buf) } } diff --git a/azalea-protocol/src/packets/game/c_player_chat.rs b/azalea-protocol/src/packets/game/c_player_chat.rs index a3f445157..62ad7322f 100644 --- a/azalea-protocol/src/packets/game/c_player_chat.rs +++ b/azalea-protocol/src/packets/game/c_player_chat.rs @@ -145,10 +145,10 @@ impl ChatType { } impl McBufReadable for PackedMessageSignature { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let id = u32::var_read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let id = u32::azalea_read_var(buf)?; if id == 0 { - let full_signature = MessageSignature::read_from(buf)?; + let full_signature = MessageSignature::azalea_read(buf)?; Ok(PackedMessageSignature::Signature(Box::new(full_signature))) } else { @@ -157,14 +157,14 @@ impl McBufReadable for PackedMessageSignature { } } impl McBufWritable for PackedMessageSignature { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { match self { PackedMessageSignature::Signature(full_signature) => { - 0u32.var_write_into(buf)?; - full_signature.write_into(buf)?; + 0u32.azalea_write_var(buf)?; + full_signature.azalea_write(buf)?; } PackedMessageSignature::Id(id) => { - (id + 1).var_write_into(buf)?; + (id + 1).azalea_write_var(buf)?; } } Ok(()) @@ -197,6 +197,6 @@ mod tests { 105, 115, 97, 8, 0, 4, 116, 101, 120, 116, 0, 0, 0, 0, ][..], ); - let _packet = ClientboundPlayerChat::read_from(&mut bytes).unwrap(); + let _packet = ClientboundPlayerChat::azalea_read(&mut bytes).unwrap(); } } diff --git a/azalea-protocol/src/packets/game/c_player_info_update.rs b/azalea-protocol/src/packets/game/c_player_info_update.rs index 8c2c94ddf..1232014b4 100644 --- a/azalea-protocol/src/packets/game/c_player_info_update.rs +++ b/azalea-protocol/src/packets/game/c_player_info_update.rs @@ -64,43 +64,43 @@ pub struct UpdateListOrderAction { } impl McBufReadable for ClientboundPlayerInfoUpdate { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let actions = ActionEnumSet::read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let actions = ActionEnumSet::azalea_read(buf)?; let mut entries = Vec::new(); - let entry_count = u32::var_read_from(buf)?; + let entry_count = u32::azalea_read_var(buf)?; for _ in 0..entry_count { - let profile_id = Uuid::read_from(buf)?; + let profile_id = Uuid::azalea_read(buf)?; let mut entry = PlayerInfoEntry::default(); entry.profile.uuid = profile_id; if actions.add_player { - let action = AddPlayerAction::read_from(buf)?; + let action = AddPlayerAction::azalea_read(buf)?; entry.profile.name = action.name; entry.profile.properties = action.properties; } if actions.initialize_chat { - let action = InitializeChatAction::read_from(buf)?; + let action = InitializeChatAction::azalea_read(buf)?; entry.chat_session = action.chat_session; } if actions.update_game_mode { - let action = UpdateGameModeAction::read_from(buf)?; + let action = UpdateGameModeAction::azalea_read(buf)?; entry.game_mode = action.game_mode; } if actions.update_listed { - let action = UpdateListedAction::read_from(buf)?; + let action = UpdateListedAction::azalea_read(buf)?; entry.listed = action.listed; } if actions.update_latency { - let action = UpdateLatencyAction::read_from(buf)?; + let action = UpdateLatencyAction::azalea_read(buf)?; entry.latency = action.latency; } if actions.update_display_name { - let action = UpdateDisplayNameAction::read_from(buf)?; + let action = UpdateDisplayNameAction::azalea_read(buf)?; entry.display_name = action.display_name; } if actions.update_list_order { - let action = UpdateListOrderAction::read_from(buf)?; + let action = UpdateListOrderAction::azalea_read(buf)?; entry.list_order = action.list_order; } @@ -112,49 +112,49 @@ impl McBufReadable for ClientboundPlayerInfoUpdate { } impl McBufWritable for ClientboundPlayerInfoUpdate { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - self.actions.write_into(buf)?; + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + self.actions.azalea_write(buf)?; - (self.entries.len() as u32).var_write_into(buf)?; + (self.entries.len() as u32).azalea_write_var(buf)?; for entry in &self.entries { - entry.profile.uuid.write_into(buf)?; + entry.profile.uuid.azalea_write(buf)?; if self.actions.add_player { AddPlayerAction { name: entry.profile.name.clone(), properties: entry.profile.properties.clone(), } - .write_into(buf)?; + .azalea_write(buf)?; } if self.actions.initialize_chat { InitializeChatAction { chat_session: entry.chat_session.clone(), } - .write_into(buf)?; + .azalea_write(buf)?; } if self.actions.update_game_mode { UpdateGameModeAction { game_mode: entry.game_mode, } - .write_into(buf)?; + .azalea_write(buf)?; } if self.actions.update_listed { UpdateListedAction { listed: entry.listed, } - .write_into(buf)?; + .azalea_write(buf)?; } if self.actions.update_latency { UpdateLatencyAction { latency: entry.latency, } - .write_into(buf)?; + .azalea_write(buf)?; } if self.actions.update_display_name { UpdateDisplayNameAction { display_name: entry.display_name.clone(), } - .write_into(buf)?; + .azalea_write(buf)?; } } @@ -174,8 +174,8 @@ pub struct ActionEnumSet { } impl McBufReadable for ActionEnumSet { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let set = FixedBitSet::<7>::read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let set = FixedBitSet::<7>::azalea_read(buf)?; Ok(ActionEnumSet { add_player: set.index(0), initialize_chat: set.index(1), @@ -189,7 +189,7 @@ impl McBufReadable for ActionEnumSet { } impl McBufWritable for ActionEnumSet { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut set = FixedBitSet::<7>::new(); if self.add_player { set.set(0); @@ -212,7 +212,7 @@ impl McBufWritable for ActionEnumSet { if self.update_list_order { set.set(6); } - set.write_into(buf)?; + set.azalea_write(buf)?; Ok(()) } } @@ -233,9 +233,9 @@ mod tests { update_list_order: true, }; let mut buf = Vec::new(); - data.write_into(&mut buf).unwrap(); + data.azalea_write(&mut buf).unwrap(); let mut data_cursor: Cursor<&[u8]> = Cursor::new(&buf); - let read_data = ActionEnumSet::read_from(&mut data_cursor).unwrap(); + let read_data = ActionEnumSet::azalea_read(&mut data_cursor).unwrap(); assert_eq!(read_data, data); } @@ -308,6 +308,6 @@ mod tests { 0, ][..], ); - let _packet = ClientboundPlayerInfoUpdate::read_from(&mut bytes).unwrap(); + let _packet = ClientboundPlayerInfoUpdate::azalea_read(&mut bytes).unwrap(); } } diff --git a/azalea-protocol/src/packets/game/c_player_position.rs b/azalea-protocol/src/packets/game/c_player_position.rs index 2f6993856..4ea5c4ccb 100755 --- a/azalea-protocol/src/packets/game/c_player_position.rs +++ b/azalea-protocol/src/packets/game/c_player_position.rs @@ -25,9 +25,9 @@ pub struct RelativeMovements { } impl McBufReadable for RelativeMovements { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { // yes minecraft seriously wastes that many bits, smh - let set = FixedBitSet::<32>::read_from(buf)?; + let set = FixedBitSet::<32>::azalea_read(buf)?; Ok(RelativeMovements { x: set.index(0), y: set.index(1), @@ -39,7 +39,7 @@ impl McBufReadable for RelativeMovements { } impl McBufWritable for RelativeMovements { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut set = FixedBitSet::<5>::new(); if self.x { set.set(0); @@ -56,6 +56,6 @@ impl McBufWritable for RelativeMovements { if self.x_rot { set.set(4); } - set.write_into(buf) + set.azalea_write(buf) } } diff --git a/azalea-protocol/src/packets/game/c_section_blocks_update.rs b/azalea-protocol/src/packets/game/c_section_blocks_update.rs index fdadd2ef5..29312e787 100755 --- a/azalea-protocol/src/packets/game/c_section_blocks_update.rs +++ b/azalea-protocol/src/packets/game/c_section_blocks_update.rs @@ -20,8 +20,8 @@ pub struct BlockStateWithPosition { } impl McBufReadable for BlockStateWithPosition { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let data = u64::var_read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let data = u64::azalea_read_var(buf)?; let position_part = data & 4095; let state = (data >> 12) as u32; let state = BlockState::try_from(state) @@ -36,10 +36,10 @@ impl McBufReadable for BlockStateWithPosition { } impl McBufWritable for BlockStateWithPosition { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let data = (self.state.id as u64) << 12 | (u64::from(self.pos.x) << 8 | u64::from(self.pos.z) << 4 | u64::from(self.pos.y)); - u64::var_write_into(&data, buf)?; + u64::azalea_write_var(&data, buf)?; Ok(()) } } diff --git a/azalea-protocol/src/packets/game/c_set_equipment.rs b/azalea-protocol/src/packets/game/c_set_equipment.rs index f043544b2..c57a60cc1 100755 --- a/azalea-protocol/src/packets/game/c_set_equipment.rs +++ b/azalea-protocol/src/packets/game/c_set_equipment.rs @@ -18,18 +18,18 @@ pub struct EquipmentSlots { } impl McBufReadable for EquipmentSlots { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let mut slots = vec![]; loop { - let equipment_byte = u8::read_from(buf)?; + let equipment_byte = u8::azalea_read(buf)?; let equipment_slot = EquipmentSlot::from_byte(equipment_byte & 127).ok_or_else(|| { BufReadError::UnexpectedEnumVariant { id: equipment_byte.into(), } })?; - let item = ItemStack::read_from(buf)?; + let item = ItemStack::azalea_read(buf)?; slots.push((equipment_slot, item)); if equipment_byte & 128 == 0 { break; @@ -40,15 +40,15 @@ impl McBufReadable for EquipmentSlots { } } impl McBufWritable for EquipmentSlots { - fn write_into(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { for i in 0..self.slots.len() { let (equipment_slot, item) = &self.slots[i]; let mut equipment_byte = *equipment_slot as u8; if i != self.slots.len() - 1 { equipment_byte |= 128; } - equipment_byte.write_into(buf)?; - item.write_into(buf)?; + equipment_byte.azalea_write(buf)?; + item.azalea_write(buf)?; } Ok(()) diff --git a/azalea-protocol/src/packets/game/c_set_objective.rs b/azalea-protocol/src/packets/game/c_set_objective.rs index cb84d1a70..d1c2f96fc 100755 --- a/azalea-protocol/src/packets/game/c_set_objective.rs +++ b/azalea-protocol/src/packets/game/c_set_objective.rs @@ -34,47 +34,47 @@ pub enum Method { } impl McBufReadable for Method { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let kind = MethodKind::read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let kind = MethodKind::azalea_read(buf)?; match kind { MethodKind::Add => Ok(Method::Add { - display_name: FormattedText::read_from(buf)?, - render_type: ObjectiveCriteria::read_from(buf)?, - number_format: NumberFormat::read_from(buf)?, + display_name: FormattedText::azalea_read(buf)?, + render_type: ObjectiveCriteria::azalea_read(buf)?, + number_format: NumberFormat::azalea_read(buf)?, }), MethodKind::Remove => Ok(Method::Remove), MethodKind::Change => Ok(Method::Change { - display_name: FormattedText::read_from(buf)?, - render_type: ObjectiveCriteria::read_from(buf)?, - number_format: NumberFormat::read_from(buf)?, + display_name: FormattedText::azalea_read(buf)?, + render_type: ObjectiveCriteria::azalea_read(buf)?, + number_format: NumberFormat::azalea_read(buf)?, }), } } } impl McBufWritable for Method { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { match self { Method::Add { display_name, render_type, number_format, } => { - MethodKind::Add.write_into(buf)?; - display_name.write_into(buf)?; - render_type.write_into(buf)?; - number_format.write_into(buf)?; + MethodKind::Add.azalea_write(buf)?; + display_name.azalea_write(buf)?; + render_type.azalea_write(buf)?; + number_format.azalea_write(buf)?; } - Method::Remove => MethodKind::Remove.write_into(buf)?, + Method::Remove => MethodKind::Remove.azalea_write(buf)?, Method::Change { display_name, render_type, number_format, } => { - MethodKind::Change.write_into(buf)?; - display_name.write_into(buf)?; - render_type.write_into(buf)?; - number_format.write_into(buf)?; + MethodKind::Change.azalea_write(buf)?; + display_name.azalea_write(buf)?; + render_type.azalea_write(buf)?; + number_format.azalea_write(buf)?; } } Ok(()) diff --git a/azalea-protocol/src/packets/game/c_set_player_team.rs b/azalea-protocol/src/packets/game/c_set_player_team.rs index c9ded1b7b..b5924a9cc 100755 --- a/azalea-protocol/src/packets/game/c_set_player_team.rs +++ b/azalea-protocol/src/packets/game/c_set_player_team.rs @@ -20,40 +20,40 @@ pub enum Method { } impl McBufReadable for Method { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - Ok(match u8::read_from(buf)? { - 0 => Method::Add((Parameters::read_from(buf)?, PlayerList::read_from(buf)?)), + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + Ok(match u8::azalea_read(buf)? { + 0 => Method::Add((Parameters::azalea_read(buf)?, PlayerList::azalea_read(buf)?)), 1 => Method::Remove, - 2 => Method::Change(Parameters::read_from(buf)?), - 3 => Method::Join(PlayerList::read_from(buf)?), - 4 => Method::Leave(PlayerList::read_from(buf)?), + 2 => Method::Change(Parameters::azalea_read(buf)?), + 3 => Method::Join(PlayerList::azalea_read(buf)?), + 4 => Method::Leave(PlayerList::azalea_read(buf)?), id => return Err(BufReadError::UnexpectedEnumVariant { id: i32::from(id) }), }) } } impl McBufWritable for Method { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { match self { Method::Add((parameters, playerlist)) => { - 0u8.write_into(buf)?; - parameters.write_into(buf)?; - playerlist.write_into(buf)?; + 0u8.azalea_write(buf)?; + parameters.azalea_write(buf)?; + playerlist.azalea_write(buf)?; } Method::Remove => { - 1u8.write_into(buf)?; + 1u8.azalea_write(buf)?; } Method::Change(parameters) => { - 2u8.write_into(buf)?; - parameters.write_into(buf)?; + 2u8.azalea_write(buf)?; + parameters.azalea_write(buf)?; } Method::Join(playerlist) => { - 3u8.write_into(buf)?; - playerlist.write_into(buf)?; + 3u8.azalea_write(buf)?; + playerlist.azalea_write(buf)?; } Method::Leave(playerlist) => { - 4u8.write_into(buf)?; - playerlist.write_into(buf)?; + 4u8.azalea_write(buf)?; + playerlist.azalea_write(buf)?; } } Ok(()) diff --git a/azalea-protocol/src/packets/game/c_stop_sound.rs b/azalea-protocol/src/packets/game/c_stop_sound.rs index 33ea9e12f..7fc8bcf15 100755 --- a/azalea-protocol/src/packets/game/c_stop_sound.rs +++ b/azalea-protocol/src/packets/game/c_stop_sound.rs @@ -13,15 +13,15 @@ pub struct ClientboundStopSound { } impl McBufReadable for ClientboundStopSound { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let set = FixedBitSet::<2>::read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let set = FixedBitSet::<2>::azalea_read(buf)?; let source = if set.index(0) { - Some(SoundSource::read_from(buf)?) + Some(SoundSource::azalea_read(buf)?) } else { None }; let name = if set.index(1) { - Some(ResourceLocation::read_from(buf)?) + Some(ResourceLocation::azalea_read(buf)?) } else { None }; @@ -31,7 +31,7 @@ impl McBufReadable for ClientboundStopSound { } impl McBufWritable for ClientboundStopSound { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut set = FixedBitSet::<2>::new(); if self.source.is_some() { set.set(0); @@ -39,12 +39,12 @@ impl McBufWritable for ClientboundStopSound { if self.name.is_some() { set.set(1); } - set.write_into(buf)?; + set.azalea_write(buf)?; if let Some(source) = &self.source { - source.write_into(buf)?; + source.azalea_write(buf)?; } if let Some(name) = &self.name { - name.write_into(buf)?; + name.azalea_write(buf)?; } Ok(()) } diff --git a/azalea-protocol/src/packets/game/c_system_chat.rs b/azalea-protocol/src/packets/game/c_system_chat.rs index 70088a315..9055f8399 100755 --- a/azalea-protocol/src/packets/game/c_system_chat.rs +++ b/azalea-protocol/src/packets/game/c_system_chat.rs @@ -23,7 +23,7 @@ mod tests { 10, 9, 0, 4, 119, 105, 116, 104, 10, 0, 0, 0, 2, 10, 0, 10, 104, 111, 118, 101, 114, 69, 118, 101, 110, 116, 10, 0, 8, 99, 111, 110, 116, 101, 110, 116, 115, 8, 0, 4, 110, 97, 109, 101, 0, 3, 112, 121, 53, 11, 0, 2, 105, 100, 0, 0, 0, 4, 101, 54, 191, 237, 134, 149, 72, 253, 131, 161, 236, 210, 76, 242, 160, 253, 8, 0, 4, 116, 121, 112, 101, 0, 16, 109, 105, 110, 101, 99, 114, 97, 102, 116, 58, 112, 108, 97, 121, 101, 114, 0, 8, 0, 6, 97, 99, 116, 105, 111, 110, 0, 11, 115, 104, 111, 119, 95, 101, 110, 116, 105, 116, 121, 0, 10, 0, 10, 99, 108, 105, 99, 107, 69, 118, 101, 110, 116, 8, 0, 6, 97, 99, 116, 105, 111, 110, 0, 15, 115, 117, 103, 103, 101, 115, 116, 95, 99, 111, 109, 109, 97, 110, 100, 8, 0, 5, 118, 97, 108, 117, 101, 0, 10, 47, 116, 101, 108, 108, 32, 112, 121, 53, 32, 0, 8, 0, 9, 105, 110, 115, 101, 114, 116, 105, 111, 110, 0, 3, 112, 121, 53, 8, 0, 4, 116, 101, 120, 116, 0, 3, 112, 121, 53, 0, 9, 0, 4, 119, 105, 116, 104, 10, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 1, 0, 10, 0, 10, 104, 111, 118, 101, 114, 69, 118, 101, 110, 116, 10, 0, 8, 99, 111, 110, 116, 101, 110, 116, 115, 8, 0, 2, 105, 100, 0, 25, 109, 105, 110, 101, 99, 114, 97, 102, 116, 58, 100, 105, 97, 109, 111, 110, 100, 95, 112, 105, 99, 107, 97, 120, 101, 8, 0, 3, 116, 97, 103, 0, 10, 123, 68, 97, 109, 97, 103, 101, 58, 48, 125, 0, 8, 0, 6, 97, 99, 116, 105, 111, 110, 0, 9, 115, 104, 111, 119, 95, 105, 116, 101, 109, 0, 9, 0, 4, 119, 105, 116, 104, 10, 0, 0, 0, 1, 9, 0, 5, 101, 120, 116, 114, 97, 10, 0, 0, 0, 1, 8, 0, 9, 116, 114, 97, 110, 115, 108, 97, 116, 101, 0, 30, 105, 116, 101, 109, 46, 109, 105, 110, 101, 99, 114, 97, 102, 116, 46, 100, 105, 97, 109, 111, 110, 100, 95, 112, 105, 99, 107, 97, 120, 101, 0, 8, 0, 4, 116, 101, 120, 116, 0, 0, 0, 8, 0, 5, 99, 111, 108, 111, 114, 0, 5, 119, 104, 105, 116, 101, 8, 0, 9, 116, 114, 97, 110, 115, 108, 97, 116, 101, 0, 20, 99, 104, 97, 116, 46, 115, 113, 117, 97, 114, 101, 95, 98, 114, 97, 99, 107, 101, 116, 115, 0, 10, 0, 10, 104, 111, 118, 101, 114, 69, 118, 101, 110, 116, 10, 0, 8, 99, 111, 110, 116, 101, 110, 116, 115, 8, 0, 4, 110, 97, 109, 101, 0, 3, 112, 121, 53, 11, 0, 2, 105, 100, 0, 0, 0, 4, 101, 54, 191, 237, 134, 149, 72, 253, 131, 161, 236, 210, 76, 242, 160, 253, 8, 0, 4, 116, 121, 112, 101, 0, 16, 109, 105, 110, 101, 99, 114, 97, 102, 116, 58, 112, 108, 97, 121, 101, 114, 0, 8, 0, 6, 97, 99, 116, 105, 111, 110, 0, 11, 115, 104, 111, 119, 95, 101, 110, 116, 105, 116, 121, 0, 10, 0, 10, 99, 108, 105, 99, 107, 69, 118, 101, 110, 116, 8, 0, 6, 97, 99, 116, 105, 111, 110, 0, 15, 115, 117, 103, 103, 101, 115, 116, 95, 99, 111, 109, 109, 97, 110, 100, 8, 0, 5, 118, 97, 108, 117, 101, 0, 10, 47, 116, 101, 108, 108, 32, 112, 121, 53, 32, 0, 8, 0, 9, 105, 110, 115, 101, 114, 116, 105, 111, 110, 0, 3, 112, 121, 53, 8, 0, 4, 116, 101, 120, 116, 0, 3, 112, 121, 53, 0, 8, 0, 9, 116, 114, 97, 110, 115, 108, 97, 116, 101, 0, 28, 99, 111, 109, 109, 97, 110, 100, 115, 46, 103, 105, 118, 101, 46, 115, 117, 99, 99, 101, 115, 115, 46, 115, 105, 110, 103, 108, 101, 0, 8, 0, 5, 99, 111, 108, 111, 114, 0, 4, 103, 114, 97, 121, 1, 0, 6, 105, 116, 97, 108, 105, 99, 1, 8, 0, 9, 116, 114, 97, 110, 115, 108, 97, 116, 101, 0, 15, 99, 104, 97, 116, 46, 116, 121, 112, 101, 46, 97, 100, 109, 105, 110, 0, 0 ]; - let packet = ClientboundSystemChat::read_from(&mut Cursor::new(&bytes)).unwrap(); + let packet = ClientboundSystemChat::azalea_read(&mut Cursor::new(&bytes)).unwrap(); assert_eq!( packet.content.to_string(), "[py5: Gave 1 [Diamond Pickaxe] to py5]".to_string() @@ -36,7 +36,7 @@ mod tests { let bytes = [ 10, 9, 0, 4, 119, 105, 116, 104, 8, 0, 0, 0, 1, 0, 14, 109, 105, 110, 101, 99, 114, 97, 102, 116, 58, 100, 117, 115, 116, 8, 0, 9, 116, 114, 97, 110, 115, 108, 97, 116, 101, 0, 25, 99, 111, 109, 109, 97, 110, 100, 115, 46, 112, 97, 114, 116, 105, 99, 108, 101, 46, 115, 117, 99, 99, 101, 115, 115, 0, 0 ]; - let packet = ClientboundSystemChat::read_from(&mut Cursor::new(&bytes)).unwrap(); + let packet = ClientboundSystemChat::azalea_read(&mut Cursor::new(&bytes)).unwrap(); assert_eq!( packet.content.to_string(), "Displaying particle minecraft:dust".to_string() diff --git a/azalea-protocol/src/packets/game/c_tab_list.rs b/azalea-protocol/src/packets/game/c_tab_list.rs index 773716829..71a908600 100755 --- a/azalea-protocol/src/packets/game/c_tab_list.rs +++ b/azalea-protocol/src/packets/game/c_tab_list.rs @@ -22,7 +22,7 @@ mod tests { let mut bytes = Cursor::new(&[ 10, 9, 0, 5, 101, 120, 116, 114, 97, 10, 0, 0, 0, 3, 1, 0, 4, 98, 111, 108, 100, 1, 8, 0, 4, 116, 101, 120, 116, 0, 16, 50, 66, 85, 73, 76, 68, 69, 82, 83, 50, 84, 79, 79, 76, 83, 10, 8, 0, 5, 99, 111, 108, 111, 114, 0, 4, 103, 114, 97, 121, 0, 8, 0, 0, 0, 1, 10, 0, 8, 0, 5, 99, 111, 108, 111, 114, 0, 4, 103, 111, 108, 100, 8, 0, 4, 116, 101, 120, 116, 0, 27, 80, 101, 110, 100, 105, 110, 103, 32, 99, 111, 110, 110, 101, 99, 116, 105, 111, 110, 32, 116, 111, 32, 50, 98, 50, 116, 10, 0, 8, 0, 4, 116, 101, 120, 116, 0, 1, 10, 0, 10, 9, 0, 5, 101, 120, 116, 114, 97, 10, 0, 0, 0, 1, 8, 0, 5, 99, 111, 108, 111, 114, 0, 4, 103, 111, 108, 100, 8, 0, 4, 116, 101, 120, 116, 0, 72, 84, 104, 105, 115, 32, 97, 99, 99, 111, 117, 110, 116, 32, 104, 97, 115, 32, 112, 114, 105, 111, 114, 105, 116, 121, 32, 115, 116, 97, 116, 117, 115, 32, 97, 110, 100, 32, 119, 105, 108, 108, 32, 98, 101, 32, 112, 108, 97, 99, 101, 100, 32, 105, 110, 32, 97, 32, 115, 104, 111, 114, 116, 101, 114, 32, 113, 117, 101, 117, 101, 46, 10, 0, 8, 0, 4, 116, 101, 120, 116, 0, 1, 10, 0 ][..]); - let _packet = ClientboundTabList::read_from(&mut bytes).unwrap(); + let _packet = ClientboundTabList::azalea_read(&mut bytes).unwrap(); assert!(bytes.get_ref()[bytes.position() as usize..].is_empty()); } } diff --git a/azalea-protocol/src/packets/game/c_update_advancements.rs b/azalea-protocol/src/packets/game/c_update_advancements.rs index 3a048b554..6e0baf16b 100755 --- a/azalea-protocol/src/packets/game/c_update_advancements.rs +++ b/azalea-protocol/src/packets/game/c_update_advancements.rs @@ -37,11 +37,11 @@ pub struct DisplayInfo { } impl azalea_buf::McBufWritable for DisplayInfo { - fn write_into(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { - self.title.write_into(buf)?; - self.description.write_into(buf)?; - self.icon.write_into(buf)?; - self.frame.write_into(buf)?; + fn azalea_write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { + self.title.azalea_write(buf)?; + self.description.azalea_write(buf)?; + self.icon.azalea_write(buf)?; + self.frame.azalea_write(buf)?; let mut data: u32 = 0; if self.background.is_some() { @@ -53,35 +53,35 @@ impl azalea_buf::McBufWritable for DisplayInfo { if self.hidden { data |= 0b100; } - data.write_into(buf)?; + data.azalea_write(buf)?; if let Some(background) = &self.background { - background.write_into(buf)?; + background.azalea_write(buf)?; } - self.x.write_into(buf)?; - self.y.write_into(buf)?; + self.x.azalea_write(buf)?; + self.y.azalea_write(buf)?; Ok(()) } } impl azalea_buf::McBufReadable for DisplayInfo { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let title = azalea_buf::McBufReadable::read_from(buf)?; - let description = azalea_buf::McBufReadable::read_from(buf)?; - let icon = azalea_buf::McBufReadable::read_from(buf)?; - let frame = azalea_buf::McBufReadable::read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let title = azalea_buf::McBufReadable::azalea_read(buf)?; + let description = azalea_buf::McBufReadable::azalea_read(buf)?; + let icon = azalea_buf::McBufReadable::azalea_read(buf)?; + let frame = azalea_buf::McBufReadable::azalea_read(buf)?; - let data = u32::read_from(buf)?; + let data = u32::azalea_read(buf)?; let has_background = (data & 0b1) != 0; let show_toast = (data & 0b10) != 0; let hidden = (data & 0b100) != 0; let background = if has_background { - Some(ResourceLocation::read_from(buf)?) + Some(ResourceLocation::azalea_read(buf)?) } else { None }; - let x = azalea_buf::McBufReadable::read_from(buf)?; - let y = azalea_buf::McBufReadable::read_from(buf)?; + let x = azalea_buf::McBufReadable::azalea_read(buf)?; + let y = azalea_buf::McBufReadable::azalea_read(buf)?; Ok(DisplayInfo { title, description, @@ -164,10 +164,10 @@ mod tests { }; let mut data = Vec::new(); - packet.write_into(&mut data).unwrap(); + packet.azalea_write(&mut data).unwrap(); let mut buf: Cursor<&[u8]> = Cursor::new(&data); - let read_packet = ClientboundUpdateAdvancements::read_from(&mut buf).unwrap(); + let read_packet = ClientboundUpdateAdvancements::azalea_read(&mut buf).unwrap(); assert_eq!(packet.reset, read_packet.reset); assert_eq!(packet.removed, read_packet.removed); diff --git a/azalea-protocol/src/packets/game/c_update_tags.rs b/azalea-protocol/src/packets/game/c_update_tags.rs index 79b596f3c..40a4076d3 100755 --- a/azalea-protocol/src/packets/game/c_update_tags.rs +++ b/azalea-protocol/src/packets/game/c_update_tags.rs @@ -22,15 +22,15 @@ pub struct Tags { pub struct TagMap(pub HashMap>); impl McBufReadable for TagMap { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let length = u32::var_read_from(buf)? as usize; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let length = u32::azalea_read_var(buf)? as usize; let mut data = HashMap::with_capacity(length); for _ in 0..length { - let tag_type = ResourceLocation::read_from(buf)?; - let tags_count = i32::var_read_from(buf)? as usize; + let tag_type = ResourceLocation::azalea_read(buf)?; + let tags_count = i32::azalea_read_var(buf)? as usize; let mut tags_vec = Vec::with_capacity(tags_count); for _ in 0..tags_count { - let tags = Tags::read_from(buf)?; + let tags = Tags::azalea_read(buf)?; tags_vec.push(tags); } data.insert(tag_type, tags_vec); @@ -40,27 +40,27 @@ impl McBufReadable for TagMap { } impl McBufWritable for TagMap { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - (self.len() as u32).var_write_into(buf)?; + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + (self.len() as u32).azalea_write_var(buf)?; for (k, v) in &self.0 { - k.write_into(buf)?; - v.write_into(buf)?; + k.azalea_write(buf)?; + v.azalea_write(buf)?; } Ok(()) } } impl McBufReadable for Tags { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let name = ResourceLocation::read_from(buf)?; - let elements = Vec::::var_read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let name = ResourceLocation::azalea_read(buf)?; + let elements = Vec::::azalea_read_var(buf)?; Ok(Tags { name, elements }) } } impl McBufWritable for Tags { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - self.name.write_into(buf)?; - self.elements.var_write_into(buf)?; + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + self.name.azalea_write(buf)?; + self.elements.azalea_write_var(buf)?; Ok(()) } } diff --git a/azalea-protocol/src/packets/game/s_interact.rs b/azalea-protocol/src/packets/game/s_interact.rs index bef47aa29..0eda7e999 100755 --- a/azalea-protocol/src/packets/game/s_interact.rs +++ b/azalea-protocol/src/packets/game/s_interact.rs @@ -28,21 +28,21 @@ pub enum ActionType { } impl McBufWritable for ActionType { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { match self { ActionType::Interact { hand } => { - 0u32.var_write_into(buf)?; - hand.write_into(buf)?; + 0u32.azalea_write_var(buf)?; + hand.azalea_write(buf)?; } ActionType::Attack => { - 1u32.var_write_into(buf)?; + 1u32.azalea_write_var(buf)?; } ActionType::InteractAt { location, hand } => { - 2u32.var_write_into(buf)?; - (location.x as f32).write_into(buf)?; - (location.y as f32).write_into(buf)?; - (location.z as f32).write_into(buf)?; - hand.write_into(buf)?; + 2u32.azalea_write_var(buf)?; + (location.x as f32).azalea_write(buf)?; + (location.y as f32).azalea_write(buf)?; + (location.z as f32).azalea_write(buf)?; + hand.azalea_write(buf)?; } } Ok(()) @@ -50,19 +50,19 @@ impl McBufWritable for ActionType { } impl McBufReadable for ActionType { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let action_type = u32::var_read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let action_type = u32::azalea_read_var(buf)?; match action_type { 0 => { - let hand = InteractionHand::read_from(buf)?; + let hand = InteractionHand::azalea_read(buf)?; Ok(ActionType::Interact { hand }) } 1 => Ok(ActionType::Attack), 2 => { - let x = f32::read_from(buf)?; - let y = f32::read_from(buf)?; - let z = f32::read_from(buf)?; - let hand = InteractionHand::read_from(buf)?; + let x = f32::azalea_read(buf)?; + let y = f32::azalea_read(buf)?; + let z = f32::azalea_read(buf)?; + let hand = InteractionHand::azalea_read(buf)?; Ok(ActionType::InteractAt { location: Vec3 { x: f64::from(x), diff --git a/azalea-protocol/src/packets/game/s_player_abilities.rs b/azalea-protocol/src/packets/game/s_player_abilities.rs index a64ff2614..d65b2b1b0 100755 --- a/azalea-protocol/src/packets/game/s_player_abilities.rs +++ b/azalea-protocol/src/packets/game/s_player_abilities.rs @@ -12,8 +12,8 @@ pub struct ServerboundPlayerAbilities { } impl McBufReadable for ServerboundPlayerAbilities { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let set = FixedBitSet::<2>::read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let set = FixedBitSet::<2>::azalea_read(buf)?; Ok(Self { is_flying: set.index(1), }) @@ -21,11 +21,11 @@ impl McBufReadable for ServerboundPlayerAbilities { } impl McBufWritable for ServerboundPlayerAbilities { - fn write_into(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { let mut set = FixedBitSet::<2>::new(); if self.is_flying { set.set(1); } - set.write_into(buf) + set.azalea_write(buf) } } diff --git a/azalea-protocol/src/packets/game/s_player_input.rs b/azalea-protocol/src/packets/game/s_player_input.rs index 74fe3d6e7..3313491b9 100755 --- a/azalea-protocol/src/packets/game/s_player_input.rs +++ b/azalea-protocol/src/packets/game/s_player_input.rs @@ -17,8 +17,8 @@ pub struct ServerboundPlayerInput { } impl McBufReadable for ServerboundPlayerInput { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let set = FixedBitSet::<7>::read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let set = FixedBitSet::<7>::azalea_read(buf)?; Ok(Self { forward: set.index(0), backward: set.index(1), @@ -32,7 +32,7 @@ impl McBufReadable for ServerboundPlayerInput { } impl McBufWritable for ServerboundPlayerInput { - fn write_into(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { let mut set = FixedBitSet::<7>::new(); if self.forward { set.set(0); @@ -55,6 +55,6 @@ impl McBufWritable for ServerboundPlayerInput { if self.sprint { set.set(6); } - set.write_into(buf) + set.azalea_write(buf) } } diff --git a/azalea-protocol/src/packets/game/s_seen_advancements.rs b/azalea-protocol/src/packets/game/s_seen_advancements.rs index 78a92dc78..24b71e898 100755 --- a/azalea-protocol/src/packets/game/s_seen_advancements.rs +++ b/azalea-protocol/src/packets/game/s_seen_advancements.rs @@ -19,10 +19,10 @@ pub enum Action { } impl McBufReadable for ServerboundSeenAdvancements { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let action = Action::read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let action = Action::azalea_read(buf)?; let tab = if action == Action::OpenedTab { - Some(ResourceLocation::read_from(buf)?) + Some(ResourceLocation::azalea_read(buf)?) } else { None }; @@ -31,10 +31,10 @@ impl McBufReadable for ServerboundSeenAdvancements { } impl McBufWritable for ServerboundSeenAdvancements { - fn write_into(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { - self.action.write_into(buf)?; + fn azalea_write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { + self.action.azalea_write(buf)?; if let Some(tab) = &self.tab { - tab.write_into(buf)?; + tab.azalea_write(buf)?; } Ok(()) } diff --git a/azalea-protocol/src/packets/game/s_set_command_block.rs b/azalea-protocol/src/packets/game/s_set_command_block.rs index 606bb49a9..cb8bcc2e5 100755 --- a/azalea-protocol/src/packets/game/s_set_command_block.rs +++ b/azalea-protocol/src/packets/game/s_set_command_block.rs @@ -25,12 +25,12 @@ pub enum Mode { } impl McBufReadable for ServerboundSetCommandBlock { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let pos = BlockPos::read_from(buf)?; - let command = String::read_from(buf)?; - let mode = Mode::read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let pos = BlockPos::azalea_read(buf)?; + let command = String::azalea_read(buf)?; + let mode = Mode::azalea_read(buf)?; - let set = FixedBitSet::<3>::read_from(buf)?; + let set = FixedBitSet::<3>::azalea_read(buf)?; Ok(Self { pos, command, @@ -43,10 +43,10 @@ impl McBufReadable for ServerboundSetCommandBlock { } impl McBufWritable for ServerboundSetCommandBlock { - fn write_into(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { - self.pos.write_into(buf)?; - self.command.write_into(buf)?; - self.mode.write_into(buf)?; + fn azalea_write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { + self.pos.azalea_write(buf)?; + self.command.azalea_write(buf)?; + self.mode.azalea_write(buf)?; let mut set = FixedBitSet::<3>::new(); if self.track_output { @@ -58,6 +58,6 @@ impl McBufWritable for ServerboundSetCommandBlock { if self.automatic { set.set(2); } - set.write_into(buf) + set.azalea_write(buf) } } diff --git a/azalea-protocol/src/packets/game/s_set_jigsaw_block.rs b/azalea-protocol/src/packets/game/s_set_jigsaw_block.rs index 0632bae3c..f5fad0eaf 100755 --- a/azalea-protocol/src/packets/game/s_set_jigsaw_block.rs +++ b/azalea-protocol/src/packets/game/s_set_jigsaw_block.rs @@ -30,8 +30,8 @@ pub enum JointType { } impl McBufReadable for JointType { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let name = String::read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let name = String::azalea_read(buf)?; match name.as_str() { "rollable" => Ok(JointType::Rollable), "aligned" => Ok(JointType::Aligned), @@ -41,10 +41,10 @@ impl McBufReadable for JointType { } impl McBufWritable for JointType { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { match self { - JointType::Rollable => "rollable".to_string().write_into(buf)?, - JointType::Aligned => "aligned".to_string().write_into(buf)?, + JointType::Rollable => "rollable".to_string().azalea_write(buf)?, + JointType::Aligned => "aligned".to_string().azalea_write(buf)?, }; Ok(()) } diff --git a/azalea-protocol/src/packets/game/s_set_structure_block.rs b/azalea-protocol/src/packets/game/s_set_structure_block.rs index 9a0b20e94..72a9ab2f9 100755 --- a/azalea-protocol/src/packets/game/s_set_structure_block.rs +++ b/azalea-protocol/src/packets/game/s_set_structure_block.rs @@ -70,8 +70,8 @@ pub struct Flags { } impl McBufReadable for Flags { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let set = FixedBitSet::<3>::read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let set = FixedBitSet::<3>::azalea_read(buf)?; Ok(Self { ignore_entities: set.index(0), show_air: set.index(1), @@ -81,7 +81,7 @@ impl McBufReadable for Flags { } impl McBufWritable for Flags { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut set = FixedBitSet::<3>::new(); if self.ignore_entities { set.set(0); @@ -92,7 +92,7 @@ impl McBufWritable for Flags { if self.show_bounding_box { set.set(2); } - set.write_into(buf)?; + set.azalea_write(buf)?; Ok(()) } } diff --git a/azalea-protocol/src/packets/game/s_use_item_on.rs b/azalea-protocol/src/packets/game/s_use_item_on.rs index 3af2ce44c..70f4e18ac 100755 --- a/azalea-protocol/src/packets/game/s_use_item_on.rs +++ b/azalea-protocol/src/packets/game/s_use_item_on.rs @@ -32,34 +32,34 @@ pub struct BlockHit { } impl McBufWritable for BlockHit { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - self.block_pos.write_into(buf)?; - self.direction.write_into(buf)?; - f32::write_into( + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + self.block_pos.azalea_write(buf)?; + self.direction.azalea_write(buf)?; + f32::azalea_write( &((self.location.x - f64::from(self.block_pos.x)) as f32), buf, )?; - f32::write_into( + f32::azalea_write( &((self.location.y - f64::from(self.block_pos.y)) as f32), buf, )?; - f32::write_into( + f32::azalea_write( &((self.location.z - f64::from(self.block_pos.z)) as f32), buf, )?; - self.inside.write_into(buf)?; + self.inside.azalea_write(buf)?; Ok(()) } } impl McBufReadable for BlockHit { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let block_pos = BlockPos::read_from(buf)?; - let direction = Direction::read_from(buf)?; - let cursor_x = f32::read_from(buf)?; - let cursor_y = f32::read_from(buf)?; - let cursor_z = f32::read_from(buf)?; - let inside = bool::read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let block_pos = BlockPos::azalea_read(buf)?; + let direction = Direction::azalea_read(buf)?; + let cursor_x = f32::azalea_read(buf)?; + let cursor_y = f32::azalea_read(buf)?; + let cursor_z = f32::azalea_read(buf)?; + let inside = bool::azalea_read(buf)?; Ok(Self { block_pos, direction, diff --git a/azalea-protocol/src/packets/login/c_login_disconnect.rs b/azalea-protocol/src/packets/login/c_login_disconnect.rs index 09f539f50..46617b2cc 100755 --- a/azalea-protocol/src/packets/login/c_login_disconnect.rs +++ b/azalea-protocol/src/packets/login/c_login_disconnect.rs @@ -11,8 +11,8 @@ pub struct ClientboundLoginDisconnect { } impl McBufReadable for ClientboundLoginDisconnect { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let disconnect_string = String::read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let disconnect_string = String::azalea_read(buf)?; let disconnect_json: serde_json::Value = serde_json::from_str(disconnect_string.as_str())?; Ok(ClientboundLoginDisconnect { @@ -22,11 +22,11 @@ impl McBufReadable for ClientboundLoginDisconnect { } impl McBufWritable for ClientboundLoginDisconnect { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let status_string = FormattedText::serialize(&self.reason, serde_json::value::Serializer) .unwrap() .to_string(); - status_string.write_into(buf)?; + status_string.azalea_write(buf)?; Ok(()) } } diff --git a/azalea-protocol/src/packets/login/s_hello.rs b/azalea-protocol/src/packets/login/s_hello.rs index 48d4e3e66..894a69ef6 100755 --- a/azalea-protocol/src/packets/login/s_hello.rs +++ b/azalea-protocol/src/packets/login/s_hello.rs @@ -23,8 +23,8 @@ mod tests { profile_id: Uuid::nil(), }; let mut buf: Vec = Vec::new(); - packet.write_into(&mut buf).unwrap(); - let packet2 = ServerboundHello::read_from(&mut Cursor::new(&buf)).unwrap(); + packet.azalea_write(&mut buf).unwrap(); + let packet2 = ServerboundHello::azalea_read(&mut Cursor::new(&buf)).unwrap(); assert_eq!(packet, packet2); } } diff --git a/azalea-protocol/src/packets/mod.rs b/azalea-protocol/src/packets/mod.rs index 0a5aab98a..7c723fb89 100755 --- a/azalea-protocol/src/packets/mod.rs +++ b/azalea-protocol/src/packets/mod.rs @@ -82,15 +82,15 @@ impl From for ConnectionProtocol { } impl azalea_buf::McBufReadable for ClientIntention { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let id = i32::var_read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let id = i32::azalea_read_var(buf)?; id.try_into() .map_err(|_| BufReadError::UnexpectedEnumVariant { id }) } } impl McBufWritable for ClientIntention { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - (*self as i32).var_write_into(buf) + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + (*self as i32).azalea_write_var(buf) } } diff --git a/azalea-protocol/src/packets/status/c_status_response.rs b/azalea-protocol/src/packets/status/c_status_response.rs index 41f0ab1a0..c2471d3e5 100755 --- a/azalea-protocol/src/packets/status/c_status_response.rs +++ b/azalea-protocol/src/packets/status/c_status_response.rs @@ -42,8 +42,8 @@ pub struct ClientboundStatusResponse { } impl McBufReadable for ClientboundStatusResponse { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let status_string = String::read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let status_string = String::azalea_read(buf)?; let status_json: serde_json::Value = serde_json::from_str(status_string.as_str())?; Ok(ClientboundStatusResponse::deserialize(status_json)?) @@ -51,11 +51,11 @@ impl McBufReadable for ClientboundStatusResponse { } impl McBufWritable for ClientboundStatusResponse { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let status_string = ClientboundStatusResponse::serialize(self, Serializer) .unwrap() .to_string(); - status_string.write_into(buf)?; + status_string.azalea_write(buf)?; Ok(()) } } diff --git a/azalea-protocol/src/read.rs b/azalea-protocol/src/read.rs index 67ea9aeee..60658c3e2 100755 --- a/azalea-protocol/src/read.rs +++ b/azalea-protocol/src/read.rs @@ -86,7 +86,7 @@ fn parse_frame(buffer: &mut BytesMut) -> Result { // the packet is all good we read it fully let mut buffer_copy = Cursor::new(&buffer[..]); // Packet Length - let length = match u32::var_read_from(&mut buffer_copy) { + let length = match u32::azalea_read_var(&mut buffer_copy) { Ok(length) => length as usize, Err(err) => match err { BufReadError::Io { source } => return Err(FrameSplitterError::Io { source }), @@ -134,7 +134,7 @@ pub fn deserialize_packet( ) -> Result> { // Packet ID let packet_id = - u32::var_read_from(stream).map_err(|e| ReadPacketError::ReadPacketId { source: e })?; + u32::azalea_read_var(stream).map_err(|e| ReadPacketError::ReadPacketId { source: e })?; P::read(packet_id, stream) } @@ -171,7 +171,7 @@ pub fn compression_decoder( compression_threshold: u32, ) -> Result, DecompressionError> { // Data Length - let n = u32::var_read_from(stream)?; + let n = u32::azalea_read_var(stream)?; if n == 0 { // no data size, no compression let mut buf = vec![]; diff --git a/azalea-protocol/src/write.rs b/azalea-protocol/src/write.rs index 0ec4308bb..c6b5be47b 100755 --- a/azalea-protocol/src/write.rs +++ b/azalea-protocol/src/write.rs @@ -14,7 +14,7 @@ use crate::{packets::ProtocolPacket, read::MAXIMUM_UNCOMPRESSED_LENGTH}; /// Prepend the length of the packet to it. fn frame_prepender(mut data: Vec) -> Result, std::io::Error> { let mut buf = Vec::new(); - (data.len() as u32).var_write_into(&mut buf)?; + (data.len() as u32).azalea_write_var(&mut buf)?; buf.append(&mut data); Ok(buf) } @@ -35,7 +35,7 @@ pub fn serialize_packet( packet: &P, ) -> Result, PacketEncodeError> { let mut buf = Vec::new(); - packet.id().var_write_into(&mut buf)?; + packet.id().azalea_write_var(&mut buf)?; packet.write(&mut buf)?; if buf.len() > MAXIMUM_UNCOMPRESSED_LENGTH as usize { return Err(PacketEncodeError::TooBig { @@ -61,7 +61,7 @@ pub fn compression_encoder( // if it's less than the compression threshold, don't compress if n < compression_threshold as usize { let mut buf = Vec::new(); - 0.var_write_into(&mut buf)?; + 0.azalea_write_var(&mut buf)?; std::io::Write::write_all(&mut buf, data)?; Ok(buf) } else { @@ -73,7 +73,7 @@ pub fn compression_encoder( // prepend the length let mut len_prepended_compressed_data = Vec::new(); - (data.len() as u32).var_write_into(&mut len_prepended_compressed_data)?; + (data.len() as u32).azalea_write_var(&mut len_prepended_compressed_data)?; len_prepended_compressed_data.append(&mut compressed_data); Ok(len_prepended_compressed_data) diff --git a/azalea-registry/src/lib.rs b/azalea-registry/src/lib.rs index e9c26c03a..640f3e5c4 100755 --- a/azalea-registry/src/lib.rs +++ b/azalea-registry/src/lib.rs @@ -29,8 +29,8 @@ where pub struct OptionalRegistry(Option); impl McBufReadable for OptionalRegistry { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - Ok(OptionalRegistry(match u32::var_read_from(buf)? { + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + Ok(OptionalRegistry(match u32::azalea_read_var(buf)? { 0 => None, value => Some( T::from_u32(value - 1) @@ -40,10 +40,10 @@ impl McBufReadable for OptionalRegistry { } } impl McBufWritable for OptionalRegistry { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { match &self.0 { - None => 0u32.var_write_into(buf), - Some(value) => (value.to_u32() + 1).var_write_into(buf), + None => 0u32.azalea_write_var(buf), + Some(value) => (value.to_u32() + 1).azalea_write_var(buf), } } } @@ -56,25 +56,25 @@ pub enum CustomRegistry { } impl McBufReadable for CustomRegistry { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let direct_registry = OptionalRegistry::::read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let direct_registry = OptionalRegistry::::azalea_read(buf)?; if let Some(direct_registry) = direct_registry.0 { return Ok(CustomRegistry::Direct(direct_registry)); } - Ok(CustomRegistry::Custom(C::read_from(buf)?)) + Ok(CustomRegistry::Custom(C::azalea_read(buf)?)) } } impl McBufWritable for CustomRegistry { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { match self { CustomRegistry::Direct(direct_registry) => { // write the id + 1 - (direct_registry.to_u32() + 1).var_write_into(buf) + (direct_registry.to_u32() + 1).azalea_write_var(buf) } CustomRegistry::Custom(custom_registry) => { // write 0, then the custom registry - 0u32.var_write_into(buf)?; - custom_registry.write_into(buf) + 0u32.azalea_write_var(buf)?; + custom_registry.azalea_write(buf) } } } @@ -94,10 +94,10 @@ pub enum HolderSet impl McBufReadable for HolderSet { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let size = i32::var_read_from(buf)? - 1; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let size = i32::azalea_read_var(buf)? - 1; if size == -1 { - let key = ResourceLocation::read_from(buf)?; + let key = ResourceLocation::azalea_read(buf)?; Ok(Self::Named { key, contents: Vec::new(), @@ -105,7 +105,7 @@ impl McBufReadable } else { let mut contents = Vec::new(); for _ in 0..size { - contents.push(D::read_from(buf)?); + contents.push(D::azalea_read(buf)?); } Ok(Self::Direct { contents }) } @@ -114,17 +114,17 @@ impl McBufReadable impl McBufWritable for HolderSet { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { match self { Self::Direct { contents } => { - (contents.len() as i32 + 1).var_write_into(buf)?; + (contents.len() as i32 + 1).azalea_write_var(buf)?; for item in contents { - item.write_into(buf)?; + item.azalea_write(buf)?; } } Self::Named { key, .. } => { - 0i32.var_write_into(buf)?; - key.write_into(buf)?; + 0i32.azalea_write_var(buf)?; + key.azalea_write(buf)?; } } Ok(()) diff --git a/azalea-world/src/chunk_storage.rs b/azalea-world/src/chunk_storage.rs index 1709a903f..6d2ce24f6 100755 --- a/azalea-world/src/chunk_storage.rs +++ b/azalea-world/src/chunk_storage.rs @@ -332,7 +332,7 @@ impl Chunk { let section_count = dimension_height / SECTION_HEIGHT; let mut sections = Vec::with_capacity(section_count as usize); for _ in 0..section_count { - let section = Section::read_from(buf)?; + let section = Section::azalea_read(buf)?; sections.push(section); } @@ -417,9 +417,9 @@ pub fn get_block_state_from_sections( } impl McBufWritable for Chunk { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { for section in &self.sections { - section.write_into(buf)?; + section.azalea_write(buf)?; } Ok(()) } @@ -438,8 +438,8 @@ impl Debug for PartialChunkStorage { } impl McBufReadable for Section { - fn read_from(buf: &mut Cursor<&[u8]>) -> Result { - let block_count = u16::read_from(buf)?; + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let block_count = u16::azalea_read(buf)?; // this is commented out because the vanilla server is wrong // assert!( @@ -468,10 +468,10 @@ impl McBufReadable for Section { } impl McBufWritable for Section { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - self.block_count.write_into(buf)?; - self.states.write_into(buf)?; - self.biomes.write_into(buf)?; + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + self.block_count.azalea_write(buf)?; + self.states.azalea_write(buf)?; + self.biomes.azalea_write(buf)?; Ok(()) } } diff --git a/azalea-world/src/palette.rs b/azalea-world/src/palette.rs index 27e017c40..6d9a509e3 100755 --- a/azalea-world/src/palette.rs +++ b/azalea-world/src/palette.rs @@ -44,11 +44,11 @@ impl PalettedContainer { buf: &mut Cursor<&[u8]>, container_type: &'static PalettedContainerKind, ) -> Result { - let server_bits_per_entry = u8::read_from(buf)?; + let server_bits_per_entry = u8::azalea_read(buf)?; let palette_type = PaletteKind::from_bits_and_type(server_bits_per_entry, container_type); let palette = palette_type.read(buf)?; let size = container_type.size(); - let data = Vec::::read_from(buf)?; + let data = Vec::::azalea_read(buf)?; // we can only trust the bits per entry that we're sent if there's enough data // that it'd be global. if it's not global, then we have to calculate it @@ -225,10 +225,10 @@ impl PalettedContainer { } impl McBufWritable for PalettedContainer { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { - self.bits_per_entry.write_into(buf)?; - self.palette.write_into(buf)?; - self.storage.data.write_into(buf)?; + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + self.bits_per_entry.azalea_write(buf)?; + self.palette.azalea_write(buf)?; + self.storage.data.azalea_write(buf)?; Ok(()) } } @@ -265,16 +265,16 @@ impl Palette { } impl McBufWritable for Palette { - fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { match self { Palette::SingleValue(value) => { - value.var_write_into(buf)?; + value.azalea_write_var(buf)?; } Palette::Linear(values) => { - values.var_write_into(buf)?; + values.azalea_write_var(buf)?; } Palette::Hashmap(values) => { - values.var_write_into(buf)?; + values.azalea_write_var(buf)?; } Palette::Global => {} } @@ -301,9 +301,9 @@ impl PaletteKind { pub fn read(&self, buf: &mut Cursor<&[u8]>) -> Result { Ok(match self { - PaletteKind::SingleValue => Palette::SingleValue(u32::var_read_from(buf)?), - PaletteKind::Linear => Palette::Linear(Vec::::var_read_from(buf)?), - PaletteKind::Hashmap => Palette::Hashmap(Vec::::var_read_from(buf)?), + PaletteKind::SingleValue => Palette::SingleValue(u32::azalea_read_var(buf)?), + PaletteKind::Linear => Palette::Linear(Vec::::azalea_read_var(buf)?), + PaletteKind::Hashmap => Palette::Hashmap(Vec::::azalea_read_var(buf)?), PaletteKind::Global => Palette::Global, }) } diff --git a/codegen/genitemcomponents.py b/codegen/genitemcomponents.py index 32923e7e7..2f9bf2c5e 100644 --- a/codegen/genitemcomponents.py +++ b/codegen/genitemcomponents.py @@ -144,7 +144,7 @@ def add_variant(variant: str): raise ValueError('Couldn\'t find end of match') code = code[:last_line_in_match] + [ - f' DataComponentKind::{variant} => Box::new({variant}::read_from(buf)?),', + f' DataComponentKind::{variant} => Box::new({variant}::azalea_read(buf)?),', ] + code[last_line_in_match:] # now insert the struct From 22bdc5013091583c1b089315224d208f95b0204b Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 27 Nov 2024 01:51:44 +0000 Subject: [PATCH 08/18] rename McBufReadable and McBufWritable to AzaleaRead and AzaleaWrite --- azalea-block/src/lib.rs | 6 +- azalea-brigadier/src/suggestion/mod.rs | 4 +- .../src/suggestion/suggestions.rs | 8 +-- azalea-buf/azalea-buf-macros/src/lib.rs | 16 ++--- azalea-buf/azalea-buf-macros/src/read.rs | 18 ++--- azalea-buf/azalea-buf-macros/src/write.rs | 24 +++---- azalea-buf/src/lib.rs | 4 +- azalea-buf/src/read.rs | 66 ++++++++--------- azalea-buf/src/serializable_uuid.rs | 6 +- azalea-buf/src/write.rs | 70 +++++++++---------- azalea-chat/src/component.rs | 6 +- azalea-chat/src/numbers.rs | 6 +- azalea-client/src/configuration.rs | 2 +- azalea-core/src/bitset.rs | 6 +- azalea-core/src/difficulty.rs | 6 +- azalea-core/src/game_type.rs | 12 ++-- azalea-core/src/position.rs | 18 ++--- azalea-core/src/resource_location.rs | 6 +- azalea-crypto/src/signing.rs | 2 +- azalea-entity/src/data.rs | 12 ++-- azalea-inventory/src/components.rs | 4 +- azalea-inventory/src/slot.rs | 10 +-- azalea-protocol/README.md | 2 +- .../azalea-protocol-macros/src/lib.rs | 4 +- azalea-protocol/src/common.rs | 8 +-- .../src/packets/config/c_update_tags.rs | 12 ++-- .../src/packets/game/c_boss_event.rs | 10 +-- .../src/packets/game/c_command_suggestions.rs | 2 +- .../src/packets/game/c_commands.rs | 14 ++-- .../src/packets/game/c_damage_event.rs | 6 +- azalea-protocol/src/packets/game/c_explode.rs | 6 +- .../packets/game/c_level_chunk_with_light.rs | 2 +- .../src/packets/game/c_level_particles.rs | 2 +- .../src/packets/game/c_map_item_data.rs | 6 +- .../src/packets/game/c_player_abilities.rs | 6 +- .../src/packets/game/c_player_chat.rs | 6 +- .../src/packets/game/c_player_info_update.rs | 10 +-- .../src/packets/game/c_player_position.rs | 6 +- .../packets/game/c_section_blocks_update.rs | 6 +- .../src/packets/game/c_set_equipment.rs | 6 +- .../src/packets/game/c_set_objective.rs | 6 +- .../src/packets/game/c_set_player_team.rs | 6 +- .../src/packets/game/c_stop_sound.rs | 6 +- .../src/packets/game/c_system_chat.rs | 2 +- .../src/packets/game/c_tab_list.rs | 2 +- .../src/packets/game/c_update_advancements.rs | 18 ++--- .../src/packets/game/c_update_tags.rs | 12 ++-- .../src/packets/game/s_interact.rs | 6 +- .../src/packets/game/s_player_abilities.rs | 6 +- .../src/packets/game/s_player_input.rs | 6 +- .../src/packets/game/s_seen_advancements.rs | 6 +- .../src/packets/game/s_set_command_block.rs | 8 +-- .../src/packets/game/s_set_jigsaw_block.rs | 8 +-- .../src/packets/game/s_set_structure_block.rs | 6 +- .../src/packets/game/s_use_item_on.rs | 6 +- .../src/packets/login/c_login_disconnect.rs | 6 +- azalea-protocol/src/packets/login/s_hello.rs | 2 +- azalea-protocol/src/packets/mod.rs | 6 +- .../src/packets/status/c_status_response.rs | 6 +- azalea-protocol/src/read.rs | 2 +- azalea-protocol/src/write.rs | 2 +- azalea-registry/src/lib.rs | 22 +++--- azalea-world/src/chunk_storage.rs | 8 +-- azalea-world/src/palette.rs | 6 +- codegen/README.md | 32 ++++----- 65 files changed, 310 insertions(+), 312 deletions(-) diff --git a/azalea-block/src/lib.rs b/azalea-block/src/lib.rs index 59db15798..a5d62ac78 100755 --- a/azalea-block/src/lib.rs +++ b/azalea-block/src/lib.rs @@ -11,7 +11,7 @@ use std::{ io::{Cursor, Write}, }; -use azalea_buf::{BufReadError, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable}; +use azalea_buf::{BufReadError, AzaleaRead, AzaleaReadVar, AzaleaWriteVar, AzaleaWrite}; pub use behavior::BlockBehavior; pub use generated::{blocks, properties}; pub use range::BlockStates; @@ -80,7 +80,7 @@ impl TryFrom for BlockState { } } -impl McBufReadable for BlockState { +impl AzaleaRead for BlockState { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let state_id = u32::azalea_read_var(buf)?; Self::try_from(state_id).map_err(|_| BufReadError::UnexpectedEnumVariant { @@ -88,7 +88,7 @@ impl McBufReadable for BlockState { }) } } -impl McBufWritable for BlockState { +impl AzaleaWrite for BlockState { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { u32::azalea_write_var(&self.id, buf) } diff --git a/azalea-brigadier/src/suggestion/mod.rs b/azalea-brigadier/src/suggestion/mod.rs index 3cf9a426d..a31b68375 100755 --- a/azalea-brigadier/src/suggestion/mod.rs +++ b/azalea-brigadier/src/suggestion/mod.rs @@ -9,7 +9,7 @@ use std::{ }; #[cfg(feature = "azalea-buf")] -use azalea_buf::McBufWritable; +use azalea_buf::AzaleaWrite; #[cfg(feature = "azalea-buf")] use azalea_chat::FormattedText; pub use suggestions::Suggestions; @@ -137,7 +137,7 @@ impl PartialOrd for SuggestionValue { } #[cfg(feature = "azalea-buf")] -impl McBufWritable for Suggestion { +impl AzaleaWrite for Suggestion { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { self.value.to_string().azalea_write(buf)?; self.tooltip diff --git a/azalea-brigadier/src/suggestion/suggestions.rs b/azalea-brigadier/src/suggestion/suggestions.rs index 4574d7fad..2eb904f2e 100755 --- a/azalea-brigadier/src/suggestion/suggestions.rs +++ b/azalea-brigadier/src/suggestion/suggestions.rs @@ -4,7 +4,7 @@ use std::{collections::HashSet, hash::Hash}; #[cfg(feature = "azalea-buf")] use azalea_buf::{ - BufReadError, McBuf, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable, + BufReadError, McBuf, AzaleaRead, AzaleaReadVar, AzaleaWriteVar, AzaleaWrite, }; #[cfg(feature = "azalea-buf")] use azalea_chat::FormattedText; @@ -79,7 +79,7 @@ impl Suggestions { } #[cfg(feature = "azalea-buf")] -impl McBufReadable for Suggestions { +impl AzaleaRead for Suggestions { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { #[derive(McBuf)] struct StandaloneSuggestion { @@ -92,7 +92,7 @@ impl McBufReadable for Suggestions { let range = StringRange::between(start, start + length); // the range of a Suggestion depends on the Suggestions containing it, - // so we can't just `impl McBufReadable for Suggestion` + // so we can't just `impl AzaleaRead for Suggestion` let mut suggestions = Vec::::azalea_read(buf)? .into_iter() .map(|s| Suggestion { @@ -108,7 +108,7 @@ impl McBufReadable for Suggestions { } #[cfg(feature = "azalea-buf")] -impl McBufWritable for Suggestions { +impl AzaleaWrite for Suggestions { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { (self.range.start() as u32).azalea_write_var(buf)?; (self.range.length() as u32).azalea_write_var(buf)?; diff --git a/azalea-buf/azalea-buf-macros/src/lib.rs b/azalea-buf/azalea-buf-macros/src/lib.rs index 4d17daa6d..c5a2238b0 100755 --- a/azalea-buf/azalea-buf-macros/src/lib.rs +++ b/azalea-buf/azalea-buf-macros/src/lib.rs @@ -5,26 +5,26 @@ use proc_macro::TokenStream; use quote::quote; use syn::{parse_macro_input, DeriveInput}; -#[proc_macro_derive(McBufReadable, attributes(var))] -pub fn derive_mcbufreadable(input: TokenStream) -> TokenStream { +#[proc_macro_derive(AzaleaRead, attributes(var))] +pub fn derive_azalearead(input: TokenStream) -> TokenStream { let DeriveInput { ident, data, .. } = parse_macro_input!(input); - read::create_impl_mcbufreadable(&ident, &data).into() + read::create_impl_azalearead(&ident, &data).into() } -#[proc_macro_derive(McBufWritable, attributes(var))] -pub fn derive_mcbufwritable(input: TokenStream) -> TokenStream { +#[proc_macro_derive(AzaleaWrite, attributes(var))] +pub fn derive_azaleawrite(input: TokenStream) -> TokenStream { let DeriveInput { ident, data, .. } = parse_macro_input!(input); - write::create_impl_mcbufwritable(&ident, &data).into() + write::create_impl_azaleawrite(&ident, &data).into() } #[proc_macro_derive(McBuf, attributes(var))] pub fn derive_mcbuf(input: TokenStream) -> TokenStream { let DeriveInput { ident, data, .. } = parse_macro_input!(input); - let writable = write::create_impl_mcbufwritable(&ident, &data); - let readable = read::create_impl_mcbufreadable(&ident, &data); + let writable = write::create_impl_azaleawrite(&ident, &data); + let readable = read::create_impl_azalearead(&ident, &data); quote! { #writable #readable diff --git a/azalea-buf/azalea-buf-macros/src/read.rs b/azalea-buf/azalea-buf-macros/src/read.rs index acbe721cf..70a6312a1 100644 --- a/azalea-buf/azalea-buf-macros/src/read.rs +++ b/azalea-buf/azalea-buf-macros/src/read.rs @@ -15,11 +15,11 @@ fn read_named_fields( syn::Type::Path(_) | syn::Type::Array(_) => { if f.attrs.iter().any(|a| a.path().is_ident("var")) { quote! { - let #field_name = azalea_buf::McBufVarReadable::azalea_read_var(buf)?; + let #field_name = azalea_buf::AzaleaReadVar::azalea_read_var(buf)?; } } else { quote! { - let #field_name = azalea_buf::McBufReadable::azalea_read(buf)?; + let #field_name = azalea_buf::AzaleaRead::azalea_read(buf)?; } } } @@ -36,14 +36,14 @@ fn read_named_fields( (read_fields, read_field_names) } -pub fn create_impl_mcbufreadable(ident: &Ident, data: &Data) -> proc_macro2::TokenStream { +pub fn create_impl_azalearead(ident: &Ident, data: &Data) -> proc_macro2::TokenStream { match data { syn::Data::Struct(syn::DataStruct { fields, .. }) => match fields { syn::Fields::Named(FieldsNamed { named, .. }) => { let (read_fields, read_field_names) = read_named_fields(named); quote! { - impl azalea_buf::McBufReadable for #ident { + impl azalea_buf::AzaleaRead for #ident { fn azalea_read(buf: &mut std::io::Cursor<&[u8]>) -> Result { #(#read_fields)* Ok(Self { @@ -55,7 +55,7 @@ pub fn create_impl_mcbufreadable(ident: &Ident, data: &Data) -> proc_macro2::Tok } syn::Fields::Unit => { quote! { - impl azalea_buf::McBufReadable for #ident { + impl azalea_buf::AzaleaRead for #ident { fn azalea_read(buf: &mut std::io::Cursor<&[u8]>) -> Result { Ok(Self) } @@ -110,11 +110,11 @@ pub fn create_impl_mcbufreadable(ident: &Ident, data: &Data) -> proc_macro2::Tok for f in &fields.unnamed { if f.attrs.iter().any(|attr| attr.path().is_ident("var")) { reader_code.extend(quote! { - Self::#variant_name(azalea_buf::McBufVarReadable::azalea_read_var(buf)?), + Self::#variant_name(azalea_buf::AzaleaReadVar::azalea_read_var(buf)?), }); } else { reader_code.extend(quote! { - Self::#variant_name(azalea_buf::McBufReadable::azalea_read(buf)?), + Self::#variant_name(azalea_buf::AzaleaRead::azalea_read(buf)?), }); } } @@ -139,9 +139,9 @@ pub fn create_impl_mcbufreadable(ident: &Ident, data: &Data) -> proc_macro2::Tok let first_reader = first_reader.expect("There should be at least one variant"); quote! { - impl azalea_buf::McBufReadable for #ident { + impl azalea_buf::AzaleaRead for #ident { fn azalea_read(buf: &mut std::io::Cursor<&[u8]>) -> Result { - let id = azalea_buf::McBufVarReadable::azalea_read_var(buf)?; + let id = azalea_buf::AzaleaReadVar::azalea_read_var(buf)?; Self::azalea_read_id(buf, id) } } diff --git a/azalea-buf/azalea-buf-macros/src/write.rs b/azalea-buf/azalea-buf-macros/src/write.rs index 5fe46bacf..ed98c8a1e 100644 --- a/azalea-buf/azalea-buf-macros/src/write.rs +++ b/azalea-buf/azalea-buf-macros/src/write.rs @@ -19,11 +19,11 @@ fn write_named_fields( syn::Type::Path(_) | syn::Type::Array(_) => { if f.attrs.iter().any(|attr| attr.path().is_ident("var")) { quote! { - azalea_buf::McBufVarWritable::azalea_write_var(#ident_dot_field, buf)?; + azalea_buf::AzaleaWriteVar::azalea_write_var(#ident_dot_field, buf)?; } } else { quote! { - azalea_buf::McBufWritable::azalea_write(#ident_dot_field, buf)?; + azalea_buf::AzaleaWrite::azalea_write(#ident_dot_field, buf)?; } } } @@ -37,7 +37,7 @@ fn write_named_fields( quote! { #(#write_fields)* } } -pub fn create_impl_mcbufwritable(ident: &Ident, data: &Data) -> proc_macro2::TokenStream { +pub fn create_impl_azaleawrite(ident: &Ident, data: &Data) -> proc_macro2::TokenStream { match data { syn::Data::Struct(syn::DataStruct { fields, .. }) => match fields { syn::Fields::Named(FieldsNamed { named, .. }) => { @@ -45,7 +45,7 @@ pub fn create_impl_mcbufwritable(ident: &Ident, data: &Data) -> proc_macro2::Tok write_named_fields(named, Some(&Ident::new("self", Span::call_site()))); quote! { - impl azalea_buf::McBufWritable for #ident { + impl azalea_buf::AzaleaWrite for #ident { fn azalea_write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { #write_fields Ok(()) @@ -55,7 +55,7 @@ pub fn create_impl_mcbufwritable(ident: &Ident, data: &Data) -> proc_macro2::Tok } syn::Fields::Unit => { quote! { - impl azalea_buf::McBufWritable for #ident { + impl azalea_buf::AzaleaWrite for #ident { fn azalea_write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { Ok(()) } @@ -103,7 +103,7 @@ pub fn create_impl_mcbufwritable(ident: &Ident, data: &Data) -> proc_macro2::Tok // the variant number that we're going to write let write_the_variant = quote! { - azalea_buf::McBufVarWritable::azalea_write_var(&#variant_discrim, buf)?; + azalea_buf::AzaleaWriteVar::azalea_write_var(&#variant_discrim, buf)?; }; match &variant.fields { syn::Fields::Named(f) => { @@ -145,11 +145,11 @@ pub fn create_impl_mcbufwritable(ident: &Ident, data: &Data) -> proc_macro2::Tok params_code.extend(quote! { #param_ident, }); if f.attrs.iter().any(|attr| attr.path().is_ident("var")) { writers_code.extend(quote! { - azalea_buf::McBufVarWritable::azalea_write_var(#param_ident, buf)?; + azalea_buf::AzaleaWriteVar::azalea_write_var(#param_ident, buf)?; }); } else { writers_code.extend(quote! { - azalea_buf::McBufWritable::azalea_write(#param_ident, buf)?; + azalea_buf::AzaleaWrite::azalea_write(#param_ident, buf)?; }); } } @@ -161,7 +161,7 @@ pub fn create_impl_mcbufwritable(ident: &Ident, data: &Data) -> proc_macro2::Tok }); match_arms_without_id.extend(quote! { Self::#variant_name(data) => { - azalea_buf::McBufWritable::azalea_write(data, buf)?; + azalea_buf::AzaleaWrite::azalea_write(data, buf)?; } }); } @@ -169,7 +169,7 @@ pub fn create_impl_mcbufwritable(ident: &Ident, data: &Data) -> proc_macro2::Tok } if is_data_enum { quote! { - impl azalea_buf::McBufWritable for #ident { + impl azalea_buf::AzaleaWrite for #ident { fn azalea_write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { match self { #match_arms @@ -189,9 +189,9 @@ pub fn create_impl_mcbufwritable(ident: &Ident, data: &Data) -> proc_macro2::Tok } else { // optimization: if it doesn't have data we can just do `as u32` quote! { - impl azalea_buf::McBufWritable for #ident { + impl azalea_buf::AzaleaWrite for #ident { fn azalea_write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { - azalea_buf::McBufVarWritable::azalea_write_var(&(*self as u32), buf) + azalea_buf::AzaleaWriteVar::azalea_write_var(&(*self as u32), buf) } } } diff --git a/azalea-buf/src/lib.rs b/azalea-buf/src/lib.rs index 332031e69..30626da87 100755 --- a/azalea-buf/src/lib.rs +++ b/azalea-buf/src/lib.rs @@ -10,9 +10,9 @@ mod write; pub use azalea_buf_macros::*; pub use definitions::*; -pub use read::{BufReadError, McBufReadable, McBufVarReadable}; +pub use read::{BufReadError, AzaleaRead, AzaleaReadVar}; pub use serializable_uuid::*; -pub use write::{McBufVarWritable, McBufWritable}; +pub use write::{AzaleaWriteVar, AzaleaWrite}; // const DEFAULT_NBT_QUOTA: u32 = 2097152; const MAX_STRING_LENGTH: u16 = 32767; diff --git a/azalea-buf/src/read.rs b/azalea-buf/src/read.rs index edae683e3..415cb3843 100755 --- a/azalea-buf/src/read.rs +++ b/azalea-buf/src/read.rs @@ -105,27 +105,27 @@ fn read_utf_with_len(buf: &mut Cursor<&[u8]>, max_length: u32) -> Result) -> Result; } -pub trait McBufVarReadable +pub trait AzaleaReadVar where Self: Sized, { fn azalea_read_var(buf: &mut Cursor<&[u8]>) -> Result; } -impl McBufReadable for i32 { +impl AzaleaRead for i32 { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { Ok(buf.read_i32::()?) } } -impl McBufVarReadable for i32 { +impl AzaleaReadVar for i32 { // fast varints modified from https://github.com/luojia65/mc-varint/blob/master/src/lib.rs#L67 /// Read a single varint from the reader and return the value fn azalea_read_var(buf: &mut Cursor<&[u8]>) -> Result { @@ -142,7 +142,7 @@ impl McBufVarReadable for i32 { } } -impl McBufVarReadable for i64 { +impl AzaleaReadVar for i64 { // fast varints modified from https://github.com/luojia65/mc-varint/blob/master/src/lib.rs#L54 fn azalea_read_var(buf: &mut Cursor<&[u8]>) -> Result { let mut buffer = [0]; @@ -158,13 +158,13 @@ impl McBufVarReadable for i64 { Ok(ans) } } -impl McBufVarReadable for u64 { +impl AzaleaReadVar for u64 { fn azalea_read_var(buf: &mut Cursor<&[u8]>) -> Result { i64::azalea_read_var(buf).map(|i| i as u64) } } -impl McBufReadable for UnsizedByteArray { +impl AzaleaRead for UnsizedByteArray { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { // read to end of the buffer let data = buf.get_ref()[buf.position() as usize..].to_vec(); @@ -173,7 +173,7 @@ impl McBufReadable for UnsizedByteArray { } } -impl McBufReadable for Vec { +impl AzaleaRead for Vec { default fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let length = u32::azalea_read_var(buf)? as usize; // we limit the capacity to not get exploited into allocating a bunch @@ -185,7 +185,7 @@ impl McBufReadable for Vec { } } -impl McBufReadable for HashMap { +impl AzaleaRead for HashMap { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let length = i32::azalea_read_var(buf)? as usize; let mut contents = HashMap::with_capacity(usize::min(length, 65536)); @@ -196,7 +196,7 @@ impl McBufReadable } } -impl McBufVarReadable +impl AzaleaReadVar for HashMap { fn azalea_read_var(buf: &mut Cursor<&[u8]>) -> Result { @@ -209,50 +209,50 @@ impl McBufVarRe } } -impl McBufReadable for Vec { +impl AzaleaRead for Vec { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let length = i32::azalea_read_var(buf)? as usize; read_bytes(buf, length).map(|b| b.to_vec()) } } -impl McBufReadable for String { +impl AzaleaRead for String { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { read_utf_with_len(buf, MAX_STRING_LENGTH.into()) } } -impl McBufReadable for u32 { +impl AzaleaRead for u32 { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { Ok(i32::azalea_read(buf)? as u32) } } -impl McBufVarReadable for u32 { +impl AzaleaReadVar for u32 { fn azalea_read_var(buf: &mut Cursor<&[u8]>) -> Result { Ok(i32::azalea_read_var(buf)? as u32) } } -impl McBufReadable for u16 { +impl AzaleaRead for u16 { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { i16::azalea_read(buf).map(|i| i as u16) } } -impl McBufReadable for i16 { +impl AzaleaRead for i16 { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { Ok(buf.read_i16::()?) } } -impl McBufVarReadable for u16 { +impl AzaleaReadVar for u16 { fn azalea_read_var(buf: &mut Cursor<&[u8]>) -> Result { Ok(i32::azalea_read_var(buf)? as u16) } } -impl McBufVarReadable for Vec { +impl AzaleaReadVar for Vec { fn azalea_read_var(buf: &mut Cursor<&[u8]>) -> Result { let length = i32::azalea_read_var(buf)? as usize; let mut contents = Vec::with_capacity(usize::min(length, 65536)); @@ -263,19 +263,19 @@ impl McBufVarReadable for Vec { } } -impl McBufReadable for i64 { +impl AzaleaRead for i64 { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { Ok(buf.read_i64::()?) } } -impl McBufReadable for u64 { +impl AzaleaRead for u64 { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { i64::azalea_read(buf).map(|i| i as u64) } } -impl McBufReadable for bool { +impl AzaleaRead for bool { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let byte = u8::azalea_read(buf)?; if byte > 1 { @@ -285,31 +285,31 @@ impl McBufReadable for bool { } } -impl McBufReadable for u8 { +impl AzaleaRead for u8 { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { Ok(buf.read_u8()?) } } -impl McBufReadable for i8 { +impl AzaleaRead for i8 { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { u8::azalea_read(buf).map(|i| i as i8) } } -impl McBufReadable for f32 { +impl AzaleaRead for f32 { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { Ok(buf.read_f32::()?) } } -impl McBufReadable for f64 { +impl AzaleaRead for f64 { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { Ok(buf.read_f64::()?) } } -impl McBufReadable for Option { +impl AzaleaRead for Option { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let present = bool::azalea_read(buf)?; Ok(if present { @@ -320,7 +320,7 @@ impl McBufReadable for Option { } } -impl McBufVarReadable for Option { +impl AzaleaReadVar for Option { fn azalea_read_var(buf: &mut Cursor<&[u8]>) -> Result { let present = bool::azalea_read(buf)?; Ok(if present { @@ -332,7 +332,7 @@ impl McBufVarReadable for Option { } // [String; 4] -impl McBufReadable for [T; N] { +impl AzaleaRead for [T; N] { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let mut contents = Vec::with_capacity(N); for _ in 0..N { @@ -344,13 +344,13 @@ impl McBufReadable for [T; N] { } } -impl McBufReadable for simdnbt::owned::NbtTag { +impl AzaleaRead for simdnbt::owned::NbtTag { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { Ok(simdnbt::owned::read_tag(buf).map_err(simdnbt::Error::from)?) } } -impl McBufReadable for simdnbt::owned::NbtCompound { +impl AzaleaRead for simdnbt::owned::NbtCompound { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { match simdnbt::owned::read_tag(buf).map_err(simdnbt::Error::from)? { simdnbt::owned::NbtTag::Compound(compound) => Ok(compound), @@ -359,15 +359,15 @@ impl McBufReadable for simdnbt::owned::NbtCompound { } } -impl McBufReadable for simdnbt::owned::Nbt { +impl AzaleaRead for simdnbt::owned::Nbt { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { Ok(simdnbt::owned::read_unnamed(buf)?) } } -impl McBufReadable for Box +impl AzaleaRead for Box where - T: McBufReadable, + T: AzaleaRead, { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { Ok(Box::new(T::azalea_read(buf)?)) diff --git a/azalea-buf/src/serializable_uuid.rs b/azalea-buf/src/serializable_uuid.rs index 8091548ef..53eccbbb9 100755 --- a/azalea-buf/src/serializable_uuid.rs +++ b/azalea-buf/src/serializable_uuid.rs @@ -2,7 +2,7 @@ use std::io::{Cursor, Write}; use uuid::Uuid; -use crate::{read::BufReadError, McBufReadable, McBufWritable}; +use crate::{read::BufReadError, AzaleaRead, AzaleaWrite}; pub trait SerializableUuid { fn to_int_array(&self) -> [u32; 4]; @@ -34,7 +34,7 @@ impl SerializableUuid for Uuid { } } -impl McBufReadable for Uuid { +impl AzaleaRead for Uuid { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { Ok(Uuid::from_int_array([ u32::azalea_read(buf)?, @@ -45,7 +45,7 @@ impl McBufReadable for Uuid { } } -impl McBufWritable for Uuid { +impl AzaleaWrite for Uuid { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let [a, b, c, d] = self.to_int_array(); a.azalea_write(buf)?; diff --git a/azalea-buf/src/write.rs b/azalea-buf/src/write.rs index b8e4039c3..1092586d8 100755 --- a/azalea-buf/src/write.rs +++ b/azalea-buf/src/write.rs @@ -20,21 +20,21 @@ fn write_utf_with_len( Ok(()) } -pub trait McBufWritable { +pub trait AzaleaWrite { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error>; } -pub trait McBufVarWritable { +pub trait AzaleaWriteVar { fn azalea_write_var(&self, buf: &mut impl Write) -> Result<(), std::io::Error>; } -impl McBufWritable for i32 { +impl AzaleaWrite for i32 { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { WriteBytesExt::write_i32::(buf, *self) } } -impl McBufVarWritable for i32 { +impl AzaleaWriteVar for i32 { fn azalea_write_var(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut buffer = [0]; let mut value = *self; @@ -53,19 +53,19 @@ impl McBufVarWritable for i32 { } } -impl McBufWritable for UnsizedByteArray { +impl AzaleaWrite for UnsizedByteArray { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { buf.write_all(self) } } -impl McBufWritable for Vec { +impl AzaleaWrite for Vec { default fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { self[..].azalea_write(buf) } } -impl McBufWritable for [T] { +impl AzaleaWrite for [T] { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { (self.len() as u32).azalea_write_var(buf)?; for item in self { @@ -75,7 +75,7 @@ impl McBufWritable for [T] { } } -impl McBufWritable for HashMap { +impl AzaleaWrite for HashMap { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { u32::azalea_write_var(&(self.len() as u32), buf)?; for (key, value) in self { @@ -87,7 +87,7 @@ impl McBufWritable for HashMap { } } -impl McBufVarWritable for HashMap { +impl AzaleaWriteVar for HashMap { fn azalea_write_var(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { u32::azalea_write_var(&(self.len() as u32), buf)?; for (key, value) in self { @@ -99,38 +99,38 @@ impl McBufVarWritable for HashMap { } } -impl McBufWritable for Vec { +impl AzaleaWrite for Vec { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { (self.len() as u32).azalea_write_var(buf)?; buf.write_all(self) } } -impl McBufWritable for String { +impl AzaleaWrite for String { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { write_utf_with_len(buf, self, MAX_STRING_LENGTH.into()) } } -impl McBufWritable for &str { +impl AzaleaWrite for &str { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { write_utf_with_len(buf, self, MAX_STRING_LENGTH.into()) } } -impl McBufWritable for u32 { +impl AzaleaWrite for u32 { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { i32::azalea_write(&(*self as i32), buf) } } -impl McBufVarWritable for u32 { +impl AzaleaWriteVar for u32 { fn azalea_write_var(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { i32::azalea_write_var(&(*self as i32), buf) } } -impl McBufVarWritable for i64 { +impl AzaleaWriteVar for i64 { fn azalea_write_var(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut buffer = [0]; let mut value = *self; @@ -149,25 +149,25 @@ impl McBufVarWritable for i64 { } } -impl McBufVarWritable for u64 { +impl AzaleaWriteVar for u64 { fn azalea_write_var(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { i64::azalea_write_var(&(*self as i64), buf) } } -impl McBufWritable for u16 { +impl AzaleaWrite for u16 { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { i16::azalea_write(&(*self as i16), buf) } } -impl McBufVarWritable for u16 { +impl AzaleaWriteVar for u16 { fn azalea_write_var(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { i32::azalea_write_var(&(*self as i32), buf) } } -impl McBufVarWritable for Vec { +impl AzaleaWriteVar for Vec { fn azalea_write_var(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { u32::azalea_write_var(&(self.len() as u32), buf)?; for i in self { @@ -177,56 +177,56 @@ impl McBufVarWritable for Vec { } } -impl McBufWritable for u8 { +impl AzaleaWrite for u8 { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { WriteBytesExt::write_u8(buf, *self) } } -impl McBufWritable for i16 { +impl AzaleaWrite for i16 { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { WriteBytesExt::write_i16::(buf, *self) } } -impl McBufWritable for i64 { +impl AzaleaWrite for i64 { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { WriteBytesExt::write_i64::(buf, *self) } } -impl McBufWritable for u64 { +impl AzaleaWrite for u64 { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { i64::azalea_write(&(*self as i64), buf) } } -impl McBufWritable for bool { +impl AzaleaWrite for bool { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let byte = u8::from(*self); byte.azalea_write(buf) } } -impl McBufWritable for i8 { +impl AzaleaWrite for i8 { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { (*self as u8).azalea_write(buf) } } -impl McBufWritable for f32 { +impl AzaleaWrite for f32 { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { WriteBytesExt::write_f32::(buf, *self) } } -impl McBufWritable for f64 { +impl AzaleaWrite for f64 { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { WriteBytesExt::write_f64::(buf, *self) } } -impl McBufWritable for Option { +impl AzaleaWrite for Option { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { if let Some(s) = self { true.azalea_write(buf)?; @@ -238,7 +238,7 @@ impl McBufWritable for Option { } } -impl McBufVarWritable for Option { +impl AzaleaWriteVar for Option { fn azalea_write_var(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { if let Some(s) = self { true.azalea_write(buf)?; @@ -251,7 +251,7 @@ impl McBufVarWritable for Option { } // [T; N] -impl McBufWritable for [T; N] { +impl AzaleaWrite for [T; N] { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { for i in self { i.azalea_write(buf)?; @@ -260,7 +260,7 @@ impl McBufWritable for [T; N] { } } -impl McBufWritable for simdnbt::owned::NbtTag { +impl AzaleaWrite for simdnbt::owned::NbtTag { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut data = Vec::new(); self.write(&mut data); @@ -268,7 +268,7 @@ impl McBufWritable for simdnbt::owned::NbtTag { } } -impl McBufWritable for simdnbt::owned::NbtCompound { +impl AzaleaWrite for simdnbt::owned::NbtCompound { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut data = Vec::new(); simdnbt::owned::NbtTag::Compound(self.clone()).write(&mut data); @@ -276,7 +276,7 @@ impl McBufWritable for simdnbt::owned::NbtCompound { } } -impl McBufWritable for simdnbt::owned::Nbt { +impl AzaleaWrite for simdnbt::owned::Nbt { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut data = Vec::new(); self.write_unnamed(&mut data); @@ -284,9 +284,9 @@ impl McBufWritable for simdnbt::owned::Nbt { } } -impl McBufWritable for Box +impl AzaleaWrite for Box where - T: McBufWritable, + T: AzaleaWrite, { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { T::azalea_write(&**self, buf) diff --git a/azalea-chat/src/component.rs b/azalea-chat/src/component.rs index f5ecd4c17..c0ebeb5fe 100755 --- a/azalea-chat/src/component.rs +++ b/azalea-chat/src/component.rs @@ -1,7 +1,7 @@ use std::fmt::Display; #[cfg(feature = "azalea-buf")] -use azalea_buf::{BufReadError, McBufReadable, McBufWritable}; +use azalea_buf::{BufReadError, AzaleaRead, AzaleaWrite}; use once_cell::sync::Lazy; use serde::{de, Deserialize, Deserializer, Serialize}; #[cfg(feature = "simdnbt")] @@ -456,7 +456,7 @@ impl From<&simdnbt::Mutf8Str> for FormattedText { #[cfg(feature = "azalea-buf")] #[cfg(feature = "simdnbt")] -impl McBufReadable for FormattedText { +impl AzaleaRead for FormattedText { fn azalea_read(buf: &mut std::io::Cursor<&[u8]>) -> Result { let nbt = simdnbt::borrow::read_optional_tag(buf)?; if let Some(nbt) = nbt { @@ -471,7 +471,7 @@ impl McBufReadable for FormattedText { #[cfg(feature = "azalea-buf")] #[cfg(feature = "simdnbt")] -impl McBufWritable for FormattedText { +impl AzaleaWrite for FormattedText { fn azalea_write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { let mut out = Vec::new(); simdnbt::owned::BaseNbt::write_unnamed(&(self.clone().to_compound().into()), &mut out); diff --git a/azalea-chat/src/numbers.rs b/azalea-chat/src/numbers.rs index 87fdecc65..161f1177d 100644 --- a/azalea-chat/src/numbers.rs +++ b/azalea-chat/src/numbers.rs @@ -4,7 +4,7 @@ use std::io::{Cursor, Write}; #[cfg(feature = "azalea-buf")] -use azalea_buf::{McBufReadable, McBufWritable}; +use azalea_buf::{AzaleaRead, AzaleaWrite}; use azalea_registry::NumberFormatKind; use simdnbt::owned::Nbt; @@ -18,7 +18,7 @@ pub enum NumberFormat { } #[cfg(feature = "azalea-buf")] -impl McBufReadable for NumberFormat { +impl AzaleaRead for NumberFormat { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let kind = NumberFormatKind::azalea_read(buf)?; match kind { @@ -34,7 +34,7 @@ impl McBufReadable for NumberFormat { } #[cfg(feature = "azalea-buf")] -impl McBufWritable for NumberFormat { +impl AzaleaWrite for NumberFormat { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { match self { NumberFormat::Blank => NumberFormatKind::Blank.azalea_write(buf)?, diff --git a/azalea-client/src/configuration.rs b/azalea-client/src/configuration.rs index d94f39e68..e07e7a74b 100644 --- a/azalea-client/src/configuration.rs +++ b/azalea-client/src/configuration.rs @@ -1,4 +1,4 @@ -use azalea_buf::McBufWritable; +use azalea_buf::AzaleaWrite; use azalea_core::resource_location::ResourceLocation; use azalea_protocol::{ common::ClientInformation, diff --git a/azalea-core/src/bitset.rs b/azalea-core/src/bitset.rs index 7d6dee940..c6756b559 100755 --- a/azalea-core/src/bitset.rs +++ b/azalea-core/src/bitset.rs @@ -1,6 +1,6 @@ use std::io::{Cursor, Write}; -use azalea_buf::{BufReadError, McBuf, McBufReadable, McBufWritable}; +use azalea_buf::{BufReadError, McBuf, AzaleaRead, AzaleaWrite}; /// Represents Java's BitSet, a list of bits. #[derive(Debug, Clone, PartialEq, Eq, Hash, Default, McBuf)] @@ -159,7 +159,7 @@ where } } -impl McBufReadable for FixedBitSet +impl AzaleaRead for FixedBitSet where [u8; N.div_ceil(8)]: Sized, { @@ -171,7 +171,7 @@ where Ok(FixedBitSet { data }) } } -impl McBufWritable for FixedBitSet +impl AzaleaWrite for FixedBitSet where [u8; N.div_ceil(8)]: Sized, { diff --git a/azalea-core/src/difficulty.rs b/azalea-core/src/difficulty.rs index 5bc1f5083..e913ffac3 100755 --- a/azalea-core/src/difficulty.rs +++ b/azalea-core/src/difficulty.rs @@ -3,7 +3,7 @@ use std::{ io::{Cursor, Write}, }; -use azalea_buf::{BufReadError, McBufReadable, McBufWritable}; +use azalea_buf::{BufReadError, AzaleaRead, AzaleaWrite}; #[derive(Hash, Clone, Copy, Debug, PartialEq, Eq)] pub enum Difficulty { @@ -66,13 +66,13 @@ impl Difficulty { } } -impl McBufReadable for Difficulty { +impl AzaleaRead for Difficulty { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { Ok(Difficulty::by_id(u8::azalea_read(buf)?)) } } -impl McBufWritable for Difficulty { +impl AzaleaWrite for Difficulty { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { u8::azalea_write(&self.id(), buf) } diff --git a/azalea-core/src/game_type.rs b/azalea-core/src/game_type.rs index d8230ead8..f898d721b 100644 --- a/azalea-core/src/game_type.rs +++ b/azalea-core/src/game_type.rs @@ -1,6 +1,6 @@ use std::io::{Cursor, Write}; -use azalea_buf::{BufReadError, McBufReadable, McBufVarReadable, McBufWritable}; +use azalea_buf::{BufReadError, AzaleaRead, AzaleaReadVar, AzaleaWrite}; use tracing::debug; /// A Minecraft gamemode, like survival or creative. @@ -93,7 +93,7 @@ impl GameMode { } } -impl McBufReadable for GameMode { +impl AzaleaRead for GameMode { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let id = u32::azalea_read_var(buf)?; let id = id.try_into().unwrap_or_else(|_| { @@ -107,13 +107,13 @@ impl McBufReadable for GameMode { } } -impl McBufWritable for GameMode { +impl AzaleaWrite for GameMode { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { u8::azalea_write(&self.to_id(), buf) } } -/// Rust doesn't let us `impl McBufReadable for Option` so we have to +/// Rust doesn't let us `impl AzaleaRead for Option` so we have to /// make a new type :( #[derive(Hash, Copy, Clone, Debug)] pub struct OptionalGameType(pub Option); @@ -130,14 +130,14 @@ impl From for Option { } } -impl McBufReadable for OptionalGameType { +impl AzaleaRead for OptionalGameType { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let id = i8::azalea_read(buf)?; GameMode::from_optional_id(id).ok_or(BufReadError::UnexpectedEnumVariant { id: id as i32 }) } } -impl McBufWritable for OptionalGameType { +impl AzaleaWrite for OptionalGameType { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { GameMode::to_optional_id(*self).azalea_write(buf) } diff --git a/azalea-core/src/position.rs b/azalea-core/src/position.rs index b045269c5..c9aa010aa 100755 --- a/azalea-core/src/position.rs +++ b/azalea-core/src/position.rs @@ -11,7 +11,7 @@ use std::{ str::FromStr, }; -use azalea_buf::{BufReadError, McBuf, McBufReadable, McBufWritable}; +use azalea_buf::{BufReadError, McBuf, AzaleaRead, AzaleaWrite}; #[cfg(feature = "serde")] use serde::{Deserialize, Serialize}; @@ -315,13 +315,13 @@ impl From for ChunkPos { } } } -impl McBufReadable for ChunkPos { +impl AzaleaRead for ChunkPos { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let long = u64::azalea_read(buf)?; Ok(ChunkPos::from(long)) } } -impl McBufWritable for ChunkPos { +impl AzaleaWrite for ChunkPos { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { u64::from(*self).azalea_write(buf)?; Ok(()) @@ -586,7 +586,7 @@ const PACKED_Z_MASK: u64 = (1 << PACKED_Z_LENGTH) - 1; const Z_OFFSET: u64 = PACKED_Y_LENGTH; const X_OFFSET: u64 = PACKED_Y_LENGTH + PACKED_Z_LENGTH; -impl McBufReadable for BlockPos { +impl AzaleaRead for BlockPos { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let val = i64::azalea_read(buf)?; let x = (val << (64 - X_OFFSET - PACKED_X_LENGTH) >> (64 - PACKED_X_LENGTH)) as i32; @@ -596,7 +596,7 @@ impl McBufReadable for BlockPos { } } -impl McBufReadable for GlobalPos { +impl AzaleaRead for GlobalPos { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { Ok(GlobalPos { world: ResourceLocation::azalea_read(buf)?, @@ -605,7 +605,7 @@ impl McBufReadable for GlobalPos { } } -impl McBufReadable for ChunkSectionPos { +impl AzaleaRead for ChunkSectionPos { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let long = i64::azalea_read(buf)?; Ok(ChunkSectionPos { @@ -616,7 +616,7 @@ impl McBufReadable for ChunkSectionPos { } } -impl McBufWritable for BlockPos { +impl AzaleaWrite for BlockPos { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut val: u64 = 0; val |= ((self.x as u64) & PACKED_X_MASK) << X_OFFSET; @@ -626,7 +626,7 @@ impl McBufWritable for BlockPos { } } -impl McBufWritable for GlobalPos { +impl AzaleaWrite for GlobalPos { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { ResourceLocation::azalea_write(&self.world, buf)?; BlockPos::azalea_write(&self.pos, buf)?; @@ -635,7 +635,7 @@ impl McBufWritable for GlobalPos { } } -impl McBufWritable for ChunkSectionPos { +impl AzaleaWrite for ChunkSectionPos { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let long = (((self.x & 0x3FFFFF) as i64) << 42) | (self.y & 0xFFFFF) as i64 diff --git a/azalea-core/src/resource_location.rs b/azalea-core/src/resource_location.rs index 25e54d86e..539b9b81f 100755 --- a/azalea-core/src/resource_location.rs +++ b/azalea-core/src/resource_location.rs @@ -6,7 +6,7 @@ use std::{ str::FromStr, }; -use azalea_buf::{BufReadError, McBufReadable, McBufWritable}; +use azalea_buf::{BufReadError, AzaleaRead, AzaleaWrite}; #[cfg(feature = "serde")] use serde::{de, Deserialize, Deserializer, Serialize, Serializer}; use simdnbt::{owned::NbtTag, FromNbtTag, ToNbtTag}; @@ -60,13 +60,13 @@ impl FromStr for ResourceLocation { } } -impl McBufReadable for ResourceLocation { +impl AzaleaRead for ResourceLocation { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let location_string = String::azalea_read(buf)?; Ok(ResourceLocation::new(&location_string)) } } -impl McBufWritable for ResourceLocation { +impl AzaleaWrite for ResourceLocation { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { self.to_string().azalea_write(buf) } diff --git a/azalea-crypto/src/signing.rs b/azalea-crypto/src/signing.rs index 8ff7d7bf2..9e276ede9 100755 --- a/azalea-crypto/src/signing.rs +++ b/azalea-crypto/src/signing.rs @@ -1,6 +1,6 @@ use std::time::{SystemTime, UNIX_EPOCH}; -use azalea_buf::{McBuf, McBufWritable}; +use azalea_buf::{McBuf, AzaleaWrite}; use rsa::{ signature::{RandomizedSigner, SignatureEncoding}, RsaPrivateKey, diff --git a/azalea-entity/src/data.rs b/azalea-entity/src/data.rs index 12558a54f..a67037e2a 100755 --- a/azalea-entity/src/data.rs +++ b/azalea-entity/src/data.rs @@ -2,9 +2,7 @@ use std::io::{Cursor, Write}; -use azalea_buf::{ - BufReadError, McBuf, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable, -}; +use azalea_buf::{AzaleaRead, AzaleaReadVar, AzaleaWrite, AzaleaWriteVar, BufReadError, McBuf}; use azalea_chat::FormattedText; use azalea_core::{ direction::Direction, @@ -36,7 +34,7 @@ impl EntityMetadataItems { } } -impl McBufReadable for EntityMetadataItems { +impl AzaleaRead for EntityMetadataItems { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let mut metadata = Vec::new(); loop { @@ -51,7 +49,7 @@ impl McBufReadable for EntityMetadataItems { } } -impl McBufWritable for EntityMetadataItems { +impl AzaleaWrite for EntityMetadataItems { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { for item in &self.0 { item.index.azalea_write(buf)?; @@ -122,7 +120,7 @@ pub enum ArmadilloStateKind { Scared, } -impl McBufReadable for OptionalUnsignedInt { +impl AzaleaRead for OptionalUnsignedInt { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let val = u32::azalea_read_var(buf)?; Ok(OptionalUnsignedInt(if val == 0 { @@ -132,7 +130,7 @@ impl McBufReadable for OptionalUnsignedInt { })) } } -impl McBufWritable for OptionalUnsignedInt { +impl AzaleaWrite for OptionalUnsignedInt { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { match self.0 { Some(val) => (val + 1).azalea_write_var(buf), diff --git a/azalea-inventory/src/components.rs b/azalea-inventory/src/components.rs index 42ac546cb..f2d44a055 100644 --- a/azalea-inventory/src/components.rs +++ b/azalea-inventory/src/components.rs @@ -1,7 +1,7 @@ use core::f64; use std::{any::Any, collections::HashMap, io::Cursor}; -use azalea_buf::{BufReadError, McBuf, McBufReadable, McBufWritable}; +use azalea_buf::{BufReadError, McBuf, AzaleaRead, AzaleaWrite}; use azalea_chat::FormattedText; use azalea_core::{position::GlobalPos, resource_location::ResourceLocation}; use azalea_registry::{ @@ -26,7 +26,7 @@ pub trait EncodableDataComponent: Send + Sync + Any { impl EncodableDataComponent for T where - T: DataComponent + Clone + McBufWritable + McBufReadable + PartialEq, + T: DataComponent + Clone + AzaleaWrite + AzaleaRead + PartialEq, { fn encode(&self, buf: &mut Vec) -> Result<(), std::io::Error> { self.azalea_write(buf) diff --git a/azalea-inventory/src/slot.rs b/azalea-inventory/src/slot.rs index 1a1a89f96..7d62bf69e 100644 --- a/azalea-inventory/src/slot.rs +++ b/azalea-inventory/src/slot.rs @@ -4,7 +4,7 @@ use std::{ io::{Cursor, Write}, }; -use azalea_buf::{BufReadError, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable}; +use azalea_buf::{AzaleaRead, AzaleaReadVar, AzaleaWrite, AzaleaWriteVar, BufReadError}; use azalea_registry::DataComponentKind; use crate::components::{self}; @@ -140,7 +140,7 @@ impl ItemStackData { } } -impl McBufReadable for ItemStack { +impl AzaleaRead for ItemStack { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let count = i32::azalea_read_var(buf)?; if count <= 0 { @@ -157,7 +157,7 @@ impl McBufReadable for ItemStack { } } -impl McBufWritable for ItemStack { +impl AzaleaWrite for ItemStack { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { match self { ItemStack::Empty => 0.azalea_write_var(buf)?, @@ -182,7 +182,7 @@ impl DataComponentPatch { } } -impl McBufReadable for DataComponentPatch { +impl AzaleaRead for DataComponentPatch { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let components_with_data_count = u32::azalea_read_var(buf)?; let components_without_data_count = u32::azalea_read_var(buf)?; @@ -207,7 +207,7 @@ impl McBufReadable for DataComponentPatch { } } -impl McBufWritable for DataComponentPatch { +impl AzaleaWrite for DataComponentPatch { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut components_with_data_count = 0; let mut components_without_data_count = 0; diff --git a/azalea-protocol/README.md b/azalea-protocol/README.md index 3f0ea40e8..91d425a68 100755 --- a/azalea-protocol/README.md +++ b/azalea-protocol/README.md @@ -21,6 +21,6 @@ Adding new packets is usually pretty easy, but you'll want to have Minecraft's d ### Implementing packets -You can manually implement reading and writing functionality for a packet by implementing McBufReadable and McBufWritable, but you can also have this automatically generated for a struct or enum by deriving McBuf. +You can manually implement reading and writing functionality for a packet by implementing AzaleaRead and AzaleaWrite, but you can also have this automatically generated for a struct or enum by deriving McBuf. Look at other packets as an example. diff --git a/azalea-protocol/azalea-protocol-macros/src/lib.rs b/azalea-protocol/azalea-protocol-macros/src/lib.rs index dde36d333..01ad307c9 100755 --- a/azalea-protocol/azalea-protocol-macros/src/lib.rs +++ b/azalea-protocol/azalea-protocol-macros/src/lib.rs @@ -21,13 +21,13 @@ fn as_packet_derive(input: TokenStream, state: proc_macro2::TokenStream) -> Toke let contents = quote! { impl #ident { pub fn write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { - azalea_buf::McBufWritable::azalea_write(self, buf) + azalea_buf::AzaleaWrite::azalea_write(self, buf) } pub fn read( buf: &mut std::io::Cursor<&[u8]>, ) -> Result<#state, azalea_buf::BufReadError> { - use azalea_buf::McBufReadable; + use azalea_buf::AzaleaRead; Ok(Self::azalea_read(buf)?.into_variant()) } diff --git a/azalea-protocol/src/common.rs b/azalea-protocol/src/common.rs index d9f99b500..9529cd1b9 100644 --- a/azalea-protocol/src/common.rs +++ b/azalea-protocol/src/common.rs @@ -1,6 +1,6 @@ //! Some serializable data types that are used by several packets. -use azalea_buf::{McBuf, McBufReadable, McBufWritable}; +use azalea_buf::{AzaleaRead, AzaleaWrite, McBuf}; use azalea_core::bitset::FixedBitSet; use bevy_ecs::component::Component; @@ -97,7 +97,7 @@ impl Default for ModelCustomization { } } -impl McBufReadable for ModelCustomization { +impl AzaleaRead for ModelCustomization { fn azalea_read(buf: &mut std::io::Cursor<&[u8]>) -> Result { let set = FixedBitSet::<7>::azalea_read(buf)?; Ok(Self { @@ -112,7 +112,7 @@ impl McBufReadable for ModelCustomization { } } -impl McBufWritable for ModelCustomization { +impl AzaleaWrite for ModelCustomization { fn azalea_write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { let mut set = FixedBitSet::<7>::new(); if self.cape { @@ -144,7 +144,7 @@ impl McBufWritable for ModelCustomization { mod tests { use std::io::Cursor; - use azalea_buf::{McBufReadable, McBufWritable}; + use azalea_buf::{AzaleaRead, AzaleaWrite}; use super::*; diff --git a/azalea-protocol/src/packets/config/c_update_tags.rs b/azalea-protocol/src/packets/config/c_update_tags.rs index 83a97e38c..95b75d2c9 100644 --- a/azalea-protocol/src/packets/config/c_update_tags.rs +++ b/azalea-protocol/src/packets/config/c_update_tags.rs @@ -2,8 +2,8 @@ use std::io::Cursor; use std::ops::Deref; use std::{collections::HashMap, io::Write}; -use azalea_buf::{BufReadError, McBuf, McBufVarReadable, McBufVarWritable}; -use azalea_buf::{McBufReadable, McBufWritable}; +use azalea_buf::{AzaleaRead, AzaleaWrite}; +use azalea_buf::{AzaleaWriteVar, BufReadError, McBuf, AzaleaReadVar}; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundConfigPacket; @@ -21,7 +21,7 @@ pub struct Tags { #[derive(Clone, Debug)] pub struct TagMap(pub HashMap>); -impl McBufReadable for TagMap { +impl AzaleaRead for TagMap { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let length = u32::azalea_read_var(buf)? as usize; let mut data = HashMap::with_capacity(length); @@ -39,7 +39,7 @@ impl McBufReadable for TagMap { } } -impl McBufWritable for TagMap { +impl AzaleaWrite for TagMap { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { (self.len() as u32).azalea_write_var(buf)?; for (k, v) in &self.0 { @@ -49,7 +49,7 @@ impl McBufWritable for TagMap { Ok(()) } } -impl McBufReadable for Tags { +impl AzaleaRead for Tags { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let name = ResourceLocation::azalea_read(buf)?; let elements = Vec::::azalea_read_var(buf)?; @@ -57,7 +57,7 @@ impl McBufReadable for Tags { } } -impl McBufWritable for Tags { +impl AzaleaWrite for Tags { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { self.name.azalea_write(buf)?; self.elements.azalea_write_var(buf)?; diff --git a/azalea-protocol/src/packets/game/c_boss_event.rs b/azalea-protocol/src/packets/game/c_boss_event.rs index 2e292afe5..5e479db26 100755 --- a/azalea-protocol/src/packets/game/c_boss_event.rs +++ b/azalea-protocol/src/packets/game/c_boss_event.rs @@ -2,7 +2,7 @@ use std::io::Cursor; use std::io::Write; use azalea_buf::{ - BufReadError, McBuf, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable, + BufReadError, McBuf, AzaleaRead, AzaleaReadVar, AzaleaWriteVar, AzaleaWrite, }; use azalea_chat::FormattedText; use azalea_core::bitset::FixedBitSet; @@ -25,7 +25,7 @@ pub enum Operation { UpdateProperties(Properties), } -impl McBufReadable for Operation { +impl AzaleaRead for Operation { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let operation_id = u32::azalea_read_var(buf)?; Ok(match operation_id { @@ -44,7 +44,7 @@ impl McBufReadable for Operation { } } -impl McBufWritable for Operation { +impl AzaleaWrite for Operation { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { match self { Operation::Add(add) => { @@ -116,7 +116,7 @@ pub struct Properties { pub create_world_fog: bool, } -impl McBufReadable for Properties { +impl AzaleaRead for Properties { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let set = FixedBitSet::<3>::azalea_read(buf)?; Ok(Self { @@ -127,7 +127,7 @@ impl McBufReadable for Properties { } } -impl McBufWritable for Properties { +impl AzaleaWrite for Properties { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut set = FixedBitSet::<3>::new(); if self.darken_screen { diff --git a/azalea-protocol/src/packets/game/c_command_suggestions.rs b/azalea-protocol/src/packets/game/c_command_suggestions.rs index ed8b42299..f1fa65d7c 100755 --- a/azalea-protocol/src/packets/game/c_command_suggestions.rs +++ b/azalea-protocol/src/packets/game/c_command_suggestions.rs @@ -14,7 +14,7 @@ mod tests { use std::io::Cursor; use azalea_brigadier::{context::StringRange, suggestion::Suggestion}; - use azalea_buf::{McBufReadable, McBufWritable}; + use azalea_buf::{AzaleaRead, AzaleaWrite}; use super::*; diff --git a/azalea-protocol/src/packets/game/c_commands.rs b/azalea-protocol/src/packets/game/c_commands.rs index e1a20e6a4..60df57e54 100755 --- a/azalea-protocol/src/packets/game/c_commands.rs +++ b/azalea-protocol/src/packets/game/c_commands.rs @@ -1,7 +1,7 @@ use std::io::{Cursor, Write}; use azalea_buf::{ - BufReadError, McBuf, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable, + BufReadError, McBuf, AzaleaRead, AzaleaReadVar, AzaleaWriteVar, AzaleaWrite, }; use azalea_core::{bitset::FixedBitSet, resource_location::ResourceLocation}; use azalea_protocol_macros::ClientboundGamePacket; @@ -46,7 +46,7 @@ impl PartialEq for BrigadierNumber { } } -impl McBufReadable for BrigadierNumber { +impl AzaleaRead for BrigadierNumber { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let flags = FixedBitSet::<2>::azalea_read(buf)?; let min = if flags.index(0) { @@ -62,7 +62,7 @@ impl McBufReadable for BrigadierNumber { Ok(BrigadierNumber { min, max }) } } -impl McBufWritable for BrigadierNumber { +impl AzaleaWrite for BrigadierNumber { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut flags = FixedBitSet::<2>::new(); if self.min.is_some() { @@ -156,7 +156,7 @@ pub struct EntityParser { pub single: bool, pub players_only: bool, } -impl McBufReadable for EntityParser { +impl AzaleaRead for EntityParser { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let flags = FixedBitSet::<2>::azalea_read(buf)?; Ok(EntityParser { @@ -165,7 +165,7 @@ impl McBufReadable for EntityParser { }) } } -impl McBufWritable for EntityParser { +impl AzaleaWrite for EntityParser { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut flags = FixedBitSet::<2>::new(); if self.single { @@ -180,7 +180,7 @@ impl McBufWritable for EntityParser { } // TODO: BrigadierNodeStub should have more stuff -impl McBufReadable for BrigadierNodeStub { +impl AzaleaRead for BrigadierNodeStub { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let flags = FixedBitSet::<8>::azalea_read(buf)?; if flags.index(5) || flags.index(6) || flags.index(7) { @@ -239,7 +239,7 @@ impl McBufReadable for BrigadierNodeStub { } } -impl McBufWritable for BrigadierNodeStub { +impl AzaleaWrite for BrigadierNodeStub { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut flags = FixedBitSet::<4>::new(); if self.is_executable { diff --git a/azalea-protocol/src/packets/game/c_damage_event.rs b/azalea-protocol/src/packets/game/c_damage_event.rs index 73ce307df..4d2185116 100644 --- a/azalea-protocol/src/packets/game/c_damage_event.rs +++ b/azalea-protocol/src/packets/game/c_damage_event.rs @@ -1,6 +1,6 @@ use std::io::{Cursor, Write}; -use azalea_buf::{McBuf, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable}; +use azalea_buf::{McBuf, AzaleaRead, AzaleaReadVar, AzaleaWriteVar, AzaleaWrite}; use azalea_core::position::Vec3; use azalea_protocol_macros::ClientboundGamePacket; @@ -17,7 +17,7 @@ pub struct ClientboundDamageEvent { #[derive(Clone, Debug)] pub struct OptionalEntityId(pub Option); -impl McBufReadable for OptionalEntityId { +impl AzaleaRead for OptionalEntityId { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { match u32::azalea_read_var(buf)? { 0 => Ok(OptionalEntityId(None)), @@ -25,7 +25,7 @@ impl McBufReadable for OptionalEntityId { } } } -impl McBufWritable for OptionalEntityId { +impl AzaleaWrite for OptionalEntityId { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { match self.0 { Some(id) => (id + 1).azalea_write_var(buf), diff --git a/azalea-protocol/src/packets/game/c_explode.rs b/azalea-protocol/src/packets/game/c_explode.rs index 705d32a42..159b41787 100755 --- a/azalea-protocol/src/packets/game/c_explode.rs +++ b/azalea-protocol/src/packets/game/c_explode.rs @@ -4,7 +4,7 @@ use std::{ }; use azalea_buf::{ - BufReadError, McBuf, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable, + BufReadError, McBuf, AzaleaRead, AzaleaReadVar, AzaleaWriteVar, AzaleaWrite, }; use azalea_core::{position::BlockPos, resource_location::ResourceLocation}; use azalea_protocol_macros::ClientboundGamePacket; @@ -34,7 +34,7 @@ pub enum BlockInteraction { TriggerBlock, } -impl McBufReadable for ClientboundExplode { +impl AzaleaRead for ClientboundExplode { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let x = f64::azalea_read(buf)?; let y = f64::azalea_read(buf)?; @@ -88,7 +88,7 @@ impl McBufReadable for ClientboundExplode { } } -impl McBufWritable for ClientboundExplode { +impl AzaleaWrite for ClientboundExplode { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { self.x.azalea_write(buf)?; self.y.azalea_write(buf)?; diff --git a/azalea-protocol/src/packets/game/c_level_chunk_with_light.rs b/azalea-protocol/src/packets/game/c_level_chunk_with_light.rs index 336cf1901..3ba47cbec 100755 --- a/azalea-protocol/src/packets/game/c_level_chunk_with_light.rs +++ b/azalea-protocol/src/packets/game/c_level_chunk_with_light.rs @@ -32,7 +32,7 @@ pub struct BlockEntity { mod tests { use std::{io::Cursor, ops::Deref}; - use azalea_buf::McBufReadable; + use azalea_buf::AzaleaRead; use azalea_world::Chunk; use simdnbt::owned::BaseNbt; diff --git a/azalea-protocol/src/packets/game/c_level_particles.rs b/azalea-protocol/src/packets/game/c_level_particles.rs index d1c8bdb27..eca5b8729 100755 --- a/azalea-protocol/src/packets/game/c_level_particles.rs +++ b/azalea-protocol/src/packets/game/c_level_particles.rs @@ -20,7 +20,7 @@ pub struct ClientboundLevelParticles { mod tests { use std::io::Cursor; - use azalea_buf::McBufReadable; + use azalea_buf::AzaleaRead; use super::*; diff --git a/azalea-protocol/src/packets/game/c_map_item_data.rs b/azalea-protocol/src/packets/game/c_map_item_data.rs index 6123c494b..70c483fcf 100755 --- a/azalea-protocol/src/packets/game/c_map_item_data.rs +++ b/azalea-protocol/src/packets/game/c_map_item_data.rs @@ -1,4 +1,4 @@ -use azalea_buf::{McBuf, McBufReadable, McBufWritable}; +use azalea_buf::{AzaleaRead, AzaleaWrite, McBuf}; use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundGamePacket; @@ -26,7 +26,7 @@ pub struct MapDecoration { #[derive(Debug, Clone)] pub struct OptionalMapPatch(pub Option); -impl McBufReadable for OptionalMapPatch { +impl AzaleaRead for OptionalMapPatch { fn azalea_read(buf: &mut std::io::Cursor<&[u8]>) -> Result { let pos = buf.position(); Ok(Self(if u8::azalea_read(buf)? == 0 { @@ -38,7 +38,7 @@ impl McBufReadable for OptionalMapPatch { } } -impl McBufWritable for OptionalMapPatch { +impl AzaleaWrite for OptionalMapPatch { fn azalea_write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { match &self.0 { None => 0u8.azalea_write(buf), diff --git a/azalea-protocol/src/packets/game/c_player_abilities.rs b/azalea-protocol/src/packets/game/c_player_abilities.rs index 0e21d3d6b..84d6059ea 100755 --- a/azalea-protocol/src/packets/game/c_player_abilities.rs +++ b/azalea-protocol/src/packets/game/c_player_abilities.rs @@ -1,7 +1,7 @@ use std::io::{Cursor, Write}; use azalea_buf::{BufReadError, McBuf}; -use azalea_buf::{McBufReadable, McBufWritable}; +use azalea_buf::{AzaleaRead, AzaleaWrite}; use azalea_core::bitset::FixedBitSet; use azalea_protocol_macros::ClientboundGamePacket; @@ -21,7 +21,7 @@ pub struct PlayerAbilitiesFlags { pub instant_break: bool, } -impl McBufReadable for PlayerAbilitiesFlags { +impl AzaleaRead for PlayerAbilitiesFlags { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let set = FixedBitSet::<4>::azalea_read(buf)?; Ok(PlayerAbilitiesFlags { @@ -33,7 +33,7 @@ impl McBufReadable for PlayerAbilitiesFlags { } } -impl McBufWritable for PlayerAbilitiesFlags { +impl AzaleaWrite for PlayerAbilitiesFlags { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut set = FixedBitSet::<4>::new(); if self.invulnerable { diff --git a/azalea-protocol/src/packets/game/c_player_chat.rs b/azalea-protocol/src/packets/game/c_player_chat.rs index 62ad7322f..4dbfe5d7a 100644 --- a/azalea-protocol/src/packets/game/c_player_chat.rs +++ b/azalea-protocol/src/packets/game/c_player_chat.rs @@ -1,7 +1,7 @@ use std::io::{Cursor, Write}; use azalea_buf::{ - BufReadError, McBuf, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable, + BufReadError, McBuf, AzaleaRead, AzaleaReadVar, AzaleaWriteVar, AzaleaWrite, }; use azalea_chat::{ translatable_component::{StringOrComponent, TranslatableComponent}, @@ -144,7 +144,7 @@ impl ChatType { } } -impl McBufReadable for PackedMessageSignature { +impl AzaleaRead for PackedMessageSignature { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let id = u32::azalea_read_var(buf)?; if id == 0 { @@ -156,7 +156,7 @@ impl McBufReadable for PackedMessageSignature { } } } -impl McBufWritable for PackedMessageSignature { +impl AzaleaWrite for PackedMessageSignature { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { match self { PackedMessageSignature::Signature(full_signature) => { diff --git a/azalea-protocol/src/packets/game/c_player_info_update.rs b/azalea-protocol/src/packets/game/c_player_info_update.rs index 1232014b4..492020936 100644 --- a/azalea-protocol/src/packets/game/c_player_info_update.rs +++ b/azalea-protocol/src/packets/game/c_player_info_update.rs @@ -5,7 +5,7 @@ use std::{ use azalea_auth::game_profile::{GameProfile, ProfilePropertyValue}; use azalea_buf::{ - BufReadError, McBuf, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable, + BufReadError, McBuf, AzaleaRead, AzaleaReadVar, AzaleaWriteVar, AzaleaWrite, }; use azalea_chat::FormattedText; use azalea_core::{bitset::FixedBitSet, game_type::GameMode}; @@ -63,7 +63,7 @@ pub struct UpdateListOrderAction { pub list_order: i32, } -impl McBufReadable for ClientboundPlayerInfoUpdate { +impl AzaleaRead for ClientboundPlayerInfoUpdate { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let actions = ActionEnumSet::azalea_read(buf)?; let mut entries = Vec::new(); @@ -111,7 +111,7 @@ impl McBufReadable for ClientboundPlayerInfoUpdate { } } -impl McBufWritable for ClientboundPlayerInfoUpdate { +impl AzaleaWrite for ClientboundPlayerInfoUpdate { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { self.actions.azalea_write(buf)?; @@ -173,7 +173,7 @@ pub struct ActionEnumSet { pub update_list_order: bool, } -impl McBufReadable for ActionEnumSet { +impl AzaleaRead for ActionEnumSet { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let set = FixedBitSet::<7>::azalea_read(buf)?; Ok(ActionEnumSet { @@ -188,7 +188,7 @@ impl McBufReadable for ActionEnumSet { } } -impl McBufWritable for ActionEnumSet { +impl AzaleaWrite for ActionEnumSet { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut set = FixedBitSet::<7>::new(); if self.add_player { diff --git a/azalea-protocol/src/packets/game/c_player_position.rs b/azalea-protocol/src/packets/game/c_player_position.rs index 4ea5c4ccb..d4cfcd293 100755 --- a/azalea-protocol/src/packets/game/c_player_position.rs +++ b/azalea-protocol/src/packets/game/c_player_position.rs @@ -1,6 +1,6 @@ use std::io::{Cursor, Write}; -use azalea_buf::{BufReadError, McBuf, McBufReadable, McBufWritable}; +use azalea_buf::{BufReadError, McBuf, AzaleaRead, AzaleaWrite}; use azalea_core::{bitset::FixedBitSet, position::Vec3}; use azalea_protocol_macros::ClientboundGamePacket; @@ -24,7 +24,7 @@ pub struct RelativeMovements { pub x_rot: bool, } -impl McBufReadable for RelativeMovements { +impl AzaleaRead for RelativeMovements { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { // yes minecraft seriously wastes that many bits, smh let set = FixedBitSet::<32>::azalea_read(buf)?; @@ -38,7 +38,7 @@ impl McBufReadable for RelativeMovements { } } -impl McBufWritable for RelativeMovements { +impl AzaleaWrite for RelativeMovements { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut set = FixedBitSet::<5>::new(); if self.x { diff --git a/azalea-protocol/src/packets/game/c_section_blocks_update.rs b/azalea-protocol/src/packets/game/c_section_blocks_update.rs index 29312e787..122e024a7 100755 --- a/azalea-protocol/src/packets/game/c_section_blocks_update.rs +++ b/azalea-protocol/src/packets/game/c_section_blocks_update.rs @@ -2,7 +2,7 @@ use std::io::{Cursor, Write}; use azalea_block::BlockState; use azalea_buf::{ - BufReadError, McBuf, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable, + BufReadError, McBuf, AzaleaRead, AzaleaReadVar, AzaleaWriteVar, AzaleaWrite, }; use azalea_core::position::{ChunkSectionBlockPos, ChunkSectionPos}; use azalea_protocol_macros::ClientboundGamePacket; @@ -19,7 +19,7 @@ pub struct BlockStateWithPosition { pub state: BlockState, } -impl McBufReadable for BlockStateWithPosition { +impl AzaleaRead for BlockStateWithPosition { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let data = u64::azalea_read_var(buf)?; let position_part = data & 4095; @@ -35,7 +35,7 @@ impl McBufReadable for BlockStateWithPosition { } } -impl McBufWritable for BlockStateWithPosition { +impl AzaleaWrite for BlockStateWithPosition { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let data = (self.state.id as u64) << 12 | (u64::from(self.pos.x) << 8 | u64::from(self.pos.z) << 4 | u64::from(self.pos.y)); diff --git a/azalea-protocol/src/packets/game/c_set_equipment.rs b/azalea-protocol/src/packets/game/c_set_equipment.rs index c57a60cc1..1d0b3c796 100755 --- a/azalea-protocol/src/packets/game/c_set_equipment.rs +++ b/azalea-protocol/src/packets/game/c_set_equipment.rs @@ -1,7 +1,7 @@ use std::io::Cursor; use azalea_buf::{BufReadError, McBuf}; -use azalea_buf::{McBufReadable, McBufWritable}; +use azalea_buf::{AzaleaRead, AzaleaWrite}; use azalea_inventory::ItemStack; use azalea_protocol_macros::ClientboundGamePacket; @@ -17,7 +17,7 @@ pub struct EquipmentSlots { pub slots: Vec<(EquipmentSlot, ItemStack)>, } -impl McBufReadable for EquipmentSlots { +impl AzaleaRead for EquipmentSlots { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let mut slots = vec![]; @@ -39,7 +39,7 @@ impl McBufReadable for EquipmentSlots { Ok(EquipmentSlots { slots }) } } -impl McBufWritable for EquipmentSlots { +impl AzaleaWrite for EquipmentSlots { fn azalea_write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { for i in 0..self.slots.len() { let (equipment_slot, item) = &self.slots[i]; diff --git a/azalea-protocol/src/packets/game/c_set_objective.rs b/azalea-protocol/src/packets/game/c_set_objective.rs index d1c2f96fc..2a53d8e22 100755 --- a/azalea-protocol/src/packets/game/c_set_objective.rs +++ b/azalea-protocol/src/packets/game/c_set_objective.rs @@ -1,6 +1,6 @@ use std::io::{Cursor, Write}; -use azalea_buf::{McBuf, McBufReadable, McBufWritable}; +use azalea_buf::{AzaleaRead, McBuf, AzaleaWrite}; use azalea_chat::{numbers::NumberFormat, FormattedText}; use azalea_core::objectives::ObjectiveCriteria; use azalea_protocol_macros::ClientboundGamePacket; @@ -33,7 +33,7 @@ pub enum Method { }, } -impl McBufReadable for Method { +impl AzaleaRead for Method { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let kind = MethodKind::azalea_read(buf)?; match kind { @@ -52,7 +52,7 @@ impl McBufReadable for Method { } } -impl McBufWritable for Method { +impl AzaleaWrite for Method { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { match self { Method::Add { diff --git a/azalea-protocol/src/packets/game/c_set_player_team.rs b/azalea-protocol/src/packets/game/c_set_player_team.rs index b5924a9cc..fe8fda1cf 100755 --- a/azalea-protocol/src/packets/game/c_set_player_team.rs +++ b/azalea-protocol/src/packets/game/c_set_player_team.rs @@ -1,6 +1,6 @@ use std::io::{Cursor, Write}; -use azalea_buf::{BufReadError, McBuf, McBufReadable, McBufWritable}; +use azalea_buf::{BufReadError, McBuf, AzaleaRead, AzaleaWrite}; use azalea_chat::{style::ChatFormatting, FormattedText}; use azalea_protocol_macros::ClientboundGamePacket; @@ -19,7 +19,7 @@ pub enum Method { Leave(PlayerList), } -impl McBufReadable for Method { +impl AzaleaRead for Method { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { Ok(match u8::azalea_read(buf)? { 0 => Method::Add((Parameters::azalea_read(buf)?, PlayerList::azalea_read(buf)?)), @@ -32,7 +32,7 @@ impl McBufReadable for Method { } } -impl McBufWritable for Method { +impl AzaleaWrite for Method { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { match self { Method::Add((parameters, playerlist)) => { diff --git a/azalea-protocol/src/packets/game/c_stop_sound.rs b/azalea-protocol/src/packets/game/c_stop_sound.rs index 7fc8bcf15..0a01fa714 100755 --- a/azalea-protocol/src/packets/game/c_stop_sound.rs +++ b/azalea-protocol/src/packets/game/c_stop_sound.rs @@ -1,6 +1,6 @@ use std::io::{Cursor, Write}; -use azalea_buf::{BufReadError, McBufReadable, McBufWritable}; +use azalea_buf::{BufReadError, AzaleaRead, AzaleaWrite}; use azalea_core::{bitset::FixedBitSet, resource_location::ResourceLocation}; use azalea_protocol_macros::ClientboundGamePacket; @@ -12,7 +12,7 @@ pub struct ClientboundStopSound { pub name: Option, } -impl McBufReadable for ClientboundStopSound { +impl AzaleaRead for ClientboundStopSound { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let set = FixedBitSet::<2>::azalea_read(buf)?; let source = if set.index(0) { @@ -30,7 +30,7 @@ impl McBufReadable for ClientboundStopSound { } } -impl McBufWritable for ClientboundStopSound { +impl AzaleaWrite for ClientboundStopSound { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut set = FixedBitSet::<2>::new(); if self.source.is_some() { diff --git a/azalea-protocol/src/packets/game/c_system_chat.rs b/azalea-protocol/src/packets/game/c_system_chat.rs index 9055f8399..13e324913 100755 --- a/azalea-protocol/src/packets/game/c_system_chat.rs +++ b/azalea-protocol/src/packets/game/c_system_chat.rs @@ -12,7 +12,7 @@ pub struct ClientboundSystemChat { mod tests { use std::io::Cursor; - use azalea_buf::McBufReadable; + use azalea_buf::AzaleaRead; use super::*; diff --git a/azalea-protocol/src/packets/game/c_tab_list.rs b/azalea-protocol/src/packets/game/c_tab_list.rs index 71a908600..87d92c9d8 100755 --- a/azalea-protocol/src/packets/game/c_tab_list.rs +++ b/azalea-protocol/src/packets/game/c_tab_list.rs @@ -12,7 +12,7 @@ pub struct ClientboundTabList { mod tests { use std::io::Cursor; - use azalea_buf::McBufReadable; + use azalea_buf::AzaleaRead; use super::*; diff --git a/azalea-protocol/src/packets/game/c_update_advancements.rs b/azalea-protocol/src/packets/game/c_update_advancements.rs index 6e0baf16b..3ce8d81c8 100755 --- a/azalea-protocol/src/packets/game/c_update_advancements.rs +++ b/azalea-protocol/src/packets/game/c_update_advancements.rs @@ -36,7 +36,7 @@ pub struct DisplayInfo { pub y: f32, } -impl azalea_buf::McBufWritable for DisplayInfo { +impl azalea_buf::AzaleaWrite for DisplayInfo { fn azalea_write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { self.title.azalea_write(buf)?; self.description.azalea_write(buf)?; @@ -63,12 +63,12 @@ impl azalea_buf::McBufWritable for DisplayInfo { Ok(()) } } -impl azalea_buf::McBufReadable for DisplayInfo { +impl azalea_buf::AzaleaRead for DisplayInfo { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { - let title = azalea_buf::McBufReadable::azalea_read(buf)?; - let description = azalea_buf::McBufReadable::azalea_read(buf)?; - let icon = azalea_buf::McBufReadable::azalea_read(buf)?; - let frame = azalea_buf::McBufReadable::azalea_read(buf)?; + let title = azalea_buf::AzaleaRead::azalea_read(buf)?; + let description = azalea_buf::AzaleaRead::azalea_read(buf)?; + let icon = azalea_buf::AzaleaRead::azalea_read(buf)?; + let frame = azalea_buf::AzaleaRead::azalea_read(buf)?; let data = u32::azalea_read(buf)?; let has_background = (data & 0b1) != 0; @@ -80,8 +80,8 @@ impl azalea_buf::McBufReadable for DisplayInfo { } else { None }; - let x = azalea_buf::McBufReadable::azalea_read(buf)?; - let y = azalea_buf::McBufReadable::azalea_read(buf)?; + let x = azalea_buf::AzaleaRead::azalea_read(buf)?; + let y = azalea_buf::AzaleaRead::azalea_read(buf)?; Ok(DisplayInfo { title, description, @@ -118,7 +118,7 @@ pub struct AdvancementHolder { #[cfg(test)] mod tests { - use azalea_buf::{McBufReadable, McBufWritable}; + use azalea_buf::{AzaleaRead, AzaleaWrite}; use super::*; diff --git a/azalea-protocol/src/packets/game/c_update_tags.rs b/azalea-protocol/src/packets/game/c_update_tags.rs index 40a4076d3..a6e9a33dc 100755 --- a/azalea-protocol/src/packets/game/c_update_tags.rs +++ b/azalea-protocol/src/packets/game/c_update_tags.rs @@ -2,8 +2,8 @@ use std::io::Cursor; use std::ops::Deref; use std::{collections::HashMap, io::Write}; -use azalea_buf::{BufReadError, McBuf, McBufVarReadable, McBufVarWritable}; -use azalea_buf::{McBufReadable, McBufWritable}; +use azalea_buf::{BufReadError, McBuf, AzaleaReadVar, AzaleaWriteVar}; +use azalea_buf::{AzaleaRead, AzaleaWrite}; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundGamePacket; @@ -21,7 +21,7 @@ pub struct Tags { #[derive(Clone, Debug)] pub struct TagMap(pub HashMap>); -impl McBufReadable for TagMap { +impl AzaleaRead for TagMap { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let length = u32::azalea_read_var(buf)? as usize; let mut data = HashMap::with_capacity(length); @@ -39,7 +39,7 @@ impl McBufReadable for TagMap { } } -impl McBufWritable for TagMap { +impl AzaleaWrite for TagMap { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { (self.len() as u32).azalea_write_var(buf)?; for (k, v) in &self.0 { @@ -49,7 +49,7 @@ impl McBufWritable for TagMap { Ok(()) } } -impl McBufReadable for Tags { +impl AzaleaRead for Tags { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let name = ResourceLocation::azalea_read(buf)?; let elements = Vec::::azalea_read_var(buf)?; @@ -57,7 +57,7 @@ impl McBufReadable for Tags { } } -impl McBufWritable for Tags { +impl AzaleaWrite for Tags { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { self.name.azalea_write(buf)?; self.elements.azalea_write_var(buf)?; diff --git a/azalea-protocol/src/packets/game/s_interact.rs b/azalea-protocol/src/packets/game/s_interact.rs index 0eda7e999..c3d2ffa71 100755 --- a/azalea-protocol/src/packets/game/s_interact.rs +++ b/azalea-protocol/src/packets/game/s_interact.rs @@ -1,6 +1,6 @@ use std::io::{Cursor, Write}; -use azalea_buf::{McBuf, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable}; +use azalea_buf::{McBuf, AzaleaRead, AzaleaReadVar, AzaleaWriteVar, AzaleaWrite}; use azalea_core::position::Vec3; use azalea_protocol_macros::ServerboundGamePacket; @@ -27,7 +27,7 @@ pub enum ActionType { }, } -impl McBufWritable for ActionType { +impl AzaleaWrite for ActionType { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { match self { ActionType::Interact { hand } => { @@ -49,7 +49,7 @@ impl McBufWritable for ActionType { } } -impl McBufReadable for ActionType { +impl AzaleaRead for ActionType { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let action_type = u32::azalea_read_var(buf)?; match action_type { diff --git a/azalea-protocol/src/packets/game/s_player_abilities.rs b/azalea-protocol/src/packets/game/s_player_abilities.rs index d65b2b1b0..fdf2d8a4e 100755 --- a/azalea-protocol/src/packets/game/s_player_abilities.rs +++ b/azalea-protocol/src/packets/game/s_player_abilities.rs @@ -1,6 +1,6 @@ use std::io::Cursor; -use azalea_buf::{McBufReadable, McBufWritable}; +use azalea_buf::{AzaleaRead, AzaleaWrite}; use azalea_core::bitset::FixedBitSet; use azalea_protocol_macros::ServerboundGamePacket; @@ -11,7 +11,7 @@ pub struct ServerboundPlayerAbilities { pub is_flying: bool, } -impl McBufReadable for ServerboundPlayerAbilities { +impl AzaleaRead for ServerboundPlayerAbilities { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let set = FixedBitSet::<2>::azalea_read(buf)?; Ok(Self { @@ -20,7 +20,7 @@ impl McBufReadable for ServerboundPlayerAbilities { } } -impl McBufWritable for ServerboundPlayerAbilities { +impl AzaleaWrite for ServerboundPlayerAbilities { fn azalea_write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { let mut set = FixedBitSet::<2>::new(); if self.is_flying { diff --git a/azalea-protocol/src/packets/game/s_player_input.rs b/azalea-protocol/src/packets/game/s_player_input.rs index 3313491b9..bd4ba9709 100755 --- a/azalea-protocol/src/packets/game/s_player_input.rs +++ b/azalea-protocol/src/packets/game/s_player_input.rs @@ -1,7 +1,7 @@ use std::io::Cursor; use azalea_buf::BufReadError; -use azalea_buf::{McBufReadable, McBufWritable}; +use azalea_buf::{AzaleaRead, AzaleaWrite}; use azalea_core::bitset::FixedBitSet; use azalea_protocol_macros::ServerboundGamePacket; @@ -16,7 +16,7 @@ pub struct ServerboundPlayerInput { pub sprint: bool, } -impl McBufReadable for ServerboundPlayerInput { +impl AzaleaRead for ServerboundPlayerInput { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let set = FixedBitSet::<7>::azalea_read(buf)?; Ok(Self { @@ -31,7 +31,7 @@ impl McBufReadable for ServerboundPlayerInput { } } -impl McBufWritable for ServerboundPlayerInput { +impl AzaleaWrite for ServerboundPlayerInput { fn azalea_write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { let mut set = FixedBitSet::<7>::new(); if self.forward { diff --git a/azalea-protocol/src/packets/game/s_seen_advancements.rs b/azalea-protocol/src/packets/game/s_seen_advancements.rs index 24b71e898..7ac970ec6 100755 --- a/azalea-protocol/src/packets/game/s_seen_advancements.rs +++ b/azalea-protocol/src/packets/game/s_seen_advancements.rs @@ -1,6 +1,6 @@ use std::io::Cursor; -use azalea_buf::{McBuf, McBufReadable, McBufWritable}; +use azalea_buf::{McBuf, AzaleaRead, AzaleaWrite}; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ServerboundGamePacket; @@ -18,7 +18,7 @@ pub enum Action { ClosedScreen = 1, } -impl McBufReadable for ServerboundSeenAdvancements { +impl AzaleaRead for ServerboundSeenAdvancements { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let action = Action::azalea_read(buf)?; let tab = if action == Action::OpenedTab { @@ -30,7 +30,7 @@ impl McBufReadable for ServerboundSeenAdvancements { } } -impl McBufWritable for ServerboundSeenAdvancements { +impl AzaleaWrite for ServerboundSeenAdvancements { fn azalea_write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { self.action.azalea_write(buf)?; if let Some(tab) = &self.tab { diff --git a/azalea-protocol/src/packets/game/s_set_command_block.rs b/azalea-protocol/src/packets/game/s_set_command_block.rs index cb8bcc2e5..9e0100a53 100755 --- a/azalea-protocol/src/packets/game/s_set_command_block.rs +++ b/azalea-protocol/src/packets/game/s_set_command_block.rs @@ -1,10 +1,10 @@ use std::io::Cursor; -use azalea_buf::{BufReadError, McBuf, McBufReadable}; +use azalea_buf::{BufReadError, McBuf, AzaleaRead}; use azalea_core::{bitset::FixedBitSet, position::BlockPos}; use azalea_protocol_macros::ServerboundGamePacket; -use crate::packets::McBufWritable; +use crate::packets::AzaleaWrite; #[derive(Clone, Debug, ServerboundGamePacket)] pub struct ServerboundSetCommandBlock { @@ -24,7 +24,7 @@ pub enum Mode { Redstone = 2, } -impl McBufReadable for ServerboundSetCommandBlock { +impl AzaleaRead for ServerboundSetCommandBlock { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let pos = BlockPos::azalea_read(buf)?; let command = String::azalea_read(buf)?; @@ -42,7 +42,7 @@ impl McBufReadable for ServerboundSetCommandBlock { } } -impl McBufWritable for ServerboundSetCommandBlock { +impl AzaleaWrite for ServerboundSetCommandBlock { fn azalea_write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { self.pos.azalea_write(buf)?; self.command.azalea_write(buf)?; diff --git a/azalea-protocol/src/packets/game/s_set_jigsaw_block.rs b/azalea-protocol/src/packets/game/s_set_jigsaw_block.rs index f5fad0eaf..937c91e8d 100755 --- a/azalea-protocol/src/packets/game/s_set_jigsaw_block.rs +++ b/azalea-protocol/src/packets/game/s_set_jigsaw_block.rs @@ -2,13 +2,13 @@ use std::io::Cursor; use std::io::Write; use azalea_buf::McBuf; -use azalea_buf::McBufReadable; +use azalea_buf::AzaleaRead; use azalea_core::position::BlockPos; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ServerboundGamePacket; use crate::packets::BufReadError; -use crate::packets::McBufWritable; +use crate::packets::AzaleaWrite; #[derive(Clone, Debug, McBuf, ServerboundGamePacket)] pub struct ServerboundSetJigsawBlock { @@ -29,7 +29,7 @@ pub enum JointType { Aligned, } -impl McBufReadable for JointType { +impl AzaleaRead for JointType { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let name = String::azalea_read(buf)?; match name.as_str() { @@ -40,7 +40,7 @@ impl McBufReadable for JointType { } } -impl McBufWritable for JointType { +impl AzaleaWrite for JointType { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { match self { JointType::Rollable => "rollable".to_string().azalea_write(buf)?, diff --git a/azalea-protocol/src/packets/game/s_set_structure_block.rs b/azalea-protocol/src/packets/game/s_set_structure_block.rs index 72a9ab2f9..e6dae6682 100755 --- a/azalea-protocol/src/packets/game/s_set_structure_block.rs +++ b/azalea-protocol/src/packets/game/s_set_structure_block.rs @@ -1,7 +1,7 @@ use std::io::{Cursor, Write}; use azalea_buf::McBuf; -use azalea_buf::{McBufReadable, McBufWritable}; +use azalea_buf::{AzaleaRead, AzaleaWrite}; use azalea_core::{bitset::FixedBitSet, position::BlockPos}; use azalea_protocol_macros::ServerboundGamePacket; @@ -69,7 +69,7 @@ pub struct Flags { pub show_bounding_box: bool, } -impl McBufReadable for Flags { +impl AzaleaRead for Flags { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let set = FixedBitSet::<3>::azalea_read(buf)?; Ok(Self { @@ -80,7 +80,7 @@ impl McBufReadable for Flags { } } -impl McBufWritable for Flags { +impl AzaleaWrite for Flags { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let mut set = FixedBitSet::<3>::new(); if self.ignore_entities { diff --git a/azalea-protocol/src/packets/game/s_use_item_on.rs b/azalea-protocol/src/packets/game/s_use_item_on.rs index 70f4e18ac..d0069d11e 100755 --- a/azalea-protocol/src/packets/game/s_use_item_on.rs +++ b/azalea-protocol/src/packets/game/s_use_item_on.rs @@ -1,6 +1,6 @@ use std::io::{Cursor, Write}; -use azalea_buf::{BufReadError, McBuf, McBufReadable, McBufWritable}; +use azalea_buf::{BufReadError, McBuf, AzaleaRead, AzaleaWrite}; use azalea_core::{ direction::Direction, position::{BlockPos, Vec3}, @@ -31,7 +31,7 @@ pub struct BlockHit { pub inside: bool, } -impl McBufWritable for BlockHit { +impl AzaleaWrite for BlockHit { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { self.block_pos.azalea_write(buf)?; self.direction.azalea_write(buf)?; @@ -52,7 +52,7 @@ impl McBufWritable for BlockHit { } } -impl McBufReadable for BlockHit { +impl AzaleaRead for BlockHit { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let block_pos = BlockPos::azalea_read(buf)?; let direction = Direction::azalea_read(buf)?; diff --git a/azalea-protocol/src/packets/login/c_login_disconnect.rs b/azalea-protocol/src/packets/login/c_login_disconnect.rs index 46617b2cc..a0e50aa43 100755 --- a/azalea-protocol/src/packets/login/c_login_disconnect.rs +++ b/azalea-protocol/src/packets/login/c_login_disconnect.rs @@ -1,6 +1,6 @@ use std::io::{Cursor, Write}; -use azalea_buf::{BufReadError, McBufReadable, McBufWritable}; +use azalea_buf::{AzaleaRead, AzaleaWrite, BufReadError}; use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundLoginPacket; use serde::{Deserialize, Serialize}; @@ -10,7 +10,7 @@ pub struct ClientboundLoginDisconnect { pub reason: FormattedText, } -impl McBufReadable for ClientboundLoginDisconnect { +impl AzaleaRead for ClientboundLoginDisconnect { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let disconnect_string = String::azalea_read(buf)?; let disconnect_json: serde_json::Value = serde_json::from_str(disconnect_string.as_str())?; @@ -21,7 +21,7 @@ impl McBufReadable for ClientboundLoginDisconnect { } } -impl McBufWritable for ClientboundLoginDisconnect { +impl AzaleaWrite for ClientboundLoginDisconnect { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let status_string = FormattedText::serialize(&self.reason, serde_json::value::Serializer) .unwrap() diff --git a/azalea-protocol/src/packets/login/s_hello.rs b/azalea-protocol/src/packets/login/s_hello.rs index 894a69ef6..62015edab 100755 --- a/azalea-protocol/src/packets/login/s_hello.rs +++ b/azalea-protocol/src/packets/login/s_hello.rs @@ -12,7 +12,7 @@ pub struct ServerboundHello { mod tests { use std::io::Cursor; - use azalea_buf::{McBufReadable, McBufWritable}; + use azalea_buf::{AzaleaRead, AzaleaWrite}; use super::*; diff --git a/azalea-protocol/src/packets/mod.rs b/azalea-protocol/src/packets/mod.rs index 7c723fb89..7c280e232 100755 --- a/azalea-protocol/src/packets/mod.rs +++ b/azalea-protocol/src/packets/mod.rs @@ -7,7 +7,7 @@ pub mod status; use std::io::{Cursor, Write}; -use azalea_buf::{BufReadError, McBufVarReadable, McBufVarWritable, McBufWritable}; +use azalea_buf::{AzaleaWrite, AzaleaWriteVar, BufReadError, AzaleaReadVar}; use crate::read::ReadPacketError; @@ -81,7 +81,7 @@ impl From for ConnectionProtocol { } } -impl azalea_buf::McBufReadable for ClientIntention { +impl azalea_buf::AzaleaRead for ClientIntention { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let id = i32::azalea_read_var(buf)?; id.try_into() @@ -89,7 +89,7 @@ impl azalea_buf::McBufReadable for ClientIntention { } } -impl McBufWritable for ClientIntention { +impl AzaleaWrite for ClientIntention { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { (*self as i32).azalea_write_var(buf) } diff --git a/azalea-protocol/src/packets/status/c_status_response.rs b/azalea-protocol/src/packets/status/c_status_response.rs index c2471d3e5..b30c75beb 100755 --- a/azalea-protocol/src/packets/status/c_status_response.rs +++ b/azalea-protocol/src/packets/status/c_status_response.rs @@ -1,6 +1,6 @@ use std::io::{Cursor, Write}; -use azalea_buf::{BufReadError, McBufReadable, McBufWritable}; +use azalea_buf::{AzaleaRead, AzaleaWrite, BufReadError}; use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundStatusPacket; use serde::{Deserialize, Serialize}; @@ -41,7 +41,7 @@ pub struct ClientboundStatusResponse { pub enforces_secure_chat: Option, } -impl McBufReadable for ClientboundStatusResponse { +impl AzaleaRead for ClientboundStatusResponse { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let status_string = String::azalea_read(buf)?; let status_json: serde_json::Value = serde_json::from_str(status_string.as_str())?; @@ -50,7 +50,7 @@ impl McBufReadable for ClientboundStatusResponse { } } -impl McBufWritable for ClientboundStatusResponse { +impl AzaleaWrite for ClientboundStatusResponse { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { let status_string = ClientboundStatusResponse::serialize(self, Serializer) .unwrap() diff --git a/azalea-protocol/src/read.rs b/azalea-protocol/src/read.rs index 60658c3e2..3e333e528 100755 --- a/azalea-protocol/src/read.rs +++ b/azalea-protocol/src/read.rs @@ -6,8 +6,8 @@ use std::{ io::{Cursor, Read}, }; +use azalea_buf::AzaleaReadVar; use azalea_buf::BufReadError; -use azalea_buf::McBufVarReadable; use azalea_crypto::Aes128CfbDec; use bytes::Buf; use bytes::BytesMut; diff --git a/azalea-protocol/src/write.rs b/azalea-protocol/src/write.rs index c6b5be47b..d2f6bd5ad 100755 --- a/azalea-protocol/src/write.rs +++ b/azalea-protocol/src/write.rs @@ -2,7 +2,7 @@ use std::{fmt::Debug, io::Read}; -use azalea_buf::McBufVarWritable; +use azalea_buf::AzaleaWriteVar; use azalea_crypto::Aes128CfbEnc; use flate2::{bufread::ZlibEncoder, Compression}; use thiserror::Error; diff --git a/azalea-registry/src/lib.rs b/azalea-registry/src/lib.rs index 640f3e5c4..2df30cc73 100755 --- a/azalea-registry/src/lib.rs +++ b/azalea-registry/src/lib.rs @@ -11,11 +11,11 @@ pub mod tags; use std::fmt::{self, Debug}; use std::io::{Cursor, Write}; -use azalea_buf::{BufReadError, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable}; +use azalea_buf::{AzaleaRead, AzaleaReadVar, AzaleaWrite, AzaleaWriteVar, BufReadError}; use azalea_registry_macros::registry; pub use extra::*; -pub trait Registry: McBufReadable + McBufWritable +pub trait Registry: AzaleaRead + AzaleaWrite where Self: Sized, { @@ -28,7 +28,7 @@ where #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub struct OptionalRegistry(Option); -impl McBufReadable for OptionalRegistry { +impl AzaleaRead for OptionalRegistry { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { Ok(OptionalRegistry(match u32::azalea_read_var(buf)? { 0 => None, @@ -39,7 +39,7 @@ impl McBufReadable for OptionalRegistry { })) } } -impl McBufWritable for OptionalRegistry { +impl AzaleaWrite for OptionalRegistry { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { match &self.0 { None => 0u32.azalea_write_var(buf), @@ -50,12 +50,12 @@ impl McBufWritable for OptionalRegistry { /// A registry that will either take an ID or a resource location. #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] -pub enum CustomRegistry { +pub enum CustomRegistry { Direct(D), Custom(C), } -impl McBufReadable for CustomRegistry { +impl AzaleaRead for CustomRegistry { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let direct_registry = OptionalRegistry::::azalea_read(buf)?; if let Some(direct_registry) = direct_registry.0 { @@ -64,7 +64,7 @@ impl McBufReadable for CustomRegi Ok(CustomRegistry::Custom(C::azalea_read(buf)?)) } } -impl McBufWritable for CustomRegistry { +impl AzaleaWrite for CustomRegistry { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { match self { CustomRegistry::Direct(direct_registry) => { @@ -81,7 +81,7 @@ impl McBufWritable for CustomRegi } #[derive(Clone, PartialEq)] -pub enum HolderSet { +pub enum HolderSet { Direct { contents: Vec, }, @@ -91,7 +91,7 @@ pub enum HolderSet }, } -impl McBufReadable +impl AzaleaRead for HolderSet { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { @@ -111,7 +111,7 @@ impl McBufReadable } } } -impl McBufWritable +impl AzaleaWrite for HolderSet { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { @@ -130,7 +130,7 @@ impl McBufWritable Ok(()) } } -impl Debug +impl Debug for HolderSet { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { diff --git a/azalea-world/src/chunk_storage.rs b/azalea-world/src/chunk_storage.rs index 6d2ce24f6..b4ef35e14 100755 --- a/azalea-world/src/chunk_storage.rs +++ b/azalea-world/src/chunk_storage.rs @@ -8,7 +8,7 @@ use std::{ }; use azalea_block::BlockState; -use azalea_buf::{BufReadError, McBufReadable, McBufWritable}; +use azalea_buf::{BufReadError, AzaleaRead, AzaleaWrite}; use azalea_core::position::{BlockPos, ChunkBlockPos, ChunkPos, ChunkSectionBlockPos}; use nohash_hasher::IntMap; use parking_lot::RwLock; @@ -416,7 +416,7 @@ pub fn get_block_state_from_sections( Some(section.get(chunk_section_pos)) } -impl McBufWritable for Chunk { +impl AzaleaWrite for Chunk { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { for section in &self.sections { section.azalea_write(buf)?; @@ -437,7 +437,7 @@ impl Debug for PartialChunkStorage { } } -impl McBufReadable for Section { +impl AzaleaRead for Section { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let block_count = u16::azalea_read(buf)?; @@ -467,7 +467,7 @@ impl McBufReadable for Section { } } -impl McBufWritable for Section { +impl AzaleaWrite for Section { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { self.block_count.azalea_write(buf)?; self.states.azalea_write(buf)?; diff --git a/azalea-world/src/palette.rs b/azalea-world/src/palette.rs index 6d9a509e3..24dbe47a6 100755 --- a/azalea-world/src/palette.rs +++ b/azalea-world/src/palette.rs @@ -1,6 +1,6 @@ use std::io::{Cursor, Write}; -use azalea_buf::{BufReadError, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable}; +use azalea_buf::{AzaleaRead, AzaleaReadVar, AzaleaWrite, AzaleaWriteVar, BufReadError}; use azalea_core::math; use tracing::warn; @@ -224,7 +224,7 @@ impl PalettedContainer { } } -impl McBufWritable for PalettedContainer { +impl AzaleaWrite for PalettedContainer { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { self.bits_per_entry.azalea_write(buf)?; self.palette.azalea_write(buf)?; @@ -264,7 +264,7 @@ impl Palette { } } -impl McBufWritable for Palette { +impl AzaleaWrite for Palette { fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { match self { Palette::SingleValue(value) => { diff --git a/codegen/README.md b/codegen/README.md index 60b881ced..b00290aa9 100755 --- a/codegen/README.md +++ b/codegen/README.md @@ -4,9 +4,9 @@ The directory name doesn't start with `azalea-` because it's not a Rust crate. ## Requirements -- Python 3.8+ -- Java 17+ -- Maven +- Python 3.8+ +- Java 17+ +- Maven ## Usage @@ -17,19 +17,20 @@ This will create a new file in the `azalea-protocol/src/packets/[state] director ## Updating to a new Minecraft version First, run `python migrate.py [new version]`. This will run a script that automatically updates as much as it can, including: -- Adding, removing, and updating packets in azalea-protocol (limited) -- Updating supported version in README.md -- Updating the `PROTOCOL_VERSION` variable in azalea-protocol -- Generating blocks in azalea-block -- Generating block shapes in azalea-physics -- Generating registries in azalea-registries -- Updating en_us.json in azalea-language -- Generating entity metadata structs and parsers in azalea-world + +- Adding, removing, and updating packets in azalea-protocol (limited) +- Updating supported version in README.md +- Updating the `PROTOCOL_VERSION` variable in azalea-protocol +- Generating blocks in azalea-block +- Generating block shapes in azalea-physics +- Generating registries in azalea-registries +- Updating en_us.json in azalea-language +- Generating entity metadata structs and parsers in azalea-world If you're lucky, that's all you're going to have to do. Look at the diff (`git diff`) and type-check the code (`cargo check`) to make sure everything is right. In the diff, specifically look for new comments that have "TODO". -If a packet is incorrect, you'll want to find it in the Minecraft source. The name of the struct should be the same or similar as the class in the vanilla source. Now, you'll have to manually write the struct for the packet. If the packet existed in the version before and it's just being updated, you can compare against that to see what was updated. Note that if a packet is particularly complicated, you may have to implement McBufReadable and McBufWritable, but most of the time the `#[derive(McBuf)]` macro will be able to generate the impls correctly. Look at other existing packets as reference if you're confused. +If a packet is incorrect, you'll want to find it in the Minecraft source. The name of the struct should be the same or similar as the class in the vanilla source. Now, you'll have to manually write the struct for the packet. If the packet existed in the version before and it's just being updated, you can compare against that to see what was updated. Note that if a packet is particularly complicated, you may have to implement AzaleaRead and AzaleaWrite, but most of the time the `#[derive(McBuf)]` macro will be able to generate the impls correctly. Look at other existing packets as reference if you're confused. Finally, test by making a bot join a world. Specifically, you'll want to test the things that were updated in the version. Setting the RUST_LOG environment variable to `debug` or `trace` may help you find the source of crashes (trace shows the first few hundred bytes for every packet received so it's typically more useful, but it may log more than you want). @@ -39,9 +40,8 @@ If it all works, make a pull request. If the version you updated to is a snapsho At the time of writing, the following data generators are used: -- [Vanilla data generator](https://wiki.vg/Data_Generators) -- [Burger](https://github.com/mat-1/Burger) -- [PixLyzer](https://gitlab.bixilon.de/bixilon/pixlyzer) +- [Vanilla data generator](https://wiki.vg/Data_Generators) +- [Burger](https://github.com/mat-1/Burger) +- [PixLyzer](https://gitlab.bixilon.de/bixilon/pixlyzer) Some things can be obtained from multiple generators. You should prefer them by the order above (the vanilla generator is the most reliable). - From 35441c33fa716f2bf92a6532e986b5e8846b3d60 Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 27 Nov 2024 02:10:14 +0000 Subject: [PATCH 09/18] McBuf -> AzBuf --- azalea-auth/src/game_profile.rs | 6 +- .../src/suggestion/suggestions.rs | 4 +- azalea-buf/azalea-buf-macros/Cargo.toml | 2 +- azalea-buf/azalea-buf-macros/src/lib.rs | 4 +- azalea-buf/azalea-buf-macros/src/read.rs | 4 +- azalea-buf/azalea-buf-macros/src/write.rs | 4 +- azalea-chat/src/style.rs | 4 +- azalea-client/src/chat.rs | 26 +-- azalea-client/src/events.rs | 4 +- azalea-client/src/packet_handling/game.rs | 8 +- azalea-core/src/bitset.rs | 4 +- azalea-core/src/delta.rs | 4 +- azalea-core/src/direction.rs | 6 +- azalea-core/src/objectives.rs | 4 +- azalea-core/src/position.rs | 4 +- azalea-core/src/resource_location.rs | 4 +- azalea-crypto/src/signing.rs | 8 +- azalea-entity/src/attributes.rs | 6 +- azalea-entity/src/data.rs | 16 +- azalea-entity/src/particle.rs | 18 +- azalea-inventory/src/components.rs | 176 +++++++++--------- azalea-inventory/src/operations.rs | 4 +- azalea-protocol/README.md | 2 +- azalea-protocol/src/common.rs | 10 +- azalea-protocol/src/packets/common.rs | 4 +- .../src/packets/config/c_cookie_request.rs | 4 +- .../src/packets/config/c_custom_payload.rs | 4 +- .../src/packets/config/c_disconnect.rs | 4 +- .../packets/config/c_finish_configuration.rs | 4 +- .../src/packets/config/c_keep_alive.rs | 4 +- azalea-protocol/src/packets/config/c_ping.rs | 4 +- .../src/packets/config/c_registry_data.rs | 4 +- .../src/packets/config/c_reset_chat.rs | 4 +- .../src/packets/config/c_resource_pack.rs | 4 +- .../src/packets/config/c_resource_pack_pop.rs | 4 +- .../packets/config/c_resource_pack_push.rs | 4 +- .../packets/config/c_select_known_packs.rs | 4 +- .../src/packets/config/c_store_cookie.rs | 4 +- .../src/packets/config/c_transfer.rs | 4 +- .../config/c_update_enabled_features.rs | 4 +- .../src/packets/config/c_update_tags.rs | 4 +- .../packets/config/s_client_information.rs | 4 +- .../src/packets/config/s_cookie_response.rs | 4 +- .../src/packets/config/s_custom_payload.rs | 4 +- .../packets/config/s_finish_configuration.rs | 4 +- .../src/packets/config/s_keep_alive.rs | 4 +- azalea-protocol/src/packets/config/s_pong.rs | 4 +- .../src/packets/config/s_resource_pack.rs | 6 +- .../packets/config/s_select_known_packs.rs | 6 +- .../src/packets/game/c_add_entity.rs | 4 +- .../src/packets/game/c_add_experience_orb.rs | 4 +- .../src/packets/game/c_add_player.rs | 4 +- azalea-protocol/src/packets/game/c_animate.rs | 6 +- .../src/packets/game/c_award_stats.rs | 6 +- .../src/packets/game/c_block_changed_ack.rs | 4 +- .../src/packets/game/c_block_destruction.rs | 4 +- .../src/packets/game/c_block_entity_data.rs | 4 +- .../src/packets/game/c_block_event.rs | 4 +- .../src/packets/game/c_block_update.rs | 4 +- .../src/packets/game/c_boss_event.rs | 14 +- azalea-protocol/src/packets/game/c_bundle.rs | 4 +- .../src/packets/game/c_change_difficulty.rs | 4 +- .../src/packets/game/c_chat_preview.rs | 4 +- .../packets/game/c_chunk_batch_finished.rs | 4 +- .../src/packets/game/c_chunk_batch_start.rs | 4 +- .../src/packets/game/c_chunks_biomes.rs | 6 +- .../src/packets/game/c_clear_titles.rs | 4 +- .../src/packets/game/c_command_suggestions.rs | 4 +- .../src/packets/game/c_commands.rs | 10 +- .../src/packets/game/c_container_close.rs | 4 +- .../packets/game/c_container_set_content.rs | 4 +- .../src/packets/game/c_container_set_data.rs | 4 +- .../src/packets/game/c_container_set_slot.rs | 4 +- .../src/packets/game/c_cookie_request.rs | 4 +- .../src/packets/game/c_cooldown.rs | 4 +- .../packets/game/c_custom_chat_completions.rs | 6 +- .../src/packets/game/c_custom_payload.rs | 4 +- .../packets/game/c_custom_report_details.rs | 4 +- .../src/packets/game/c_custom_sound.rs | 6 +- .../src/packets/game/c_damage_event.rs | 4 +- .../src/packets/game/c_debug_sample.rs | 4 +- .../src/packets/game/c_delete_chat.rs | 4 +- .../src/packets/game/c_disconnect.rs | 4 +- .../src/packets/game/c_disguised_chat.rs | 4 +- .../src/packets/game/c_entity_event.rs | 4 +- .../packets/game/c_entity_position_sync.rs | 6 +- azalea-protocol/src/packets/game/c_explode.rs | 6 +- .../src/packets/game/c_forget_level_chunk.rs | 4 +- .../src/packets/game/c_game_event.rs | 6 +- .../src/packets/game/c_horse_screen_open.rs | 4 +- .../src/packets/game/c_hurt_animation.rs | 4 +- .../src/packets/game/c_initialize_border.rs | 4 +- .../src/packets/game/c_keep_alive.rs | 4 +- .../packets/game/c_level_chunk_with_light.rs | 8 +- .../src/packets/game/c_level_event.rs | 4 +- .../src/packets/game/c_level_particles.rs | 4 +- .../src/packets/game/c_light_update.rs | 6 +- azalea-protocol/src/packets/game/c_login.rs | 4 +- .../src/packets/game/c_map_item_data.rs | 10 +- .../src/packets/game/c_merchant_offers.rs | 6 +- .../src/packets/game/c_move_entity_pos.rs | 4 +- .../src/packets/game/c_move_entity_pos_rot.rs | 4 +- .../src/packets/game/c_move_entity_rot.rs | 4 +- .../src/packets/game/c_move_minecart.rs | 6 +- .../src/packets/game/c_move_vehicle.rs | 4 +- .../src/packets/game/c_open_book.rs | 4 +- .../src/packets/game/c_open_screen.rs | 4 +- .../src/packets/game/c_open_sign_editor.rs | 4 +- azalea-protocol/src/packets/game/c_ping.rs | 4 +- .../src/packets/game/c_place_ghost_recipe.rs | 4 +- .../src/packets/game/c_player_abilities.rs | 4 +- .../src/packets/game/c_player_chat.rs | 16 +- .../src/packets/game/c_player_chat_header.rs | 4 +- .../src/packets/game/c_player_combat_end.rs | 4 +- .../src/packets/game/c_player_combat_enter.rs | 4 +- .../src/packets/game/c_player_combat_kill.rs | 4 +- .../src/packets/game/c_player_info_remove.rs | 4 +- .../src/packets/game/c_player_info_update.rs | 18 +- .../src/packets/game/c_player_look_at.rs | 8 +- .../src/packets/game/c_player_position.rs | 4 +- .../src/packets/game/c_player_rotation.rs | 4 +- .../src/packets/game/c_pong_response.rs | 4 +- .../src/packets/game/c_projectile_power.rs | 4 +- .../src/packets/game/c_recipe_book_add.rs | 20 +- .../src/packets/game/c_recipe_book_remove.rs | 4 +- .../packets/game/c_recipe_book_settings.rs | 6 +- .../src/packets/game/c_remove_entities.rs | 4 +- .../src/packets/game/c_remove_mob_effect.rs | 4 +- .../src/packets/game/c_reset_score.rs | 4 +- .../src/packets/game/c_resource_pack_pop.rs | 4 +- .../src/packets/game/c_resource_pack_push.rs | 4 +- azalea-protocol/src/packets/game/c_respawn.rs | 4 +- .../src/packets/game/c_rotate_head.rs | 4 +- .../packets/game/c_section_blocks_update.rs | 6 +- .../packets/game/c_select_advancements_tab.rs | 4 +- .../src/packets/game/c_server_data.rs | 4 +- .../src/packets/game/c_server_links.rs | 10 +- .../src/packets/game/c_set_action_bar_text.rs | 4 +- .../src/packets/game/c_set_border_center.rs | 4 +- .../packets/game/c_set_border_lerp_size.rs | 4 +- .../src/packets/game/c_set_border_size.rs | 4 +- .../game/c_set_border_warning_delay.rs | 4 +- .../game/c_set_border_warning_distance.rs | 4 +- .../src/packets/game/c_set_camera.rs | 4 +- .../packets/game/c_set_chunk_cache_center.rs | 4 +- .../packets/game/c_set_chunk_cache_radius.rs | 4 +- .../src/packets/game/c_set_cursor_item.rs | 4 +- .../game/c_set_default_spawn_position.rs | 4 +- .../game/c_set_display_chat_preview.rs | 4 +- .../packets/game/c_set_display_objective.rs | 6 +- .../src/packets/game/c_set_entity_data.rs | 4 +- .../src/packets/game/c_set_entity_link.rs | 4 +- .../src/packets/game/c_set_entity_motion.rs | 4 +- .../src/packets/game/c_set_equipment.rs | 6 +- .../src/packets/game/c_set_experience.rs | 4 +- .../src/packets/game/c_set_health.rs | 4 +- .../src/packets/game/c_set_held_slot.rs | 4 +- .../src/packets/game/c_set_objective.rs | 6 +- .../src/packets/game/c_set_passengers.rs | 4 +- .../packets/game/c_set_player_inventory.rs | 4 +- .../src/packets/game/c_set_player_team.rs | 6 +- .../src/packets/game/c_set_score.rs | 4 +- .../packets/game/c_set_simulation_distance.rs | 4 +- .../src/packets/game/c_set_subtitle_text.rs | 4 +- .../src/packets/game/c_set_time.rs | 4 +- .../src/packets/game/c_set_title_text.rs | 4 +- .../packets/game/c_set_titles_animation.rs | 4 +- azalea-protocol/src/packets/game/c_sound.rs | 6 +- .../src/packets/game/c_sound_entity.rs | 6 +- .../src/packets/game/c_start_configuration.rs | 4 +- .../src/packets/game/c_store_cookie.rs | 4 +- .../src/packets/game/c_system_chat.rs | 4 +- .../src/packets/game/c_tab_list.rs | 4 +- .../src/packets/game/c_tag_query.rs | 4 +- .../src/packets/game/c_take_item_entity.rs | 4 +- .../src/packets/game/c_teleport_entity.rs | 4 +- .../src/packets/game/c_ticking_state.rs | 4 +- .../src/packets/game/c_ticking_step.rs | 4 +- .../src/packets/game/c_transfer.rs | 4 +- .../src/packets/game/c_update_advancements.rs | 12 +- .../src/packets/game/c_update_attributes.rs | 6 +- .../packets/game/c_update_enabled_features.rs | 4 +- .../src/packets/game/c_update_mob_effect.rs | 4 +- .../src/packets/game/c_update_recipes.rs | 26 +-- .../src/packets/game/c_update_tags.rs | 4 +- .../packets/game/s_accept_teleportation.rs | 4 +- .../packets/game/s_block_entity_tag_query.rs | 4 +- .../src/packets/game/s_change_difficulty.rs | 4 +- azalea-protocol/src/packets/game/s_chat.rs | 6 +- .../src/packets/game/s_chat_ack.rs | 4 +- .../src/packets/game/s_chat_command.rs | 4 +- .../src/packets/game/s_chat_command_signed.rs | 6 +- .../src/packets/game/s_chat_preview.rs | 4 +- .../src/packets/game/s_chat_session_update.rs | 8 +- .../packets/game/s_chunk_batch_received.rs | 4 +- .../src/packets/game/s_client_command.rs | 6 +- .../src/packets/game/s_client_information.rs | 4 +- .../src/packets/game/s_client_tick_end.rs | 4 +- .../src/packets/game/s_command_suggestion.rs | 4 +- .../game/s_configuration_acknowledged.rs | 4 +- .../packets/game/s_container_button_click.rs | 4 +- .../src/packets/game/s_container_click.rs | 4 +- .../src/packets/game/s_container_close.rs | 4 +- .../game/s_container_slot_state_changed.rs | 4 +- .../src/packets/game/s_cookie_response.rs | 4 +- .../src/packets/game/s_custom_payload.rs | 4 +- .../game/s_debug_sample_subscription.rs | 6 +- .../src/packets/game/s_edit_book.rs | 4 +- .../src/packets/game/s_entity_tag_query.rs | 4 +- .../src/packets/game/s_interact.rs | 6 +- .../src/packets/game/s_jigsaw_generate.rs | 4 +- .../src/packets/game/s_keep_alive.rs | 4 +- .../src/packets/game/s_lock_difficulty.rs | 4 +- .../src/packets/game/s_move_player_pos.rs | 4 +- .../src/packets/game/s_move_player_pos_rot.rs | 4 +- .../src/packets/game/s_move_player_rot.rs | 4 +- .../packets/game/s_move_player_status_only.rs | 4 +- .../src/packets/game/s_move_vehicle.rs | 4 +- .../src/packets/game/s_paddle_boat.rs | 4 +- .../src/packets/game/s_pick_item.rs | 4 +- .../src/packets/game/s_ping_request.rs | 4 +- .../src/packets/game/s_place_recipe.rs | 4 +- .../src/packets/game/s_player_action.rs | 6 +- .../src/packets/game/s_player_command.rs | 6 +- azalea-protocol/src/packets/game/s_pong.rs | 4 +- .../game/s_recipe_book_change_settings.rs | 6 +- .../packets/game/s_recipe_book_seen_recipe.rs | 4 +- .../src/packets/game/s_rename_item.rs | 4 +- .../src/packets/game/s_resource_pack.rs | 6 +- .../src/packets/game/s_seen_advancements.rs | 4 +- .../src/packets/game/s_select_bundle_item.rs | 4 +- .../src/packets/game/s_select_trade.rs | 4 +- .../src/packets/game/s_set_beacon.rs | 4 +- .../src/packets/game/s_set_carried_item.rs | 4 +- .../src/packets/game/s_set_command_block.rs | 4 +- .../packets/game/s_set_command_minecart.rs | 4 +- .../packets/game/s_set_creative_mode_slot.rs | 4 +- .../src/packets/game/s_set_jigsaw_block.rs | 6 +- .../src/packets/game/s_set_structure_block.rs | 14 +- .../src/packets/game/s_sign_update.rs | 4 +- azalea-protocol/src/packets/game/s_swing.rs | 4 +- .../src/packets/game/s_teleport_to_entity.rs | 4 +- .../src/packets/game/s_use_item.rs | 4 +- .../src/packets/game/s_use_item_on.rs | 4 +- .../packets/handshake/s_client_intention.rs | 4 +- .../src/packets/login/c_cookie_request.rs | 4 +- .../src/packets/login/c_custom_query.rs | 4 +- azalea-protocol/src/packets/login/c_hello.rs | 4 +- .../src/packets/login/c_login_compression.rs | 4 +- .../src/packets/login/c_login_finished.rs | 4 +- .../src/packets/login/s_cookie_response.rs | 4 +- .../src/packets/login/s_custom_query.rs | 4 +- .../packets/login/s_custom_query_answer.rs | 4 +- azalea-protocol/src/packets/login/s_hello.rs | 4 +- azalea-protocol/src/packets/login/s_key.rs | 4 +- .../src/packets/login/s_login_acknowledged.rs | 4 +- .../src/packets/status/c_pong_response.rs | 4 +- .../src/packets/status/s_ping_request.rs | 4 +- .../src/packets/status/s_status_request.rs | 4 +- .../azalea-registry-macros/src/lib.rs | 2 +- azalea/examples/testbot/commands.rs | 4 +- azalea/src/swarm/chat.rs | 30 +-- azalea/src/swarm/mod.rs | 4 +- codegen/README.md | 2 +- codegen/genitemcomponents.py | 2 +- codegen/lib/code/packet.py | 4 +- codegen/lib/code/utils.py | 2 +- 267 files changed, 748 insertions(+), 760 deletions(-) diff --git a/azalea-auth/src/game_profile.rs b/azalea-auth/src/game_profile.rs index 31650754d..af00712d6 100755 --- a/azalea-auth/src/game_profile.rs +++ b/azalea-auth/src/game_profile.rs @@ -1,10 +1,10 @@ use std::collections::HashMap; -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use serde::{Deserialize, Serialize}; use uuid::Uuid; -#[derive(McBuf, Debug, Clone, Default, Eq, PartialEq)] +#[derive(AzBuf, Debug, Clone, Default, Eq, PartialEq)] pub struct GameProfile { /// The UUID of the player. pub uuid: Uuid, @@ -43,7 +43,7 @@ impl From for GameProfile { } } -#[derive(McBuf, Debug, Clone, Eq, PartialEq)] +#[derive(AzBuf, Debug, Clone, Eq, PartialEq)] pub struct ProfilePropertyValue { pub value: String, pub signature: Option, diff --git a/azalea-brigadier/src/suggestion/suggestions.rs b/azalea-brigadier/src/suggestion/suggestions.rs index 2eb904f2e..d6368f443 100755 --- a/azalea-brigadier/src/suggestion/suggestions.rs +++ b/azalea-brigadier/src/suggestion/suggestions.rs @@ -4,7 +4,7 @@ use std::{collections::HashSet, hash::Hash}; #[cfg(feature = "azalea-buf")] use azalea_buf::{ - BufReadError, McBuf, AzaleaRead, AzaleaReadVar, AzaleaWriteVar, AzaleaWrite, + BufReadError, AzBuf, AzaleaRead, AzaleaReadVar, AzaleaWriteVar, AzaleaWrite, }; #[cfg(feature = "azalea-buf")] use azalea_chat::FormattedText; @@ -81,7 +81,7 @@ impl Suggestions { #[cfg(feature = "azalea-buf")] impl AzaleaRead for Suggestions { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { - #[derive(McBuf)] + #[derive(AzBuf)] struct StandaloneSuggestion { pub text: String, pub tooltip: Option, diff --git a/azalea-buf/azalea-buf-macros/Cargo.toml b/azalea-buf/azalea-buf-macros/Cargo.toml index 85545a75a..eca13dae7 100644 --- a/azalea-buf/azalea-buf-macros/Cargo.toml +++ b/azalea-buf/azalea-buf-macros/Cargo.toml @@ -1,5 +1,5 @@ [package] -description = "#[derive(McBuf)]" +description = "#[derive(AzBuf)]" edition = "2021" license = "MIT" name = "azalea-buf-macros" diff --git a/azalea-buf/azalea-buf-macros/src/lib.rs b/azalea-buf/azalea-buf-macros/src/lib.rs index c5a2238b0..9cdbb8af7 100755 --- a/azalea-buf/azalea-buf-macros/src/lib.rs +++ b/azalea-buf/azalea-buf-macros/src/lib.rs @@ -19,8 +19,8 @@ pub fn derive_azaleawrite(input: TokenStream) -> TokenStream { write::create_impl_azaleawrite(&ident, &data).into() } -#[proc_macro_derive(McBuf, attributes(var))] -pub fn derive_mcbuf(input: TokenStream) -> TokenStream { +#[proc_macro_derive(AzBuf, attributes(var))] +pub fn derive_azbuf(input: TokenStream) -> TokenStream { let DeriveInput { ident, data, .. } = parse_macro_input!(input); let writable = write::create_impl_azaleawrite(&ident, &data); diff --git a/azalea-buf/azalea-buf-macros/src/read.rs b/azalea-buf/azalea-buf-macros/src/read.rs index 70a6312a1..5ab2449a9 100644 --- a/azalea-buf/azalea-buf-macros/src/read.rs +++ b/azalea-buf/azalea-buf-macros/src/read.rs @@ -63,7 +63,7 @@ pub fn create_impl_azalearead(ident: &Ident, data: &Data) -> proc_macro2::TokenS } } _ => { - panic!("#[derive(McBuf)] can only be used on structs with named fields") + panic!("#[derive(AzBuf)] can only be used on structs with named fields") } }, syn::Data::Enum(syn::DataEnum { variants, .. }) => { @@ -157,6 +157,6 @@ pub fn create_impl_azalearead(ident: &Ident, data: &Data) -> proc_macro2::TokenS } } } - _ => panic!("#[derive(McBuf)] can only be used on structs"), + _ => panic!("#[derive(AzBuf)] can only be used on structs"), } } diff --git a/azalea-buf/azalea-buf-macros/src/write.rs b/azalea-buf/azalea-buf-macros/src/write.rs index ed98c8a1e..df461d592 100644 --- a/azalea-buf/azalea-buf-macros/src/write.rs +++ b/azalea-buf/azalea-buf-macros/src/write.rs @@ -63,7 +63,7 @@ pub fn create_impl_azaleawrite(ident: &Ident, data: &Data) -> proc_macro2::Token } } _ => { - panic!("#[derive(McBuf)] can only be used on structs with named fields") + panic!("#[derive(AzBuf)] can only be used on structs with named fields") } }, syn::Data::Enum(syn::DataEnum { variants, .. }) => { @@ -197,6 +197,6 @@ pub fn create_impl_azaleawrite(ident: &Ident, data: &Data) -> proc_macro2::Token } } } - _ => panic!("#[derive(McBuf)] can only be used on structs"), + _ => panic!("#[derive(AzBuf)] can only be used on structs"), } } diff --git a/azalea-chat/src/style.rs b/azalea-chat/src/style.rs index a27f3d2a1..1c900eea8 100755 --- a/azalea-chat/src/style.rs +++ b/azalea-chat/src/style.rs @@ -1,7 +1,7 @@ use std::{collections::HashMap, fmt}; #[cfg(feature = "azalea-buf")] -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use once_cell::sync::Lazy; use serde::{ser::SerializeStruct, Serialize, Serializer}; use serde_json::Value; @@ -101,7 +101,7 @@ impl Ansi { } #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)] -#[cfg_attr(feature = "azalea-buf", derive(McBuf))] +#[cfg_attr(feature = "azalea-buf", derive(AzBuf))] pub enum ChatFormatting { Black, DarkBlue, diff --git a/azalea-client/src/chat.rs b/azalea-client/src/chat.rs index 340c991c8..ca748da2f 100755 --- a/azalea-client/src/chat.rs +++ b/azalea-client/src/chat.rs @@ -29,7 +29,7 @@ use crate::{ /// A chat packet, either a system message or a chat message. #[derive(Debug, Clone, PartialEq)] -pub enum Chat { +pub enum ChatPacket { System(Arc), Player(Arc), Disguised(Arc), @@ -42,13 +42,13 @@ macro_rules! regex { }}; } -impl Chat { +impl ChatPacket { /// Get the message shown in chat for this packet. pub fn message(&self) -> FormattedText { match self { - Chat::System(p) => p.content.clone(), - Chat::Player(p) => p.message(), - Chat::Disguised(p) => p.message(), + ChatPacket::System(p) => p.content.clone(), + ChatPacket::Player(p) => p.message(), + ChatPacket::Disguised(p) => p.message(), } } @@ -58,7 +58,7 @@ impl Chat { /// None. pub fn split_sender_and_content(&self) -> (Option, String) { match self { - Chat::System(p) => { + ChatPacket::System(p) => { let message = p.content.to_string(); // Overlay messages aren't in chat if p.overlay { @@ -72,13 +72,13 @@ impl Chat { (None, message) } - Chat::Player(p) => ( + ChatPacket::Player(p) => ( // If it's a player chat packet, then the sender and content // are already split for us. Some(p.chat_type.name.to_string()), p.body.content.clone(), ), - Chat::Disguised(p) => ( + ChatPacket::Disguised(p) => ( // disguised chat packets are basically the same as player chat packets but without // the chat signing things Some(p.chat_type.name.to_string()), @@ -99,9 +99,9 @@ impl Chat { /// when a server uses a plugin to modify chat messages). pub fn uuid(&self) -> Option { match self { - Chat::System(_) => None, - Chat::Player(m) => Some(m.sender), - Chat::Disguised(_) => None, + ChatPacket::System(_) => None, + ChatPacket::Player(m) => Some(m.sender), + ChatPacket::Disguised(_) => None, } } @@ -115,7 +115,7 @@ impl Chat { /// Create a new Chat from a string. This is meant to be used as a /// convenience function for testing. pub fn new(message: &str) -> Self { - Chat::System(Arc::new(ClientboundSystemChat { + ChatPacket::System(Arc::new(ClientboundSystemChat { content: FormattedText::from(message), overlay: false, })) @@ -197,7 +197,7 @@ impl Plugin for ChatPlugin { #[derive(Event, Debug, Clone)] pub struct ChatReceivedEvent { pub entity: Entity, - pub packet: Chat, + pub packet: ChatPacket, } /// Send a chat message (or command, if it starts with a slash) to the server. diff --git a/azalea-client/src/events.rs b/azalea-client/src/events.rs index 29ff76376..fb8afa754 100644 --- a/azalea-client/src/events.rs +++ b/azalea-client/src/events.rs @@ -21,7 +21,7 @@ use derive_more::{Deref, DerefMut}; use tokio::sync::mpsc; use crate::{ - chat::{Chat, ChatReceivedEvent}, + chat::{ChatPacket, ChatReceivedEvent}, disconnect::DisconnectEvent, packet_handling::game::{ AddPlayerEvent, DeathEvent, KeepAliveEvent, PacketEvent, RemovePlayerEvent, @@ -62,7 +62,7 @@ pub enum Event { /// The client is now in the world. Fired when we receive a login packet. Login, /// A chat message was sent in the game chat. - Chat(Chat), + Chat(ChatPacket), /// Happens 20 times per second, but only when the world is loaded. Tick, /// We received a packet from the server. diff --git a/azalea-client/src/packet_handling/game.rs b/azalea-client/src/packet_handling/game.rs index e71938e55..025fb9b5e 100644 --- a/azalea-client/src/packet_handling/game.rs +++ b/azalea-client/src/packet_handling/game.rs @@ -33,7 +33,7 @@ use tracing::{debug, error, trace, warn}; use uuid::Uuid; use crate::{ - chat::{Chat, ChatReceivedEvent}, + chat::{ChatPacket, ChatReceivedEvent}, chunks, disconnect::DisconnectEvent, inventory::{ @@ -1030,7 +1030,7 @@ pub fn process_packet_events(ecs: &mut World) { chat_events.send(ChatReceivedEvent { entity: player_entity, - packet: Chat::Player(Arc::new(p.clone())), + packet: ChatPacket::Player(Arc::new(p.clone())), }); } ClientboundGamePacket::SystemChat(p) => { @@ -1042,7 +1042,7 @@ pub fn process_packet_events(ecs: &mut World) { chat_events.send(ChatReceivedEvent { entity: player_entity, - packet: Chat::System(Arc::new(p.clone())), + packet: ChatPacket::System(Arc::new(p.clone())), }); } ClientboundGamePacket::DisguisedChat(p) => { @@ -1054,7 +1054,7 @@ pub fn process_packet_events(ecs: &mut World) { chat_events.send(ChatReceivedEvent { entity: player_entity, - packet: Chat::Disguised(Arc::new(p.clone())), + packet: ChatPacket::Disguised(Arc::new(p.clone())), }); } ClientboundGamePacket::Sound(_p) => { diff --git a/azalea-core/src/bitset.rs b/azalea-core/src/bitset.rs index c6756b559..c7e039de7 100755 --- a/azalea-core/src/bitset.rs +++ b/azalea-core/src/bitset.rs @@ -1,9 +1,9 @@ use std::io::{Cursor, Write}; -use azalea_buf::{BufReadError, McBuf, AzaleaRead, AzaleaWrite}; +use azalea_buf::{BufReadError, AzBuf, AzaleaRead, AzaleaWrite}; /// Represents Java's BitSet, a list of bits. -#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, McBuf)] +#[derive(Debug, Clone, PartialEq, Eq, Hash, Default, AzBuf)] pub struct BitSet { data: Vec, } diff --git a/azalea-core/src/delta.rs b/azalea-core/src/delta.rs index 2dd670052..cf46471bf 100755 --- a/azalea-core/src/delta.rs +++ b/azalea-core/src/delta.rs @@ -1,4 +1,4 @@ -pub use azalea_buf::McBuf; +pub use azalea_buf::AzBuf; use crate::position::Vec3; @@ -9,7 +9,7 @@ pub trait PositionDeltaTrait { } /// Only works for up to 8 blocks -#[derive(Clone, Debug, McBuf, Default)] +#[derive(Clone, Debug, AzBuf, Default)] pub struct PositionDelta8 { pub xa: i16, pub ya: i16, diff --git a/azalea-core/src/direction.rs b/azalea-core/src/direction.rs index 32e1a23a7..b0b8c9603 100755 --- a/azalea-core/src/direction.rs +++ b/azalea-core/src/direction.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use crate::position::Vec3; -#[derive(Clone, Copy, Debug, McBuf, Default, Eq, PartialEq)] +#[derive(Clone, Copy, Debug, AzBuf, Default, Eq, PartialEq)] pub enum Direction { #[default] Down = 0, @@ -62,7 +62,7 @@ impl Direction { } // TODO: make azalea_block use this instead of FacingCardinal -#[derive(Clone, Copy, Debug, McBuf, PartialEq, Eq, Hash)] +#[derive(Clone, Copy, Debug, AzBuf, PartialEq, Eq, Hash)] pub enum CardinalDirection { North, South, diff --git a/azalea-core/src/objectives.rs b/azalea-core/src/objectives.rs index dd1534f20..a2f0d5171 100644 --- a/azalea-core/src/objectives.rs +++ b/azalea-core/src/objectives.rs @@ -3,9 +3,9 @@ use std::{ str::FromStr, }; -use azalea_buf::McBuf; +use azalea_buf::AzBuf; -#[derive(Clone, Copy, Debug, McBuf)] +#[derive(Clone, Copy, Debug, AzBuf)] pub enum ObjectiveCriteria { Integer, Hearts, diff --git a/azalea-core/src/position.rs b/azalea-core/src/position.rs index c9aa010aa..22cb490a3 100755 --- a/azalea-core/src/position.rs +++ b/azalea-core/src/position.rs @@ -11,7 +11,7 @@ use std::{ str::FromStr, }; -use azalea_buf::{BufReadError, McBuf, AzaleaRead, AzaleaWrite}; +use azalea_buf::{BufReadError, AzBuf, AzaleaRead, AzaleaWrite}; #[cfg(feature = "serde")] use serde::{Deserialize, Serialize}; @@ -214,7 +214,7 @@ macro_rules! vec3_impl { /// Used to represent an exact position in the world where an entity could be. /// For blocks, [`BlockPos`] is used instead. -#[derive(Clone, Copy, Debug, Default, PartialEq, McBuf)] +#[derive(Clone, Copy, Debug, Default, PartialEq, AzBuf)] #[cfg_attr(feature = "serde", derive(Deserialize, Serialize))] pub struct Vec3 { pub x: f64, diff --git a/azalea-core/src/resource_location.rs b/azalea-core/src/resource_location.rs index 539b9b81f..c95e31094 100755 --- a/azalea-core/src/resource_location.rs +++ b/azalea-core/src/resource_location.rs @@ -6,7 +6,7 @@ use std::{ str::FromStr, }; -use azalea_buf::{BufReadError, AzaleaRead, AzaleaWrite}; +use azalea_buf::{AzaleaRead, AzaleaWrite, BufReadError}; #[cfg(feature = "serde")] use serde::{de, Deserialize, Deserializer, Serialize, Serializer}; use simdnbt::{owned::NbtTag, FromNbtTag, ToNbtTag}; @@ -142,7 +142,7 @@ mod tests { } #[test] - fn mcbuf_resource_location() { + fn azbuf_resource_location() { let mut buf = Vec::new(); ResourceLocation::new("minecraft:dirt") .azalea_write(&mut buf) diff --git a/azalea-crypto/src/signing.rs b/azalea-crypto/src/signing.rs index 9e276ede9..ba9cc3056 100755 --- a/azalea-crypto/src/signing.rs +++ b/azalea-crypto/src/signing.rs @@ -1,6 +1,6 @@ use std::time::{SystemTime, UNIX_EPOCH}; -use azalea_buf::{McBuf, AzaleaWrite}; +use azalea_buf::{AzBuf, AzaleaWrite}; use rsa::{ signature::{RandomizedSigner, SignatureEncoding}, RsaPrivateKey, @@ -8,18 +8,18 @@ use rsa::{ use sha2::Sha256; use uuid::Uuid; -#[derive(Debug, Clone, McBuf)] +#[derive(Debug, Clone, AzBuf)] pub struct SaltSignaturePair { pub salt: u64, pub signature: Vec, } -#[derive(Clone, Debug, PartialEq, McBuf)] +#[derive(Clone, Debug, PartialEq, AzBuf)] pub struct MessageSignature { pub bytes: [u8; 256], } -#[derive(Clone, Debug, McBuf, PartialEq)] +#[derive(Clone, Debug, AzBuf, PartialEq)] pub struct SignedMessageHeader { pub previous_signature: Option, pub sender: Uuid, diff --git a/azalea-entity/src/attributes.rs b/azalea-entity/src/attributes.rs index ddafaec36..797ea43c4 100644 --- a/azalea-entity/src/attributes.rs +++ b/azalea-entity/src/attributes.rs @@ -2,7 +2,7 @@ use std::collections::{hash_map, HashMap}; -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::resource_location::ResourceLocation; use bevy_ecs::component::Component; use thiserror::Error; @@ -71,14 +71,14 @@ impl AttributeInstance { } } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct AttributeModifier { pub id: ResourceLocation, pub amount: f64, pub operation: AttributeModifierOperation, } -#[derive(Clone, Debug, Copy, McBuf)] +#[derive(Clone, Debug, Copy, AzBuf)] pub enum AttributeModifierOperation { Addition, MultiplyBase, diff --git a/azalea-entity/src/data.rs b/azalea-entity/src/data.rs index a67037e2a..257c41c3b 100755 --- a/azalea-entity/src/data.rs +++ b/azalea-entity/src/data.rs @@ -2,7 +2,7 @@ use std::io::{Cursor, Write}; -use azalea_buf::{AzaleaRead, AzaleaReadVar, AzaleaWrite, AzaleaWriteVar, BufReadError, McBuf}; +use azalea_buf::{AzBuf, AzaleaRead, AzaleaReadVar, AzaleaWrite, AzaleaWriteVar, BufReadError}; use azalea_chat::FormattedText; use azalea_core::{ direction::Direction, @@ -62,7 +62,7 @@ impl AzaleaWrite for EntityMetadataItems { // Note: This enum is partially generated and parsed by // codegen/lib/code/entity.py -#[derive(Clone, Debug, EnumAsInner, McBuf)] +#[derive(Clone, Debug, EnumAsInner, AzBuf)] pub enum EntityDataValue { Byte(u8), Int(#[var] i32), @@ -102,7 +102,7 @@ pub enum EntityDataValue { #[derive(Clone, Debug)] pub struct OptionalUnsignedInt(pub Option); -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct Quaternion { pub x: f32, pub y: f32, @@ -112,7 +112,7 @@ pub struct Quaternion { // mojang just calls this ArmadilloState but i added "Kind" since otherwise it // collides with a name in metadata.rs -#[derive(Clone, Debug, Copy, Default, McBuf)] +#[derive(Clone, Debug, Copy, Default, AzBuf)] pub enum ArmadilloStateKind { #[default] Idle, @@ -140,14 +140,14 @@ impl AzaleaWrite for OptionalUnsignedInt { } /// A set of x, y, and z rotations. This is used for armor stands. -#[derive(Clone, Debug, McBuf, Default)] +#[derive(Clone, Debug, AzBuf, Default)] pub struct Rotations { pub x: f32, pub y: f32, pub z: f32, } -#[derive(Clone, Debug, Copy, McBuf, Default, Component, Eq, PartialEq)] +#[derive(Clone, Debug, Copy, AzBuf, Default, Component, Eq, PartialEq)] pub enum Pose { #[default] Standing = 0, @@ -160,7 +160,7 @@ pub enum Pose { Dying, } -#[derive(Debug, Clone, McBuf)] +#[derive(Debug, Clone, AzBuf)] pub struct VillagerData { pub kind: azalea_registry::VillagerKind, pub profession: azalea_registry::VillagerProfession, @@ -197,7 +197,7 @@ impl TryFrom for Vec { } } -#[derive(Debug, Copy, Clone, McBuf, Default)] +#[derive(Debug, Copy, Clone, AzBuf, Default)] pub enum SnifferState { #[default] Idling, diff --git a/azalea-entity/src/particle.rs b/azalea-entity/src/particle.rs index 202f6f1d8..76559e58d 100755 --- a/azalea-entity/src/particle.rs +++ b/azalea-entity/src/particle.rs @@ -1,4 +1,4 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::position::BlockPos; use azalea_inventory::ItemStack; use azalea_registry::ParticleKind; @@ -7,7 +7,7 @@ use bevy_ecs::component::Component; // the order of this enum must be kept in sync with ParticleKind, otherwise // we get errors parsing particles. /// A [`ParticleKind`] with data potentially attached to it. -#[derive(Component, Clone, Debug, McBuf, Default)] +#[derive(Component, Clone, Debug, AzBuf, Default)] pub enum Particle { AngryVillager, Block(BlockParticle), @@ -249,12 +249,12 @@ impl From for Particle { } } -#[derive(Debug, Clone, McBuf, Default)] +#[derive(Debug, Clone, AzBuf, Default)] pub struct BlockParticle { #[var] pub block_state: i32, } -#[derive(Debug, Clone, McBuf, Default)] +#[derive(Debug, Clone, AzBuf, Default)] pub struct DustParticle { /// Red value, 0-1 pub red: f32, @@ -266,7 +266,7 @@ pub struct DustParticle { pub scale: f32, } -#[derive(Debug, Clone, McBuf, Default)] +#[derive(Debug, Clone, AzBuf, Default)] pub struct DustColorTransitionParticle { /// Red value, 0-1 pub from_red: f32, @@ -284,12 +284,12 @@ pub struct DustColorTransitionParticle { pub to_blue: f32, } -#[derive(Debug, Clone, McBuf, Default)] +#[derive(Debug, Clone, AzBuf, Default)] pub struct ItemParticle { pub item: ItemStack, } -#[derive(Debug, Clone, McBuf, Default)] +#[derive(Debug, Clone, AzBuf, Default)] pub struct VibrationParticle { pub origin: BlockPos, pub position_type: String, @@ -300,12 +300,12 @@ pub struct VibrationParticle { pub ticks: u32, } -#[derive(Debug, Clone, McBuf, Default)] +#[derive(Debug, Clone, AzBuf, Default)] pub struct SculkChargeParticle { pub roll: f32, } -#[derive(Debug, Clone, McBuf, Default)] +#[derive(Debug, Clone, AzBuf, Default)] pub struct ShriekParticle { #[var] pub delay: i32, // The time in ticks before the particle is displayed diff --git a/azalea-inventory/src/components.rs b/azalea-inventory/src/components.rs index f2d44a055..10b00b360 100644 --- a/azalea-inventory/src/components.rs +++ b/azalea-inventory/src/components.rs @@ -1,7 +1,7 @@ use core::f64; use std::{any::Any, collections::HashMap, io::Cursor}; -use azalea_buf::{BufReadError, McBuf, AzaleaRead, AzaleaWrite}; +use azalea_buf::{AzBuf, AzaleaRead, AzaleaWrite, BufReadError}; use azalea_chat::FormattedText; use azalea_core::{position::GlobalPos, resource_location::ResourceLocation}; use azalea_registry::{ @@ -134,27 +134,27 @@ pub fn from_kind( }) } -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct CustomData { pub nbt: Nbt, } impl DataComponent for CustomData {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct MaxStackSize { #[var] pub count: i32, } impl DataComponent for MaxStackSize {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct MaxDamage { #[var] pub amount: i32, } impl DataComponent for MaxDamage {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct Damage { #[var] pub amount: i32, @@ -162,7 +162,7 @@ pub struct Damage { impl DataComponent for Damage {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct Unbreakable { pub show_in_tooltip: bool, } @@ -175,26 +175,26 @@ impl Default for Unbreakable { } } -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct CustomName { pub name: FormattedText, } impl DataComponent for CustomName {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct ItemName { pub name: FormattedText, } impl DataComponent for ItemName {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct Lore { pub lines: Vec, // vanilla also has styled_lines here but it doesn't appear to be used for the protocol } impl DataComponent for Lore {} -#[derive(Clone, PartialEq, Copy, McBuf)] +#[derive(Clone, PartialEq, Copy, AzBuf)] pub enum Rarity { Common, Uncommon, @@ -203,7 +203,7 @@ pub enum Rarity { } impl DataComponent for Rarity {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct Enchantments { #[var] pub levels: HashMap, @@ -211,7 +211,7 @@ pub struct Enchantments { } impl DataComponent for Enchantments {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub enum BlockStateValueMatcher { Exact { value: String, @@ -222,38 +222,38 @@ pub enum BlockStateValueMatcher { }, } -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct BlockStatePropertyMatcher { pub name: String, pub value_matcher: BlockStateValueMatcher, } -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct BlockPredicate { pub blocks: Option>, pub properties: Option>, pub nbt: Option, } -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct AdventureModePredicate { pub predicates: Vec, pub show_in_tooltip: bool, } -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct CanPlaceOn { pub predicate: AdventureModePredicate, } impl DataComponent for CanPlaceOn {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct CanBreak { pub predicate: AdventureModePredicate, } impl DataComponent for CanBreak {} -#[derive(Clone, Copy, PartialEq, McBuf)] +#[derive(Clone, Copy, PartialEq, AzBuf)] pub enum EquipmentSlotGroup { Any, Mainhand, @@ -267,7 +267,7 @@ pub enum EquipmentSlotGroup { Body, } -#[derive(Clone, Copy, PartialEq, McBuf)] +#[derive(Clone, Copy, PartialEq, AzBuf)] pub enum AttributeModifierOperation { Addition, MultiplyBase, @@ -277,7 +277,7 @@ pub enum AttributeModifierOperation { // this is duplicated in azalea-entity, BUT the one there has a different // protocol format (and we can't use it anyways because it would cause a // circular dependency) -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct AttributeModifier { pub uuid: Uuid, pub name: String, @@ -285,57 +285,57 @@ pub struct AttributeModifier { pub operation: AttributeModifierOperation, } -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct AttributeModifiersEntry { pub attribute: Attribute, pub modifier: AttributeModifier, pub slot: EquipmentSlotGroup, } -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct AttributeModifiers { pub modifiers: Vec, pub show_in_tooltip: bool, } impl DataComponent for AttributeModifiers {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct CustomModelData { #[var] pub value: i32, } impl DataComponent for CustomModelData {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct HideAdditionalTooltip; impl DataComponent for HideAdditionalTooltip {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct HideTooltip; impl DataComponent for HideTooltip {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct RepairCost { #[var] pub cost: u32, } impl DataComponent for RepairCost {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct CreativeSlotLock; impl DataComponent for CreativeSlotLock {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct EnchantmentGlintOverride { pub show_glint: bool, } impl DataComponent for EnchantmentGlintOverride {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct IntangibleProjectile; impl DataComponent for IntangibleProjectile {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct MobEffectDetails { #[var] pub amplifier: i32, @@ -347,19 +347,19 @@ pub struct MobEffectDetails { pub hidden_effect: Option>, } -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct MobEffectInstance { pub effect: MobEffect, pub details: MobEffectDetails, } -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct PossibleEffect { pub effect: MobEffectInstance, pub probability: f32, } -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct Food { #[var] pub nutrition: i32, @@ -370,14 +370,14 @@ pub struct Food { } impl DataComponent for Food {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct ToolRule { pub blocks: HolderSet, pub speed: Option, pub correct_for_drops: Option, } -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct Tool { pub rules: Vec, pub default_mining_speed: f32, @@ -386,7 +386,7 @@ pub struct Tool { } impl DataComponent for Tool {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct StoredEnchantments { #[var] pub enchantments: HashMap, @@ -394,52 +394,52 @@ pub struct StoredEnchantments { } impl DataComponent for StoredEnchantments {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct DyedColor { pub rgb: i32, pub show_in_tooltip: bool, } impl DataComponent for DyedColor {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct MapColor { pub color: i32, } impl DataComponent for MapColor {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct MapId { #[var] pub id: i32, } impl DataComponent for MapId {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct MapDecorations { pub decorations: NbtCompound, } impl DataComponent for MapDecorations {} -#[derive(Clone, Copy, PartialEq, McBuf)] +#[derive(Clone, Copy, PartialEq, AzBuf)] pub enum MapPostProcessing { Lock, Scale, } impl DataComponent for MapPostProcessing {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct ChargedProjectiles { pub items: Vec, } impl DataComponent for ChargedProjectiles {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct BundleContents { pub items: Vec, } impl DataComponent for BundleContents {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct PotionContents { pub potion: Option, pub custom_color: Option, @@ -447,26 +447,26 @@ pub struct PotionContents { } impl DataComponent for PotionContents {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct SuspiciousStewEffect { pub effect: MobEffect, #[var] pub duration: i32, } -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct SuspiciousStewEffects { pub effects: Vec, } impl DataComponent for SuspiciousStewEffects {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct WritableBookContent { pub pages: Vec, } impl DataComponent for WritableBookContent {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct WrittenBookContent { pub title: String, pub author: String, @@ -477,7 +477,7 @@ pub struct WrittenBookContent { } impl DataComponent for WrittenBookContent {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct Trim { pub material: TrimMaterial, pub pattern: TrimPattern, @@ -485,57 +485,57 @@ pub struct Trim { } impl DataComponent for Trim {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct DebugStickState { pub properties: NbtCompound, } impl DataComponent for DebugStickState {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct EntityData { pub entity: NbtCompound, } impl DataComponent for EntityData {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct BucketEntityData { pub entity: NbtCompound, } impl DataComponent for BucketEntityData {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct BlockEntityData { pub entity: NbtCompound, } impl DataComponent for BlockEntityData {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct Instrument { pub instrument: azalea_registry::Instrument, } impl DataComponent for Instrument {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct OminousBottleAmplifier { #[var] pub amplifier: i32, } impl DataComponent for OminousBottleAmplifier {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct Recipes { pub recipes: Vec, } impl DataComponent for Recipes {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct LodestoneTracker { pub target: Option, pub tracked: bool, } impl DataComponent for LodestoneTracker {} -#[derive(Clone, Copy, PartialEq, McBuf)] +#[derive(Clone, Copy, PartialEq, AzBuf)] pub enum FireworkExplosionShape { SmallBall, LargeBall, @@ -544,7 +544,7 @@ pub enum FireworkExplosionShape { Burst, } -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct FireworkExplosion { pub shape: FireworkExplosionShape, pub colors: Vec, @@ -554,7 +554,7 @@ pub struct FireworkExplosion { } impl DataComponent for FireworkExplosion {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct Fireworks { #[var] pub flight_duration: i32, @@ -562,14 +562,14 @@ pub struct Fireworks { } impl DataComponent for Fireworks {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct GameProfileProperty { pub name: String, pub value: String, pub signature: Option, } -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct Profile { pub name: String, pub id: Option, @@ -577,13 +577,13 @@ pub struct Profile { } impl DataComponent for Profile {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct NoteBlockSound { pub sound: ResourceLocation, } impl DataComponent for NoteBlockSound {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct BannerPattern { #[var] pub pattern: i32, @@ -591,13 +591,13 @@ pub struct BannerPattern { pub color: i32, } -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct BannerPatterns { pub patterns: Vec, } impl DataComponent for BannerPatterns {} -#[derive(Clone, Copy, PartialEq, McBuf)] +#[derive(Clone, Copy, PartialEq, AzBuf)] pub enum DyeColor { White, Orange, @@ -617,31 +617,31 @@ pub enum DyeColor { Black, } -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct BaseColor { pub color: DyeColor, } impl DataComponent for BaseColor {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct PotDecorations { pub items: Vec, } impl DataComponent for PotDecorations {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct Container { pub items: Vec, } impl DataComponent for Container {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct BlockState { pub properties: HashMap, } impl DataComponent for BlockState {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct BeehiveOccupant { pub entity_data: NbtCompound, #[var] @@ -650,32 +650,32 @@ pub struct BeehiveOccupant { pub min_ticks_in_hive: i32, } -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct Bees { pub occupants: Vec, } impl DataComponent for Bees {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct Lock { pub key: String, } impl DataComponent for Lock {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct ContainerLoot { pub loot: NbtCompound, } impl DataComponent for ContainerLoot {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct JukeboxPlayable { pub song: azalea_registry::JukeboxSong, pub show_in_tooltip: bool, } impl DataComponent for JukeboxPlayable {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct Consumable { pub consume_seconds: f32, pub animation: ItemUseAnimation, @@ -685,7 +685,7 @@ pub struct Consumable { } impl DataComponent for Consumable {} -#[derive(Clone, Copy, PartialEq, McBuf)] +#[derive(Clone, Copy, PartialEq, AzBuf)] pub enum ItemUseAnimation { None, Eat, @@ -699,39 +699,39 @@ pub enum ItemUseAnimation { Brush, } -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct UseRemainder { pub convert_into: ItemStack, } impl DataComponent for UseRemainder {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct UseCooldown { pub seconds: f32, pub cooldown_group: Option, } impl DataComponent for UseCooldown {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct Enchantable { #[var] pub value: u32, } impl DataComponent for Enchantable {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct Repairable { pub items: HolderSet, } impl DataComponent for Repairable {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct ItemModel { pub resource_location: ResourceLocation, } impl DataComponent for ItemModel {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct DamageResistant { // in the vanilla code this is // ``` @@ -745,7 +745,7 @@ pub struct DamageResistant { } impl DataComponent for DamageResistant {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct Equippable { pub slot: EquipmentSlot, pub equip_sound: SoundEvent, @@ -754,7 +754,7 @@ pub struct Equippable { } impl DataComponent for Equippable {} -#[derive(Clone, Copy, Debug, PartialEq, McBuf)] +#[derive(Clone, Copy, Debug, PartialEq, AzBuf)] pub enum EquipmentSlot { Mainhand, Offhand, @@ -767,17 +767,17 @@ pub enum EquipmentSlot { Body, } -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct Glider; impl DataComponent for Glider {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct TooltipStyle { pub resource_location: ResourceLocation, } impl DataComponent for TooltipStyle {} -#[derive(Clone, PartialEq, McBuf)] +#[derive(Clone, PartialEq, AzBuf)] pub struct DeathProtection { pub death_effects: Vec, } diff --git a/azalea-inventory/src/operations.rs b/azalea-inventory/src/operations.rs index 0f73d877e..0df7c794a 100644 --- a/azalea-inventory/src/operations.rs +++ b/azalea-inventory/src/operations.rs @@ -1,6 +1,6 @@ use std::ops::RangeInclusive; -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use crate::{ item::MaxStackSizeExt, AnvilMenuLocation, BeaconMenuLocation, BlastFurnaceMenuLocation, @@ -250,7 +250,7 @@ impl ClickOperation { } } -#[derive(McBuf, Clone, Copy, Debug)] +#[derive(AzBuf, Clone, Copy, Debug)] pub enum ClickType { Pickup = 0, QuickMove = 1, diff --git a/azalea-protocol/README.md b/azalea-protocol/README.md index 91d425a68..e1923c9e2 100755 --- a/azalea-protocol/README.md +++ b/azalea-protocol/README.md @@ -21,6 +21,6 @@ Adding new packets is usually pretty easy, but you'll want to have Minecraft's d ### Implementing packets -You can manually implement reading and writing functionality for a packet by implementing AzaleaRead and AzaleaWrite, but you can also have this automatically generated for a struct or enum by deriving McBuf. +You can manually implement reading and writing functionality for a packet by implementing AzaleaRead and AzaleaWrite, but you can also have this automatically generated for a struct or enum by deriving AzBuf. Look at other packets as an example. diff --git a/azalea-protocol/src/common.rs b/azalea-protocol/src/common.rs index 9529cd1b9..d5b5bf1b8 100644 --- a/azalea-protocol/src/common.rs +++ b/azalea-protocol/src/common.rs @@ -1,13 +1,13 @@ //! Some serializable data types that are used by several packets. -use azalea_buf::{AzaleaRead, AzaleaWrite, McBuf}; +use azalea_buf::{AzBuf, AzaleaRead, AzaleaWrite}; use azalea_core::bitset::FixedBitSet; use bevy_ecs::component::Component; /// A component that contains some of the "settings" for this client that are /// sent to the server, such as render distance. This is only present on local /// players. -#[derive(Clone, Debug, McBuf, PartialEq, Eq, Component)] +#[derive(Clone, Debug, AzBuf, PartialEq, Eq, Component)] pub struct ClientInformation { /// The locale of the client. pub language: String, @@ -45,7 +45,7 @@ impl Default for ClientInformation { } } -#[derive(McBuf, Clone, Copy, Debug, PartialEq, Eq, Default)] +#[derive(AzBuf, Clone, Copy, Debug, PartialEq, Eq, Default)] pub enum ChatVisibility { /// All chat messages should be sent to the client. #[default] @@ -57,7 +57,7 @@ pub enum ChatVisibility { Hidden = 2, } -#[derive(McBuf, Clone, Copy, Debug, PartialEq, Eq, Default)] +#[derive(AzBuf, Clone, Copy, Debug, PartialEq, Eq, Default)] pub enum HumanoidArm { Left = 0, #[default] @@ -75,7 +75,7 @@ pub struct ModelCustomization { pub hat: bool, } -#[derive(McBuf, Clone, Copy, Debug, PartialEq, Eq, Default)] +#[derive(AzBuf, Clone, Copy, Debug, PartialEq, Eq, Default)] pub enum ParticleStatus { #[default] All, diff --git a/azalea-protocol/src/packets/common.rs b/azalea-protocol/src/packets/common.rs index 173e15fc0..fc78cd7a5 100644 --- a/azalea-protocol/src/packets/common.rs +++ b/azalea-protocol/src/packets/common.rs @@ -1,11 +1,11 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::{ game_type::{GameMode, OptionalGameType}, position::GlobalPos, resource_location::ResourceLocation, }; -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct CommonPlayerSpawnInfo { pub dimension_type: azalea_registry::DimensionType, pub dimension: ResourceLocation, diff --git a/azalea-protocol/src/packets/config/c_cookie_request.rs b/azalea-protocol/src/packets/config/c_cookie_request.rs index d9f0a426f..4c57718db 100644 --- a/azalea-protocol/src/packets/config/c_cookie_request.rs +++ b/azalea-protocol/src/packets/config/c_cookie_request.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundConfigPacket; -#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] pub struct ClientboundCookieRequest { pub key: ResourceLocation, } diff --git a/azalea-protocol/src/packets/config/c_custom_payload.rs b/azalea-protocol/src/packets/config/c_custom_payload.rs index c00f22c6f..3432ac3a5 100644 --- a/azalea-protocol/src/packets/config/c_custom_payload.rs +++ b/azalea-protocol/src/packets/config/c_custom_payload.rs @@ -1,9 +1,9 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_buf::UnsizedByteArray; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundConfigPacket; -#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] pub struct ClientboundCustomPayload { pub identifier: ResourceLocation, pub data: UnsizedByteArray, diff --git a/azalea-protocol/src/packets/config/c_disconnect.rs b/azalea-protocol/src/packets/config/c_disconnect.rs index 3dec97f24..b59b318d4 100644 --- a/azalea-protocol/src/packets/config/c_disconnect.rs +++ b/azalea-protocol/src/packets/config/c_disconnect.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundConfigPacket; -#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] pub struct ClientboundDisconnect { pub reason: FormattedText, } diff --git a/azalea-protocol/src/packets/config/c_finish_configuration.rs b/azalea-protocol/src/packets/config/c_finish_configuration.rs index 1c904bfcc..e3f3e5a59 100644 --- a/azalea-protocol/src/packets/config/c_finish_configuration.rs +++ b/azalea-protocol/src/packets/config/c_finish_configuration.rs @@ -1,5 +1,5 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundConfigPacket; -#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] pub struct ClientboundFinishConfiguration {} diff --git a/azalea-protocol/src/packets/config/c_keep_alive.rs b/azalea-protocol/src/packets/config/c_keep_alive.rs index 93ea610fc..f0310c348 100644 --- a/azalea-protocol/src/packets/config/c_keep_alive.rs +++ b/azalea-protocol/src/packets/config/c_keep_alive.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundConfigPacket; -#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] pub struct ClientboundKeepAlive { pub id: u64, } diff --git a/azalea-protocol/src/packets/config/c_ping.rs b/azalea-protocol/src/packets/config/c_ping.rs index 29067db32..35b5c39cc 100644 --- a/azalea-protocol/src/packets/config/c_ping.rs +++ b/azalea-protocol/src/packets/config/c_ping.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundConfigPacket; -#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] pub struct ClientboundPing { pub id: u32, } diff --git a/azalea-protocol/src/packets/config/c_registry_data.rs b/azalea-protocol/src/packets/config/c_registry_data.rs index 14ae09fb6..185de4c36 100644 --- a/azalea-protocol/src/packets/config/c_registry_data.rs +++ b/azalea-protocol/src/packets/config/c_registry_data.rs @@ -1,11 +1,11 @@ use std::collections::HashMap; -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundConfigPacket; use simdnbt::owned::NbtCompound; -#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] pub struct ClientboundRegistryData { pub registry_id: ResourceLocation, pub entries: HashMap>, diff --git a/azalea-protocol/src/packets/config/c_reset_chat.rs b/azalea-protocol/src/packets/config/c_reset_chat.rs index 7525d925b..273cb0fd6 100644 --- a/azalea-protocol/src/packets/config/c_reset_chat.rs +++ b/azalea-protocol/src/packets/config/c_reset_chat.rs @@ -1,5 +1,5 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundConfigPacket; -#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] pub struct ClientboundResetChat; diff --git a/azalea-protocol/src/packets/config/c_resource_pack.rs b/azalea-protocol/src/packets/config/c_resource_pack.rs index 50b2fb32d..63a59b5ba 100644 --- a/azalea-protocol/src/packets/config/c_resource_pack.rs +++ b/azalea-protocol/src/packets/config/c_resource_pack.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundConfigPacket; -#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] pub struct ClientboundResourcePack { pub url: String, pub hash: String, diff --git a/azalea-protocol/src/packets/config/c_resource_pack_pop.rs b/azalea-protocol/src/packets/config/c_resource_pack_pop.rs index 042ba8ff6..f949a7267 100644 --- a/azalea-protocol/src/packets/config/c_resource_pack_pop.rs +++ b/azalea-protocol/src/packets/config/c_resource_pack_pop.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundConfigPacket; use uuid::Uuid; -#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] pub struct ClientboundResourcePackPop { pub id: Option, } diff --git a/azalea-protocol/src/packets/config/c_resource_pack_push.rs b/azalea-protocol/src/packets/config/c_resource_pack_push.rs index 677f8cef3..6be5c7096 100644 --- a/azalea-protocol/src/packets/config/c_resource_pack_push.rs +++ b/azalea-protocol/src/packets/config/c_resource_pack_push.rs @@ -1,9 +1,9 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundConfigPacket; use uuid::Uuid; -#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] pub struct ClientboundResourcePackPush { pub id: Uuid, pub url: String, diff --git a/azalea-protocol/src/packets/config/c_select_known_packs.rs b/azalea-protocol/src/packets/config/c_select_known_packs.rs index ac17fea3b..6a4f76db1 100644 --- a/azalea-protocol/src/packets/config/c_select_known_packs.rs +++ b/azalea-protocol/src/packets/config/c_select_known_packs.rs @@ -1,9 +1,9 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundConfigPacket; use super::s_select_known_packs::KnownPack; -#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] pub struct ClientboundSelectKnownPacks { pub known_packs: Vec, } diff --git a/azalea-protocol/src/packets/config/c_store_cookie.rs b/azalea-protocol/src/packets/config/c_store_cookie.rs index 01f8bf895..c52211ea2 100644 --- a/azalea-protocol/src/packets/config/c_store_cookie.rs +++ b/azalea-protocol/src/packets/config/c_store_cookie.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundConfigPacket; -#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] pub struct ClientboundStoreCookie { pub key: ResourceLocation, pub payload: Vec, diff --git a/azalea-protocol/src/packets/config/c_transfer.rs b/azalea-protocol/src/packets/config/c_transfer.rs index 3d92d5cd6..332421d87 100644 --- a/azalea-protocol/src/packets/config/c_transfer.rs +++ b/azalea-protocol/src/packets/config/c_transfer.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundConfigPacket; -#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] pub struct ClientboundTransfer { pub host: String, #[var] diff --git a/azalea-protocol/src/packets/config/c_update_enabled_features.rs b/azalea-protocol/src/packets/config/c_update_enabled_features.rs index 4b0748f95..4529c7577 100644 --- a/azalea-protocol/src/packets/config/c_update_enabled_features.rs +++ b/azalea-protocol/src/packets/config/c_update_enabled_features.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundConfigPacket; -#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] pub struct ClientboundUpdateEnabledFeatures { pub features: Vec, } diff --git a/azalea-protocol/src/packets/config/c_update_tags.rs b/azalea-protocol/src/packets/config/c_update_tags.rs index 95b75d2c9..678a5ccf5 100644 --- a/azalea-protocol/src/packets/config/c_update_tags.rs +++ b/azalea-protocol/src/packets/config/c_update_tags.rs @@ -2,12 +2,12 @@ use std::io::Cursor; use std::ops::Deref; use std::{collections::HashMap, io::Write}; +use azalea_buf::{AzBuf, AzaleaReadVar, AzaleaWriteVar, BufReadError}; use azalea_buf::{AzaleaRead, AzaleaWrite}; -use azalea_buf::{AzaleaWriteVar, BufReadError, McBuf, AzaleaReadVar}; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundConfigPacket; -#[derive(Clone, Debug, McBuf, ClientboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] pub struct ClientboundUpdateTags { pub tags: TagMap, } diff --git a/azalea-protocol/src/packets/config/s_client_information.rs b/azalea-protocol/src/packets/config/s_client_information.rs index efde4055e..614890ffd 100644 --- a/azalea-protocol/src/packets/config/s_client_information.rs +++ b/azalea-protocol/src/packets/config/s_client_information.rs @@ -1,9 +1,9 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundConfigPacket; use crate::common::ClientInformation; -#[derive(Clone, Debug, McBuf, ServerboundConfigPacket, PartialEq, Eq)] +#[derive(Clone, Debug, AzBuf, ServerboundConfigPacket, PartialEq, Eq)] pub struct ServerboundClientInformation { pub information: ClientInformation, } diff --git a/azalea-protocol/src/packets/config/s_cookie_response.rs b/azalea-protocol/src/packets/config/s_cookie_response.rs index 8cde60fa4..e932352f5 100644 --- a/azalea-protocol/src/packets/config/s_cookie_response.rs +++ b/azalea-protocol/src/packets/config/s_cookie_response.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ServerboundConfigPacket; -#[derive(Clone, Debug, McBuf, ServerboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, ServerboundConfigPacket)] pub struct ServerboundCookieResponse { pub key: ResourceLocation, pub payload: Option>, diff --git a/azalea-protocol/src/packets/config/s_custom_payload.rs b/azalea-protocol/src/packets/config/s_custom_payload.rs index b331e5ddd..f480985d1 100644 --- a/azalea-protocol/src/packets/config/s_custom_payload.rs +++ b/azalea-protocol/src/packets/config/s_custom_payload.rs @@ -1,9 +1,9 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_buf::UnsizedByteArray; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ServerboundConfigPacket; -#[derive(Clone, Debug, McBuf, ServerboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, ServerboundConfigPacket)] pub struct ServerboundCustomPayload { pub identifier: ResourceLocation, pub data: UnsizedByteArray, diff --git a/azalea-protocol/src/packets/config/s_finish_configuration.rs b/azalea-protocol/src/packets/config/s_finish_configuration.rs index 268f945f4..a4d94fb19 100644 --- a/azalea-protocol/src/packets/config/s_finish_configuration.rs +++ b/azalea-protocol/src/packets/config/s_finish_configuration.rs @@ -1,5 +1,5 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundConfigPacket; -#[derive(Clone, Debug, McBuf, ServerboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, ServerboundConfigPacket)] pub struct ServerboundFinishConfiguration {} diff --git a/azalea-protocol/src/packets/config/s_keep_alive.rs b/azalea-protocol/src/packets/config/s_keep_alive.rs index a916deef5..1986a4eba 100644 --- a/azalea-protocol/src/packets/config/s_keep_alive.rs +++ b/azalea-protocol/src/packets/config/s_keep_alive.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundConfigPacket; -#[derive(Clone, Debug, McBuf, ServerboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, ServerboundConfigPacket)] pub struct ServerboundKeepAlive { pub id: u64, } diff --git a/azalea-protocol/src/packets/config/s_pong.rs b/azalea-protocol/src/packets/config/s_pong.rs index c2d041da6..50c012dd7 100644 --- a/azalea-protocol/src/packets/config/s_pong.rs +++ b/azalea-protocol/src/packets/config/s_pong.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundConfigPacket; -#[derive(Clone, Debug, McBuf, ServerboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, ServerboundConfigPacket)] pub struct ServerboundPong { pub id: u32, } diff --git a/azalea-protocol/src/packets/config/s_resource_pack.rs b/azalea-protocol/src/packets/config/s_resource_pack.rs index 503606aa6..0822c7230 100644 --- a/azalea-protocol/src/packets/config/s_resource_pack.rs +++ b/azalea-protocol/src/packets/config/s_resource_pack.rs @@ -1,14 +1,14 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundConfigPacket; use uuid::Uuid; -#[derive(Clone, Debug, McBuf, ServerboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, ServerboundConfigPacket)] pub struct ServerboundResourcePack { pub id: Uuid, pub action: Action, } -#[derive(McBuf, Clone, Copy, Debug)] +#[derive(AzBuf, Clone, Copy, Debug)] pub enum Action { SuccessfullyLoaded = 0, Declined = 1, diff --git a/azalea-protocol/src/packets/config/s_select_known_packs.rs b/azalea-protocol/src/packets/config/s_select_known_packs.rs index 5d3668d9a..320b5ca5d 100644 --- a/azalea-protocol/src/packets/config/s_select_known_packs.rs +++ b/azalea-protocol/src/packets/config/s_select_known_packs.rs @@ -1,12 +1,12 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundConfigPacket; -#[derive(Clone, Debug, McBuf, ServerboundConfigPacket)] +#[derive(Clone, Debug, AzBuf, ServerboundConfigPacket)] pub struct ServerboundSelectKnownPacks { pub known_packs: Vec, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct KnownPack { pub namespace: String, pub id: String, diff --git a/azalea-protocol/src/packets/game/c_add_entity.rs b/azalea-protocol/src/packets/game/c_add_entity.rs index 6ff5c9760..cf0adeb7d 100755 --- a/azalea-protocol/src/packets/game/c_add_entity.rs +++ b/azalea-protocol/src/packets/game/c_add_entity.rs @@ -1,10 +1,10 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::{position::Vec3, resource_location::ResourceLocation}; use azalea_entity::{metadata::apply_default_metadata, EntityBundle}; use azalea_protocol_macros::ClientboundGamePacket; use uuid::Uuid; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundAddEntity { /// The id of the entity. #[var] diff --git a/azalea-protocol/src/packets/game/c_add_experience_orb.rs b/azalea-protocol/src/packets/game/c_add_experience_orb.rs index 93d28cd08..b3d12858d 100755 --- a/azalea-protocol/src/packets/game/c_add_experience_orb.rs +++ b/azalea-protocol/src/packets/game/c_add_experience_orb.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundAddExperienceOrb { #[var] pub id: u32, diff --git a/azalea-protocol/src/packets/game/c_add_player.rs b/azalea-protocol/src/packets/game/c_add_player.rs index 68bc033ae..7b36567dd 100755 --- a/azalea-protocol/src/packets/game/c_add_player.rs +++ b/azalea-protocol/src/packets/game/c_add_player.rs @@ -1,4 +1,4 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::{ResourceLocation, Vec3}; use azalea_entity::{metadata::PlayerMetadataBundle, EntityBundle, PlayerBundle}; use azalea_protocol_macros::ClientboundGamePacket; @@ -7,7 +7,7 @@ use uuid::Uuid; /// This packet is sent by the server when a player comes into visible range, /// not when a player joins. -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundAddPlayer { #[var] pub id: u32, diff --git a/azalea-protocol/src/packets/game/c_animate.rs b/azalea-protocol/src/packets/game/c_animate.rs index 0c89aafaa..bda0b1520 100755 --- a/azalea-protocol/src/packets/game/c_animate.rs +++ b/azalea-protocol/src/packets/game/c_animate.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundAnimate { #[var] pub id: u32, @@ -10,7 +10,7 @@ pub struct ClientboundAnimate { // minecraft actually uses a u8 for this, but a varint still works and makes it // so i don't have to add a special handler -#[derive(Clone, Debug, Copy, McBuf)] +#[derive(Clone, Debug, Copy, AzBuf)] pub enum AnimationAction { SwingMainHand = 0, Hurt = 1, diff --git a/azalea-protocol/src/packets/game/c_award_stats.rs b/azalea-protocol/src/packets/game/c_award_stats.rs index 2239ed9f1..20f8b1e07 100755 --- a/azalea-protocol/src/packets/game/c_award_stats.rs +++ b/azalea-protocol/src/packets/game/c_award_stats.rs @@ -1,15 +1,15 @@ use std::collections::HashMap; -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundAwardStats { #[var] pub stats: HashMap, } -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, McBuf)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, AzBuf)] pub enum Stat { Mined(azalea_registry::Block), Crafted(azalea_registry::Item), diff --git a/azalea-protocol/src/packets/game/c_block_changed_ack.rs b/azalea-protocol/src/packets/game/c_block_changed_ack.rs index 987885800..ebb303c02 100755 --- a/azalea-protocol/src/packets/game/c_block_changed_ack.rs +++ b/azalea-protocol/src/packets/game/c_block_changed_ack.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundBlockChangedAck { #[var] pub sequence: i32, diff --git a/azalea-protocol/src/packets/game/c_block_destruction.rs b/azalea-protocol/src/packets/game/c_block_destruction.rs index e702790e5..50d8085b1 100755 --- a/azalea-protocol/src/packets/game/c_block_destruction.rs +++ b/azalea-protocol/src/packets/game/c_block_destruction.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::position::BlockPos; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundBlockDestruction { /// The ID of the entity breaking the block. #[var] diff --git a/azalea-protocol/src/packets/game/c_block_entity_data.rs b/azalea-protocol/src/packets/game/c_block_entity_data.rs index 425ac2660..82ba60de2 100755 --- a/azalea-protocol/src/packets/game/c_block_entity_data.rs +++ b/azalea-protocol/src/packets/game/c_block_entity_data.rs @@ -1,9 +1,9 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::position::BlockPos; use azalea_protocol_macros::ClientboundGamePacket; use simdnbt::owned::Nbt; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundBlockEntityData { pub pos: BlockPos, pub block_entity_type: azalea_registry::BlockEntityKind, diff --git a/azalea-protocol/src/packets/game/c_block_event.rs b/azalea-protocol/src/packets/game/c_block_event.rs index c98661ef4..3a71b1860 100755 --- a/azalea-protocol/src/packets/game/c_block_event.rs +++ b/azalea-protocol/src/packets/game/c_block_event.rs @@ -1,9 +1,9 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::position::BlockPos; use azalea_protocol_macros::ClientboundGamePacket; use azalea_registry::Block; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundBlockEvent { pub pos: BlockPos, pub action_id: u8, diff --git a/azalea-protocol/src/packets/game/c_block_update.rs b/azalea-protocol/src/packets/game/c_block_update.rs index 369b8cc55..ae9bd9981 100755 --- a/azalea-protocol/src/packets/game/c_block_update.rs +++ b/azalea-protocol/src/packets/game/c_block_update.rs @@ -1,9 +1,9 @@ use azalea_block::BlockState; -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::position::BlockPos; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundBlockUpdate { pub pos: BlockPos, pub block_state: BlockState, diff --git a/azalea-protocol/src/packets/game/c_boss_event.rs b/azalea-protocol/src/packets/game/c_boss_event.rs index 5e479db26..e54ab59fb 100755 --- a/azalea-protocol/src/packets/game/c_boss_event.rs +++ b/azalea-protocol/src/packets/game/c_boss_event.rs @@ -1,15 +1,13 @@ use std::io::Cursor; use std::io::Write; -use azalea_buf::{ - BufReadError, McBuf, AzaleaRead, AzaleaReadVar, AzaleaWriteVar, AzaleaWrite, -}; +use azalea_buf::{AzBuf, AzaleaRead, AzaleaReadVar, AzaleaWrite, AzaleaWriteVar, BufReadError}; use azalea_chat::FormattedText; use azalea_core::bitset::FixedBitSet; use azalea_protocol_macros::ClientboundGamePacket; use uuid::Uuid; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundBossEvent { pub id: Uuid, pub operation: Operation, @@ -75,7 +73,7 @@ impl AzaleaWrite for Operation { } } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct AddOperation { pub name: FormattedText, pub progress: f32, @@ -83,13 +81,13 @@ pub struct AddOperation { pub properties: Properties, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct Style { pub color: BossBarColor, pub overlay: BossBarOverlay, } -#[derive(McBuf, Clone, Copy, Debug)] +#[derive(AzBuf, Clone, Copy, Debug)] pub enum BossBarColor { Pink = 0, Blue = 1, @@ -100,7 +98,7 @@ pub enum BossBarColor { White = 6, } -#[derive(McBuf, Clone, Copy, Debug)] +#[derive(AzBuf, Clone, Copy, Debug)] pub enum BossBarOverlay { Progress = 0, Notched6 = 1, diff --git a/azalea-protocol/src/packets/game/c_bundle.rs b/azalea-protocol/src/packets/game/c_bundle.rs index 1e553ce4a..f9379b976 100644 --- a/azalea-protocol/src/packets/game/c_bundle.rs +++ b/azalea-protocol/src/packets/game/c_bundle.rs @@ -1,5 +1,5 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundBundle {} diff --git a/azalea-protocol/src/packets/game/c_change_difficulty.rs b/azalea-protocol/src/packets/game/c_change_difficulty.rs index 9f8577728..cdcc4792a 100755 --- a/azalea-protocol/src/packets/game/c_change_difficulty.rs +++ b/azalea-protocol/src/packets/game/c_change_difficulty.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::difficulty::Difficulty; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundChangeDifficulty { pub difficulty: Difficulty, pub locked: bool, diff --git a/azalea-protocol/src/packets/game/c_chat_preview.rs b/azalea-protocol/src/packets/game/c_chat_preview.rs index 17a3e41e6..e0ddd2ec6 100755 --- a/azalea-protocol/src/packets/game/c_chat_preview.rs +++ b/azalea-protocol/src/packets/game/c_chat_preview.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundChatPreview { pub query_id: i32, pub preview: Option, diff --git a/azalea-protocol/src/packets/game/c_chunk_batch_finished.rs b/azalea-protocol/src/packets/game/c_chunk_batch_finished.rs index 9ea0e73e2..c419888b8 100644 --- a/azalea-protocol/src/packets/game/c_chunk_batch_finished.rs +++ b/azalea-protocol/src/packets/game/c_chunk_batch_finished.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundChunkBatchFinished { #[var] pub batch_size: u32, diff --git a/azalea-protocol/src/packets/game/c_chunk_batch_start.rs b/azalea-protocol/src/packets/game/c_chunk_batch_start.rs index b960abd9a..8b0555dc9 100644 --- a/azalea-protocol/src/packets/game/c_chunk_batch_start.rs +++ b/azalea-protocol/src/packets/game/c_chunk_batch_start.rs @@ -1,5 +1,5 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundChunkBatchStart {} diff --git a/azalea-protocol/src/packets/game/c_chunks_biomes.rs b/azalea-protocol/src/packets/game/c_chunks_biomes.rs index 8b85a9a17..a8e65af49 100644 --- a/azalea-protocol/src/packets/game/c_chunks_biomes.rs +++ b/azalea-protocol/src/packets/game/c_chunks_biomes.rs @@ -1,13 +1,13 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::position::ChunkPos; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundChunksBiomes { pub chunk_biome_data: Vec, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct ChunkBiomeData { pub pos: ChunkPos, pub buffer: Vec, diff --git a/azalea-protocol/src/packets/game/c_clear_titles.rs b/azalea-protocol/src/packets/game/c_clear_titles.rs index 6a4a84977..58b67bad8 100644 --- a/azalea-protocol/src/packets/game/c_clear_titles.rs +++ b/azalea-protocol/src/packets/game/c_clear_titles.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundClearTitles { pub reset_times: bool, } diff --git a/azalea-protocol/src/packets/game/c_command_suggestions.rs b/azalea-protocol/src/packets/game/c_command_suggestions.rs index f1fa65d7c..37679a721 100755 --- a/azalea-protocol/src/packets/game/c_command_suggestions.rs +++ b/azalea-protocol/src/packets/game/c_command_suggestions.rs @@ -1,8 +1,8 @@ use azalea_brigadier::suggestion::Suggestions; -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundCommandSuggestions { #[var] pub id: u32, diff --git a/azalea-protocol/src/packets/game/c_commands.rs b/azalea-protocol/src/packets/game/c_commands.rs index 60df57e54..1a2315597 100755 --- a/azalea-protocol/src/packets/game/c_commands.rs +++ b/azalea-protocol/src/packets/game/c_commands.rs @@ -1,13 +1,11 @@ use std::io::{Cursor, Write}; -use azalea_buf::{ - BufReadError, McBuf, AzaleaRead, AzaleaReadVar, AzaleaWriteVar, AzaleaWrite, -}; +use azalea_buf::{AzBuf, AzaleaRead, AzaleaReadVar, AzaleaWrite, AzaleaWriteVar, BufReadError}; use azalea_core::{bitset::FixedBitSet, resource_location::ResourceLocation}; use azalea_protocol_macros::ClientboundGamePacket; use tracing::warn; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundCommands { pub entries: Vec, #[var] @@ -82,7 +80,7 @@ impl AzaleaWrite for BrigadierNumber { } } -#[derive(Debug, Clone, Copy, McBuf, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, AzBuf, PartialEq, Eq)] pub enum BrigadierString { /// Reads a single word SingleWord = 0, @@ -93,7 +91,7 @@ pub enum BrigadierString { GreedyPhrase = 2, } -#[derive(Debug, Clone, McBuf, PartialEq)] +#[derive(Debug, Clone, AzBuf, PartialEq)] pub enum BrigadierParser { Bool, Float(BrigadierNumber), diff --git a/azalea-protocol/src/packets/game/c_container_close.rs b/azalea-protocol/src/packets/game/c_container_close.rs index 88ddba430..dda6153b2 100644 --- a/azalea-protocol/src/packets/game/c_container_close.rs +++ b/azalea-protocol/src/packets/game/c_container_close.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundContainerClose { pub container_id: u8, } diff --git a/azalea-protocol/src/packets/game/c_container_set_content.rs b/azalea-protocol/src/packets/game/c_container_set_content.rs index 2a10489b5..852ce60fd 100755 --- a/azalea-protocol/src/packets/game/c_container_set_content.rs +++ b/azalea-protocol/src/packets/game/c_container_set_content.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_inventory::ItemStack; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundContainerSetContent { pub container_id: i8, #[var] diff --git a/azalea-protocol/src/packets/game/c_container_set_data.rs b/azalea-protocol/src/packets/game/c_container_set_data.rs index ebcace7f1..3815f5c51 100755 --- a/azalea-protocol/src/packets/game/c_container_set_data.rs +++ b/azalea-protocol/src/packets/game/c_container_set_data.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundContainerSetData { pub container_id: i8, pub id: u16, diff --git a/azalea-protocol/src/packets/game/c_container_set_slot.rs b/azalea-protocol/src/packets/game/c_container_set_slot.rs index 32250cd5f..5e3476d9d 100755 --- a/azalea-protocol/src/packets/game/c_container_set_slot.rs +++ b/azalea-protocol/src/packets/game/c_container_set_slot.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_inventory::ItemStack; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundContainerSetSlot { pub container_id: i8, #[var] diff --git a/azalea-protocol/src/packets/game/c_cookie_request.rs b/azalea-protocol/src/packets/game/c_cookie_request.rs index 1cecd4f19..330b73341 100755 --- a/azalea-protocol/src/packets/game/c_cookie_request.rs +++ b/azalea-protocol/src/packets/game/c_cookie_request.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundCookieRequest { pub key: ResourceLocation, } diff --git a/azalea-protocol/src/packets/game/c_cooldown.rs b/azalea-protocol/src/packets/game/c_cooldown.rs index 71a2fbf24..016101b77 100755 --- a/azalea-protocol/src/packets/game/c_cooldown.rs +++ b/azalea-protocol/src/packets/game/c_cooldown.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundCooldown { pub item: azalea_registry::Item, #[var] diff --git a/azalea-protocol/src/packets/game/c_custom_chat_completions.rs b/azalea-protocol/src/packets/game/c_custom_chat_completions.rs index 2145f3127..87c27b7ab 100755 --- a/azalea-protocol/src/packets/game/c_custom_chat_completions.rs +++ b/azalea-protocol/src/packets/game/c_custom_chat_completions.rs @@ -1,13 +1,13 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundCustomChatCompletions { pub action: Action, pub entries: Vec, } -#[derive(McBuf, Clone, Copy, Debug)] +#[derive(AzBuf, Clone, Copy, Debug)] pub enum Action { Add = 0, Remove = 1, diff --git a/azalea-protocol/src/packets/game/c_custom_payload.rs b/azalea-protocol/src/packets/game/c_custom_payload.rs index 600f4b114..0610d63e1 100755 --- a/azalea-protocol/src/packets/game/c_custom_payload.rs +++ b/azalea-protocol/src/packets/game/c_custom_payload.rs @@ -1,9 +1,9 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_buf::UnsizedByteArray; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundCustomPayload { pub identifier: ResourceLocation, pub data: UnsizedByteArray, diff --git a/azalea-protocol/src/packets/game/c_custom_report_details.rs b/azalea-protocol/src/packets/game/c_custom_report_details.rs index e66fedfb3..85eccfb7e 100644 --- a/azalea-protocol/src/packets/game/c_custom_report_details.rs +++ b/azalea-protocol/src/packets/game/c_custom_report_details.rs @@ -1,9 +1,9 @@ use std::collections::HashMap; -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundCustomReportDetails { // azalea doesn't implement max lengths yet diff --git a/azalea-protocol/src/packets/game/c_custom_sound.rs b/azalea-protocol/src/packets/game/c_custom_sound.rs index f7106bd5b..7daadb3a7 100644 --- a/azalea-protocol/src/packets/game/c_custom_sound.rs +++ b/azalea-protocol/src/packets/game/c_custom_sound.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundCustomSound { pub name: ResourceLocation, pub source: SoundSource, @@ -13,7 +13,7 @@ pub struct ClientboundCustomSound { pub pitch: f32, } -#[derive(McBuf, Clone, Copy, Debug)] +#[derive(AzBuf, Clone, Copy, Debug)] pub enum SoundSource { Master = 0, Music = 1, diff --git a/azalea-protocol/src/packets/game/c_damage_event.rs b/azalea-protocol/src/packets/game/c_damage_event.rs index 4d2185116..a736f39a4 100644 --- a/azalea-protocol/src/packets/game/c_damage_event.rs +++ b/azalea-protocol/src/packets/game/c_damage_event.rs @@ -1,10 +1,10 @@ use std::io::{Cursor, Write}; -use azalea_buf::{McBuf, AzaleaRead, AzaleaReadVar, AzaleaWriteVar, AzaleaWrite}; +use azalea_buf::{AzBuf, AzaleaRead, AzaleaReadVar, AzaleaWriteVar, AzaleaWrite}; use azalea_core::position::Vec3; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundDamageEvent { #[var] pub entity_id: u32, diff --git a/azalea-protocol/src/packets/game/c_debug_sample.rs b/azalea-protocol/src/packets/game/c_debug_sample.rs index b7624aced..505500622 100755 --- a/azalea-protocol/src/packets/game/c_debug_sample.rs +++ b/azalea-protocol/src/packets/game/c_debug_sample.rs @@ -1,9 +1,9 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; use super::s_debug_sample_subscription::RemoteDebugSampleType; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundDebugSample { pub sample: Vec, pub debug_sample_type: RemoteDebugSampleType, diff --git a/azalea-protocol/src/packets/game/c_delete_chat.rs b/azalea-protocol/src/packets/game/c_delete_chat.rs index d151d0415..d44a4553d 100755 --- a/azalea-protocol/src/packets/game/c_delete_chat.rs +++ b/azalea-protocol/src/packets/game/c_delete_chat.rs @@ -1,9 +1,9 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; use super::c_player_chat::PackedMessageSignature; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundDeleteChat { pub signature: PackedMessageSignature, } diff --git a/azalea-protocol/src/packets/game/c_disconnect.rs b/azalea-protocol/src/packets/game/c_disconnect.rs index b348ea8ea..ba197f1db 100755 --- a/azalea-protocol/src/packets/game/c_disconnect.rs +++ b/azalea-protocol/src/packets/game/c_disconnect.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundDisconnect { pub reason: FormattedText, } diff --git a/azalea-protocol/src/packets/game/c_disguised_chat.rs b/azalea-protocol/src/packets/game/c_disguised_chat.rs index cc6f6d240..90dc5d64a 100644 --- a/azalea-protocol/src/packets/game/c_disguised_chat.rs +++ b/azalea-protocol/src/packets/game/c_disguised_chat.rs @@ -1,4 +1,4 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_chat::{ translatable_component::{StringOrComponent, TranslatableComponent}, FormattedText, @@ -11,7 +11,7 @@ use super::c_player_chat::ChatTypeBound; // [`ClientboundPlayerChat`], except that it doesn't have any of the chat // signing things. Vanilla servers use this when messages are sent from the // console. -#[derive(Clone, Debug, McBuf, ClientboundGamePacket, PartialEq)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket, PartialEq)] pub struct ClientboundDisguisedChat { pub message: FormattedText, pub chat_type: ChatTypeBound, diff --git a/azalea-protocol/src/packets/game/c_entity_event.rs b/azalea-protocol/src/packets/game/c_entity_event.rs index 6ca5faee8..13efbabd0 100755 --- a/azalea-protocol/src/packets/game/c_entity_event.rs +++ b/azalea-protocol/src/packets/game/c_entity_event.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundEntityEvent { pub entity_id: u32, pub event_id: u8, diff --git a/azalea-protocol/src/packets/game/c_entity_position_sync.rs b/azalea-protocol/src/packets/game/c_entity_position_sync.rs index 735b801b0..c5cde3229 100755 --- a/azalea-protocol/src/packets/game/c_entity_position_sync.rs +++ b/azalea-protocol/src/packets/game/c_entity_position_sync.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::position::Vec3; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundEntityPositionSync { #[var] pub id: u32, @@ -10,7 +10,7 @@ pub struct ClientboundEntityPositionSync { pub on_ground: bool, } -#[derive(McBuf, Clone, Debug)] +#[derive(AzBuf, Clone, Debug)] pub struct PositionMoveRotation { pub position: Vec3, pub delta_movement: Vec3, diff --git a/azalea-protocol/src/packets/game/c_explode.rs b/azalea-protocol/src/packets/game/c_explode.rs index 159b41787..aef3887d0 100755 --- a/azalea-protocol/src/packets/game/c_explode.rs +++ b/azalea-protocol/src/packets/game/c_explode.rs @@ -3,9 +3,7 @@ use std::{ str::FromStr, }; -use azalea_buf::{ - BufReadError, McBuf, AzaleaRead, AzaleaReadVar, AzaleaWriteVar, AzaleaWrite, -}; +use azalea_buf::{AzBuf, AzaleaRead, AzaleaReadVar, AzaleaWrite, AzaleaWriteVar, BufReadError}; use azalea_core::{position::BlockPos, resource_location::ResourceLocation}; use azalea_protocol_macros::ClientboundGamePacket; use azalea_registry::{ParticleKind, SoundEvent}; @@ -26,7 +24,7 @@ pub struct ClientboundExplode { pub explosion_sound: SoundEvent, } -#[derive(Clone, Copy, Debug, PartialEq, McBuf)] +#[derive(Clone, Copy, Debug, PartialEq, AzBuf)] pub enum BlockInteraction { Keep, Destroy, diff --git a/azalea-protocol/src/packets/game/c_forget_level_chunk.rs b/azalea-protocol/src/packets/game/c_forget_level_chunk.rs index baa8b7866..bd9016341 100755 --- a/azalea-protocol/src/packets/game/c_forget_level_chunk.rs +++ b/azalea-protocol/src/packets/game/c_forget_level_chunk.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::position::ChunkPos; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundForgetLevelChunk { pub pos: ChunkPos, } diff --git a/azalea-protocol/src/packets/game/c_game_event.rs b/azalea-protocol/src/packets/game/c_game_event.rs index 40f633489..940aa2f1d 100755 --- a/azalea-protocol/src/packets/game/c_game_event.rs +++ b/azalea-protocol/src/packets/game/c_game_event.rs @@ -1,13 +1,13 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundGameEvent { pub event: EventType, pub param: f32, } -#[derive(Clone, Debug, Copy, McBuf)] +#[derive(Clone, Debug, Copy, AzBuf)] pub enum EventType { NoRespawnBlockAvailable = 0, StartRaining = 1, diff --git a/azalea-protocol/src/packets/game/c_horse_screen_open.rs b/azalea-protocol/src/packets/game/c_horse_screen_open.rs index c16164bf1..13a672532 100755 --- a/azalea-protocol/src/packets/game/c_horse_screen_open.rs +++ b/azalea-protocol/src/packets/game/c_horse_screen_open.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundHorseScreenOpen { pub container_id: u8, #[var] diff --git a/azalea-protocol/src/packets/game/c_hurt_animation.rs b/azalea-protocol/src/packets/game/c_hurt_animation.rs index 27ef2652c..49a329894 100644 --- a/azalea-protocol/src/packets/game/c_hurt_animation.rs +++ b/azalea-protocol/src/packets/game/c_hurt_animation.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundHurtAnimation { #[var] pub id: u32, diff --git a/azalea-protocol/src/packets/game/c_initialize_border.rs b/azalea-protocol/src/packets/game/c_initialize_border.rs index fe95fa69d..ca338b7f9 100755 --- a/azalea-protocol/src/packets/game/c_initialize_border.rs +++ b/azalea-protocol/src/packets/game/c_initialize_border.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, ClientboundGamePacket, McBuf)] +#[derive(Clone, Debug, ClientboundGamePacket, AzBuf)] pub struct ClientboundInitializeBorder { pub new_center_x: f64, pub new_center_z: f64, diff --git a/azalea-protocol/src/packets/game/c_keep_alive.rs b/azalea-protocol/src/packets/game/c_keep_alive.rs index 7b6447d94..ff93560b3 100755 --- a/azalea-protocol/src/packets/game/c_keep_alive.rs +++ b/azalea-protocol/src/packets/game/c_keep_alive.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundKeepAlive { pub id: u64, } diff --git a/azalea-protocol/src/packets/game/c_level_chunk_with_light.rs b/azalea-protocol/src/packets/game/c_level_chunk_with_light.rs index 3ba47cbec..a4a6da45c 100755 --- a/azalea-protocol/src/packets/game/c_level_chunk_with_light.rs +++ b/azalea-protocol/src/packets/game/c_level_chunk_with_light.rs @@ -1,10 +1,10 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; use simdnbt::owned::Nbt; use super::c_light_update::ClientboundLightUpdatePacketData; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundLevelChunkWithLight { pub x: i32, pub z: i32, @@ -12,7 +12,7 @@ pub struct ClientboundLevelChunkWithLight { pub light_data: ClientboundLightUpdatePacketData, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct ClientboundLevelChunkPacketData { pub heightmaps: Nbt, // we can't parse the data in azalea-protocol because it depends on context from other packets @@ -20,7 +20,7 @@ pub struct ClientboundLevelChunkPacketData { pub block_entities: Vec, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct BlockEntity { pub packed_xz: u8, pub y: u16, diff --git a/azalea-protocol/src/packets/game/c_level_event.rs b/azalea-protocol/src/packets/game/c_level_event.rs index 5ba76b5ed..f41a1f429 100755 --- a/azalea-protocol/src/packets/game/c_level_event.rs +++ b/azalea-protocol/src/packets/game/c_level_event.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::position::BlockPos; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundLevelEvent { pub event_type: u32, pub pos: BlockPos, diff --git a/azalea-protocol/src/packets/game/c_level_particles.rs b/azalea-protocol/src/packets/game/c_level_particles.rs index eca5b8729..d700673c0 100755 --- a/azalea-protocol/src/packets/game/c_level_particles.rs +++ b/azalea-protocol/src/packets/game/c_level_particles.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_entity::particle::Particle; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundLevelParticles { pub override_limiter: bool, pub x: f64, diff --git a/azalea-protocol/src/packets/game/c_light_update.rs b/azalea-protocol/src/packets/game/c_light_update.rs index 7e10d2ff1..725232914 100755 --- a/azalea-protocol/src/packets/game/c_light_update.rs +++ b/azalea-protocol/src/packets/game/c_light_update.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::bitset::BitSet; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundLightUpdate { #[var] pub x: i32, @@ -11,7 +11,7 @@ pub struct ClientboundLightUpdate { pub light_data: ClientboundLightUpdatePacketData, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct ClientboundLightUpdatePacketData { pub sky_y_mask: BitSet, pub block_y_mask: BitSet, diff --git a/azalea-protocol/src/packets/game/c_login.rs b/azalea-protocol/src/packets/game/c_login.rs index 6221c428b..c0616c559 100755 --- a/azalea-protocol/src/packets/game/c_login.rs +++ b/azalea-protocol/src/packets/game/c_login.rs @@ -1,4 +1,4 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundGamePacket; @@ -8,7 +8,7 @@ use crate::packets::common::CommonPlayerSpawnInfo; /// /// This packet contains information about the state of the player, the /// world, and the registry. -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundLogin { pub player_id: u32, pub hardcore: bool, diff --git a/azalea-protocol/src/packets/game/c_map_item_data.rs b/azalea-protocol/src/packets/game/c_map_item_data.rs index 70c483fcf..9a41ed859 100755 --- a/azalea-protocol/src/packets/game/c_map_item_data.rs +++ b/azalea-protocol/src/packets/game/c_map_item_data.rs @@ -1,8 +1,8 @@ -use azalea_buf::{AzaleaRead, AzaleaWrite, McBuf}; +use azalea_buf::{AzBuf, AzaleaRead, AzaleaWrite}; use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, ClientboundGamePacket, McBuf)] +#[derive(Clone, Debug, ClientboundGamePacket, AzBuf)] pub struct ClientboundMapItemData { #[var] pub map_id: u32, @@ -12,7 +12,7 @@ pub struct ClientboundMapItemData { pub color_patch: OptionalMapPatch, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct MapDecoration { pub decoration_type: DecorationType, pub x: i8, @@ -47,7 +47,7 @@ impl AzaleaWrite for OptionalMapPatch { } } -#[derive(Debug, Clone, McBuf)] +#[derive(Debug, Clone, AzBuf)] pub struct MapPatch { pub width: u8, pub height: u8, @@ -56,7 +56,7 @@ pub struct MapPatch { pub map_colors: Vec, } -#[derive(Clone, Copy, Debug, McBuf)] +#[derive(Clone, Copy, Debug, AzBuf)] pub enum DecorationType { Player, Frame, diff --git a/azalea-protocol/src/packets/game/c_merchant_offers.rs b/azalea-protocol/src/packets/game/c_merchant_offers.rs index 00a376a42..e1822579b 100755 --- a/azalea-protocol/src/packets/game/c_merchant_offers.rs +++ b/azalea-protocol/src/packets/game/c_merchant_offers.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_inventory::ItemStack; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundMerchantOffers { #[var] pub container_id: u32, @@ -15,7 +15,7 @@ pub struct ClientboundMerchantOffers { pub can_restock: bool, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct MerchantOffer { pub base_cost_a: ItemStack, pub result: ItemStack, diff --git a/azalea-protocol/src/packets/game/c_move_entity_pos.rs b/azalea-protocol/src/packets/game/c_move_entity_pos.rs index f33f40104..b153bb3ce 100755 --- a/azalea-protocol/src/packets/game/c_move_entity_pos.rs +++ b/azalea-protocol/src/packets/game/c_move_entity_pos.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::delta::PositionDelta8; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundMoveEntityPos { #[var] pub entity_id: u32, diff --git a/azalea-protocol/src/packets/game/c_move_entity_pos_rot.rs b/azalea-protocol/src/packets/game/c_move_entity_pos_rot.rs index 03558d696..7b22e2901 100755 --- a/azalea-protocol/src/packets/game/c_move_entity_pos_rot.rs +++ b/azalea-protocol/src/packets/game/c_move_entity_pos_rot.rs @@ -1,9 +1,9 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::delta::PositionDelta8; use azalea_protocol_macros::ClientboundGamePacket; /// This packet is sent by the server when an entity moves less then 8 blocks. -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundMoveEntityPosRot { #[var] pub entity_id: u32, diff --git a/azalea-protocol/src/packets/game/c_move_entity_rot.rs b/azalea-protocol/src/packets/game/c_move_entity_rot.rs index d1f07d34a..a83627487 100755 --- a/azalea-protocol/src/packets/game/c_move_entity_rot.rs +++ b/azalea-protocol/src/packets/game/c_move_entity_rot.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundMoveEntityRot { #[var] pub entity_id: u32, diff --git a/azalea-protocol/src/packets/game/c_move_minecart.rs b/azalea-protocol/src/packets/game/c_move_minecart.rs index 569be41e2..becf52422 100644 --- a/azalea-protocol/src/packets/game/c_move_minecart.rs +++ b/azalea-protocol/src/packets/game/c_move_minecart.rs @@ -1,15 +1,15 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::position::Vec3; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundMoveMinecart { #[var] pub entity_id: u32, pub lerp_steps: Vec, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct MinecartStep { pub position: Vec3, pub movement: Vec3, diff --git a/azalea-protocol/src/packets/game/c_move_vehicle.rs b/azalea-protocol/src/packets/game/c_move_vehicle.rs index ea090984a..96e3e5c27 100755 --- a/azalea-protocol/src/packets/game/c_move_vehicle.rs +++ b/azalea-protocol/src/packets/game/c_move_vehicle.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundMoveVehicle { pub x: f64, pub y: f64, diff --git a/azalea-protocol/src/packets/game/c_open_book.rs b/azalea-protocol/src/packets/game/c_open_book.rs index 793639c9d..2c4f6b156 100755 --- a/azalea-protocol/src/packets/game/c_open_book.rs +++ b/azalea-protocol/src/packets/game/c_open_book.rs @@ -1,9 +1,9 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; use super::s_interact::InteractionHand; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundOpenBook { pub hand: InteractionHand, } diff --git a/azalea-protocol/src/packets/game/c_open_screen.rs b/azalea-protocol/src/packets/game/c_open_screen.rs index 234d8f092..4ba717250 100755 --- a/azalea-protocol/src/packets/game/c_open_screen.rs +++ b/azalea-protocol/src/packets/game/c_open_screen.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundOpenScreen { #[var] pub container_id: u32, diff --git a/azalea-protocol/src/packets/game/c_open_sign_editor.rs b/azalea-protocol/src/packets/game/c_open_sign_editor.rs index 5652bed9b..52f5922c8 100755 --- a/azalea-protocol/src/packets/game/c_open_sign_editor.rs +++ b/azalea-protocol/src/packets/game/c_open_sign_editor.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::position::BlockPos; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundOpenSignEditor { pub pos: BlockPos, pub is_front_text: bool, diff --git a/azalea-protocol/src/packets/game/c_ping.rs b/azalea-protocol/src/packets/game/c_ping.rs index 44a8d9d60..956aca8dc 100755 --- a/azalea-protocol/src/packets/game/c_ping.rs +++ b/azalea-protocol/src/packets/game/c_ping.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundPing { pub id: u32, } diff --git a/azalea-protocol/src/packets/game/c_place_ghost_recipe.rs b/azalea-protocol/src/packets/game/c_place_ghost_recipe.rs index fbdec4eda..41c324032 100755 --- a/azalea-protocol/src/packets/game/c_place_ghost_recipe.rs +++ b/azalea-protocol/src/packets/game/c_place_ghost_recipe.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundPlaceGhostRecipe { pub container_id: u8, pub recipe: ResourceLocation, diff --git a/azalea-protocol/src/packets/game/c_player_abilities.rs b/azalea-protocol/src/packets/game/c_player_abilities.rs index 84d6059ea..c32a99fef 100755 --- a/azalea-protocol/src/packets/game/c_player_abilities.rs +++ b/azalea-protocol/src/packets/game/c_player_abilities.rs @@ -1,11 +1,11 @@ use std::io::{Cursor, Write}; -use azalea_buf::{BufReadError, McBuf}; +use azalea_buf::{AzBuf, BufReadError}; use azalea_buf::{AzaleaRead, AzaleaWrite}; use azalea_core::bitset::FixedBitSet; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundPlayerAbilities { pub flags: PlayerAbilitiesFlags, pub flying_speed: f32, diff --git a/azalea-protocol/src/packets/game/c_player_chat.rs b/azalea-protocol/src/packets/game/c_player_chat.rs index 4dbfe5d7a..fe024cebb 100644 --- a/azalea-protocol/src/packets/game/c_player_chat.rs +++ b/azalea-protocol/src/packets/game/c_player_chat.rs @@ -1,8 +1,6 @@ use std::io::{Cursor, Write}; -use azalea_buf::{ - BufReadError, McBuf, AzaleaRead, AzaleaReadVar, AzaleaWriteVar, AzaleaWrite, -}; +use azalea_buf::{AzBuf, AzaleaRead, AzaleaReadVar, AzaleaWrite, AzaleaWriteVar, BufReadError}; use azalea_chat::{ translatable_component::{StringOrComponent, TranslatableComponent}, FormattedText, @@ -12,7 +10,7 @@ use azalea_crypto::MessageSignature; use azalea_protocol_macros::ClientboundGamePacket; use uuid::Uuid; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket, PartialEq)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket, PartialEq)] pub struct ClientboundPlayerChat { pub sender: Uuid, #[var] @@ -24,7 +22,7 @@ pub struct ClientboundPlayerChat { pub chat_type: ChatTypeBound, } -#[derive(Clone, Debug, PartialEq, McBuf)] +#[derive(Clone, Debug, PartialEq, AzBuf)] pub struct PackedSignedMessageBody { // the error is here, for some reason it skipped a byte earlier and here // it's reading `0` when it should be `11` @@ -34,7 +32,7 @@ pub struct PackedSignedMessageBody { pub last_seen: PackedLastSeenMessages, } -#[derive(Clone, Debug, PartialEq, McBuf)] +#[derive(Clone, Debug, PartialEq, AzBuf)] pub struct PackedLastSeenMessages { pub entries: Vec, } @@ -46,14 +44,14 @@ pub enum PackedMessageSignature { Id(u32), } -#[derive(Clone, Debug, PartialEq, McBuf)] +#[derive(Clone, Debug, PartialEq, AzBuf)] pub enum FilterMask { PassThrough, FullyFiltered, PartiallyFiltered(BitSet), } -#[derive(Copy, Clone, Debug, McBuf, PartialEq, Eq)] +#[derive(Copy, Clone, Debug, AzBuf, PartialEq, Eq)] pub enum ChatType { Chat = 0, SayCommand = 1, @@ -64,7 +62,7 @@ pub enum ChatType { EmoteCommand = 6, } -#[derive(Clone, Debug, McBuf, PartialEq)] +#[derive(Clone, Debug, AzBuf, PartialEq)] pub struct ChatTypeBound { pub chat_type: ChatType, pub name: FormattedText, diff --git a/azalea-protocol/src/packets/game/c_player_chat_header.rs b/azalea-protocol/src/packets/game/c_player_chat_header.rs index 0964e6497..d7e84cc50 100755 --- a/azalea-protocol/src/packets/game/c_player_chat_header.rs +++ b/azalea-protocol/src/packets/game/c_player_chat_header.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_crypto::{MessageSignature, SignedMessageHeader}; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundPlayerChatHeader { pub header: SignedMessageHeader, pub header_signature: MessageSignature, diff --git a/azalea-protocol/src/packets/game/c_player_combat_end.rs b/azalea-protocol/src/packets/game/c_player_combat_end.rs index 88b2f3a55..b8029f1bc 100755 --- a/azalea-protocol/src/packets/game/c_player_combat_end.rs +++ b/azalea-protocol/src/packets/game/c_player_combat_end.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; /// Unused by the client in vanilla. -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundPlayerCombatEnd { #[var] pub duration: u32, diff --git a/azalea-protocol/src/packets/game/c_player_combat_enter.rs b/azalea-protocol/src/packets/game/c_player_combat_enter.rs index 046837955..8c344b499 100755 --- a/azalea-protocol/src/packets/game/c_player_combat_enter.rs +++ b/azalea-protocol/src/packets/game/c_player_combat_enter.rs @@ -1,6 +1,6 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; /// Unused in vanilla. -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundPlayerCombatEnter {} diff --git a/azalea-protocol/src/packets/game/c_player_combat_kill.rs b/azalea-protocol/src/packets/game/c_player_combat_kill.rs index f5d138fe1..fb7285b58 100755 --- a/azalea-protocol/src/packets/game/c_player_combat_kill.rs +++ b/azalea-protocol/src/packets/game/c_player_combat_kill.rs @@ -1,9 +1,9 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundGamePacket; /// Used to send a respawn screen. -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundPlayerCombatKill { #[var] pub player_id: u32, diff --git a/azalea-protocol/src/packets/game/c_player_info_remove.rs b/azalea-protocol/src/packets/game/c_player_info_remove.rs index 708e96e16..fcaef9d45 100644 --- a/azalea-protocol/src/packets/game/c_player_info_remove.rs +++ b/azalea-protocol/src/packets/game/c_player_info_remove.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; use uuid::Uuid; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundPlayerInfoRemove { pub profile_ids: Vec, } diff --git a/azalea-protocol/src/packets/game/c_player_info_update.rs b/azalea-protocol/src/packets/game/c_player_info_update.rs index 492020936..ba43564ca 100644 --- a/azalea-protocol/src/packets/game/c_player_info_update.rs +++ b/azalea-protocol/src/packets/game/c_player_info_update.rs @@ -4,9 +4,7 @@ use std::{ }; use azalea_auth::game_profile::{GameProfile, ProfilePropertyValue}; -use azalea_buf::{ - BufReadError, McBuf, AzaleaRead, AzaleaReadVar, AzaleaWriteVar, AzaleaWrite, -}; +use azalea_buf::{AzBuf, AzaleaRead, AzaleaReadVar, AzaleaWrite, AzaleaWriteVar, BufReadError}; use azalea_chat::FormattedText; use azalea_core::{bitset::FixedBitSet, game_type::GameMode}; use azalea_protocol_macros::ClientboundGamePacket; @@ -31,33 +29,33 @@ pub struct PlayerInfoEntry { pub chat_session: Option, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct AddPlayerAction { pub name: String, pub properties: HashMap, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct InitializeChatAction { pub chat_session: Option, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct UpdateGameModeAction { pub game_mode: GameMode, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct UpdateListedAction { pub listed: bool, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct UpdateLatencyAction { #[var] pub latency: i32, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct UpdateDisplayNameAction { pub display_name: Option, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct UpdateListOrderAction { #[var] pub list_order: i32, diff --git a/azalea-protocol/src/packets/game/c_player_look_at.rs b/azalea-protocol/src/packets/game/c_player_look_at.rs index 4acfbbb3b..4d8868140 100755 --- a/azalea-protocol/src/packets/game/c_player_look_at.rs +++ b/azalea-protocol/src/packets/game/c_player_look_at.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundPlayerLookAt { pub from_anchor: Anchor, pub x: f64, @@ -10,13 +10,13 @@ pub struct ClientboundPlayerLookAt { pub entity: Option, } -#[derive(McBuf, Clone, Copy, Debug)] +#[derive(AzBuf, Clone, Copy, Debug)] pub enum Anchor { Feet = 0, Eyes = 1, } -#[derive(McBuf, Clone, Debug)] +#[derive(AzBuf, Clone, Debug)] pub struct AtEntity { #[var] pub entity: u32, diff --git a/azalea-protocol/src/packets/game/c_player_position.rs b/azalea-protocol/src/packets/game/c_player_position.rs index d4cfcd293..aa030fc57 100755 --- a/azalea-protocol/src/packets/game/c_player_position.rs +++ b/azalea-protocol/src/packets/game/c_player_position.rs @@ -1,10 +1,10 @@ use std::io::{Cursor, Write}; -use azalea_buf::{BufReadError, McBuf, AzaleaRead, AzaleaWrite}; +use azalea_buf::{AzBuf, AzaleaRead, AzaleaWrite, BufReadError}; use azalea_core::{bitset::FixedBitSet, position::Vec3}; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundPlayerPosition { #[var] pub id: u32, diff --git a/azalea-protocol/src/packets/game/c_player_rotation.rs b/azalea-protocol/src/packets/game/c_player_rotation.rs index 20570b27c..33214cf9e 100755 --- a/azalea-protocol/src/packets/game/c_player_rotation.rs +++ b/azalea-protocol/src/packets/game/c_player_rotation.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundPlayerRotation { pub y_rot: f32, pub x_rot: f32, diff --git a/azalea-protocol/src/packets/game/c_pong_response.rs b/azalea-protocol/src/packets/game/c_pong_response.rs index b9c3807eb..835666db6 100755 --- a/azalea-protocol/src/packets/game/c_pong_response.rs +++ b/azalea-protocol/src/packets/game/c_pong_response.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundPongResponse { pub time: u64, } diff --git a/azalea-protocol/src/packets/game/c_projectile_power.rs b/azalea-protocol/src/packets/game/c_projectile_power.rs index 281442442..8b453ae2b 100644 --- a/azalea-protocol/src/packets/game/c_projectile_power.rs +++ b/azalea-protocol/src/packets/game/c_projectile_power.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundProjectilePower { pub id: u32, pub acceleration_power: f64, diff --git a/azalea-protocol/src/packets/game/c_recipe_book_add.rs b/azalea-protocol/src/packets/game/c_recipe_book_add.rs index 137d99d69..e6b911306 100755 --- a/azalea-protocol/src/packets/game/c_recipe_book_add.rs +++ b/azalea-protocol/src/packets/game/c_recipe_book_add.rs @@ -1,21 +1,21 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; use super::c_update_recipes::{Ingredient, SlotDisplayData}; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundRecipeBookAdd { pub entries: Vec, pub replace: bool, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct Entry { pub contents: RecipeDisplayEntry, pub flags: u8, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct RecipeDisplayEntry { #[var] pub id: u32, @@ -28,7 +28,7 @@ pub struct RecipeDisplayEntry { } /// [`azalea_registry::RecipeDisplay`] -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub enum RecipeDisplayData { Shapeless(ShapelessCraftingRecipeDisplay), Shaped(ShapedCraftingRecipeDisplay), @@ -37,13 +37,13 @@ pub enum RecipeDisplayData { Smithing(SmithingRecipeDisplay), } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct ShapelessCraftingRecipeDisplay { pub ingredients: Vec, pub result: SlotDisplayData, pub crafting_station: SlotDisplayData, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct ShapedCraftingRecipeDisplay { #[var] pub width: u32, @@ -53,7 +53,7 @@ pub struct ShapedCraftingRecipeDisplay { pub result: SlotDisplayData, pub crafting_station: SlotDisplayData, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct FurnaceRecipeDisplay { pub ingredient: SlotDisplayData, pub fuel: SlotDisplayData, @@ -63,13 +63,13 @@ pub struct FurnaceRecipeDisplay { pub duration: u32, pub experience: f32, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct StonecutterRecipeDisplay { pub input: SlotDisplayData, pub result: SlotDisplayData, pub crafting_station: SlotDisplayData, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct SmithingRecipeDisplay { pub template: SlotDisplayData, pub base: SlotDisplayData, diff --git a/azalea-protocol/src/packets/game/c_recipe_book_remove.rs b/azalea-protocol/src/packets/game/c_recipe_book_remove.rs index 783bf8ae6..aa5a09fe3 100755 --- a/azalea-protocol/src/packets/game/c_recipe_book_remove.rs +++ b/azalea-protocol/src/packets/game/c_recipe_book_remove.rs @@ -1,9 +1,9 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; use super::{c_entity_position_sync::PositionMoveRotation, c_player_position::RelativeMovements}; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundRecipeBookRemove { #[var] pub id: u32, diff --git a/azalea-protocol/src/packets/game/c_recipe_book_settings.rs b/azalea-protocol/src/packets/game/c_recipe_book_settings.rs index e2b768cdf..f88a97334 100755 --- a/azalea-protocol/src/packets/game/c_recipe_book_settings.rs +++ b/azalea-protocol/src/packets/game/c_recipe_book_settings.rs @@ -1,12 +1,12 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundRecipeBookSettings { pub book_settings: RecipeBookSettings, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct RecipeBookSettings { pub gui_open: bool, pub filtering_craftable: bool, diff --git a/azalea-protocol/src/packets/game/c_remove_entities.rs b/azalea-protocol/src/packets/game/c_remove_entities.rs index 8ad2fe290..f3eb71399 100755 --- a/azalea-protocol/src/packets/game/c_remove_entities.rs +++ b/azalea-protocol/src/packets/game/c_remove_entities.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundRemoveEntities { #[var] pub entity_ids: Vec, diff --git a/azalea-protocol/src/packets/game/c_remove_mob_effect.rs b/azalea-protocol/src/packets/game/c_remove_mob_effect.rs index d2ea7994e..21500db3b 100755 --- a/azalea-protocol/src/packets/game/c_remove_mob_effect.rs +++ b/azalea-protocol/src/packets/game/c_remove_mob_effect.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundRemoveMobEffect { #[var] pub entity_id: u32, diff --git a/azalea-protocol/src/packets/game/c_reset_score.rs b/azalea-protocol/src/packets/game/c_reset_score.rs index 8c1aae118..8a40dd0d6 100644 --- a/azalea-protocol/src/packets/game/c_reset_score.rs +++ b/azalea-protocol/src/packets/game/c_reset_score.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundResetScore { pub owner: String, pub objective_name: Option, diff --git a/azalea-protocol/src/packets/game/c_resource_pack_pop.rs b/azalea-protocol/src/packets/game/c_resource_pack_pop.rs index c989be881..14150ea19 100644 --- a/azalea-protocol/src/packets/game/c_resource_pack_pop.rs +++ b/azalea-protocol/src/packets/game/c_resource_pack_pop.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; use uuid::Uuid; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundResourcePackPop { pub id: Option, } diff --git a/azalea-protocol/src/packets/game/c_resource_pack_push.rs b/azalea-protocol/src/packets/game/c_resource_pack_push.rs index b454fb869..6e355029d 100644 --- a/azalea-protocol/src/packets/game/c_resource_pack_push.rs +++ b/azalea-protocol/src/packets/game/c_resource_pack_push.rs @@ -1,9 +1,9 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundGamePacket; use uuid::Uuid; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundResourcePackPush { pub id: Uuid, pub url: String, diff --git a/azalea-protocol/src/packets/game/c_respawn.rs b/azalea-protocol/src/packets/game/c_respawn.rs index ddb03e675..79bbfd1d1 100755 --- a/azalea-protocol/src/packets/game/c_respawn.rs +++ b/azalea-protocol/src/packets/game/c_respawn.rs @@ -1,9 +1,9 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; use crate::packets::common::CommonPlayerSpawnInfo; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundRespawn { pub common: CommonPlayerSpawnInfo, pub data_to_keep: u8, diff --git a/azalea-protocol/src/packets/game/c_rotate_head.rs b/azalea-protocol/src/packets/game/c_rotate_head.rs index c2aba5485..26e559489 100755 --- a/azalea-protocol/src/packets/game/c_rotate_head.rs +++ b/azalea-protocol/src/packets/game/c_rotate_head.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundRotateHead { #[var] pub entity_id: u32, diff --git a/azalea-protocol/src/packets/game/c_section_blocks_update.rs b/azalea-protocol/src/packets/game/c_section_blocks_update.rs index 122e024a7..4554c015d 100755 --- a/azalea-protocol/src/packets/game/c_section_blocks_update.rs +++ b/azalea-protocol/src/packets/game/c_section_blocks_update.rs @@ -1,13 +1,11 @@ use std::io::{Cursor, Write}; use azalea_block::BlockState; -use azalea_buf::{ - BufReadError, McBuf, AzaleaRead, AzaleaReadVar, AzaleaWriteVar, AzaleaWrite, -}; +use azalea_buf::{AzBuf, AzaleaRead, AzaleaReadVar, AzaleaWrite, AzaleaWriteVar, BufReadError}; use azalea_core::position::{ChunkSectionBlockPos, ChunkSectionPos}; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSectionBlocksUpdate { pub section_pos: ChunkSectionPos, pub states: Vec, diff --git a/azalea-protocol/src/packets/game/c_select_advancements_tab.rs b/azalea-protocol/src/packets/game/c_select_advancements_tab.rs index 34a5901af..eb4cc62af 100755 --- a/azalea-protocol/src/packets/game/c_select_advancements_tab.rs +++ b/azalea-protocol/src/packets/game/c_select_advancements_tab.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSelectAdvancementsTab { pub tab: Option, } diff --git a/azalea-protocol/src/packets/game/c_server_data.rs b/azalea-protocol/src/packets/game/c_server_data.rs index d59f989db..221166855 100755 --- a/azalea-protocol/src/packets/game/c_server_data.rs +++ b/azalea-protocol/src/packets/game/c_server_data.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundServerData { pub motd: FormattedText, pub icon_bytes: Option>, diff --git a/azalea-protocol/src/packets/game/c_server_links.rs b/azalea-protocol/src/packets/game/c_server_links.rs index a4f85c775..e41a60905 100644 --- a/azalea-protocol/src/packets/game/c_server_links.rs +++ b/azalea-protocol/src/packets/game/c_server_links.rs @@ -1,25 +1,25 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundServerLinks { pub links: Vec, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct ServerLinkEntry { pub kind: ServerLinkKind, pub link: String, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub enum ServerLinkKind { Known(KnownLinkKind), Component(FormattedText), } -#[derive(Clone, Copy, Debug, McBuf)] +#[derive(Clone, Copy, Debug, AzBuf)] pub enum KnownLinkKind { BugReport, CommunityGuidelines, diff --git a/azalea-protocol/src/packets/game/c_set_action_bar_text.rs b/azalea-protocol/src/packets/game/c_set_action_bar_text.rs index 224ef06ec..d08c50218 100755 --- a/azalea-protocol/src/packets/game/c_set_action_bar_text.rs +++ b/azalea-protocol/src/packets/game/c_set_action_bar_text.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSetActionBarText { pub text: FormattedText, } diff --git a/azalea-protocol/src/packets/game/c_set_border_center.rs b/azalea-protocol/src/packets/game/c_set_border_center.rs index 94aece4a6..afc495565 100755 --- a/azalea-protocol/src/packets/game/c_set_border_center.rs +++ b/azalea-protocol/src/packets/game/c_set_border_center.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSetBorderCenter { pub new_center_x: f64, pub new_center_z: f64, diff --git a/azalea-protocol/src/packets/game/c_set_border_lerp_size.rs b/azalea-protocol/src/packets/game/c_set_border_lerp_size.rs index b1a73a670..3c70a40e9 100755 --- a/azalea-protocol/src/packets/game/c_set_border_lerp_size.rs +++ b/azalea-protocol/src/packets/game/c_set_border_lerp_size.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSetBorderLerpSize { pub old_size: f64, pub new_size: f64, diff --git a/azalea-protocol/src/packets/game/c_set_border_size.rs b/azalea-protocol/src/packets/game/c_set_border_size.rs index f135b09aa..6884cde6d 100755 --- a/azalea-protocol/src/packets/game/c_set_border_size.rs +++ b/azalea-protocol/src/packets/game/c_set_border_size.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSetBorderSize { pub size: f64, } diff --git a/azalea-protocol/src/packets/game/c_set_border_warning_delay.rs b/azalea-protocol/src/packets/game/c_set_border_warning_delay.rs index c07cfb7ec..e1126165b 100755 --- a/azalea-protocol/src/packets/game/c_set_border_warning_delay.rs +++ b/azalea-protocol/src/packets/game/c_set_border_warning_delay.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSetBorderWarningDelay { #[var] pub warning_delay: u32, diff --git a/azalea-protocol/src/packets/game/c_set_border_warning_distance.rs b/azalea-protocol/src/packets/game/c_set_border_warning_distance.rs index 4314cac21..dbb2a742c 100755 --- a/azalea-protocol/src/packets/game/c_set_border_warning_distance.rs +++ b/azalea-protocol/src/packets/game/c_set_border_warning_distance.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSetBorderWarningDistance { #[var] pub warning_blocks: u32, diff --git a/azalea-protocol/src/packets/game/c_set_camera.rs b/azalea-protocol/src/packets/game/c_set_camera.rs index 3637591d7..4ce4547c3 100755 --- a/azalea-protocol/src/packets/game/c_set_camera.rs +++ b/azalea-protocol/src/packets/game/c_set_camera.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSetCamera { #[var] pub camera_id: u32, diff --git a/azalea-protocol/src/packets/game/c_set_chunk_cache_center.rs b/azalea-protocol/src/packets/game/c_set_chunk_cache_center.rs index fe55e319c..4c66213c0 100755 --- a/azalea-protocol/src/packets/game/c_set_chunk_cache_center.rs +++ b/azalea-protocol/src/packets/game/c_set_chunk_cache_center.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSetChunkCacheCenter { #[var] pub x: i32, diff --git a/azalea-protocol/src/packets/game/c_set_chunk_cache_radius.rs b/azalea-protocol/src/packets/game/c_set_chunk_cache_radius.rs index 22e3a4873..b992e5728 100755 --- a/azalea-protocol/src/packets/game/c_set_chunk_cache_radius.rs +++ b/azalea-protocol/src/packets/game/c_set_chunk_cache_radius.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSetChunkCacheRadius { #[var] pub radius: u32, diff --git a/azalea-protocol/src/packets/game/c_set_cursor_item.rs b/azalea-protocol/src/packets/game/c_set_cursor_item.rs index a68a9cb2f..2c10ae26a 100644 --- a/azalea-protocol/src/packets/game/c_set_cursor_item.rs +++ b/azalea-protocol/src/packets/game/c_set_cursor_item.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_inventory::ItemStack; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSetCursorItem { pub contents: Option, } diff --git a/azalea-protocol/src/packets/game/c_set_default_spawn_position.rs b/azalea-protocol/src/packets/game/c_set_default_spawn_position.rs index 7edbe3c4d..b6262ac83 100755 --- a/azalea-protocol/src/packets/game/c_set_default_spawn_position.rs +++ b/azalea-protocol/src/packets/game/c_set_default_spawn_position.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::position::BlockPos; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSetDefaultSpawnPosition { pub pos: BlockPos, pub angle: f32, diff --git a/azalea-protocol/src/packets/game/c_set_display_chat_preview.rs b/azalea-protocol/src/packets/game/c_set_display_chat_preview.rs index b4994f3d3..df2a62d4a 100755 --- a/azalea-protocol/src/packets/game/c_set_display_chat_preview.rs +++ b/azalea-protocol/src/packets/game/c_set_display_chat_preview.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSetDisplayChatPreview { pub enabled: bool, } diff --git a/azalea-protocol/src/packets/game/c_set_display_objective.rs b/azalea-protocol/src/packets/game/c_set_display_objective.rs index 27ce402a0..12118772a 100755 --- a/azalea-protocol/src/packets/game/c_set_display_objective.rs +++ b/azalea-protocol/src/packets/game/c_set_display_objective.rs @@ -1,13 +1,13 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSetDisplayObjective { pub slot: DisplaySlot, pub objective_name: String, } -#[derive(Clone, Debug, Copy, McBuf)] +#[derive(Clone, Debug, Copy, AzBuf)] pub enum DisplaySlot { List = 0, Sidebar, diff --git a/azalea-protocol/src/packets/game/c_set_entity_data.rs b/azalea-protocol/src/packets/game/c_set_entity_data.rs index 4f4e9db13..da6536fe5 100755 --- a/azalea-protocol/src/packets/game/c_set_entity_data.rs +++ b/azalea-protocol/src/packets/game/c_set_entity_data.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_entity::EntityMetadataItems; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSetEntityData { #[var] pub id: u32, diff --git a/azalea-protocol/src/packets/game/c_set_entity_link.rs b/azalea-protocol/src/packets/game/c_set_entity_link.rs index c06d7c270..c4ce8bdf4 100755 --- a/azalea-protocol/src/packets/game/c_set_entity_link.rs +++ b/azalea-protocol/src/packets/game/c_set_entity_link.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSetEntityLink { pub source_id: u32, pub dest_id: u32, diff --git a/azalea-protocol/src/packets/game/c_set_entity_motion.rs b/azalea-protocol/src/packets/game/c_set_entity_motion.rs index 4538be471..d0dd76987 100755 --- a/azalea-protocol/src/packets/game/c_set_entity_motion.rs +++ b/azalea-protocol/src/packets/game/c_set_entity_motion.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSetEntityMotion { #[var] pub id: u32, diff --git a/azalea-protocol/src/packets/game/c_set_equipment.rs b/azalea-protocol/src/packets/game/c_set_equipment.rs index 1d0b3c796..637b2b52a 100755 --- a/azalea-protocol/src/packets/game/c_set_equipment.rs +++ b/azalea-protocol/src/packets/game/c_set_equipment.rs @@ -1,11 +1,11 @@ use std::io::Cursor; -use azalea_buf::{BufReadError, McBuf}; +use azalea_buf::{AzBuf, BufReadError}; use azalea_buf::{AzaleaRead, AzaleaWrite}; use azalea_inventory::ItemStack; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSetEquipment { #[var] pub entity_id: u32, @@ -55,7 +55,7 @@ impl AzaleaWrite for EquipmentSlots { } } -#[derive(Clone, Debug, Copy, McBuf)] +#[derive(Clone, Debug, Copy, AzBuf)] pub enum EquipmentSlot { MainHand = 0, OffHand = 1, diff --git a/azalea-protocol/src/packets/game/c_set_experience.rs b/azalea-protocol/src/packets/game/c_set_experience.rs index ef89a0e96..c11482a02 100755 --- a/azalea-protocol/src/packets/game/c_set_experience.rs +++ b/azalea-protocol/src/packets/game/c_set_experience.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSetExperience { pub experience_progress: f32, #[var] diff --git a/azalea-protocol/src/packets/game/c_set_health.rs b/azalea-protocol/src/packets/game/c_set_health.rs index 063677e90..56f3fe03b 100755 --- a/azalea-protocol/src/packets/game/c_set_health.rs +++ b/azalea-protocol/src/packets/game/c_set_health.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSetHealth { pub health: f32, #[var] diff --git a/azalea-protocol/src/packets/game/c_set_held_slot.rs b/azalea-protocol/src/packets/game/c_set_held_slot.rs index 58ccae98c..81c21651d 100644 --- a/azalea-protocol/src/packets/game/c_set_held_slot.rs +++ b/azalea-protocol/src/packets/game/c_set_held_slot.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSetHeldSlot { pub slot: u8, } diff --git a/azalea-protocol/src/packets/game/c_set_objective.rs b/azalea-protocol/src/packets/game/c_set_objective.rs index 2a53d8e22..7ddb3f717 100755 --- a/azalea-protocol/src/packets/game/c_set_objective.rs +++ b/azalea-protocol/src/packets/game/c_set_objective.rs @@ -1,17 +1,17 @@ use std::io::{Cursor, Write}; -use azalea_buf::{AzaleaRead, McBuf, AzaleaWrite}; +use azalea_buf::{AzBuf, AzaleaRead, AzaleaWrite}; use azalea_chat::{numbers::NumberFormat, FormattedText}; use azalea_core::objectives::ObjectiveCriteria; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSetObjective { pub objective_name: String, pub method: Method, } -#[derive(Clone, Copy, Debug, McBuf)] +#[derive(Clone, Copy, Debug, AzBuf)] pub enum MethodKind { Add, Remove, diff --git a/azalea-protocol/src/packets/game/c_set_passengers.rs b/azalea-protocol/src/packets/game/c_set_passengers.rs index 21f7a71a8..76fc3ca02 100755 --- a/azalea-protocol/src/packets/game/c_set_passengers.rs +++ b/azalea-protocol/src/packets/game/c_set_passengers.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSetPassengers { #[var] pub vehicle: u32, diff --git a/azalea-protocol/src/packets/game/c_set_player_inventory.rs b/azalea-protocol/src/packets/game/c_set_player_inventory.rs index 2549fc0c4..ca8955ee7 100644 --- a/azalea-protocol/src/packets/game/c_set_player_inventory.rs +++ b/azalea-protocol/src/packets/game/c_set_player_inventory.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_inventory::ItemStack; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSetPlayerInventory { #[var] pub slot: i32, diff --git a/azalea-protocol/src/packets/game/c_set_player_team.rs b/azalea-protocol/src/packets/game/c_set_player_team.rs index fe8fda1cf..38249cf3d 100755 --- a/azalea-protocol/src/packets/game/c_set_player_team.rs +++ b/azalea-protocol/src/packets/game/c_set_player_team.rs @@ -1,10 +1,10 @@ use std::io::{Cursor, Write}; -use azalea_buf::{BufReadError, McBuf, AzaleaRead, AzaleaWrite}; +use azalea_buf::{AzBuf, AzaleaRead, AzaleaWrite, BufReadError}; use azalea_chat::{style::ChatFormatting, FormattedText}; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSetPlayerTeam { pub name: String, pub method: Method, @@ -60,7 +60,7 @@ impl AzaleaWrite for Method { } } -#[derive(McBuf, Clone, Debug)] +#[derive(AzBuf, Clone, Debug)] pub struct Parameters { pub display_name: FormattedText, pub options: u8, diff --git a/azalea-protocol/src/packets/game/c_set_score.rs b/azalea-protocol/src/packets/game/c_set_score.rs index 80dc9c8f8..5a16d1346 100755 --- a/azalea-protocol/src/packets/game/c_set_score.rs +++ b/azalea-protocol/src/packets/game/c_set_score.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_chat::{numbers::NumberFormat, FormattedText}; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSetScore { pub owner: String, pub objective_name: String, diff --git a/azalea-protocol/src/packets/game/c_set_simulation_distance.rs b/azalea-protocol/src/packets/game/c_set_simulation_distance.rs index 7fad59f51..2a80d1f15 100755 --- a/azalea-protocol/src/packets/game/c_set_simulation_distance.rs +++ b/azalea-protocol/src/packets/game/c_set_simulation_distance.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSetSimulationDistance { #[var] pub simulation_distance: u32, diff --git a/azalea-protocol/src/packets/game/c_set_subtitle_text.rs b/azalea-protocol/src/packets/game/c_set_subtitle_text.rs index 06fdb4665..31405739f 100755 --- a/azalea-protocol/src/packets/game/c_set_subtitle_text.rs +++ b/azalea-protocol/src/packets/game/c_set_subtitle_text.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSetSubtitleText { pub text: FormattedText, } diff --git a/azalea-protocol/src/packets/game/c_set_time.rs b/azalea-protocol/src/packets/game/c_set_time.rs index 6ac069756..b1970eec2 100755 --- a/azalea-protocol/src/packets/game/c_set_time.rs +++ b/azalea-protocol/src/packets/game/c_set_time.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSetTime { pub game_time: u64, pub day_time: u64, diff --git a/azalea-protocol/src/packets/game/c_set_title_text.rs b/azalea-protocol/src/packets/game/c_set_title_text.rs index 9cbcfd4c5..4ef3e590c 100755 --- a/azalea-protocol/src/packets/game/c_set_title_text.rs +++ b/azalea-protocol/src/packets/game/c_set_title_text.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSetTitleText { pub text: FormattedText, } diff --git a/azalea-protocol/src/packets/game/c_set_titles_animation.rs b/azalea-protocol/src/packets/game/c_set_titles_animation.rs index 6ef0da8e6..cc0c37fc0 100755 --- a/azalea-protocol/src/packets/game/c_set_titles_animation.rs +++ b/azalea-protocol/src/packets/game/c_set_titles_animation.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSetTitlesAnimation { pub fade_in: u32, pub stay: u32, diff --git a/azalea-protocol/src/packets/game/c_sound.rs b/azalea-protocol/src/packets/game/c_sound.rs index b7dec932a..771617698 100755 --- a/azalea-protocol/src/packets/game/c_sound.rs +++ b/azalea-protocol/src/packets/game/c_sound.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; use azalea_registry::SoundEvent; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSound { pub sound: SoundEvent, pub source: SoundSource, @@ -14,7 +14,7 @@ pub struct ClientboundSound { pub seed: u64, } -#[derive(McBuf, Clone, Copy, Debug)] +#[derive(AzBuf, Clone, Copy, Debug)] pub enum SoundSource { Master = 0, Music = 1, diff --git a/azalea-protocol/src/packets/game/c_sound_entity.rs b/azalea-protocol/src/packets/game/c_sound_entity.rs index 241f2770c..96b22cb88 100755 --- a/azalea-protocol/src/packets/game/c_sound_entity.rs +++ b/azalea-protocol/src/packets/game/c_sound_entity.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundSoundEntity { pub source: SoundSource, #[var] @@ -12,7 +12,7 @@ pub struct ClientboundSoundEntity { pub seed: u64, } -#[derive(McBuf, Clone, Copy, Debug)] +#[derive(AzBuf, Clone, Copy, Debug)] pub enum SoundSource { Master = 0, Music = 1, diff --git a/azalea-protocol/src/packets/game/c_start_configuration.rs b/azalea-protocol/src/packets/game/c_start_configuration.rs index 4723d9cd9..6955b70d8 100644 --- a/azalea-protocol/src/packets/game/c_start_configuration.rs +++ b/azalea-protocol/src/packets/game/c_start_configuration.rs @@ -1,5 +1,5 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundStartConfiguration {} diff --git a/azalea-protocol/src/packets/game/c_store_cookie.rs b/azalea-protocol/src/packets/game/c_store_cookie.rs index 7593e8b78..a1deee4f8 100644 --- a/azalea-protocol/src/packets/game/c_store_cookie.rs +++ b/azalea-protocol/src/packets/game/c_store_cookie.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundStoreCookie { pub key: ResourceLocation, pub payload: Vec, diff --git a/azalea-protocol/src/packets/game/c_system_chat.rs b/azalea-protocol/src/packets/game/c_system_chat.rs index 13e324913..14dfdcbfc 100755 --- a/azalea-protocol/src/packets/game/c_system_chat.rs +++ b/azalea-protocol/src/packets/game/c_system_chat.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket, PartialEq)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket, PartialEq)] pub struct ClientboundSystemChat { pub content: FormattedText, pub overlay: bool, diff --git a/azalea-protocol/src/packets/game/c_tab_list.rs b/azalea-protocol/src/packets/game/c_tab_list.rs index 87d92c9d8..268351da5 100755 --- a/azalea-protocol/src/packets/game/c_tab_list.rs +++ b/azalea-protocol/src/packets/game/c_tab_list.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundTabList { pub header: FormattedText, pub footer: FormattedText, diff --git a/azalea-protocol/src/packets/game/c_tag_query.rs b/azalea-protocol/src/packets/game/c_tag_query.rs index 41de799d1..efd94e32f 100755 --- a/azalea-protocol/src/packets/game/c_tag_query.rs +++ b/azalea-protocol/src/packets/game/c_tag_query.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; use simdnbt::owned::NbtTag; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundTagQuery { #[var] pub transaction_id: u32, diff --git a/azalea-protocol/src/packets/game/c_take_item_entity.rs b/azalea-protocol/src/packets/game/c_take_item_entity.rs index 93d636ee6..0dfc85521 100755 --- a/azalea-protocol/src/packets/game/c_take_item_entity.rs +++ b/azalea-protocol/src/packets/game/c_take_item_entity.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundTakeItemEntity { #[var] pub item_id: u32, diff --git a/azalea-protocol/src/packets/game/c_teleport_entity.rs b/azalea-protocol/src/packets/game/c_teleport_entity.rs index 53fdf9fb9..0f0261332 100755 --- a/azalea-protocol/src/packets/game/c_teleport_entity.rs +++ b/azalea-protocol/src/packets/game/c_teleport_entity.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::position::Vec3; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundTeleportEntity { #[var] pub id: u32, diff --git a/azalea-protocol/src/packets/game/c_ticking_state.rs b/azalea-protocol/src/packets/game/c_ticking_state.rs index f262fa290..3e4e11c27 100644 --- a/azalea-protocol/src/packets/game/c_ticking_state.rs +++ b/azalea-protocol/src/packets/game/c_ticking_state.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundTickingState { pub tick_rate: f32, pub is_frozen: bool, diff --git a/azalea-protocol/src/packets/game/c_ticking_step.rs b/azalea-protocol/src/packets/game/c_ticking_step.rs index d238cd01e..0a1511343 100644 --- a/azalea-protocol/src/packets/game/c_ticking_step.rs +++ b/azalea-protocol/src/packets/game/c_ticking_step.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundTickingStep { #[var] pub tick_steps: u32, diff --git a/azalea-protocol/src/packets/game/c_transfer.rs b/azalea-protocol/src/packets/game/c_transfer.rs index 1942c6d97..ad7de333f 100644 --- a/azalea-protocol/src/packets/game/c_transfer.rs +++ b/azalea-protocol/src/packets/game/c_transfer.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundTransfer { pub host: String, #[var] diff --git a/azalea-protocol/src/packets/game/c_update_advancements.rs b/azalea-protocol/src/packets/game/c_update_advancements.rs index 3ce8d81c8..cd0c0b980 100755 --- a/azalea-protocol/src/packets/game/c_update_advancements.rs +++ b/azalea-protocol/src/packets/game/c_update_advancements.rs @@ -1,13 +1,13 @@ use std::collections::HashMap; use std::io::Cursor; -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_chat::FormattedText; use azalea_core::resource_location::ResourceLocation; use azalea_inventory::ItemStack; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundUpdateAdvancements { pub reset: bool, pub added: Vec, @@ -15,7 +15,7 @@ pub struct ClientboundUpdateAdvancements { pub progress: HashMap, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct Advancement { pub parent_id: Option, pub display: Option, @@ -96,7 +96,7 @@ impl azalea_buf::AzaleaRead for DisplayInfo { } } -#[derive(Clone, Debug, Copy, McBuf)] +#[derive(Clone, Debug, Copy, AzBuf)] pub enum FrameType { Task = 0, Challenge = 1, @@ -105,12 +105,12 @@ pub enum FrameType { pub type AdvancementProgress = HashMap; -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct CriterionProgress { pub date: Option, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct AdvancementHolder { pub id: ResourceLocation, pub value: Advancement, diff --git a/azalea-protocol/src/packets/game/c_update_attributes.rs b/azalea-protocol/src/packets/game/c_update_attributes.rs index 1692e936d..2b800643b 100755 --- a/azalea-protocol/src/packets/game/c_update_attributes.rs +++ b/azalea-protocol/src/packets/game/c_update_attributes.rs @@ -1,16 +1,16 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_entity::attributes::AttributeModifier; use azalea_protocol_macros::ClientboundGamePacket; use azalea_registry::Attribute; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundUpdateAttributes { #[var] pub entity_id: u32, pub values: Vec, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct AttributeSnapshot { pub attribute: Attribute, pub base: f64, diff --git a/azalea-protocol/src/packets/game/c_update_enabled_features.rs b/azalea-protocol/src/packets/game/c_update_enabled_features.rs index 6a4b71826..d4dac4836 100644 --- a/azalea-protocol/src/packets/game/c_update_enabled_features.rs +++ b/azalea-protocol/src/packets/game/c_update_enabled_features.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundUpdateEnabledFeatures { pub features: Vec, } diff --git a/azalea-protocol/src/packets/game/c_update_mob_effect.rs b/azalea-protocol/src/packets/game/c_update_mob_effect.rs index 1b8446e60..6a31ccab0 100755 --- a/azalea-protocol/src/packets/game/c_update_mob_effect.rs +++ b/azalea-protocol/src/packets/game/c_update_mob_effect.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; use azalea_registry::MobEffect; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundUpdateMobEffect { #[var] pub entity_id: u32, diff --git a/azalea-protocol/src/packets/game/c_update_recipes.rs b/azalea-protocol/src/packets/game/c_update_recipes.rs index 5a57d803c..38c4f37bf 100755 --- a/azalea-protocol/src/packets/game/c_update_recipes.rs +++ b/azalea-protocol/src/packets/game/c_update_recipes.rs @@ -1,29 +1,29 @@ use std::collections::HashMap; -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::resource_location::ResourceLocation; use azalea_inventory::ItemStack; use azalea_protocol_macros::ClientboundGamePacket; use azalea_registry::HolderSet; -#[derive(Clone, Debug, PartialEq, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, PartialEq, AzBuf, ClientboundGamePacket)] pub struct ClientboundUpdateRecipes { pub item_sets: HashMap, pub stonecutter_recipes: Vec, } -#[derive(Clone, Debug, PartialEq, McBuf)] +#[derive(Clone, Debug, PartialEq, AzBuf)] pub struct SingleInputEntry { pub input: Ingredient, pub recipe: SelectableRecipe, } -#[derive(Clone, Debug, PartialEq, McBuf)] +#[derive(Clone, Debug, PartialEq, AzBuf)] pub struct SelectableRecipe { pub option_display: SlotDisplayData, } /// [`azalea_registry::SlotDisplay`] -#[derive(Clone, Debug, PartialEq, McBuf)] +#[derive(Clone, Debug, PartialEq, AzBuf)] pub enum SlotDisplayData { Empty, AnyFuel, @@ -35,40 +35,40 @@ pub enum SlotDisplayData { Composite(CompositeSlotDisplay), } -#[derive(Clone, Debug, PartialEq, McBuf)] +#[derive(Clone, Debug, PartialEq, AzBuf)] pub struct ItemStackDisplay { pub item: azalea_registry::Item, } -#[derive(Clone, Debug, PartialEq, McBuf)] +#[derive(Clone, Debug, PartialEq, AzBuf)] pub struct ItemStackSlotDisplay { pub stack: ItemStack, } -#[derive(Clone, Debug, PartialEq, McBuf)] +#[derive(Clone, Debug, PartialEq, AzBuf)] pub struct TagSlotDisplay { pub tag: azalea_registry::Item, } -#[derive(Clone, Debug, PartialEq, McBuf)] +#[derive(Clone, Debug, PartialEq, AzBuf)] pub struct SmithingTrimDemoSlotDisplay { pub base: SlotDisplayData, pub material: SlotDisplayData, pub pattern: SlotDisplayData, } -#[derive(Clone, Debug, PartialEq, McBuf)] +#[derive(Clone, Debug, PartialEq, AzBuf)] pub struct WithRemainderSlotDisplay { pub input: SlotDisplayData, pub remainder: SlotDisplayData, } -#[derive(Clone, Debug, PartialEq, McBuf)] +#[derive(Clone, Debug, PartialEq, AzBuf)] pub struct CompositeSlotDisplay { pub contents: Vec, } -#[derive(Clone, Debug, PartialEq, McBuf)] +#[derive(Clone, Debug, PartialEq, AzBuf)] pub struct RecipePropertySet { pub items: Vec, } -#[derive(Clone, Debug, PartialEq, McBuf)] +#[derive(Clone, Debug, PartialEq, AzBuf)] pub struct Ingredient { pub allowed: HolderSet, } diff --git a/azalea-protocol/src/packets/game/c_update_tags.rs b/azalea-protocol/src/packets/game/c_update_tags.rs index a6e9a33dc..4b63ec8fc 100755 --- a/azalea-protocol/src/packets/game/c_update_tags.rs +++ b/azalea-protocol/src/packets/game/c_update_tags.rs @@ -2,12 +2,12 @@ use std::io::Cursor; use std::ops::Deref; use std::{collections::HashMap, io::Write}; -use azalea_buf::{BufReadError, McBuf, AzaleaReadVar, AzaleaWriteVar}; +use azalea_buf::{AzBuf, AzaleaReadVar, AzaleaWriteVar, BufReadError}; use azalea_buf::{AzaleaRead, AzaleaWrite}; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundGamePacket; -#[derive(Clone, Debug, McBuf, ClientboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundUpdateTags { pub tags: TagMap, } diff --git a/azalea-protocol/src/packets/game/s_accept_teleportation.rs b/azalea-protocol/src/packets/game/s_accept_teleportation.rs index 7d18be5c2..dedc125a4 100755 --- a/azalea-protocol/src/packets/game/s_accept_teleportation.rs +++ b/azalea-protocol/src/packets/game/s_accept_teleportation.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundAcceptTeleportation { #[var] pub id: u32, diff --git a/azalea-protocol/src/packets/game/s_block_entity_tag_query.rs b/azalea-protocol/src/packets/game/s_block_entity_tag_query.rs index b66f2d89f..159f12dc8 100644 --- a/azalea-protocol/src/packets/game/s_block_entity_tag_query.rs +++ b/azalea-protocol/src/packets/game/s_block_entity_tag_query.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::position::BlockPos; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundBlockEntityTagQuery { #[var] pub transaction_id: u32, diff --git a/azalea-protocol/src/packets/game/s_change_difficulty.rs b/azalea-protocol/src/packets/game/s_change_difficulty.rs index f991e4b4e..7dcd3c830 100755 --- a/azalea-protocol/src/packets/game/s_change_difficulty.rs +++ b/azalea-protocol/src/packets/game/s_change_difficulty.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::difficulty::Difficulty; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundChangeDifficulty { pub difficulty: Difficulty, } diff --git a/azalea-protocol/src/packets/game/s_chat.rs b/azalea-protocol/src/packets/game/s_chat.rs index 4e2210818..03bafd110 100755 --- a/azalea-protocol/src/packets/game/s_chat.rs +++ b/azalea-protocol/src/packets/game/s_chat.rs @@ -1,9 +1,9 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::bitset::FixedBitSet; use azalea_crypto::MessageSignature; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundChat { pub message: String, pub timestamp: u64, @@ -12,7 +12,7 @@ pub struct ServerboundChat { pub last_seen_messages: LastSeenMessagesUpdate, } -#[derive(Clone, Debug, McBuf, Default)] +#[derive(Clone, Debug, AzBuf, Default)] pub struct LastSeenMessagesUpdate { #[var] pub messages: u32, diff --git a/azalea-protocol/src/packets/game/s_chat_ack.rs b/azalea-protocol/src/packets/game/s_chat_ack.rs index 96477ff20..d4b6efd67 100755 --- a/azalea-protocol/src/packets/game/s_chat_ack.rs +++ b/azalea-protocol/src/packets/game/s_chat_ack.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundChatAck { #[var] pub messages: u32, diff --git a/azalea-protocol/src/packets/game/s_chat_command.rs b/azalea-protocol/src/packets/game/s_chat_command.rs index 84035ffcb..4fdab9f98 100755 --- a/azalea-protocol/src/packets/game/s_chat_command.rs +++ b/azalea-protocol/src/packets/game/s_chat_command.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundChatCommand { pub command: String, } diff --git a/azalea-protocol/src/packets/game/s_chat_command_signed.rs b/azalea-protocol/src/packets/game/s_chat_command_signed.rs index 9b5bf5f0f..c20f3c6d4 100755 --- a/azalea-protocol/src/packets/game/s_chat_command_signed.rs +++ b/azalea-protocol/src/packets/game/s_chat_command_signed.rs @@ -1,10 +1,10 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_crypto::MessageSignature; use azalea_protocol_macros::ServerboundGamePacket; use super::s_chat::LastSeenMessagesUpdate; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundChatCommandSigned { pub command: String, pub timestamp: u64, @@ -13,7 +13,7 @@ pub struct ServerboundChatCommandSigned { pub last_seen_messages: LastSeenMessagesUpdate, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct ArgumentSignature { pub name: String, pub signature: MessageSignature, diff --git a/azalea-protocol/src/packets/game/s_chat_preview.rs b/azalea-protocol/src/packets/game/s_chat_preview.rs index 688c19b4f..3d2bf34ec 100755 --- a/azalea-protocol/src/packets/game/s_chat_preview.rs +++ b/azalea-protocol/src/packets/game/s_chat_preview.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundChatPreview { pub query_id: i32, pub query: String, diff --git a/azalea-protocol/src/packets/game/s_chat_session_update.rs b/azalea-protocol/src/packets/game/s_chat_session_update.rs index 6da67e378..f3499983b 100644 --- a/azalea-protocol/src/packets/game/s_chat_session_update.rs +++ b/azalea-protocol/src/packets/game/s_chat_session_update.rs @@ -1,19 +1,19 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; use uuid::Uuid; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundChatSessionUpdate { pub chat_session: RemoteChatSessionData, } -#[derive(Clone, Debug, PartialEq, Eq, McBuf)] +#[derive(Clone, Debug, PartialEq, Eq, AzBuf)] pub struct RemoteChatSessionData { pub session_id: Uuid, pub profile_public_key: ProfilePublicKeyData, } -#[derive(Clone, Debug, McBuf, PartialEq, Eq)] +#[derive(Clone, Debug, AzBuf, PartialEq, Eq)] pub struct ProfilePublicKeyData { pub expires_at: u64, pub key: Vec, diff --git a/azalea-protocol/src/packets/game/s_chunk_batch_received.rs b/azalea-protocol/src/packets/game/s_chunk_batch_received.rs index d8aa35648..faa50932e 100644 --- a/azalea-protocol/src/packets/game/s_chunk_batch_received.rs +++ b/azalea-protocol/src/packets/game/s_chunk_batch_received.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundChunkBatchReceived { pub desired_chunks_per_tick: f32, } diff --git a/azalea-protocol/src/packets/game/s_client_command.rs b/azalea-protocol/src/packets/game/s_client_command.rs index 3a8d30249..5742bdb44 100755 --- a/azalea-protocol/src/packets/game/s_client_command.rs +++ b/azalea-protocol/src/packets/game/s_client_command.rs @@ -1,12 +1,12 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundClientCommand { pub action: Action, } -#[derive(McBuf, Clone, Copy, Debug)] +#[derive(AzBuf, Clone, Copy, Debug)] pub enum Action { PerformRespawn = 0, RequestStats = 1, diff --git a/azalea-protocol/src/packets/game/s_client_information.rs b/azalea-protocol/src/packets/game/s_client_information.rs index 722a42715..7844239f6 100755 --- a/azalea-protocol/src/packets/game/s_client_information.rs +++ b/azalea-protocol/src/packets/game/s_client_information.rs @@ -1,9 +1,9 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; use crate::common::ClientInformation; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundClientInformation { pub information: ClientInformation, } diff --git a/azalea-protocol/src/packets/game/s_client_tick_end.rs b/azalea-protocol/src/packets/game/s_client_tick_end.rs index 4338f452e..71ee54ba6 100644 --- a/azalea-protocol/src/packets/game/s_client_tick_end.rs +++ b/azalea-protocol/src/packets/game/s_client_tick_end.rs @@ -1,5 +1,5 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundTickEnd {} diff --git a/azalea-protocol/src/packets/game/s_command_suggestion.rs b/azalea-protocol/src/packets/game/s_command_suggestion.rs index 6bcbf7394..2e52a9691 100755 --- a/azalea-protocol/src/packets/game/s_command_suggestion.rs +++ b/azalea-protocol/src/packets/game/s_command_suggestion.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundCommandSuggestion { #[var] pub id: u32, diff --git a/azalea-protocol/src/packets/game/s_configuration_acknowledged.rs b/azalea-protocol/src/packets/game/s_configuration_acknowledged.rs index 72539acb1..58e27abbe 100644 --- a/azalea-protocol/src/packets/game/s_configuration_acknowledged.rs +++ b/azalea-protocol/src/packets/game/s_configuration_acknowledged.rs @@ -1,5 +1,5 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundConfigurationAcknowledged {} diff --git a/azalea-protocol/src/packets/game/s_container_button_click.rs b/azalea-protocol/src/packets/game/s_container_button_click.rs index 834a16a5b..909772f3c 100755 --- a/azalea-protocol/src/packets/game/s_container_button_click.rs +++ b/azalea-protocol/src/packets/game/s_container_button_click.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundContainerButtonClick { pub container_id: u8, pub button_id: u8, diff --git a/azalea-protocol/src/packets/game/s_container_click.rs b/azalea-protocol/src/packets/game/s_container_click.rs index 5470f8f54..a6dee6972 100755 --- a/azalea-protocol/src/packets/game/s_container_click.rs +++ b/azalea-protocol/src/packets/game/s_container_click.rs @@ -1,10 +1,10 @@ use std::collections::HashMap; -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_inventory::{operations::ClickType, ItemStack}; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundContainerClick { pub container_id: u8, #[var] diff --git a/azalea-protocol/src/packets/game/s_container_close.rs b/azalea-protocol/src/packets/game/s_container_close.rs index 5314753f1..1cb88eabf 100755 --- a/azalea-protocol/src/packets/game/s_container_close.rs +++ b/azalea-protocol/src/packets/game/s_container_close.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundContainerClose { pub container_id: u8, } diff --git a/azalea-protocol/src/packets/game/s_container_slot_state_changed.rs b/azalea-protocol/src/packets/game/s_container_slot_state_changed.rs index 46124c1be..73ac02800 100644 --- a/azalea-protocol/src/packets/game/s_container_slot_state_changed.rs +++ b/azalea-protocol/src/packets/game/s_container_slot_state_changed.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundContainerSlotStateChanged { #[var] pub slot_id: u32, diff --git a/azalea-protocol/src/packets/game/s_cookie_response.rs b/azalea-protocol/src/packets/game/s_cookie_response.rs index 7f18248ce..5159d72ec 100644 --- a/azalea-protocol/src/packets/game/s_cookie_response.rs +++ b/azalea-protocol/src/packets/game/s_cookie_response.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundCookieResponse { pub key: ResourceLocation, pub payload: Option>, diff --git a/azalea-protocol/src/packets/game/s_custom_payload.rs b/azalea-protocol/src/packets/game/s_custom_payload.rs index fd7510624..b32f1d249 100755 --- a/azalea-protocol/src/packets/game/s_custom_payload.rs +++ b/azalea-protocol/src/packets/game/s_custom_payload.rs @@ -1,9 +1,9 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_buf::UnsizedByteArray; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundCustomPayload { pub identifier: ResourceLocation, pub data: UnsizedByteArray, diff --git a/azalea-protocol/src/packets/game/s_debug_sample_subscription.rs b/azalea-protocol/src/packets/game/s_debug_sample_subscription.rs index 236972e06..450517933 100644 --- a/azalea-protocol/src/packets/game/s_debug_sample_subscription.rs +++ b/azalea-protocol/src/packets/game/s_debug_sample_subscription.rs @@ -1,12 +1,12 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundDebugSampleSubscription { pub sample_type: RemoteDebugSampleType, } -#[derive(Clone, Copy, Debug, McBuf)] +#[derive(Clone, Copy, Debug, AzBuf)] pub enum RemoteDebugSampleType { TickTime, } diff --git a/azalea-protocol/src/packets/game/s_edit_book.rs b/azalea-protocol/src/packets/game/s_edit_book.rs index 3edafebd8..af05a7cdb 100755 --- a/azalea-protocol/src/packets/game/s_edit_book.rs +++ b/azalea-protocol/src/packets/game/s_edit_book.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundEditBook { #[var] pub slot: u32, diff --git a/azalea-protocol/src/packets/game/s_entity_tag_query.rs b/azalea-protocol/src/packets/game/s_entity_tag_query.rs index 5b0c7db6d..619e9e54a 100644 --- a/azalea-protocol/src/packets/game/s_entity_tag_query.rs +++ b/azalea-protocol/src/packets/game/s_entity_tag_query.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundEntityTagQuery { #[var] pub transaction_id: u32, diff --git a/azalea-protocol/src/packets/game/s_interact.rs b/azalea-protocol/src/packets/game/s_interact.rs index c3d2ffa71..cdd9cba5f 100755 --- a/azalea-protocol/src/packets/game/s_interact.rs +++ b/azalea-protocol/src/packets/game/s_interact.rs @@ -1,12 +1,12 @@ use std::io::{Cursor, Write}; -use azalea_buf::{McBuf, AzaleaRead, AzaleaReadVar, AzaleaWriteVar, AzaleaWrite}; +use azalea_buf::{AzBuf, AzaleaRead, AzaleaReadVar, AzaleaWrite, AzaleaWriteVar}; use azalea_core::position::Vec3; use azalea_protocol_macros::ServerboundGamePacket; use crate::packets::BufReadError; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundInteract { #[var] pub entity_id: u32, @@ -79,7 +79,7 @@ impl AzaleaRead for ActionType { } } -#[derive(McBuf, Clone, Copy, Debug)] +#[derive(AzBuf, Clone, Copy, Debug)] pub enum InteractionHand { MainHand = 0, OffHand = 1, diff --git a/azalea-protocol/src/packets/game/s_jigsaw_generate.rs b/azalea-protocol/src/packets/game/s_jigsaw_generate.rs index 9e2915d89..4a3b58ce1 100755 --- a/azalea-protocol/src/packets/game/s_jigsaw_generate.rs +++ b/azalea-protocol/src/packets/game/s_jigsaw_generate.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::position::BlockPos; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundJigsawGenerate { pub pos: BlockPos, #[var] diff --git a/azalea-protocol/src/packets/game/s_keep_alive.rs b/azalea-protocol/src/packets/game/s_keep_alive.rs index 4e8ab8a80..a6806a929 100755 --- a/azalea-protocol/src/packets/game/s_keep_alive.rs +++ b/azalea-protocol/src/packets/game/s_keep_alive.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundKeepAlive { pub id: u64, } diff --git a/azalea-protocol/src/packets/game/s_lock_difficulty.rs b/azalea-protocol/src/packets/game/s_lock_difficulty.rs index e71773a89..72acb705e 100755 --- a/azalea-protocol/src/packets/game/s_lock_difficulty.rs +++ b/azalea-protocol/src/packets/game/s_lock_difficulty.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundLockDifficulty { pub locked: bool, } diff --git a/azalea-protocol/src/packets/game/s_move_player_pos.rs b/azalea-protocol/src/packets/game/s_move_player_pos.rs index d3b52ca60..2e2ec0c55 100755 --- a/azalea-protocol/src/packets/game/s_move_player_pos.rs +++ b/azalea-protocol/src/packets/game/s_move_player_pos.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundMovePlayerPos { pub x: f64, pub y: f64, diff --git a/azalea-protocol/src/packets/game/s_move_player_pos_rot.rs b/azalea-protocol/src/packets/game/s_move_player_pos_rot.rs index 5d385a922..cb0e0633b 100755 --- a/azalea-protocol/src/packets/game/s_move_player_pos_rot.rs +++ b/azalea-protocol/src/packets/game/s_move_player_pos_rot.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundMovePlayerPosRot { pub x: f64, pub y: f64, diff --git a/azalea-protocol/src/packets/game/s_move_player_rot.rs b/azalea-protocol/src/packets/game/s_move_player_rot.rs index a0fd02647..c3cda3ea1 100755 --- a/azalea-protocol/src/packets/game/s_move_player_rot.rs +++ b/azalea-protocol/src/packets/game/s_move_player_rot.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundMovePlayerRot { pub y_rot: f32, pub x_rot: f32, diff --git a/azalea-protocol/src/packets/game/s_move_player_status_only.rs b/azalea-protocol/src/packets/game/s_move_player_status_only.rs index f82441812..155841f03 100755 --- a/azalea-protocol/src/packets/game/s_move_player_status_only.rs +++ b/azalea-protocol/src/packets/game/s_move_player_status_only.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundMovePlayerStatusOnly { pub on_ground: bool, } diff --git a/azalea-protocol/src/packets/game/s_move_vehicle.rs b/azalea-protocol/src/packets/game/s_move_vehicle.rs index 832babd19..0452c9b02 100755 --- a/azalea-protocol/src/packets/game/s_move_vehicle.rs +++ b/azalea-protocol/src/packets/game/s_move_vehicle.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundMoveVehicle { pub x: f64, pub y: f64, diff --git a/azalea-protocol/src/packets/game/s_paddle_boat.rs b/azalea-protocol/src/packets/game/s_paddle_boat.rs index bf90ab3fc..eed7addc4 100755 --- a/azalea-protocol/src/packets/game/s_paddle_boat.rs +++ b/azalea-protocol/src/packets/game/s_paddle_boat.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundPaddleBoat { pub left: bool, pub right: bool, diff --git a/azalea-protocol/src/packets/game/s_pick_item.rs b/azalea-protocol/src/packets/game/s_pick_item.rs index 1d6b476f1..289da6e70 100755 --- a/azalea-protocol/src/packets/game/s_pick_item.rs +++ b/azalea-protocol/src/packets/game/s_pick_item.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundPickItem { #[var] pub slot: u32, diff --git a/azalea-protocol/src/packets/game/s_ping_request.rs b/azalea-protocol/src/packets/game/s_ping_request.rs index 1887e720d..1ea7550fe 100755 --- a/azalea-protocol/src/packets/game/s_ping_request.rs +++ b/azalea-protocol/src/packets/game/s_ping_request.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundPingRequest { pub time: u64, } diff --git a/azalea-protocol/src/packets/game/s_place_recipe.rs b/azalea-protocol/src/packets/game/s_place_recipe.rs index a3a5001b8..33456948b 100755 --- a/azalea-protocol/src/packets/game/s_place_recipe.rs +++ b/azalea-protocol/src/packets/game/s_place_recipe.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundPlaceRecipe { pub container_id: u8, pub recipe: ResourceLocation, diff --git a/azalea-protocol/src/packets/game/s_player_action.rs b/azalea-protocol/src/packets/game/s_player_action.rs index dfdb7ab74..5b65b7464 100755 --- a/azalea-protocol/src/packets/game/s_player_action.rs +++ b/azalea-protocol/src/packets/game/s_player_action.rs @@ -1,9 +1,9 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::direction::Direction; use azalea_core::position::BlockPos; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundPlayerAction { pub action: Action, pub pos: BlockPos, @@ -12,7 +12,7 @@ pub struct ServerboundPlayerAction { pub sequence: u32, } -#[derive(McBuf, Clone, Copy, Debug)] +#[derive(AzBuf, Clone, Copy, Debug)] pub enum Action { StartDestroyBlock = 0, AbortDestroyBlock = 1, diff --git a/azalea-protocol/src/packets/game/s_player_command.rs b/azalea-protocol/src/packets/game/s_player_command.rs index a8a86e753..72a92310f 100755 --- a/azalea-protocol/src/packets/game/s_player_command.rs +++ b/azalea-protocol/src/packets/game/s_player_command.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundPlayerCommand { #[var] pub id: u32, @@ -10,7 +10,7 @@ pub struct ServerboundPlayerCommand { pub data: u32, } -#[derive(McBuf, Clone, Copy, Debug)] +#[derive(AzBuf, Clone, Copy, Debug)] pub enum Action { PressShiftKey = 0, ReleaseShiftKey = 1, diff --git a/azalea-protocol/src/packets/game/s_pong.rs b/azalea-protocol/src/packets/game/s_pong.rs index 0a82c48c1..10ce0fb7a 100755 --- a/azalea-protocol/src/packets/game/s_pong.rs +++ b/azalea-protocol/src/packets/game/s_pong.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundPong { pub id: u32, } diff --git a/azalea-protocol/src/packets/game/s_recipe_book_change_settings.rs b/azalea-protocol/src/packets/game/s_recipe_book_change_settings.rs index 515131be9..a31ca173f 100755 --- a/azalea-protocol/src/packets/game/s_recipe_book_change_settings.rs +++ b/azalea-protocol/src/packets/game/s_recipe_book_change_settings.rs @@ -1,14 +1,14 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundRecipeBookChangeSettings { pub book_type: RecipeBookType, pub is_open: bool, pub is_filtering: bool, } -#[derive(McBuf, Clone, Copy, Debug)] +#[derive(AzBuf, Clone, Copy, Debug)] pub enum RecipeBookType { Crafting = 0, Furnace = 1, diff --git a/azalea-protocol/src/packets/game/s_recipe_book_seen_recipe.rs b/azalea-protocol/src/packets/game/s_recipe_book_seen_recipe.rs index 622e5a9b3..9eeffde9e 100755 --- a/azalea-protocol/src/packets/game/s_recipe_book_seen_recipe.rs +++ b/azalea-protocol/src/packets/game/s_recipe_book_seen_recipe.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundRecipeBookSeenRecipe { pub recipe: ResourceLocation, } diff --git a/azalea-protocol/src/packets/game/s_rename_item.rs b/azalea-protocol/src/packets/game/s_rename_item.rs index e63790cda..4c913ba0f 100755 --- a/azalea-protocol/src/packets/game/s_rename_item.rs +++ b/azalea-protocol/src/packets/game/s_rename_item.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundRenameItem { pub name: String, } diff --git a/azalea-protocol/src/packets/game/s_resource_pack.rs b/azalea-protocol/src/packets/game/s_resource_pack.rs index 80bf9e612..7bdb7bb46 100755 --- a/azalea-protocol/src/packets/game/s_resource_pack.rs +++ b/azalea-protocol/src/packets/game/s_resource_pack.rs @@ -1,14 +1,14 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; use uuid::Uuid; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundResourcePack { pub id: Uuid, pub action: Action, } -#[derive(McBuf, Clone, Copy, Debug)] +#[derive(AzBuf, Clone, Copy, Debug)] pub enum Action { SuccessfullyLoaded = 0, Declined = 1, diff --git a/azalea-protocol/src/packets/game/s_seen_advancements.rs b/azalea-protocol/src/packets/game/s_seen_advancements.rs index 7ac970ec6..f46411f04 100755 --- a/azalea-protocol/src/packets/game/s_seen_advancements.rs +++ b/azalea-protocol/src/packets/game/s_seen_advancements.rs @@ -1,6 +1,6 @@ use std::io::Cursor; -use azalea_buf::{McBuf, AzaleaRead, AzaleaWrite}; +use azalea_buf::{AzBuf, AzaleaRead, AzaleaWrite}; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ServerboundGamePacket; @@ -12,7 +12,7 @@ pub struct ServerboundSeenAdvancements { pub tab: Option, } -#[derive(McBuf, Clone, Copy, Debug, Eq, PartialEq)] +#[derive(AzBuf, Clone, Copy, Debug, Eq, PartialEq)] pub enum Action { OpenedTab = 0, ClosedScreen = 1, diff --git a/azalea-protocol/src/packets/game/s_select_bundle_item.rs b/azalea-protocol/src/packets/game/s_select_bundle_item.rs index 682bbaf54..727cfc5a2 100644 --- a/azalea-protocol/src/packets/game/s_select_bundle_item.rs +++ b/azalea-protocol/src/packets/game/s_select_bundle_item.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundSelectBundleItem { #[var] pub slot_id: i32, diff --git a/azalea-protocol/src/packets/game/s_select_trade.rs b/azalea-protocol/src/packets/game/s_select_trade.rs index 2968a33da..e0cc8aab4 100755 --- a/azalea-protocol/src/packets/game/s_select_trade.rs +++ b/azalea-protocol/src/packets/game/s_select_trade.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundSelectTrade { #[var] pub item: u32, diff --git a/azalea-protocol/src/packets/game/s_set_beacon.rs b/azalea-protocol/src/packets/game/s_set_beacon.rs index 0c21c486f..b0b911a14 100755 --- a/azalea-protocol/src/packets/game/s_set_beacon.rs +++ b/azalea-protocol/src/packets/game/s_set_beacon.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundSetBeacon { #[var] pub primary: Option, diff --git a/azalea-protocol/src/packets/game/s_set_carried_item.rs b/azalea-protocol/src/packets/game/s_set_carried_item.rs index afa764166..5efa2d44f 100755 --- a/azalea-protocol/src/packets/game/s_set_carried_item.rs +++ b/azalea-protocol/src/packets/game/s_set_carried_item.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundSetCarriedItem { pub slot: u16, } diff --git a/azalea-protocol/src/packets/game/s_set_command_block.rs b/azalea-protocol/src/packets/game/s_set_command_block.rs index 9e0100a53..dacb79de4 100755 --- a/azalea-protocol/src/packets/game/s_set_command_block.rs +++ b/azalea-protocol/src/packets/game/s_set_command_block.rs @@ -1,6 +1,6 @@ use std::io::Cursor; -use azalea_buf::{BufReadError, McBuf, AzaleaRead}; +use azalea_buf::{AzBuf, AzaleaRead, BufReadError}; use azalea_core::{bitset::FixedBitSet, position::BlockPos}; use azalea_protocol_macros::ServerboundGamePacket; @@ -17,7 +17,7 @@ pub struct ServerboundSetCommandBlock { pub automatic: bool, } -#[derive(McBuf, Clone, Copy, Debug)] +#[derive(AzBuf, Clone, Copy, Debug)] pub enum Mode { Sequence = 0, Auto = 1, diff --git a/azalea-protocol/src/packets/game/s_set_command_minecart.rs b/azalea-protocol/src/packets/game/s_set_command_minecart.rs index 7fefa5854..0431a8658 100755 --- a/azalea-protocol/src/packets/game/s_set_command_minecart.rs +++ b/azalea-protocol/src/packets/game/s_set_command_minecart.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundSetCommandMinecart { #[var] pub entity: u32, diff --git a/azalea-protocol/src/packets/game/s_set_creative_mode_slot.rs b/azalea-protocol/src/packets/game/s_set_creative_mode_slot.rs index 99bf7a1de..e4b26a64c 100755 --- a/azalea-protocol/src/packets/game/s_set_creative_mode_slot.rs +++ b/azalea-protocol/src/packets/game/s_set_creative_mode_slot.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_inventory::ItemStack; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundSetCreativeModeSlot { pub slot_num: u16, pub item_stack: ItemStack, diff --git a/azalea-protocol/src/packets/game/s_set_jigsaw_block.rs b/azalea-protocol/src/packets/game/s_set_jigsaw_block.rs index 937c91e8d..1d97d4c75 100755 --- a/azalea-protocol/src/packets/game/s_set_jigsaw_block.rs +++ b/azalea-protocol/src/packets/game/s_set_jigsaw_block.rs @@ -1,16 +1,16 @@ use std::io::Cursor; use std::io::Write; -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_buf::AzaleaRead; use azalea_core::position::BlockPos; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ServerboundGamePacket; -use crate::packets::BufReadError; use crate::packets::AzaleaWrite; +use crate::packets::BufReadError; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundSetJigsawBlock { pub pos: BlockPos, pub name: ResourceLocation, diff --git a/azalea-protocol/src/packets/game/s_set_structure_block.rs b/azalea-protocol/src/packets/game/s_set_structure_block.rs index e6dae6682..7f05a3a7b 100755 --- a/azalea-protocol/src/packets/game/s_set_structure_block.rs +++ b/azalea-protocol/src/packets/game/s_set_structure_block.rs @@ -1,13 +1,13 @@ use std::io::{Cursor, Write}; -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_buf::{AzaleaRead, AzaleaWrite}; use azalea_core::{bitset::FixedBitSet, position::BlockPos}; use azalea_protocol_macros::ServerboundGamePacket; use crate::packets::BufReadError; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundSetStructureBlock { pub pos: BlockPos, pub update_type: UpdateType, @@ -24,14 +24,14 @@ pub struct ServerboundSetStructureBlock { pub flags: Flags, } -#[derive(Clone, Debug, McBuf)] +#[derive(Clone, Debug, AzBuf)] pub struct BytePosition { pub x: u8, pub y: u8, pub z: u8, } -#[derive(McBuf, Clone, Copy, Debug)] +#[derive(AzBuf, Clone, Copy, Debug)] pub enum UpdateType { UpdateData = 0, SaveArea = 1, @@ -39,7 +39,7 @@ pub enum UpdateType { ScanArea = 3, } -#[derive(McBuf, Clone, Copy, Debug)] +#[derive(AzBuf, Clone, Copy, Debug)] pub enum StructureMode { Save = 0, Load = 1, @@ -47,14 +47,14 @@ pub enum StructureMode { Data = 3, } -#[derive(McBuf, Clone, Copy, Debug)] +#[derive(AzBuf, Clone, Copy, Debug)] pub enum Mirror { None = 0, LeftRight = 1, FrontBack = 2, } -#[derive(McBuf, Clone, Copy, Debug)] +#[derive(AzBuf, Clone, Copy, Debug)] pub enum Rotation { None = 0, Clockwise90 = 1, diff --git a/azalea-protocol/src/packets/game/s_sign_update.rs b/azalea-protocol/src/packets/game/s_sign_update.rs index 177f2419c..c43a09785 100755 --- a/azalea-protocol/src/packets/game/s_sign_update.rs +++ b/azalea-protocol/src/packets/game/s_sign_update.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::position::BlockPos; use azalea_protocol_macros::ServerboundGamePacket; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundSignUpdate { pub pos: BlockPos, pub is_front_text: bool, diff --git a/azalea-protocol/src/packets/game/s_swing.rs b/azalea-protocol/src/packets/game/s_swing.rs index bca4a9724..68648ac6c 100755 --- a/azalea-protocol/src/packets/game/s_swing.rs +++ b/azalea-protocol/src/packets/game/s_swing.rs @@ -1,9 +1,9 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; use crate::packets::game::s_interact::InteractionHand; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundSwing { pub hand: InteractionHand, } diff --git a/azalea-protocol/src/packets/game/s_teleport_to_entity.rs b/azalea-protocol/src/packets/game/s_teleport_to_entity.rs index c7a385c0e..e88295300 100755 --- a/azalea-protocol/src/packets/game/s_teleport_to_entity.rs +++ b/azalea-protocol/src/packets/game/s_teleport_to_entity.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; use uuid::Uuid; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundTeleportToEntity { pub uuid: Uuid, } diff --git a/azalea-protocol/src/packets/game/s_use_item.rs b/azalea-protocol/src/packets/game/s_use_item.rs index 7db59eb3c..ac8ae217a 100755 --- a/azalea-protocol/src/packets/game/s_use_item.rs +++ b/azalea-protocol/src/packets/game/s_use_item.rs @@ -1,9 +1,9 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; use crate::packets::game::s_interact::InteractionHand; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundUseItem { pub hand: InteractionHand, #[var] diff --git a/azalea-protocol/src/packets/game/s_use_item_on.rs b/azalea-protocol/src/packets/game/s_use_item_on.rs index d0069d11e..0ad23ad2b 100755 --- a/azalea-protocol/src/packets/game/s_use_item_on.rs +++ b/azalea-protocol/src/packets/game/s_use_item_on.rs @@ -1,6 +1,6 @@ use std::io::{Cursor, Write}; -use azalea_buf::{BufReadError, McBuf, AzaleaRead, AzaleaWrite}; +use azalea_buf::{AzBuf, AzaleaRead, AzaleaWrite, BufReadError}; use azalea_core::{ direction::Direction, position::{BlockPos, Vec3}, @@ -9,7 +9,7 @@ use azalea_protocol_macros::ServerboundGamePacket; use crate::packets::game::s_interact::InteractionHand; -#[derive(Clone, Debug, McBuf, ServerboundGamePacket)] +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundUseItemOn { pub hand: InteractionHand, pub block_hit: BlockHit, diff --git a/azalea-protocol/src/packets/handshake/s_client_intention.rs b/azalea-protocol/src/packets/handshake/s_client_intention.rs index b41fbd98c..48fb28641 100755 --- a/azalea-protocol/src/packets/handshake/s_client_intention.rs +++ b/azalea-protocol/src/packets/handshake/s_client_intention.rs @@ -1,11 +1,11 @@ use std::hash::Hash; -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundHandshakePacket; use crate::packets::ClientIntention; -#[derive(Hash, Clone, Debug, McBuf, ServerboundHandshakePacket)] +#[derive(Hash, Clone, Debug, AzBuf, ServerboundHandshakePacket)] pub struct ServerboundClientIntention { #[var] pub protocol_version: i32, diff --git a/azalea-protocol/src/packets/login/c_cookie_request.rs b/azalea-protocol/src/packets/login/c_cookie_request.rs index cfe801ddb..f914def2e 100755 --- a/azalea-protocol/src/packets/login/c_cookie_request.rs +++ b/azalea-protocol/src/packets/login/c_cookie_request.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundLoginPacket; -#[derive(Clone, Debug, McBuf, ClientboundLoginPacket)] +#[derive(Clone, Debug, AzBuf, ClientboundLoginPacket)] pub struct ClientboundCookieRequest { pub key: FormattedText, } diff --git a/azalea-protocol/src/packets/login/c_custom_query.rs b/azalea-protocol/src/packets/login/c_custom_query.rs index bf9a84df9..80c698e6f 100755 --- a/azalea-protocol/src/packets/login/c_custom_query.rs +++ b/azalea-protocol/src/packets/login/c_custom_query.rs @@ -1,10 +1,10 @@ use std::hash::Hash; -use azalea_buf::{McBuf, UnsizedByteArray}; +use azalea_buf::{AzBuf, UnsizedByteArray}; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundLoginPacket; -#[derive(Hash, Clone, Debug, McBuf, ClientboundLoginPacket)] +#[derive(Hash, Clone, Debug, AzBuf, ClientboundLoginPacket)] pub struct ClientboundCustomQuery { #[var] pub transaction_id: u32, diff --git a/azalea-protocol/src/packets/login/c_hello.rs b/azalea-protocol/src/packets/login/c_hello.rs index 4bd08d68d..a83612123 100755 --- a/azalea-protocol/src/packets/login/c_hello.rs +++ b/azalea-protocol/src/packets/login/c_hello.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundLoginPacket; -#[derive(Clone, Debug, McBuf, ClientboundLoginPacket)] +#[derive(Clone, Debug, AzBuf, ClientboundLoginPacket)] pub struct ClientboundHello { // TODO: make this len thing work // #[len(20)] diff --git a/azalea-protocol/src/packets/login/c_login_compression.rs b/azalea-protocol/src/packets/login/c_login_compression.rs index d16e30679..c53e38294 100755 --- a/azalea-protocol/src/packets/login/c_login_compression.rs +++ b/azalea-protocol/src/packets/login/c_login_compression.rs @@ -1,9 +1,9 @@ use std::hash::Hash; -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundLoginPacket; -#[derive(Hash, Clone, Debug, ClientboundLoginPacket, McBuf)] +#[derive(Hash, Clone, Debug, ClientboundLoginPacket, AzBuf)] pub struct ClientboundLoginCompression { #[var] pub compression_threshold: i32, diff --git a/azalea-protocol/src/packets/login/c_login_finished.rs b/azalea-protocol/src/packets/login/c_login_finished.rs index dbc9dd55d..482ea53f8 100755 --- a/azalea-protocol/src/packets/login/c_login_finished.rs +++ b/azalea-protocol/src/packets/login/c_login_finished.rs @@ -1,8 +1,8 @@ use azalea_auth::game_profile::GameProfile; -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundLoginPacket; -#[derive(Clone, Debug, McBuf, ClientboundLoginPacket)] +#[derive(Clone, Debug, AzBuf, ClientboundLoginPacket)] pub struct ClientboundLoginFinished { pub game_profile: GameProfile, } diff --git a/azalea-protocol/src/packets/login/s_cookie_response.rs b/azalea-protocol/src/packets/login/s_cookie_response.rs index 1c381d6f1..5e7576003 100755 --- a/azalea-protocol/src/packets/login/s_cookie_response.rs +++ b/azalea-protocol/src/packets/login/s_cookie_response.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ServerboundLoginPacket; -#[derive(Clone, Debug, McBuf, ServerboundLoginPacket)] +#[derive(Clone, Debug, AzBuf, ServerboundLoginPacket)] pub struct ServerboundCookieResponse { pub key: ResourceLocation, pub payload: Option>, diff --git a/azalea-protocol/src/packets/login/s_custom_query.rs b/azalea-protocol/src/packets/login/s_custom_query.rs index 67648ce83..39ecdceff 100755 --- a/azalea-protocol/src/packets/login/s_custom_query.rs +++ b/azalea-protocol/src/packets/login/s_custom_query.rs @@ -1,7 +1,7 @@ -use azalea_buf::{McBuf, UnsizedByteArray}; +use azalea_buf::{AzBuf, UnsizedByteArray}; use azalea_protocol_macros::ServerboundLoginPacket; -#[derive(Clone, Debug, McBuf, ServerboundLoginPacket)] +#[derive(Clone, Debug, AzBuf, ServerboundLoginPacket)] pub struct ServerboundCustomQuery { #[var] pub transaction_id: u32, diff --git a/azalea-protocol/src/packets/login/s_custom_query_answer.rs b/azalea-protocol/src/packets/login/s_custom_query_answer.rs index dc8f5778f..348202943 100644 --- a/azalea-protocol/src/packets/login/s_custom_query_answer.rs +++ b/azalea-protocol/src/packets/login/s_custom_query_answer.rs @@ -1,9 +1,9 @@ use std::hash::Hash; -use azalea_buf::{McBuf, UnsizedByteArray}; +use azalea_buf::{AzBuf, UnsizedByteArray}; use azalea_protocol_macros::ServerboundLoginPacket; -#[derive(Hash, Clone, Debug, McBuf, ServerboundLoginPacket)] +#[derive(Hash, Clone, Debug, AzBuf, ServerboundLoginPacket)] pub struct ServerboundCustomQueryAnswer { #[var] pub transaction_id: u32, diff --git a/azalea-protocol/src/packets/login/s_hello.rs b/azalea-protocol/src/packets/login/s_hello.rs index 62015edab..15d27ce01 100755 --- a/azalea-protocol/src/packets/login/s_hello.rs +++ b/azalea-protocol/src/packets/login/s_hello.rs @@ -1,8 +1,8 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundLoginPacket; use uuid::Uuid; -#[derive(Clone, Debug, PartialEq, Eq, McBuf, ServerboundLoginPacket)] +#[derive(Clone, Debug, PartialEq, Eq, AzBuf, ServerboundLoginPacket)] pub struct ServerboundHello { pub name: String, pub profile_id: Uuid, diff --git a/azalea-protocol/src/packets/login/s_key.rs b/azalea-protocol/src/packets/login/s_key.rs index 515c2ef4a..1b96d4451 100755 --- a/azalea-protocol/src/packets/login/s_key.rs +++ b/azalea-protocol/src/packets/login/s_key.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundLoginPacket; -#[derive(Clone, Debug, McBuf, ServerboundLoginPacket)] +#[derive(Clone, Debug, AzBuf, ServerboundLoginPacket)] pub struct ServerboundKey { pub key_bytes: Vec, pub encrypted_challenge: Vec, diff --git a/azalea-protocol/src/packets/login/s_login_acknowledged.rs b/azalea-protocol/src/packets/login/s_login_acknowledged.rs index 963e58c06..e36648b63 100644 --- a/azalea-protocol/src/packets/login/s_login_acknowledged.rs +++ b/azalea-protocol/src/packets/login/s_login_acknowledged.rs @@ -1,5 +1,5 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundLoginPacket; -#[derive(Clone, Debug, McBuf, ServerboundLoginPacket)] +#[derive(Clone, Debug, AzBuf, ServerboundLoginPacket)] pub struct ServerboundLoginAcknowledged {} diff --git a/azalea-protocol/src/packets/status/c_pong_response.rs b/azalea-protocol/src/packets/status/c_pong_response.rs index 6886e9515..34a5e73b1 100755 --- a/azalea-protocol/src/packets/status/c_pong_response.rs +++ b/azalea-protocol/src/packets/status/c_pong_response.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundStatusPacket; -#[derive(Clone, Debug, McBuf, ClientboundStatusPacket)] +#[derive(Clone, Debug, AzBuf, ClientboundStatusPacket)] pub struct ClientboundPongResponse { pub time: u64, } diff --git a/azalea-protocol/src/packets/status/s_ping_request.rs b/azalea-protocol/src/packets/status/s_ping_request.rs index cf38f4fc7..34f2e062d 100755 --- a/azalea-protocol/src/packets/status/s_ping_request.rs +++ b/azalea-protocol/src/packets/status/s_ping_request.rs @@ -1,7 +1,7 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundStatusPacket; -#[derive(Clone, Debug, McBuf, ServerboundStatusPacket)] +#[derive(Clone, Debug, AzBuf, ServerboundStatusPacket)] pub struct ServerboundPingRequest { pub time: u64, } diff --git a/azalea-protocol/src/packets/status/s_status_request.rs b/azalea-protocol/src/packets/status/s_status_request.rs index 101d1efb3..662d74bfd 100755 --- a/azalea-protocol/src/packets/status/s_status_request.rs +++ b/azalea-protocol/src/packets/status/s_status_request.rs @@ -1,5 +1,5 @@ -use azalea_buf::McBuf; +use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundStatusPacket; -#[derive(Clone, Debug, McBuf, ServerboundStatusPacket)] +#[derive(Clone, Debug, AzBuf, ServerboundStatusPacket)] pub struct ServerboundStatusRequest {} diff --git a/azalea-registry/azalea-registry-macros/src/lib.rs b/azalea-registry/azalea-registry-macros/src/lib.rs index 50a9f1991..2b148fd2b 100755 --- a/azalea-registry/azalea-registry-macros/src/lib.rs +++ b/azalea-registry/azalea-registry-macros/src/lib.rs @@ -75,7 +75,7 @@ pub fn registry(input: TokenStream) -> TokenStream { let attributes = input.attributes; generated.extend(quote! { #(#attributes)* - #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, azalea_buf::McBuf, simdnbt::ToNbtTag, simdnbt::FromNbtTag)] + #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, azalea_buf::AzBuf, simdnbt::ToNbtTag, simdnbt::FromNbtTag)] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] #[repr(u32)] pub enum #name { diff --git a/azalea/examples/testbot/commands.rs b/azalea/examples/testbot/commands.rs index 0e5e0f9c2..9cdb3cb79 100644 --- a/azalea/examples/testbot/commands.rs +++ b/azalea/examples/testbot/commands.rs @@ -3,7 +3,7 @@ pub mod debug; pub mod movement; use azalea::brigadier::prelude::*; -use azalea::chat::Chat; +use azalea::chat::ChatPacket; use azalea::ecs::prelude::*; use azalea::entity::metadata::Player; use azalea::Client; @@ -17,7 +17,7 @@ pub type Ctx = CommandContext>; pub struct CommandSource { pub bot: Client, pub state: State, - pub chat: Chat, + pub chat: ChatPacket, } impl CommandSource { diff --git a/azalea/src/swarm/chat.rs b/azalea/src/swarm/chat.rs index f768734aa..cf01c60b3 100644 --- a/azalea/src/swarm/chat.rs +++ b/azalea/src/swarm/chat.rs @@ -15,7 +15,7 @@ use std::collections::VecDeque; -use azalea_client::chat::{Chat, ChatReceivedEvent}; +use azalea_client::chat::{ChatPacket, ChatReceivedEvent}; use bevy_app::{App, Plugin, Update}; use bevy_ecs::prelude::Event; @@ -50,11 +50,11 @@ pub struct ClientChatState { /// A chat message that no other bots have seen yet was received by a bot. #[derive(Event, Debug)] -pub struct NewChatMessageEvent(Chat); +pub struct NewChatMessageEvent(ChatPacket); #[derive(Resource)] pub struct GlobalChatState { - pub chat_queue: VecDeque, + pub chat_queue: VecDeque, pub chat_min_index: usize, } @@ -176,7 +176,7 @@ mod tests { app } - fn drain_events(ecs: &mut World) -> Vec { + fn drain_events(ecs: &mut World) -> Vec { let mut system_state: SystemState>> = SystemState::new(ecs); let mut events = system_state.get_mut(ecs); @@ -193,12 +193,12 @@ mod tests { app.world.send_event(ChatReceivedEvent { entity: bot0, - packet: Chat::new("a"), + packet: ChatPacket::new("a"), }); app.update(); // the swarm should get the event immediately after the bot gets it - assert_eq!(drain_events(&mut app.world), vec![Chat::new("a")]); + assert_eq!(drain_events(&mut app.world), vec![ChatPacket::new("a")]); assert_eq!( app.world.get::(bot0).unwrap().chat_index, 1 @@ -206,7 +206,7 @@ mod tests { // and a second bot sending the event shouldn't do anything app.world.send_event(ChatReceivedEvent { entity: bot1, - packet: Chat::new("a"), + packet: ChatPacket::new("a"), }); app.update(); assert_eq!(drain_events(&mut app.world), vec![]); @@ -218,19 +218,19 @@ mod tests { // but if the first one gets it again, it should sent it again app.world.send_event(ChatReceivedEvent { entity: bot0, - packet: Chat::new("a"), + packet: ChatPacket::new("a"), }); app.update(); - assert_eq!(drain_events(&mut app.world), vec![Chat::new("a")]); + assert_eq!(drain_events(&mut app.world), vec![ChatPacket::new("a")]); // alright and now the second bot got a different chat message and it should be // sent app.world.send_event(ChatReceivedEvent { entity: bot1, - packet: Chat::new("b"), + packet: ChatPacket::new("b"), }); app.update(); - assert_eq!(drain_events(&mut app.world), vec![Chat::new("b")]); + assert_eq!(drain_events(&mut app.world), vec![ChatPacket::new("b")]); } #[tokio::test] @@ -242,16 +242,16 @@ mod tests { // bot0 gets a chat message app.world.send_event(ChatReceivedEvent { entity: bot0, - packet: Chat::new("a"), + packet: ChatPacket::new("a"), }); app.update(); - assert_eq!(drain_events(&mut app.world), vec![Chat::new("a")]); + assert_eq!(drain_events(&mut app.world), vec![ChatPacket::new("a")]); let bot1 = app.world.spawn_empty().id(); app.world.send_event(ChatReceivedEvent { entity: bot1, - packet: Chat::new("b"), + packet: ChatPacket::new("b"), }); app.update(); - assert_eq!(drain_events(&mut app.world), vec![Chat::new("b")]); + assert_eq!(drain_events(&mut app.world), vec![ChatPacket::new("b")]); } } diff --git a/azalea/src/swarm/mod.rs b/azalea/src/swarm/mod.rs index 83fba1027..31f018cf6 100644 --- a/azalea/src/swarm/mod.rs +++ b/azalea/src/swarm/mod.rs @@ -7,7 +7,7 @@ pub mod prelude; use std::{collections::HashMap, future::Future, net::SocketAddr, sync::Arc, time::Duration}; use azalea_client::{ - chat::Chat, start_ecs_runner, Account, Client, DefaultPlugins, Event, JoinError, + chat::ChatPacket, start_ecs_runner, Account, Client, DefaultPlugins, Event, JoinError, StartClientOpts, }; use azalea_protocol::{resolver, ServerAddress}; @@ -495,7 +495,7 @@ pub enum SwarmEvent { /// with the account and options from this event. Disconnect(Box, JoinOpts), /// At least one bot received a chat message. - Chat(Chat), + Chat(ChatPacket), } pub type SwarmHandleFn = fn(Swarm, SwarmEvent, SS) -> Fut; diff --git a/codegen/README.md b/codegen/README.md index b00290aa9..341a432d0 100755 --- a/codegen/README.md +++ b/codegen/README.md @@ -30,7 +30,7 @@ First, run `python migrate.py [new version]`. This will run a script that automa If you're lucky, that's all you're going to have to do. Look at the diff (`git diff`) and type-check the code (`cargo check`) to make sure everything is right. In the diff, specifically look for new comments that have "TODO". -If a packet is incorrect, you'll want to find it in the Minecraft source. The name of the struct should be the same or similar as the class in the vanilla source. Now, you'll have to manually write the struct for the packet. If the packet existed in the version before and it's just being updated, you can compare against that to see what was updated. Note that if a packet is particularly complicated, you may have to implement AzaleaRead and AzaleaWrite, but most of the time the `#[derive(McBuf)]` macro will be able to generate the impls correctly. Look at other existing packets as reference if you're confused. +If a packet is incorrect, you'll want to find it in the Minecraft source. The name of the struct should be the same or similar as the class in the vanilla source. Now, you'll have to manually write the struct for the packet. If the packet existed in the version before and it's just being updated, you can compare against that to see what was updated. Note that if a packet is particularly complicated, you may have to implement AzaleaRead and AzaleaWrite, but most of the time the `#[derive(AzBuf)]` macro will be able to generate the impls correctly. Look at other existing packets as reference if you're confused. Finally, test by making a bot join a world. Specifically, you'll want to test the things that were updated in the version. Setting the RUST_LOG environment variable to `debug` or `trace` may help you find the source of crashes (trace shows the first few hundred bytes for every packet received so it's typically more useful, but it may log more than you want). diff --git a/codegen/genitemcomponents.py b/codegen/genitemcomponents.py index 2f9bf2c5e..73f03081d 100644 --- a/codegen/genitemcomponents.py +++ b/codegen/genitemcomponents.py @@ -149,7 +149,7 @@ def add_variant(variant: str): # now insert the struct code.append('') - code.append('#[derive(Clone, PartialEq, McBuf)]') + code.append('#[derive(Clone, PartialEq, AzBuf)]') code.append(f'pub struct {variant} {{') code.append(' pub todo: todo!(), // see DataComponents.java') code.append('}') diff --git a/codegen/lib/code/packet.py b/codegen/lib/code/packet.py index 67a063a1d..fa214f4fb 100755 --- a/codegen/lib/code/packet.py +++ b/codegen/lib/code/packet.py @@ -32,9 +32,9 @@ def generate_packet(burger_packets, mappings: Mappings, target_packet_id, target packet_derive_name = f'{to_camel_case(direction)}{to_camel_case(state)}Packet' generated_packet_code.append( - f'#[derive(Clone, Debug, McBuf, {packet_derive_name})]') + f'#[derive(Clone, Debug, AzBuf, {packet_derive_name})]') uses.add(f'azalea_protocol_macros::{packet_derive_name}') - uses.add(f'azalea_buf::McBuf') + uses.add(f'azalea_buf::AzBuf') obfuscated_class_name = packet['class'].split('.')[0] class_name = mappings.get_class( diff --git a/codegen/lib/code/utils.py b/codegen/lib/code/utils.py index 29adc2472..6c335e2d8 100755 --- a/codegen/lib/code/utils.py +++ b/codegen/lib/code/utils.py @@ -131,7 +131,7 @@ def burger_type_to_rust_type(burger_type, field_name: Optional[str] = None, inst field_type_rs = to_camel_case( enum_name.split('.')[-1].split('$')[-1]) extra_code.append('') - extra_code.append(f'#[derive(McBuf, Clone, Copy, Debug)]') + extra_code.append(f'#[derive(AzBuf, Clone, Copy, Debug)]') extra_code.append(f'pub enum {field_type_rs} {{') for index, variant in enumerate(enum_variants): extra_code.append( From 170ffb07d02d0a33324250cf2c521e9a9784e265 Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 27 Nov 2024 03:24:00 +0000 Subject: [PATCH 10/18] remove most uses of into_variant --- azalea-client/src/attack.rs | 11 ++- azalea-client/src/chat.rs | 20 ++--- azalea-client/src/chunks.rs | 11 ++- azalea-client/src/client.rs | 51 ++++++------- azalea-client/src/configuration.rs | 18 ++--- azalea-client/src/interact.rs | 20 +++-- azalea-client/src/inventory.rs | 29 ++++--- azalea-client/src/mining.rs | 51 ++++++------- azalea-client/src/movement.rs | 29 ++++--- .../src/packet_handling/configuration.rs | 42 ++++++----- azalea-client/src/packet_handling/game.rs | 75 ++++++++++--------- azalea-client/src/packet_handling/login.rs | 26 ++++--- azalea-client/src/ping.rs | 18 ++--- azalea-client/src/raw_connection.rs | 5 +- azalea-client/src/respawn.rs | 11 ++- azalea-core/src/game_type.rs | 2 +- azalea-physics/src/lib.rs | 9 +-- .../azalea-protocol-macros/src/lib.rs | 15 +++- azalea-protocol/examples/handshake_proxy.rs | 8 +- azalea-protocol/src/connect.rs | 11 +-- azalea-protocol/src/lib.rs | 21 +++--- azalea-protocol/src/packets/mod.rs | 8 +- azalea/src/accept_resource_packs.rs | 22 +++--- 23 files changed, 257 insertions(+), 256 deletions(-) diff --git a/azalea-client/src/attack.rs b/azalea-client/src/attack.rs index 7854206eb..b1b36b69c 100644 --- a/azalea-client/src/attack.rs +++ b/azalea-client/src/attack.rs @@ -83,15 +83,14 @@ pub fn handle_attack_event( swing_arm_event.send(SwingArmEvent { entity: event.entity, }); - send_packet_events.send(SendPacketEvent { - entity: event.entity, - packet: ServerboundInteract { + send_packet_events.send(SendPacketEvent::new( + event.entity, + ServerboundInteract { entity_id: *event.target, action: s_interact::ActionType::Attack, using_secondary_action: **sneaking, - } - .into_variant(), - }); + }, + )); // we can't attack if we're in spectator mode but it still sends the attack // packet diff --git a/azalea-client/src/chat.rs b/azalea-client/src/chat.rs index ca748da2f..5641cc570 100755 --- a/azalea-client/src/chat.rs +++ b/azalea-client/src/chat.rs @@ -6,12 +6,15 @@ use std::{ }; use azalea_chat::FormattedText; -use azalea_protocol::packets::game::{ - c_disguised_chat::ClientboundDisguisedChat, - c_player_chat::ClientboundPlayerChat, - c_system_chat::ClientboundSystemChat, - s_chat::{LastSeenMessagesUpdate, ServerboundChat}, - s_chat_command::ServerboundChatCommand, +use azalea_protocol::packets::{ + game::{ + c_disguised_chat::ClientboundDisguisedChat, + c_player_chat::ClientboundPlayerChat, + c_system_chat::ClientboundSystemChat, + s_chat::{LastSeenMessagesUpdate, ServerboundChat}, + s_chat_command::ServerboundChatCommand, + }, + Packet, }; use bevy_app::{App, Plugin, Update}; use bevy_ecs::{ @@ -281,10 +284,7 @@ pub fn handle_send_chat_kind_event( } }; - send_packet_events.send(SendPacketEvent { - entity: event.entity, - packet, - }); + send_packet_events.send(SendPacketEvent::new(event.entity, packet)); } } diff --git a/azalea-client/src/chunks.rs b/azalea-client/src/chunks.rs index 184732c4c..7056efa41 100644 --- a/azalea-client/src/chunks.rs +++ b/azalea-client/src/chunks.rs @@ -159,13 +159,12 @@ pub fn handle_chunk_batch_finished_event( if let Ok(mut chunk_batch_info) = query.get_mut(event.entity) { chunk_batch_info.batch_finished(event.batch_size); let desired_chunks_per_tick = chunk_batch_info.desired_chunks_per_tick(); - send_packets.send(SendPacketEvent { - entity: event.entity, - packet: ServerboundChunkBatchReceived { + send_packets.send(SendPacketEvent::new( + event.entity, + ServerboundChunkBatchReceived { desired_chunks_per_tick, - } - .into_variant(), - }); + }, + )); } } } diff --git a/azalea-client/src/client.rs b/azalea-client/src/client.rs index 96fe8255a..467266870 100644 --- a/azalea-client/src/client.rs +++ b/azalea-client/src/client.rs @@ -30,7 +30,7 @@ use azalea_protocol::{ s_hello::ServerboundHello, s_key::ServerboundKey, s_login_acknowledged::ServerboundLoginAcknowledged, ClientboundLoginPacket, }, - ClientIntention, ConnectionProtocol, PROTOCOL_VERSION, + ClientIntention, ConnectionProtocol, Packet, PROTOCOL_VERSION, }, resolver, ServerAddress, }; @@ -349,15 +349,12 @@ impl Client { JoinError, > { // handshake - conn.write( - ServerboundClientIntention { - protocol_version: PROTOCOL_VERSION, - hostname: address.host.clone(), - port: address.port, - intention: ClientIntention::Login, - } - .into_variant(), - ) + conn.write(ServerboundClientIntention { + protocol_version: PROTOCOL_VERSION, + hostname: address.host.clone(), + port: address.port, + intention: ClientIntention::Login, + }) .await?; let mut conn = conn.login(); @@ -370,15 +367,12 @@ impl Client { )); // login - conn.write( - ServerboundHello { - name: account.username.clone(), - // TODO: pretty sure this should generate an offline-mode uuid instead of just - // Uuid::default() - profile_id: account.uuid.unwrap_or_default(), - } - .into_variant(), - ) + conn.write(ServerboundHello { + name: account.username.clone(), + // TODO: pretty sure this should generate an offline-mode uuid instead of just + // Uuid::default() + profile_id: account.uuid.unwrap_or_default(), + }) .await?; let (conn, profile) = loop { @@ -438,13 +432,10 @@ impl Client { } } - conn.write( - ServerboundKey { - key_bytes: e.encrypted_public_key, - encrypted_challenge: e.encrypted_challenge, - } - .into_variant(), - ) + conn.write(ServerboundKey { + key_bytes: e.encrypted_public_key, + encrypted_challenge: e.encrypted_challenge, + }) .await?; conn.set_encryption_key(e.secret_key); @@ -458,8 +449,7 @@ impl Client { "Got profile {:?}. handshake is finished and we're now switching to the configuration state", p.game_profile ); - conn.write(ServerboundLoginAcknowledged {}.into_variant()) - .await?; + conn.write(ServerboundLoginAcknowledged {}).await?; break (conn.configuration(), p.game_profile); } ClientboundLoginPacket::LoginDisconnect(p) => { @@ -489,8 +479,9 @@ impl Client { /// Write a packet directly to the server. pub fn write_packet( &self, - packet: ServerboundGamePacket, + packet: impl Packet, ) -> Result<(), crate::raw_connection::WritePacketError> { + let packet = packet.into_variant(); self.raw_connection_mut(&mut self.ecs.lock()) .write_packet(packet) } @@ -601,7 +592,7 @@ impl Client { "Sending client information (already logged in): {:?}", client_information ); - self.write_packet(azalea_protocol::packets::game::s_client_information::ServerboundClientInformation { information: client_information.clone() }.into_variant())?; + self.write_packet(azalea_protocol::packets::game::s_client_information::ServerboundClientInformation { information: client_information.clone() })?; } Ok(()) diff --git a/azalea-client/src/configuration.rs b/azalea-client/src/configuration.rs index e07e7a74b..54bd5da5c 100644 --- a/azalea-client/src/configuration.rs +++ b/azalea-client/src/configuration.rs @@ -31,21 +31,19 @@ fn handle_in_configuration_state( let mut brand_data = Vec::new(); // they don't have to know :) "vanilla".azalea_write(&mut brand_data).unwrap(); - send_packet_events.send(SendConfigurationEvent { + send_packet_events.send(SendConfigurationEvent::new( entity, - packet: ServerboundCustomPayload { + ServerboundCustomPayload { identifier: ResourceLocation::new("brand"), data: brand_data.into(), - } - .into_variant(), - }); + }, + )); - send_packet_events.send(SendConfigurationEvent { + send_packet_events.send(SendConfigurationEvent::new( entity, - packet: ServerboundClientInformation { + ServerboundClientInformation { information: client_information.clone(), - } - .into_variant(), - }); + }, + )); } } diff --git a/azalea-client/src/interact.rs b/azalea-client/src/interact.rs index ee665a447..d2dfd93a2 100644 --- a/azalea-client/src/interact.rs +++ b/azalea-client/src/interact.rs @@ -148,15 +148,14 @@ pub fn handle_block_interact_event( } }; - send_packet_events.send(SendPacketEvent { + send_packet_events.send(SendPacketEvent::new( entity, - packet: ServerboundUseItemOn { + ServerboundUseItemOn { hand: InteractionHand::MainHand, block_hit, sequence: sequence_number.0, - } - .into_variant(), - }); + }, + )); } } @@ -302,13 +301,12 @@ pub fn handle_swing_arm_event( mut send_packet_events: EventWriter, ) { for event in events.read() { - send_packet_events.send(SendPacketEvent { - entity: event.entity, - packet: ServerboundSwing { + send_packet_events.send(SendPacketEvent::new( + event.entity, + ServerboundSwing { hand: InteractionHand::MainHand, - } - .into_variant(), - }); + }, + )); } } diff --git a/azalea-client/src/inventory.rs b/azalea-client/src/inventory.rs index e2fbd0280..eb0b0675c 100644 --- a/azalea-client/src/inventory.rs +++ b/azalea-client/src/inventory.rs @@ -627,13 +627,12 @@ fn handle_container_close_event( continue; } - send_packet_events.send(SendPacketEvent { + send_packet_events.send(SendPacketEvent::new( entity, - packet: ServerboundContainerClose { + ServerboundContainerClose { container_id: inventory.id, - } - .into_variant(), - }); + }, + )); client_side_events.send(ClientSideCloseContainerEvent { entity: event.entity, }); @@ -695,9 +694,9 @@ pub fn handle_container_click_event( } } - send_packet_events.send(SendPacketEvent { + send_packet_events.send(SendPacketEvent::new( entity, - packet: ServerboundContainerClick { + ServerboundContainerClick { container_id: event.window_id, state_id: inventory.state_id, slot_num: event.operation.slot_num().map(|n| n as i16).unwrap_or(-999), @@ -705,9 +704,8 @@ pub fn handle_container_click_event( click_type: event.operation.click_type(), changed_slots, carried_item: inventory.carried.clone(), - } - .into_variant(), - }); + }, + )); } } @@ -763,12 +761,11 @@ fn handle_set_selected_hotbar_slot_event( } inventory.selected_hotbar_slot = event.slot; - send_packet_events.send(SendPacketEvent { - entity: event.entity, - packet: ServerboundSetCarriedItem { + send_packet_events.send(SendPacketEvent::new( + event.entity, + ServerboundSetCarriedItem { slot: event.slot as u16, - } - .into_variant(), - }); + }, + )); } } diff --git a/azalea-client/src/mining.rs b/azalea-client/src/mining.rs index e3e67e2b4..bf5a48cac 100644 --- a/azalea-client/src/mining.rs +++ b/azalea-client/src/mining.rs @@ -251,17 +251,16 @@ fn handle_start_mining_block_with_direction_event( { if mining.is_some() { // send a packet to stop mining since we just changed target - send_packet_events.send(SendPacketEvent { - entity: event.entity, - packet: ServerboundPlayerAction { + send_packet_events.send(SendPacketEvent::new( + event.entity, + ServerboundPlayerAction { action: s_player_action::Action::AbortDestroyBlock, pos: current_mining_pos .expect("IsMining is true so MineBlockPos must be present"), direction: event.direction, sequence: 0, - } - .into_variant(), - }); + }, + )); } let target_block_state = instance @@ -324,16 +323,15 @@ fn handle_start_mining_block_with_direction_event( }); } - send_packet_events.send(SendPacketEvent { - entity: event.entity, - packet: ServerboundPlayerAction { + send_packet_events.send(SendPacketEvent::new( + event.entity, + ServerboundPlayerAction { action: s_player_action::Action::StartDestroyBlock, pos: event.position, direction: event.direction, sequence: **sequence_number, - } - .into_variant(), - }); + }, + )); } } } @@ -494,16 +492,15 @@ pub fn handle_stop_mining_block_event( let mine_block_pos = mine_block_pos.expect("IsMining is true so MineBlockPos must be present"); - send_packet_events.send(SendPacketEvent { - entity: event.entity, - packet: ServerboundPlayerAction { + send_packet_events.send(SendPacketEvent::new( + event.entity, + ServerboundPlayerAction { action: s_player_action::Action::AbortDestroyBlock, pos: mine_block_pos, direction: Direction::Down, sequence: 0, - } - .into_variant(), - }); + }, + )); commands.entity(event.entity).remove::(); **mine_progress = 0.; mine_block_progress_events.send(MineBlockProgressEvent { @@ -568,16 +565,15 @@ pub fn continue_mining_block( position: mining.pos, }); *sequence_number += 1; - send_packet_events.send(SendPacketEvent { + send_packet_events.send(SendPacketEvent::new( entity, - packet: ServerboundPlayerAction { + ServerboundPlayerAction { action: s_player_action::Action::StartDestroyBlock, pos: mining.pos, direction: mining.dir, sequence: **sequence_number, - } - .into_variant(), - }); + }, + )); swing_arm_events.send(SwingArmEvent { entity }); } else if is_same_mining_target( mining.pos, @@ -614,16 +610,15 @@ pub fn continue_mining_block( entity, position: mining.pos, }); - send_packet_events.send(SendPacketEvent { + send_packet_events.send(SendPacketEvent::new( entity, - packet: ServerboundPlayerAction { + ServerboundPlayerAction { action: s_player_action::Action::StopDestroyBlock, pos: mining.pos, direction: mining.dir, sequence: **sequence_number, - } - .into_variant(), - }); + }, + )); **mine_progress = 0.; **mine_ticks = 0.; **mine_delay = 0; diff --git a/azalea-client/src/movement.rs b/azalea-client/src/movement.rs index f08af3519..3304e27d8 100644 --- a/azalea-client/src/movement.rs +++ b/azalea-client/src/movement.rs @@ -5,12 +5,15 @@ use azalea_core::tick::GameTick; use azalea_entity::{metadata::Sprinting, Attributes, Jumping}; use azalea_entity::{InLoadedChunk, LastSentPosition, LookDirection, Physics, Position}; use azalea_physics::{ai_step, PhysicsSet}; -use azalea_protocol::packets::game::s_player_command::ServerboundPlayerCommand; -use azalea_protocol::packets::game::{ - s_move_player_pos::ServerboundMovePlayerPos, - s_move_player_pos_rot::ServerboundMovePlayerPosRot, - s_move_player_rot::ServerboundMovePlayerRot, - s_move_player_status_only::ServerboundMovePlayerStatusOnly, +use azalea_protocol::packets::game::ServerboundPlayerCommand; +use azalea_protocol::packets::{ + game::{ + s_move_player_pos::ServerboundMovePlayerPos, + s_move_player_pos_rot::ServerboundMovePlayerPosRot, + s_move_player_rot::ServerboundMovePlayerRot, + s_move_player_status_only::ServerboundMovePlayerStatusOnly, + }, + Packet, }; use azalea_world::{MinecraftEntityId, MoveEntityError}; use bevy_app::{App, Plugin, Update}; @@ -244,7 +247,10 @@ pub fn send_position( }; if let Some(packet) = packet { - send_packet_events.send(SendPacketEvent { entity, packet }); + send_packet_events.send(SendPacketEvent { + sent_by: entity, + packet, + }); } } } @@ -261,15 +267,14 @@ fn send_sprinting_if_needed( } else { azalea_protocol::packets::game::s_player_command::Action::StopSprinting }; - send_packet_events.send(SendPacketEvent { + send_packet_events.send(SendPacketEvent::new( entity, - packet: ServerboundPlayerCommand { + ServerboundPlayerCommand { id: **minecraft_entity_id, action: sprinting_action, data: 0, - } - .into_variant(), - }); + }, + )); physics_state.was_sprinting = **sprinting; } } diff --git a/azalea-client/src/packet_handling/configuration.rs b/azalea-client/src/packet_handling/configuration.rs index 924c56749..89f871170 100644 --- a/azalea-client/src/packet_handling/configuration.rs +++ b/azalea-client/src/packet_handling/configuration.rs @@ -4,8 +4,10 @@ use azalea_entity::indexing::EntityIdIndex; use azalea_protocol::packets::config::s_finish_configuration::ServerboundFinishConfiguration; use azalea_protocol::packets::config::s_keep_alive::ServerboundKeepAlive; use azalea_protocol::packets::config::s_select_known_packs::ServerboundSelectKnownPacks; -use azalea_protocol::packets::config::{self, ClientboundConfigPacket, ServerboundConfigPacket}; -use azalea_protocol::packets::ConnectionProtocol; +use azalea_protocol::packets::config::{ + self, ClientboundConfigPacket, ServerboundConfigPacket, ServerboundResourcePack, +}; +use azalea_protocol::packets::{ConnectionProtocol, Packet}; use azalea_protocol::read::deserialize_packet; use bevy_ecs::prelude::*; use bevy_ecs::system::SystemState; @@ -107,7 +109,7 @@ pub fn process_packet_events(ecs: &mut World) { let mut raw_connection = query.get_mut(player_entity).unwrap(); raw_connection - .write_packet(ServerboundFinishConfiguration {}.into_variant()) + .write_packet(ServerboundFinishConfiguration {}) .expect( "we should be in the right state and encoding this packet shouldn't fail", ); @@ -150,7 +152,7 @@ pub fn process_packet_events(ecs: &mut World) { id: p.id, }); raw_connection - .write_packet(ServerboundKeepAlive { id: p.id }.into_variant()) + .write_packet(ServerboundKeepAlive { id: p.id }) .unwrap(); } ClientboundConfigPacket::Ping(p) => { @@ -161,7 +163,7 @@ pub fn process_packet_events(ecs: &mut World) { let raw_connection = query.get_mut(player_entity).unwrap(); raw_connection - .write_packet(config::s_pong::ServerboundPong { id: p.id }.into_variant()) + .write_packet(config::s_pong::ServerboundPong { id: p.id }) .unwrap(); } ClientboundConfigPacket::ResourcePackPush(p) => { @@ -173,13 +175,10 @@ pub fn process_packet_events(ecs: &mut World) { // always accept resource pack raw_connection - .write_packet( - config::s_resource_pack::ServerboundResourcePack { - id: p.id, - action: config::s_resource_pack::Action::Accepted, - } - .into_variant(), - ) + .write_packet(ServerboundResourcePack { + id: p.id, + action: config::s_resource_pack::Action::Accepted, + }) .unwrap(); } ClientboundConfigPacket::ResourcePackPop(_) => { @@ -212,12 +211,9 @@ pub fn process_packet_events(ecs: &mut World) { // resource pack management isn't implemented raw_connection - .write_packet( - ServerboundSelectKnownPacks { - known_packs: vec![], - } - .into_variant(), - ) + .write_packet(ServerboundSelectKnownPacks { + known_packs: vec![], + }) .unwrap(); } } @@ -228,16 +224,22 @@ pub fn process_packet_events(ecs: &mut World) { /// `configuration` state. #[derive(Event)] pub struct SendConfigurationEvent { - pub entity: Entity, + pub sent_by: Entity, pub packet: ServerboundConfigPacket, } +impl SendConfigurationEvent { + pub fn new(sent_by: Entity, packet: impl Packet) -> Self { + let packet = packet.into_variant(); + Self { sent_by, packet } + } +} pub fn handle_send_packet_event( mut send_packet_events: EventReader, mut query: Query<&mut RawConnection>, ) { for event in send_packet_events.read() { - if let Ok(raw_connection) = query.get_mut(event.entity) { + if let Ok(raw_connection) = query.get_mut(event.sent_by) { // debug!("Sending packet: {:?}", event.packet); if let Err(e) = raw_connection.write_packet(event.packet.clone()) { error!("Failed to send packet: {e}"); diff --git a/azalea-client/src/packet_handling/game.rs b/azalea-client/src/packet_handling/game.rs index 025fb9b5e..78cfd2852 100644 --- a/azalea-client/src/packet_handling/game.rs +++ b/azalea-client/src/packet_handling/game.rs @@ -17,12 +17,15 @@ use azalea_entity::{ Physics, PlayerBundle, Position, RelativeEntityUpdate, }; use azalea_protocol::{ - packets::game::{ - c_player_combat_kill::ClientboundPlayerCombatKill, - s_accept_teleportation::ServerboundAcceptTeleportation, - s_configuration_acknowledged::ServerboundConfigurationAcknowledged, - s_keep_alive::ServerboundKeepAlive, s_move_player_pos_rot::ServerboundMovePlayerPosRot, - s_pong::ServerboundPong, ClientboundGamePacket, ServerboundGamePacket, + packets::{ + game::{ + c_player_combat_kill::ClientboundPlayerCombatKill, + s_accept_teleportation::ServerboundAcceptTeleportation, + s_configuration_acknowledged::ServerboundConfigurationAcknowledged, + s_keep_alive::ServerboundKeepAlive, s_move_player_pos_rot::ServerboundMovePlayerPosRot, + s_pong::ServerboundPong, ClientboundGamePacket, ServerboundGamePacket, + }, + Packet, }, read::deserialize_packet, }; @@ -338,10 +341,9 @@ pub fn process_packet_events(ecs: &mut World) { "Sending client information because login: {:?}", client_information ); - send_packet_events.send(SendPacketEvent { - entity: player_entity, - packet: azalea_protocol::packets::game::s_client_information::ServerboundClientInformation { information: client_information.clone() }.into_variant(), - }); + send_packet_events.send(SendPacketEvent::new(player_entity, + azalea_protocol::packets::game::s_client_information::ServerboundClientInformation { information: client_information.clone() }, + )); system_state.apply(ecs); } @@ -491,13 +493,13 @@ pub fn process_packet_events(ecs: &mut World) { **position = new_pos; } - send_packet_events.send(SendPacketEvent { - entity: player_entity, - packet: ServerboundAcceptTeleportation { id: p.id }.into_variant(), - }); - send_packet_events.send(SendPacketEvent { - entity: player_entity, - packet: ServerboundMovePlayerPosRot { + send_packet_events.send(SendPacketEvent::new( + player_entity, + ServerboundAcceptTeleportation { id: p.id }, + )); + send_packet_events.send(SendPacketEvent::new( + player_entity, + ServerboundMovePlayerPosRot { x: new_pos.x, y: new_pos.y, z: new_pos.z, @@ -505,9 +507,8 @@ pub fn process_packet_events(ecs: &mut World) { x_rot, // this is always false on_ground: false, - } - .into_variant(), - }); + }, + )); } ClientboundGamePacket::PlayerInfoUpdate(p) => { debug!("Got player info packet {p:?}"); @@ -981,10 +982,10 @@ pub fn process_packet_events(ecs: &mut World) { entity: player_entity, id: p.id, }); - send_packet_events.send(SendPacketEvent { - entity: player_entity, - packet: ServerboundKeepAlive { id: p.id }.into_variant(), - }); + send_packet_events.send(SendPacketEvent::new( + player_entity, + ServerboundKeepAlive { id: p.id }, + )); } ClientboundGamePacket::RemoveEntities(p) => { debug!("Got remove entities packet {:?}", p); @@ -1277,10 +1278,10 @@ pub fn process_packet_events(ecs: &mut World) { SystemState::new(ecs); let mut send_packet_events = system_state.get_mut(ecs); - send_packet_events.send(SendPacketEvent { - entity: player_entity, - packet: ServerboundPong { id: p.id }.into_variant(), - }); + send_packet_events.send(SendPacketEvent::new( + player_entity, + ServerboundPong { id: p.id }, + )); } ClientboundGamePacket::PlaceGhostRecipe(_) => {} ClientboundGamePacket::PlayerCombatEnd(_) => {} @@ -1421,10 +1422,10 @@ pub fn process_packet_events(ecs: &mut World) { SystemState::new(ecs); let (mut commands, mut packet_events) = system_state.get_mut(ecs); - packet_events.send(SendPacketEvent { - entity: player_entity, - packet: ServerboundConfigurationAcknowledged {}.into_variant(), - }); + packet_events.send(SendPacketEvent::new( + player_entity, + ServerboundConfigurationAcknowledged {}, + )); commands .entity(player_entity) @@ -1488,16 +1489,22 @@ pub fn process_packet_events(ecs: &mut World) { /// An event for sending a packet to the server while we're in the `game` state. #[derive(Event)] pub struct SendPacketEvent { - pub entity: Entity, + pub sent_by: Entity, pub packet: ServerboundGamePacket, } +impl SendPacketEvent { + pub fn new(sent_by: Entity, packet: impl Packet) -> Self { + let packet = packet.into_variant(); + Self { sent_by, packet } + } +} pub fn handle_send_packet_event( mut send_packet_events: EventReader, mut query: Query<&mut RawConnection>, ) { for event in send_packet_events.read() { - if let Ok(raw_connection) = query.get_mut(event.entity) { + if let Ok(raw_connection) = query.get_mut(event.sent_by) { // debug!("Sending packet: {:?}", event.packet); if let Err(e) = raw_connection.write_packet(event.packet.clone()) { error!("Failed to send packet: {e}"); diff --git a/azalea-client/src/packet_handling/login.rs b/azalea-client/src/packet_handling/login.rs index 90b21c6ff..11c0b8e9c 100644 --- a/azalea-client/src/packet_handling/login.rs +++ b/azalea-client/src/packet_handling/login.rs @@ -3,9 +3,12 @@ use std::{collections::HashSet, sync::Arc}; -use azalea_protocol::packets::login::{ - s_custom_query_answer::ServerboundCustomQueryAnswer, ClientboundLoginPacket, - ServerboundLoginPacket, +use azalea_protocol::packets::{ + login::{ + s_custom_query_answer::ServerboundCustomQueryAnswer, ClientboundLoginPacket, + ServerboundLoginPacket, + }, + Packet, }; use bevy_ecs::{prelude::*, system::SystemState}; use derive_more::{Deref, DerefMut}; @@ -33,6 +36,12 @@ pub struct SendLoginPacketEvent { pub entity: Entity, pub packet: ServerboundLoginPacket, } +impl SendLoginPacketEvent { + pub fn new(entity: Entity, packet: impl Packet) -> Self { + let packet = packet.into_variant(); + Self { entity, packet } + } +} #[derive(Component)] pub struct LoginSendPacketQueue { @@ -86,14 +95,13 @@ pub fn process_packet_events(ecs: &mut World) { } } - send_packet_events.send(SendLoginPacketEvent { - entity: player_entity, - packet: ServerboundCustomQueryAnswer { + send_packet_events.send(SendLoginPacketEvent::new( + player_entity, + ServerboundCustomQueryAnswer { transaction_id: p.transaction_id, data: None, - } - .into_variant(), - }); + }, + )); } _ => {} } diff --git a/azalea-client/src/ping.rs b/azalea-client/src/ping.rs index 99485eed4..aee35af2e 100755 --- a/azalea-client/src/ping.rs +++ b/azalea-client/src/ping.rs @@ -74,21 +74,17 @@ pub async fn ping_server_with_connection( mut conn: Connection, ) -> Result { // send the client intention packet and switch to the status state - conn.write( - ServerboundClientIntention { - protocol_version: PROTOCOL_VERSION, - hostname: address.host.clone(), - port: address.port, - intention: ClientIntention::Status, - } - .into_variant(), - ) + conn.write(ServerboundClientIntention { + protocol_version: PROTOCOL_VERSION, + hostname: address.host.clone(), + port: address.port, + intention: ClientIntention::Status, + }) .await?; let mut conn = conn.status(); // send the empty status request packet - conn.write(ServerboundStatusRequest {}.into_variant()) - .await?; + conn.write(ServerboundStatusRequest {}).await?; let packet = conn.read().await?; diff --git a/azalea-client/src/raw_connection.rs b/azalea-client/src/raw_connection.rs index 8cbb15a47..3eacf5289 100644 --- a/azalea-client/src/raw_connection.rs +++ b/azalea-client/src/raw_connection.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use azalea_protocol::{ connect::{RawReadConnection, RawWriteConnection}, - packets::{ConnectionProtocol, ProtocolPacket}, + packets::{ConnectionProtocol, Packet, ProtocolPacket}, read::ReadPacketError, write::serialize_packet, }; @@ -106,8 +106,9 @@ impl RawConnection { /// encoding it failed somehow (like it's too big or something). pub fn write_packet( &self, - packet: P, + packet: impl Packet

, ) -> Result<(), WritePacketError> { + let packet = packet.into_variant(); let raw_packet = serialize_packet(&packet)?; self.write_raw_packet(raw_packet)?; diff --git a/azalea-client/src/respawn.rs b/azalea-client/src/respawn.rs index aa641979c..edd2a43aa 100644 --- a/azalea-client/src/respawn.rs +++ b/azalea-client/src/respawn.rs @@ -24,12 +24,11 @@ pub fn perform_respawn( mut send_packets: EventWriter, ) { for event in events.read() { - send_packets.send(SendPacketEvent { - entity: event.entity, - packet: ServerboundClientCommand { + send_packets.send(SendPacketEvent::new( + event.entity, + ServerboundClientCommand { action: s_client_command::Action::PerformRespawn, - } - .into_variant(), - }); + }, + )); } } diff --git a/azalea-core/src/game_type.rs b/azalea-core/src/game_type.rs index f898d721b..5bac06d5c 100644 --- a/azalea-core/src/game_type.rs +++ b/azalea-core/src/game_type.rs @@ -1,6 +1,6 @@ use std::io::{Cursor, Write}; -use azalea_buf::{BufReadError, AzaleaRead, AzaleaReadVar, AzaleaWrite}; +use azalea_buf::{AzaleaRead, AzaleaReadVar, AzaleaWrite, BufReadError}; use tracing::debug; /// A Minecraft gamemode, like survival or creative. diff --git a/azalea-physics/src/lib.rs b/azalea-physics/src/lib.rs index 998fb300d..2d81ac7c9 100644 --- a/azalea-physics/src/lib.rs +++ b/azalea-physics/src/lib.rs @@ -648,8 +648,7 @@ mod tests { azalea_block::blocks::StoneSlab { kind: azalea_block::properties::Type::Top, waterlogged: false, - } - .into(), + }, ); assert!( block_state.is_some(), @@ -705,8 +704,7 @@ mod tests { west: azalea_block::properties::WallWest::Low, up: false, waterlogged: false, - } - .into(), + }, ); assert!( block_state.is_some(), @@ -767,8 +765,7 @@ mod tests { west: azalea_block::properties::WallWest::Low, up: false, waterlogged: false, - } - .into(), + }, ); assert!( block_state.is_some(), diff --git a/azalea-protocol/azalea-protocol-macros/src/lib.rs b/azalea-protocol/azalea-protocol-macros/src/lib.rs index 01ad307c9..25f024a94 100755 --- a/azalea-protocol/azalea-protocol-macros/src/lib.rs +++ b/azalea-protocol/azalea-protocol-macros/src/lib.rs @@ -28,11 +28,13 @@ fn as_packet_derive(input: TokenStream, state: proc_macro2::TokenStream) -> Toke buf: &mut std::io::Cursor<&[u8]>, ) -> Result<#state, azalea_buf::BufReadError> { use azalea_buf::AzaleaRead; - Ok(Self::azalea_read(buf)?.into_variant()) + Ok(crate::packets::Packet::into_variant(Self::azalea_read(buf)?)) } - /// Convert this packet into an variant for the enum of the state and direction. - pub fn into_variant(self) -> #state { + } + + impl crate::packets::Packet<#state> for #ident { + fn into_variant(self) -> #state { #state::#variant_name(self) } } @@ -352,6 +354,13 @@ pub fn declare_state_packets(input: TokenStream) -> TokenStream { }) } } + + impl crate::packets::Packet<#s_state_name> for #s_state_name { + /// No-op, exists so you can pass a packet enum when a Packet<> is expected. + fn into_variant(self) -> #s_state_name { + self + } + } }); contents.extend(quote! { diff --git a/azalea-protocol/examples/handshake_proxy.rs b/azalea-protocol/examples/handshake_proxy.rs index fa48fcd53..25f0380fa 100644 --- a/azalea-protocol/examples/handshake_proxy.rs +++ b/azalea-protocol/examples/handshake_proxy.rs @@ -108,12 +108,12 @@ async fn handle_connection(stream: TcpStream) -> anyhow::Result<()> { version: PROXY_VERSION.clone(), enforces_secure_chat: PROXY_SECURE_CHAT, } - .into_variant(), + .into(), ) .await?; } ServerboundStatusPacket::PingRequest(p) => { - conn.write(ClientboundPongResponse { time: p.time }.into_variant()) + conn.write(ClientboundPongResponse { time: p.time }.into()) .await?; break; } @@ -189,10 +189,10 @@ async fn transfer( // received earlier to the proxy target let mut outbound_conn: Connection = Connection::wrap(outbound); - outbound_conn.write(intent.into_variant()).await?; + outbound_conn.write(intent.into()).await?; let mut outbound_conn = outbound_conn.login(); - outbound_conn.write(hello.into_variant()).await?; + outbound_conn.write(hello.into()).await?; let mut outbound = outbound_conn.unwrap()?; diff --git a/azalea-protocol/src/connect.rs b/azalea-protocol/src/connect.rs index 2576b0f5e..5d2c8b1a3 100755 --- a/azalea-protocol/src/connect.rs +++ b/azalea-protocol/src/connect.rs @@ -84,7 +84,7 @@ pub struct WriteConnection { /// port: resolved_address.port(), /// intention: ClientIntention::Login, /// } -/// .into_variant(), +/// .into(), /// ) /// .await?; /// @@ -96,7 +96,7 @@ pub struct WriteConnection { /// name: "bot".to_string(), /// profile_id: uuid::Uuid::nil(), /// } -/// .into_variant(), +/// .into(), /// ) /// .await?; /// @@ -111,7 +111,7 @@ pub struct WriteConnection { /// key_bytes: e.encrypted_public_key, /// encrypted_challenge: e.encrypted_challenge, /// } -/// .into_variant(), +/// .into(), /// ) /// .await?; /// conn.set_encryption_key(e.secret_key); @@ -241,7 +241,8 @@ where } /// Write a packet to the other side of the connection. - pub async fn write(&mut self, packet: W) -> std::io::Result<()> { + pub async fn write(&mut self, packet: impl crate::packets::Packet) -> std::io::Result<()> { + let packet = packet.into_variant(); self.writer.write(packet).await } @@ -414,7 +415,7 @@ impl Connection { /// ServerboundKeyPacket { /// key_bytes: e.encrypted_public_key, /// encrypted_challenge: e.encrypted_challenge, - /// }.into_variant() + /// }.into() /// ).await?; /// conn.set_encryption_key(e.secret_key); /// } diff --git a/azalea-protocol/src/lib.rs b/azalea-protocol/src/lib.rs index 7afd461c2..dc97865ff 100644 --- a/azalea-protocol/src/lib.rs +++ b/azalea-protocol/src/lib.rs @@ -122,7 +122,7 @@ mod tests { name: "test".to_string(), profile_id: Uuid::nil(), } - .into_variant(); + .into(); let mut stream = Vec::new(); write_packet(&packet, &mut stream, None, &mut None) .await @@ -146,7 +146,7 @@ mod tests { name: "test".to_string(), profile_id: Uuid::nil(), } - .into_variant(); + .into(); let mut stream = Vec::new(); write_packet(&packet, &mut stream, None, &mut None) .await @@ -170,16 +170,13 @@ mod tests { async fn test_read_long_compressed_chat() { let compression_threshold = 256; - let buf = serialize_packet( - &ServerboundChat { - message: "a".repeat(256), - timestamp: 0, - salt: 0, - signature: None, - last_seen_messages: LastSeenMessagesUpdate::default(), - } - .into_variant(), - ) + let buf = serialize_packet(&ServerboundChat { + message: "a".repeat(256), + timestamp: 0, + salt: 0, + signature: None, + last_seen_messages: LastSeenMessagesUpdate::default(), + }) .unwrap(); let buf = compression_encoder(&buf, compression_threshold).unwrap(); diff --git a/azalea-protocol/src/packets/mod.rs b/azalea-protocol/src/packets/mod.rs index 7c280e232..8ae0b48b6 100755 --- a/azalea-protocol/src/packets/mod.rs +++ b/azalea-protocol/src/packets/mod.rs @@ -7,7 +7,7 @@ pub mod status; use std::io::{Cursor, Write}; -use azalea_buf::{AzaleaWrite, AzaleaWriteVar, BufReadError, AzaleaReadVar}; +use azalea_buf::{AzaleaReadVar, AzaleaWrite, AzaleaWriteVar, BufReadError}; use crate::read::ReadPacketError; @@ -39,7 +39,7 @@ impl ConnectionProtocol { } } -/// An enum of packets for a certain protocol +/// An enum of packets for a certain protocol. pub trait ProtocolPacket where Self: Sized, @@ -52,6 +52,10 @@ where fn write(&self, buf: &mut impl Write) -> Result<(), std::io::Error>; } +pub trait Packet { + fn into_variant(self) -> Protocol; +} + #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub enum ClientIntention { Status = 1, diff --git a/azalea/src/accept_resource_packs.rs b/azalea/src/accept_resource_packs.rs index 080a4fc6a..f62d5ec0e 100644 --- a/azalea/src/accept_resource_packs.rs +++ b/azalea/src/accept_resource_packs.rs @@ -30,21 +30,19 @@ fn accept_resource_pack( mut send_packet_events: EventWriter, ) { for event in events.read() { - send_packet_events.send(SendPacketEvent { - entity: event.entity, - packet: ServerboundResourcePack { + send_packet_events.send(SendPacketEvent::new( + event.entity, + ServerboundResourcePack { id: event.id, action: s_resource_pack::Action::Accepted, - } - .into_variant(), - }); - send_packet_events.send(SendPacketEvent { - entity: event.entity, - packet: ServerboundResourcePack { + }, + )); + send_packet_events.send(SendPacketEvent::new( + event.entity, + ServerboundResourcePack { id: event.id, action: s_resource_pack::Action::SuccessfullyLoaded, - } - .into_variant(), - }); + }, + )); } } From f8cd7ed1dec3c31ba91c0b1fda1ea17df49994ba Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 27 Nov 2024 04:59:13 +0000 Subject: [PATCH 11/18] update codegen and use resourcelocation names for packets --- azalea-block/src/lib.rs | 2 +- .../src/suggestion/suggestions.rs | 4 +- azalea-buf/src/lib.rs | 4 +- azalea-buf/src/read.rs | 4 +- azalea-chat/src/component.rs | 2 +- azalea-client/src/client.rs | 6 +- azalea-client/src/configuration.rs | 2 +- azalea-client/src/lib.rs | 2 +- .../src/packet_handling/configuration.rs | 2 + azalea-client/src/packet_handling/game.rs | 4 +- azalea-client/src/ping.rs | 4 +- azalea-core/src/bitset.rs | 2 +- azalea-core/src/difficulty.rs | 2 +- azalea-core/src/position.rs | 2 +- azalea-physics/src/lib.rs | 9 +- .../azalea-protocol-macros/src/lib.rs | 245 ++++++----- azalea-protocol/examples/handshake_proxy.rs | 30 +- .../client_information.rs} | 2 - azalea-protocol/src/common/mod.rs | 4 + azalea-protocol/src/common/server_links.rs | 28 ++ azalea-protocol/src/lib.rs | 25 +- .../packets/config/c_custom_report_details.rs | 9 + .../src/packets/config/c_server_links.rs | 9 + azalea-protocol/src/packets/config/mod.rs | 58 +-- .../packets/config/s_client_information.rs | 2 +- .../{c_bundle.rs => c_bundle_delimiter.rs} | 2 +- ...cart.rs => c_move_minecart_along_track.rs} | 2 +- .../src/packets/game/c_server_links.rs | 29 +- azalea-protocol/src/packets/game/mod.rs | 396 +++++++++--------- ...ndle_item.rs => s_bundle_item_selected.rs} | 2 +- .../src/packets/game/s_client_information.rs | 2 +- .../src/packets/game/s_client_tick_end.rs | 2 +- ...pick_item.rs => s_pick_item_from_block.rs} | 2 +- .../packets/game/s_pick_item_from_entity.rs | 9 + .../src/packets/game/s_player_loaded.rs | 5 + azalea-protocol/src/packets/handshake/mod.rs | 13 +- .../{s_client_intention.rs => s_intention.rs} | 2 +- azalea-protocol/src/packets/login/mod.rs | 32 +- azalea-protocol/src/packets/status/mod.rs | 18 +- azalea-world/src/chunk_storage.rs | 2 +- codegen/genpackets.py | 18 + codegen/lib/code/packet.py | 241 ++++------- codegen/lib/code/utils.py | 4 +- codegen/lib/extract.py | 15 +- codegen/newpacket.py | 24 +- 45 files changed, 651 insertions(+), 632 deletions(-) rename azalea-protocol/src/{common.rs => common/client_information.rs} (98%) create mode 100644 azalea-protocol/src/common/mod.rs create mode 100644 azalea-protocol/src/common/server_links.rs create mode 100644 azalea-protocol/src/packets/config/c_custom_report_details.rs create mode 100644 azalea-protocol/src/packets/config/c_server_links.rs rename azalea-protocol/src/packets/game/{c_bundle.rs => c_bundle_delimiter.rs} (76%) rename azalea-protocol/src/packets/game/{c_move_minecart.rs => c_move_minecart_along_track.rs} (89%) rename azalea-protocol/src/packets/game/{s_select_bundle_item.rs => s_bundle_item_selected.rs} (82%) rename azalea-protocol/src/packets/game/{s_pick_item.rs => s_pick_item_from_block.rs} (79%) create mode 100644 azalea-protocol/src/packets/game/s_pick_item_from_entity.rs create mode 100644 azalea-protocol/src/packets/game/s_player_loaded.rs rename azalea-protocol/src/packets/handshake/{s_client_intention.rs => s_intention.rs} (89%) create mode 100755 codegen/genpackets.py diff --git a/azalea-block/src/lib.rs b/azalea-block/src/lib.rs index a5d62ac78..c1655919f 100755 --- a/azalea-block/src/lib.rs +++ b/azalea-block/src/lib.rs @@ -11,7 +11,7 @@ use std::{ io::{Cursor, Write}, }; -use azalea_buf::{BufReadError, AzaleaRead, AzaleaReadVar, AzaleaWriteVar, AzaleaWrite}; +use azalea_buf::{AzaleaRead, AzaleaReadVar, AzaleaWrite, AzaleaWriteVar, BufReadError}; pub use behavior::BlockBehavior; pub use generated::{blocks, properties}; pub use range::BlockStates; diff --git a/azalea-brigadier/src/suggestion/suggestions.rs b/azalea-brigadier/src/suggestion/suggestions.rs index d6368f443..60eaa1112 100755 --- a/azalea-brigadier/src/suggestion/suggestions.rs +++ b/azalea-brigadier/src/suggestion/suggestions.rs @@ -3,9 +3,7 @@ use std::io::{Cursor, Write}; use std::{collections::HashSet, hash::Hash}; #[cfg(feature = "azalea-buf")] -use azalea_buf::{ - BufReadError, AzBuf, AzaleaRead, AzaleaReadVar, AzaleaWriteVar, AzaleaWrite, -}; +use azalea_buf::{AzBuf, AzaleaRead, AzaleaReadVar, AzaleaWrite, AzaleaWriteVar, BufReadError}; #[cfg(feature = "azalea-buf")] use azalea_chat::FormattedText; diff --git a/azalea-buf/src/lib.rs b/azalea-buf/src/lib.rs index 30626da87..3e938ae52 100755 --- a/azalea-buf/src/lib.rs +++ b/azalea-buf/src/lib.rs @@ -10,9 +10,9 @@ mod write; pub use azalea_buf_macros::*; pub use definitions::*; -pub use read::{BufReadError, AzaleaRead, AzaleaReadVar}; +pub use read::{AzaleaRead, AzaleaReadVar, BufReadError}; pub use serializable_uuid::*; -pub use write::{AzaleaWriteVar, AzaleaWrite}; +pub use write::{AzaleaWrite, AzaleaWriteVar}; // const DEFAULT_NBT_QUOTA: u32 = 2097152; const MAX_STRING_LENGTH: u16 = 32767; diff --git a/azalea-buf/src/read.rs b/azalea-buf/src/read.rs index 415cb3843..879c3f7f2 100755 --- a/azalea-buf/src/read.rs +++ b/azalea-buf/src/read.rs @@ -196,9 +196,7 @@ impl AzaleaRead for Hash } } -impl AzaleaReadVar - for HashMap -{ +impl AzaleaReadVar for HashMap { fn azalea_read_var(buf: &mut Cursor<&[u8]>) -> Result { let length = i32::azalea_read_var(buf)? as usize; let mut contents = HashMap::with_capacity(usize::min(length, 65536)); diff --git a/azalea-chat/src/component.rs b/azalea-chat/src/component.rs index c0ebeb5fe..530d83b99 100755 --- a/azalea-chat/src/component.rs +++ b/azalea-chat/src/component.rs @@ -1,7 +1,7 @@ use std::fmt::Display; #[cfg(feature = "azalea-buf")] -use azalea_buf::{BufReadError, AzaleaRead, AzaleaWrite}; +use azalea_buf::{AzaleaRead, AzaleaWrite, BufReadError}; use once_cell::sync::Lazy; use serde::{de, Deserialize, Deserializer, Serialize}; #[cfg(feature = "simdnbt")] diff --git a/azalea-client/src/client.rs b/azalea-client/src/client.rs index 467266870..b9aa47b3f 100644 --- a/azalea-client/src/client.rs +++ b/azalea-client/src/client.rs @@ -17,13 +17,13 @@ use azalea_entity::{ }; use azalea_physics::PhysicsPlugin; use azalea_protocol::{ - common::ClientInformation, + common::client_information::ClientInformation, connect::{Connection, ConnectionError, Proxy}, packets::{ config::{ClientboundConfigPacket, ServerboundConfigPacket}, game::ServerboundGamePacket, handshake::{ - s_client_intention::ServerboundClientIntention, ClientboundHandshakePacket, + s_intention::ServerboundIntention, ClientboundHandshakePacket, ServerboundHandshakePacket, }, login::{ @@ -349,7 +349,7 @@ impl Client { JoinError, > { // handshake - conn.write(ServerboundClientIntention { + conn.write(ServerboundIntention { protocol_version: PROTOCOL_VERSION, hostname: address.host.clone(), port: address.port, diff --git a/azalea-client/src/configuration.rs b/azalea-client/src/configuration.rs index 54bd5da5c..bfaa36f01 100644 --- a/azalea-client/src/configuration.rs +++ b/azalea-client/src/configuration.rs @@ -1,7 +1,7 @@ use azalea_buf::AzaleaWrite; use azalea_core::resource_location::ResourceLocation; use azalea_protocol::{ - common::ClientInformation, + common::client_information::ClientInformation, packets::config::{ s_client_information::ServerboundClientInformation, s_custom_payload::ServerboundCustomPayload, diff --git a/azalea-client/src/lib.rs b/azalea-client/src/lib.rs index 58a47f38e..3e4a48aad 100644 --- a/azalea-client/src/lib.rs +++ b/azalea-client/src/lib.rs @@ -30,7 +30,7 @@ pub mod respawn; pub mod task_pool; pub use account::{Account, AccountOpts}; -pub use azalea_protocol::common::ClientInformation; +pub use azalea_protocol::common::client_information::ClientInformation; pub use client::{ start_ecs_runner, Client, DefaultPlugins, JoinError, JoinedClientBundle, StartClientOpts, TickBroadcast, diff --git a/azalea-client/src/packet_handling/configuration.rs b/azalea-client/src/packet_handling/configuration.rs index 89f871170..3a719ce19 100644 --- a/azalea-client/src/packet_handling/configuration.rs +++ b/azalea-client/src/packet_handling/configuration.rs @@ -216,6 +216,8 @@ pub fn process_packet_events(ecs: &mut World) { }) .unwrap(); } + ClientboundConfigPacket::ServerLinks(_) => {} + ClientboundConfigPacket::CustomReportDetails(_) => {} } } } diff --git a/azalea-client/src/packet_handling/game.rs b/azalea-client/src/packet_handling/game.rs index 78cfd2852..38178a63b 100644 --- a/azalea-client/src/packet_handling/game.rs +++ b/azalea-client/src/packet_handling/game.rs @@ -1458,7 +1458,7 @@ pub fn process_packet_events(ecs: &mut World) { ClientboundGamePacket::TabList(_) => {} ClientboundGamePacket::TagQuery(_) => {} ClientboundGamePacket::TakeItemEntity(_) => {} - ClientboundGamePacket::Bundle(_) => {} + ClientboundGamePacket::BundleDelimiter(_) => {} ClientboundGamePacket::DamageEvent(_) => {} ClientboundGamePacket::HurtAnimation(_) => {} @@ -1471,7 +1471,7 @@ pub fn process_packet_events(ecs: &mut World) { ClientboundGamePacket::PongResponse(_) => {} ClientboundGamePacket::StoreCookie(_) => {} ClientboundGamePacket::Transfer(_) => {} - ClientboundGamePacket::MoveMinecart(_) => {} + ClientboundGamePacket::MoveMinecartAlongTrack(_) => {} ClientboundGamePacket::SetHeldSlot(_) => {} ClientboundGamePacket::SetPlayerInventory(_) => {} ClientboundGamePacket::ProjectilePower(_) => {} diff --git a/azalea-client/src/ping.rs b/azalea-client/src/ping.rs index aee35af2e..f5d714cd0 100755 --- a/azalea-client/src/ping.rs +++ b/azalea-client/src/ping.rs @@ -6,7 +6,7 @@ use azalea_protocol::{ connect::{Connection, ConnectionError, Proxy}, packets::{ handshake::{ - s_client_intention::ServerboundClientIntention, ClientboundHandshakePacket, + s_intention::ServerboundIntention, ClientboundHandshakePacket, ServerboundHandshakePacket, }, status::{ @@ -74,7 +74,7 @@ pub async fn ping_server_with_connection( mut conn: Connection, ) -> Result { // send the client intention packet and switch to the status state - conn.write(ServerboundClientIntention { + conn.write(ServerboundIntention { protocol_version: PROTOCOL_VERSION, hostname: address.host.clone(), port: address.port, diff --git a/azalea-core/src/bitset.rs b/azalea-core/src/bitset.rs index c7e039de7..e7c79467f 100755 --- a/azalea-core/src/bitset.rs +++ b/azalea-core/src/bitset.rs @@ -1,6 +1,6 @@ use std::io::{Cursor, Write}; -use azalea_buf::{BufReadError, AzBuf, AzaleaRead, AzaleaWrite}; +use azalea_buf::{AzBuf, AzaleaRead, AzaleaWrite, BufReadError}; /// Represents Java's BitSet, a list of bits. #[derive(Debug, Clone, PartialEq, Eq, Hash, Default, AzBuf)] diff --git a/azalea-core/src/difficulty.rs b/azalea-core/src/difficulty.rs index e913ffac3..b907bbb3b 100755 --- a/azalea-core/src/difficulty.rs +++ b/azalea-core/src/difficulty.rs @@ -3,7 +3,7 @@ use std::{ io::{Cursor, Write}, }; -use azalea_buf::{BufReadError, AzaleaRead, AzaleaWrite}; +use azalea_buf::{AzaleaRead, AzaleaWrite, BufReadError}; #[derive(Hash, Clone, Copy, Debug, PartialEq, Eq)] pub enum Difficulty { diff --git a/azalea-core/src/position.rs b/azalea-core/src/position.rs index 22cb490a3..749a09479 100755 --- a/azalea-core/src/position.rs +++ b/azalea-core/src/position.rs @@ -11,7 +11,7 @@ use std::{ str::FromStr, }; -use azalea_buf::{BufReadError, AzBuf, AzaleaRead, AzaleaWrite}; +use azalea_buf::{AzBuf, AzaleaRead, AzaleaWrite, BufReadError}; #[cfg(feature = "serde")] use serde::{Deserialize, Serialize}; diff --git a/azalea-physics/src/lib.rs b/azalea-physics/src/lib.rs index 2d81ac7c9..998fb300d 100644 --- a/azalea-physics/src/lib.rs +++ b/azalea-physics/src/lib.rs @@ -648,7 +648,8 @@ mod tests { azalea_block::blocks::StoneSlab { kind: azalea_block::properties::Type::Top, waterlogged: false, - }, + } + .into(), ); assert!( block_state.is_some(), @@ -704,7 +705,8 @@ mod tests { west: azalea_block::properties::WallWest::Low, up: false, waterlogged: false, - }, + } + .into(), ); assert!( block_state.is_some(), @@ -765,7 +767,8 @@ mod tests { west: azalea_block::properties::WallWest::Low, up: false, waterlogged: false, - }, + } + .into(), ); assert!( block_state.is_some(), diff --git a/azalea-protocol/azalea-protocol-macros/src/lib.rs b/azalea-protocol/azalea-protocol-macros/src/lib.rs index 25f024a94..393f8de99 100755 --- a/azalea-protocol/azalea-protocol-macros/src/lib.rs +++ b/azalea-protocol/azalea-protocol-macros/src/lib.rs @@ -109,14 +109,9 @@ pub fn derive_c_config_packet(input: TokenStream) -> TokenStream { ) } -#[derive(Debug)] -struct PacketListItem { - module: Ident, - name: Ident, -} #[derive(Debug)] struct PacketList { - packets: Vec, + packets: Vec, } impl Parse for PacketList { @@ -124,15 +119,10 @@ impl Parse for PacketList { let mut packets = vec![]; // example: - // c_change_difficulty::ClientboundChangeDifficultyPacket, - - // c_change_difficulty - while let Ok(module) = input.parse::() { - input.parse::()?; - // ClientboundChangeDifficultyPacket - let name = input.parse::()?; - packets.push(PacketListItem { module, name }); - + // change_difficulty, + // keep_alive, + while let Ok(packet_name) = input.parse::() { + packets.push(packet_name); if input.parse::().is_err() { break; } @@ -145,8 +135,8 @@ impl Parse for PacketList { #[derive(Debug)] struct DeclareStatePackets { name: Ident, - serverbound: PacketList, clientbound: PacketList, + serverbound: PacketList, } impl Parse for DeclareStatePackets { @@ -154,25 +144,31 @@ impl Parse for DeclareStatePackets { let name = input.parse()?; input.parse::()?; - let s_token: Ident = input.parse()?; - if s_token != "Serverbound" { - return Err(syn::Error::new(s_token.span(), "Expected `Serverbound`")); + let clientbound_token: Ident = input.parse()?; + if clientbound_token != "Clientbound" { + return Err(syn::Error::new( + clientbound_token.span(), + "Expected `Clientbound`", + )); } input.parse::]>()?; let content; bracketed!(content in input); - let serverbound = content.parse()?; + let clientbound = content.parse()?; input.parse::()?; - let c_token: Ident = input.parse()?; - if c_token != "Clientbound" { - return Err(syn::Error::new(c_token.span(), "Expected `Clientbound`")); + let serverbound_token: Ident = input.parse()?; + if serverbound_token != "Serverbound" { + return Err(syn::Error::new( + serverbound_token.span(), + "Expected `Serverbound`", + )); } input.parse::]>()?; let content; bracketed!(content in input); - let clientbound = content.parse()?; + let serverbound = content.parse()?; Ok(DeclareStatePackets { name, @@ -185,103 +181,111 @@ impl Parse for DeclareStatePackets { pub fn declare_state_packets(input: TokenStream) -> TokenStream { let input = parse_macro_input!(input as DeclareStatePackets); - let s_state_name = Ident::new(&format!("Serverbound{}", input.name), input.name.span()); - let c_state_name = Ident::new(&format!("Clientbound{}", input.name), input.name.span()); + let clientbound_state_name = + Ident::new(&format!("Clientbound{}", input.name), input.name.span()); + let serverbound_state_name = + Ident::new(&format!("Serverbound{}", input.name), input.name.span()); let state_name_litstr = syn::LitStr::new(&input.name.to_string(), input.name.span()); - let has_s_packets = !input.serverbound.packets.is_empty(); - let has_c_packets = !input.clientbound.packets.is_empty(); + let has_clientbound_packets = !input.clientbound.packets.is_empty(); + let has_serverbound_packets = !input.serverbound.packets.is_empty(); let mut mod_and_use_statements_contents = quote!(); - let mut s_enum_contents = quote!(); - let mut c_enum_contents = quote!(); - let mut s_id_match_contents = quote!(); - let mut c_id_match_contents = quote!(); - let mut s_write_match_contents = quote!(); - let mut c_write_match_contents = quote!(); - let mut s_read_match_contents = quote!(); - let mut c_read_match_contents = quote!(); - - for (id, PacketListItem { module, name }) in input.serverbound.packets.iter().enumerate() { + let mut clientbound_enum_contents = quote!(); + let mut serverbound_enum_contents = quote!(); + let mut clientbound_id_match_contents = quote!(); + let mut serverbound_id_match_contents = quote!(); + let mut clientbound_write_match_contents = quote!(); + let mut serverbound_write_match_contents = quote!(); + let mut clientbound_read_match_contents = quote!(); + let mut serverbound_read_match_contents = quote!(); + + for (id, packet_name) in input.clientbound.packets.iter().enumerate() { let id = id as u32; - let name_litstr = syn::LitStr::new(&name.to_string(), name.span()); - let variant_name = variant_name_from(name); + + let struct_name = packet_name_to_struct_name(packet_name, "clientbound"); + let module_name = packet_name_to_module_name(packet_name, "clientbound"); + let variant_name = packet_name_to_variant_name(packet_name); + let packet_name_litstr = syn::LitStr::new(&packet_name.to_string(), packet_name.span()); mod_and_use_statements_contents.extend(quote! { - pub mod #module; - pub use #module::#name; + pub mod #module_name; + pub use #module_name::#struct_name; }); - s_enum_contents.extend(quote! { - #variant_name(#module::#name), + clientbound_enum_contents.extend(quote! { + #variant_name(#module_name::#struct_name), }); - s_id_match_contents.extend(quote! { - #s_state_name::#variant_name(_packet) => #id, + clientbound_id_match_contents.extend(quote! { + #clientbound_state_name::#variant_name(_packet) => #id, }); - s_write_match_contents.extend(quote! { - #s_state_name::#variant_name(packet) => packet.write(buf), + clientbound_write_match_contents.extend(quote! { + #clientbound_state_name::#variant_name(packet) => packet.write(buf), }); - s_read_match_contents.extend(quote! { + clientbound_read_match_contents.extend(quote! { #id => { - let data = #module::#name::read(buf).map_err(|e| crate::read::ReadPacketError::Parse { + let data = #module_name::#struct_name::read(buf).map_err(|e| crate::read::ReadPacketError::Parse { source: e, packet_id: #id, backtrace: Box::new(std::backtrace::Backtrace::capture()), - packet_name: #name_litstr.to_string(), + packet_name: #packet_name_litstr.to_string(), })?; #[cfg(debug_assertions)] { let mut leftover = Vec::new(); let _ = std::io::Read::read_to_end(buf, &mut leftover); if !leftover.is_empty() { - return Err(Box::new(crate::read::ReadPacketError::LeftoverData { packet_name: #name_litstr.to_string(), data: leftover })); + return Err( + Box::new( + crate::read::ReadPacketError::LeftoverData { + packet_name: #packet_name_litstr.to_string(), + data: leftover + } + ) + ); } } data }, }); } - for (id, PacketListItem { module, name }) in input.clientbound.packets.iter().enumerate() { + for (id, packet_name) in input.serverbound.packets.iter().enumerate() { let id = id as u32; - let name_litstr = syn::LitStr::new(&name.to_string(), name.span()); - let variant_name = variant_name_from(name); + + let struct_name = packet_name_to_struct_name(packet_name, "serverbound"); + let module_name = packet_name_to_module_name(packet_name, "serverbound"); + let variant_name = packet_name_to_variant_name(packet_name); + let packet_name_litstr = syn::LitStr::new(&packet_name.to_string(), packet_name.span()); mod_and_use_statements_contents.extend(quote! { - pub mod #module; - pub use #module::#name; + pub mod #module_name; + pub use #module_name::#struct_name; }); - c_enum_contents.extend(quote! { - #variant_name(#module::#name), + serverbound_enum_contents.extend(quote! { + #variant_name(#module_name::#struct_name), }); - c_id_match_contents.extend(quote! { - #c_state_name::#variant_name(_packet) => #id, + serverbound_id_match_contents.extend(quote! { + #serverbound_state_name::#variant_name(_packet) => #id, }); - c_write_match_contents.extend(quote! { - #c_state_name::#variant_name(packet) => packet.write(buf), + serverbound_write_match_contents.extend(quote! { + #serverbound_state_name::#variant_name(packet) => packet.write(buf), }); - c_read_match_contents.extend(quote! { + serverbound_read_match_contents.extend(quote! { #id => { - let data = #module::#name::read(buf).map_err(|e| crate::read::ReadPacketError::Parse { + let data = #module_name::#struct_name::read(buf).map_err(|e| crate::read::ReadPacketError::Parse { source: e, packet_id: #id, backtrace: Box::new(std::backtrace::Backtrace::capture()), - packet_name: #name_litstr.to_string(), + packet_name: #packet_name_litstr.to_string(), })?; #[cfg(debug_assertions)] { let mut leftover = Vec::new(); let _ = std::io::Read::read_to_end(buf, &mut leftover); if !leftover.is_empty() { - return Err( - Box::new( - crate::read::ReadPacketError::LeftoverData { - packet_name: #name_litstr.to_string(), - data: leftover - } - ) - ); + return Err(Box::new(crate::read::ReadPacketError::LeftoverData { packet_name: #packet_name_litstr.to_string(), data: leftover })); } } data @@ -289,19 +293,19 @@ pub fn declare_state_packets(input: TokenStream) -> TokenStream { }); } - if !has_s_packets { - s_id_match_contents.extend(quote! { + if !has_serverbound_packets { + serverbound_id_match_contents.extend(quote! { _ => unreachable!("This enum is empty and can't exist.") }); - s_write_match_contents.extend(quote! { + serverbound_write_match_contents.extend(quote! { _ => unreachable!("This enum is empty and can't exist.") }); } - if !has_c_packets { - c_id_match_contents.extend(quote! { + if !has_clientbound_packets { + clientbound_id_match_contents.extend(quote! { _ => unreachable!("This enum is empty and can't exist.") }); - c_write_match_contents.extend(quote! { + clientbound_write_match_contents.extend(quote! { _ => unreachable!("This enum is empty and can't exist.") }); } @@ -310,33 +314,33 @@ pub fn declare_state_packets(input: TokenStream) -> TokenStream { #mod_and_use_statements_contents #[derive(Clone, Debug)] - pub enum #s_state_name + pub enum #clientbound_state_name where - Self: Sized, + Self: Sized, { - #s_enum_contents + #clientbound_enum_contents } #[derive(Clone, Debug)] - pub enum #c_state_name + pub enum #serverbound_state_name where - Self: Sized, + Self: Sized, { - #c_enum_contents + #serverbound_enum_contents } }; contents.extend(quote! { #[allow(unreachable_code)] - impl crate::packets::ProtocolPacket for #s_state_name { + impl crate::packets::ProtocolPacket for #serverbound_state_name { fn id(&self) -> u32 { match self { - #s_id_match_contents + #serverbound_id_match_contents } } fn write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { match self { - #s_write_match_contents + #serverbound_write_match_contents } } @@ -344,20 +348,20 @@ pub fn declare_state_packets(input: TokenStream) -> TokenStream { fn read( id: u32, buf: &mut std::io::Cursor<&[u8]>, - ) -> Result<#s_state_name, Box> + ) -> Result<#serverbound_state_name, Box> where Self: Sized, { Ok(match id { - #s_read_match_contents + #serverbound_read_match_contents _ => return Err(Box::new(crate::read::ReadPacketError::UnknownPacketId { state_name: #state_name_litstr.to_string(), id })), }) } } - impl crate::packets::Packet<#s_state_name> for #s_state_name { + impl crate::packets::Packet<#serverbound_state_name> for #serverbound_state_name { /// No-op, exists so you can pass a packet enum when a Packet<> is expected. - fn into_variant(self) -> #s_state_name { + fn into_variant(self) -> #serverbound_state_name { self } } @@ -365,16 +369,16 @@ pub fn declare_state_packets(input: TokenStream) -> TokenStream { contents.extend(quote! { #[allow(unreachable_code)] - impl crate::packets::ProtocolPacket for #c_state_name { + impl crate::packets::ProtocolPacket for #clientbound_state_name { fn id(&self) -> u32 { match self { - #c_id_match_contents + #clientbound_id_match_contents } } fn write(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { match self { - #c_write_match_contents + #clientbound_write_match_contents } } @@ -382,12 +386,12 @@ pub fn declare_state_packets(input: TokenStream) -> TokenStream { fn read( id: u32, buf: &mut std::io::Cursor<&[u8]>, - ) -> Result<#c_state_name, Box> + ) -> Result<#clientbound_state_name, Box> where Self: Sized, { Ok(match id { - #c_read_match_contents + #clientbound_read_match_contents _ => return Err(Box::new(crate::read::ReadPacketError::UnknownPacketId { state_name: #state_name_litstr.to_string(), id })), }) } @@ -407,3 +411,48 @@ fn variant_name_from(name: &syn::Ident) -> syn::Ident { } syn::Ident::new(&variant_name, name.span()) } + +fn packet_name_to_struct_name(name: &syn::Ident, direction: &str) -> syn::Ident { + let struct_name_snake = format!("{direction}_{name}"); + let struct_name = to_camel_case(&struct_name_snake); + syn::Ident::new(&struct_name, name.span()) +} +fn packet_name_to_module_name(name: &syn::Ident, direction: &str) -> syn::Ident { + let module_name_snake = format!("{}_{name}", direction.chars().next().unwrap()); + let module_name = to_snake_case(&module_name_snake); + syn::Ident::new(&module_name, name.span()) +} +fn packet_name_to_variant_name(name: &syn::Ident) -> syn::Ident { + let variant_name = to_camel_case(&name.to_string()); + syn::Ident::new(&variant_name, name.span()) +} + +fn to_camel_case(snake_case: &str) -> String { + let mut camel_case = String::new(); + let mut capitalize_next = true; + for c in snake_case.chars() { + if c == '_' { + capitalize_next = true; + } else { + if capitalize_next { + camel_case.push(c.to_ascii_uppercase()); + } else { + camel_case.push(c); + } + capitalize_next = false; + } + } + camel_case +} +fn to_snake_case(camel_case: &str) -> String { + let mut snake_case = String::new(); + for c in camel_case.chars() { + if c.is_ascii_uppercase() { + snake_case.push('_'); + snake_case.push(c.to_ascii_lowercase()); + } else { + snake_case.push(c); + } + } + snake_case +} diff --git a/azalea-protocol/examples/handshake_proxy.rs b/azalea-protocol/examples/handshake_proxy.rs index 25f0380fa..7d0119d55 100644 --- a/azalea-protocol/examples/handshake_proxy.rs +++ b/azalea-protocol/examples/handshake_proxy.rs @@ -7,7 +7,7 @@ use azalea_protocol::{ connect::Connection, packets::{ handshake::{ - s_client_intention::ServerboundClientIntention, ClientboundHandshakePacket, + s_intention::ServerboundIntention, ClientboundHandshakePacket, ServerboundHandshakePacket, }, login::{s_hello::ServerboundHello, ServerboundLoginPacket}, @@ -74,7 +74,7 @@ async fn handle_connection(stream: TcpStream) -> anyhow::Result<()> { // the server or is going to join the game. let intent = match conn.read().await { Ok(packet) => match packet { - ServerboundHandshakePacket::ClientIntention(packet) => { + ServerboundHandshakePacket::Intention(packet) => { info!( "New connection: {0}, Version {1}, {2:?}", ip.ip(), @@ -100,21 +100,17 @@ async fn handle_connection(stream: TcpStream) -> anyhow::Result<()> { match conn.read().await { Ok(p) => match p { ServerboundStatusPacket::StatusRequest(_) => { - conn.write( - ClientboundStatusResponse { - description: PROXY_DESC.into(), - favicon: PROXY_FAVICON.clone(), - players: PROXY_PLAYERS.clone(), - version: PROXY_VERSION.clone(), - enforces_secure_chat: PROXY_SECURE_CHAT, - } - .into(), - ) + conn.write(ClientboundStatusResponse { + description: PROXY_DESC.into(), + favicon: PROXY_FAVICON.clone(), + players: PROXY_PLAYERS.clone(), + version: PROXY_VERSION.clone(), + enforces_secure_chat: PROXY_SECURE_CHAT, + }) .await?; } ServerboundStatusPacket::PingRequest(p) => { - conn.write(ClientboundPongResponse { time: p.time }.into()) - .await?; + conn.write(ClientboundPongResponse { time: p.time }).await?; break; } }, @@ -178,7 +174,7 @@ async fn handle_connection(stream: TcpStream) -> anyhow::Result<()> { async fn transfer( mut inbound: TcpStream, - intent: ServerboundClientIntention, + intent: ServerboundIntention, hello: ServerboundHello, ) -> Result<(), Box> { let outbound = TcpStream::connect(PROXY_ADDR).await?; @@ -189,10 +185,10 @@ async fn transfer( // received earlier to the proxy target let mut outbound_conn: Connection = Connection::wrap(outbound); - outbound_conn.write(intent.into()).await?; + outbound_conn.write(intent).await?; let mut outbound_conn = outbound_conn.login(); - outbound_conn.write(hello.into()).await?; + outbound_conn.write(hello).await?; let mut outbound = outbound_conn.unwrap()?; diff --git a/azalea-protocol/src/common.rs b/azalea-protocol/src/common/client_information.rs similarity index 98% rename from azalea-protocol/src/common.rs rename to azalea-protocol/src/common/client_information.rs index d5b5bf1b8..6f5e05e25 100644 --- a/azalea-protocol/src/common.rs +++ b/azalea-protocol/src/common/client_information.rs @@ -1,5 +1,3 @@ -//! Some serializable data types that are used by several packets. - use azalea_buf::{AzBuf, AzaleaRead, AzaleaWrite}; use azalea_core::bitset::FixedBitSet; use bevy_ecs::component::Component; diff --git a/azalea-protocol/src/common/mod.rs b/azalea-protocol/src/common/mod.rs new file mode 100644 index 000000000..da535b487 --- /dev/null +++ b/azalea-protocol/src/common/mod.rs @@ -0,0 +1,4 @@ +//! Some serializable data types that are used by several packets. + +pub mod client_information; +pub mod server_links; diff --git a/azalea-protocol/src/common/server_links.rs b/azalea-protocol/src/common/server_links.rs new file mode 100644 index 000000000..4aed98f34 --- /dev/null +++ b/azalea-protocol/src/common/server_links.rs @@ -0,0 +1,28 @@ +use azalea_buf::AzBuf; +use azalea_chat::FormattedText; + +#[derive(Clone, Debug, AzBuf)] +pub struct ServerLinkEntry { + pub kind: ServerLinkKind, + pub link: String, +} + +#[derive(Clone, Debug, AzBuf)] +pub enum ServerLinkKind { + Known(KnownLinkKind), + Component(FormattedText), +} + +#[derive(Clone, Copy, Debug, AzBuf)] +pub enum KnownLinkKind { + BugReport, + CommunityGuidelines, + Support, + Status, + Feedback, + Community, + Website, + Forums, + News, + Announcements, +} diff --git a/azalea-protocol/src/lib.rs b/azalea-protocol/src/lib.rs index dc97865ff..fb271433a 100644 --- a/azalea-protocol/src/lib.rs +++ b/azalea-protocol/src/lib.rs @@ -111,6 +111,7 @@ mod tests { packets::{ game::s_chat::{LastSeenMessagesUpdate, ServerboundChat}, login::{s_hello::ServerboundHello, ServerboundLoginPacket}, + Packet, }, read::{compression_decoder, read_packet}, write::{compression_encoder, serialize_packet, write_packet}, @@ -121,10 +122,9 @@ mod tests { let packet = ServerboundHello { name: "test".to_string(), profile_id: Uuid::nil(), - } - .into(); + }; let mut stream = Vec::new(); - write_packet(&packet, &mut stream, None, &mut None) + write_packet(&packet.into_variant(), &mut stream, None, &mut None) .await .unwrap(); @@ -146,7 +146,7 @@ mod tests { name: "test".to_string(), profile_id: Uuid::nil(), } - .into(); + .into_variant(); let mut stream = Vec::new(); write_packet(&packet, &mut stream, None, &mut None) .await @@ -170,13 +170,16 @@ mod tests { async fn test_read_long_compressed_chat() { let compression_threshold = 256; - let buf = serialize_packet(&ServerboundChat { - message: "a".repeat(256), - timestamp: 0, - salt: 0, - signature: None, - last_seen_messages: LastSeenMessagesUpdate::default(), - }) + let buf = serialize_packet( + &ServerboundChat { + message: "a".repeat(256), + timestamp: 0, + salt: 0, + signature: None, + last_seen_messages: LastSeenMessagesUpdate::default(), + } + .into_variant(), + ) .unwrap(); let buf = compression_encoder(&buf, compression_threshold).unwrap(); diff --git a/azalea-protocol/src/packets/config/c_custom_report_details.rs b/azalea-protocol/src/packets/config/c_custom_report_details.rs new file mode 100644 index 000000000..5fa375d04 --- /dev/null +++ b/azalea-protocol/src/packets/config/c_custom_report_details.rs @@ -0,0 +1,9 @@ +use std::collections::HashMap; + +use azalea_buf::AzBuf; +use azalea_protocol_macros::ClientboundConfigPacket; + +#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] +pub struct ClientboundCustomReportDetails { + pub details: HashMap, +} diff --git a/azalea-protocol/src/packets/config/c_server_links.rs b/azalea-protocol/src/packets/config/c_server_links.rs new file mode 100644 index 000000000..3420e5920 --- /dev/null +++ b/azalea-protocol/src/packets/config/c_server_links.rs @@ -0,0 +1,9 @@ +use azalea_buf::AzBuf; +use azalea_protocol_macros::ClientboundConfigPacket; + +use crate::common::server_links::ServerLinkEntry; + +#[derive(Clone, Debug, AzBuf, ClientboundConfigPacket)] +pub struct ClientboundServerLinks { + pub links: Vec, +} diff --git a/azalea-protocol/src/packets/config/mod.rs b/azalea-protocol/src/packets/config/mod.rs index da7a14fad..a3f02503c 100755 --- a/azalea-protocol/src/packets/config/mod.rs +++ b/azalea-protocol/src/packets/config/mod.rs @@ -1,32 +1,36 @@ +// NOTE: This file is generated automatically by codegen/packet.py. +// Don't edit it directly! + use azalea_protocol_macros::declare_state_packets; -declare_state_packets!( - ConfigPacket, - Serverbound => [ - s_client_information::ServerboundClientInformation, - s_cookie_response::ServerboundCookieResponse, - s_custom_payload::ServerboundCustomPayload, - s_finish_configuration::ServerboundFinishConfiguration, - s_keep_alive::ServerboundKeepAlive, - s_pong::ServerboundPong, - s_resource_pack::ServerboundResourcePack, - s_select_known_packs::ServerboundSelectKnownPacks, - ], +declare_state_packets!(ConfigPacket, Clientbound => [ - c_cookie_request::ClientboundCookieRequest, - c_custom_payload::ClientboundCustomPayload, - c_disconnect::ClientboundDisconnect, - c_finish_configuration::ClientboundFinishConfiguration, - c_keep_alive::ClientboundKeepAlive, - c_ping::ClientboundPing, - c_reset_chat::ClientboundResetChat, - c_registry_data::ClientboundRegistryData, - c_resource_pack_pop::ClientboundResourcePackPop, - c_resource_pack_push::ClientboundResourcePackPush, - c_store_cookie::ClientboundStoreCookie, - c_transfer::ClientboundTransfer, - c_update_enabled_features::ClientboundUpdateEnabledFeatures, - c_update_tags::ClientboundUpdateTags, - c_select_known_packs::ClientboundSelectKnownPacks, + keep_alive, + registry_data, + reset_chat, + resource_pack_pop, + resource_pack_push, + select_known_packs, + server_links, + disconnect, + finish_configuration, + ping, + cookie_request, + update_enabled_features, + update_tags, + transfer, + store_cookie, + custom_payload, + custom_report_details, + ], + Serverbound => [ + keep_alive, + resource_pack, + select_known_packs, + finish_configuration, + client_information, + cookie_response, + pong, + custom_payload, ] ); diff --git a/azalea-protocol/src/packets/config/s_client_information.rs b/azalea-protocol/src/packets/config/s_client_information.rs index 614890ffd..d58ce5022 100644 --- a/azalea-protocol/src/packets/config/s_client_information.rs +++ b/azalea-protocol/src/packets/config/s_client_information.rs @@ -1,7 +1,7 @@ use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundConfigPacket; -use crate::common::ClientInformation; +use crate::common::client_information::ClientInformation; #[derive(Clone, Debug, AzBuf, ServerboundConfigPacket, PartialEq, Eq)] pub struct ServerboundClientInformation { diff --git a/azalea-protocol/src/packets/game/c_bundle.rs b/azalea-protocol/src/packets/game/c_bundle_delimiter.rs similarity index 76% rename from azalea-protocol/src/packets/game/c_bundle.rs rename to azalea-protocol/src/packets/game/c_bundle_delimiter.rs index f9379b976..cda33d1b7 100644 --- a/azalea-protocol/src/packets/game/c_bundle.rs +++ b/azalea-protocol/src/packets/game/c_bundle_delimiter.rs @@ -2,4 +2,4 @@ use azalea_buf::AzBuf; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] -pub struct ClientboundBundle {} +pub struct ClientboundBundleDelimiter; diff --git a/azalea-protocol/src/packets/game/c_move_minecart.rs b/azalea-protocol/src/packets/game/c_move_minecart_along_track.rs similarity index 89% rename from azalea-protocol/src/packets/game/c_move_minecart.rs rename to azalea-protocol/src/packets/game/c_move_minecart_along_track.rs index becf52422..0a205ddde 100644 --- a/azalea-protocol/src/packets/game/c_move_minecart.rs +++ b/azalea-protocol/src/packets/game/c_move_minecart_along_track.rs @@ -3,7 +3,7 @@ use azalea_core::position::Vec3; use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] -pub struct ClientboundMoveMinecart { +pub struct ClientboundMoveMinecartAlongTrack { #[var] pub entity_id: u32, pub lerp_steps: Vec, diff --git a/azalea-protocol/src/packets/game/c_server_links.rs b/azalea-protocol/src/packets/game/c_server_links.rs index e41a60905..80c444f02 100644 --- a/azalea-protocol/src/packets/game/c_server_links.rs +++ b/azalea-protocol/src/packets/game/c_server_links.rs @@ -1,34 +1,9 @@ use azalea_buf::AzBuf; -use azalea_chat::FormattedText; use azalea_protocol_macros::ClientboundGamePacket; +use crate::common::server_links::ServerLinkEntry; + #[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundServerLinks { pub links: Vec, } - -#[derive(Clone, Debug, AzBuf)] -pub struct ServerLinkEntry { - pub kind: ServerLinkKind, - pub link: String, -} - -#[derive(Clone, Debug, AzBuf)] -pub enum ServerLinkKind { - Known(KnownLinkKind), - Component(FormattedText), -} - -#[derive(Clone, Copy, Debug, AzBuf)] -pub enum KnownLinkKind { - BugReport, - CommunityGuidelines, - Support, - Status, - Feedback, - Community, - Website, - Forums, - News, - Announcements, -} diff --git a/azalea-protocol/src/packets/game/mod.rs b/azalea-protocol/src/packets/game/mod.rs index a1b6505fe..b5bdb2b23 100755 --- a/azalea-protocol/src/packets/game/mod.rs +++ b/azalea-protocol/src/packets/game/mod.rs @@ -1,202 +1,204 @@ -use azalea_protocol_macros::declare_state_packets; +// NOTE: This file is generated automatically by codegen/packet.py. +// Don't edit it directly! -// see GameProtocols.java in the decompiled vanilla source +use azalea_protocol_macros::declare_state_packets; -declare_state_packets!( - GamePacket, - Serverbound => [ - s_accept_teleportation::ServerboundAcceptTeleportation, - s_block_entity_tag_query::ServerboundBlockEntityTagQuery, - s_select_bundle_item::ServerboundSelectBundleItem, - s_change_difficulty::ServerboundChangeDifficulty, - s_chat_ack::ServerboundChatAck, - s_chat_command::ServerboundChatCommand, - s_chat_command_signed::ServerboundChatCommandSigned, - s_chat::ServerboundChat, - s_chat_session_update::ServerboundChatSessionUpdate, - s_chunk_batch_received::ServerboundChunkBatchReceived, - s_client_command::ServerboundClientCommand, - s_client_tick_end::ServerboundTickEnd, - s_client_information::ServerboundClientInformation, - s_command_suggestion::ServerboundCommandSuggestion, - s_configuration_acknowledged::ServerboundConfigurationAcknowledged, - s_container_button_click::ServerboundContainerButtonClick, - s_container_click::ServerboundContainerClick, - s_container_close::ServerboundContainerClose, - s_container_slot_state_changed::ServerboundContainerSlotStateChanged, - s_cookie_response::ServerboundCookieResponse, - s_custom_payload::ServerboundCustomPayload, - s_debug_sample_subscription::ServerboundDebugSampleSubscription, - s_edit_book::ServerboundEditBook, - s_entity_tag_query::ServerboundEntityTagQuery, - s_interact::ServerboundInteract, - s_jigsaw_generate::ServerboundJigsawGenerate, - s_keep_alive::ServerboundKeepAlive, - s_lock_difficulty::ServerboundLockDifficulty, - s_move_player_pos::ServerboundMovePlayerPos, - s_move_player_pos_rot::ServerboundMovePlayerPosRot, - s_move_player_rot::ServerboundMovePlayerRot, - s_move_player_status_only::ServerboundMovePlayerStatusOnly, - s_move_vehicle::ServerboundMoveVehicle, - s_paddle_boat::ServerboundPaddleBoat, - s_pick_item::ServerboundPickItem, - s_ping_request::ServerboundPingRequest, - s_place_recipe::ServerboundPlaceRecipe, - s_player_abilities::ServerboundPlayerAbilities, - s_player_action::ServerboundPlayerAction, - s_player_command::ServerboundPlayerCommand, - s_player_input::ServerboundPlayerInput, - s_pong::ServerboundPong, - s_recipe_book_change_settings::ServerboundRecipeBookChangeSettings, - s_recipe_book_seen_recipe::ServerboundRecipeBookSeenRecipe, - s_rename_item::ServerboundRenameItem, - s_resource_pack::ServerboundResourcePack, - s_seen_advancements::ServerboundSeenAdvancements, - s_select_trade::ServerboundSelectTrade, - s_set_beacon::ServerboundSetBeacon, - s_set_carried_item::ServerboundSetCarriedItem, - s_set_command_block::ServerboundSetCommandBlock, - s_set_command_minecart::ServerboundSetCommandMinecart, - s_set_creative_mode_slot::ServerboundSetCreativeModeSlot, - s_set_jigsaw_block::ServerboundSetJigsawBlock, - s_set_structure_block::ServerboundSetStructureBlock, - s_sign_update::ServerboundSignUpdate, - s_swing::ServerboundSwing, - s_teleport_to_entity::ServerboundTeleportToEntity, - s_use_item_on::ServerboundUseItemOn, - s_use_item::ServerboundUseItem, - ], +declare_state_packets!(GamePacket, Clientbound => [ - c_bundle::ClientboundBundle, - c_add_entity::ClientboundAddEntity, - c_add_experience_orb::ClientboundAddExperienceOrb, - c_animate::ClientboundAnimate, - c_award_stats::ClientboundAwardStats, - c_block_changed_ack::ClientboundBlockChangedAck, - c_block_destruction::ClientboundBlockDestruction, - c_block_entity_data::ClientboundBlockEntityData, - c_block_event::ClientboundBlockEvent, - c_block_update::ClientboundBlockUpdate, - c_boss_event::ClientboundBossEvent, - c_change_difficulty::ClientboundChangeDifficulty, - c_chunk_batch_finished::ClientboundChunkBatchFinished, - c_chunk_batch_start::ClientboundChunkBatchStart, - c_chunks_biomes::ClientboundChunksBiomes, - c_clear_titles::ClientboundClearTitles, - c_command_suggestions::ClientboundCommandSuggestions, - c_commands::ClientboundCommands, - c_container_close::ClientboundContainerClose, - c_container_set_content::ClientboundContainerSetContent, - c_container_set_data::ClientboundContainerSetData, - c_container_set_slot::ClientboundContainerSetSlot, - c_cookie_request::ClientboundCookieRequest, - c_cooldown::ClientboundCooldown, - c_custom_chat_completions::ClientboundCustomChatCompletions, - c_custom_payload::ClientboundCustomPayload, - c_damage_event::ClientboundDamageEvent, - c_debug_sample::ClientboundDebugSample, - c_delete_chat::ClientboundDeleteChat, - c_disconnect::ClientboundDisconnect, - c_disguised_chat::ClientboundDisguisedChat, - c_entity_event::ClientboundEntityEvent, - c_entity_position_sync::ClientboundEntityPositionSync, - c_explode::ClientboundExplode, - c_forget_level_chunk::ClientboundForgetLevelChunk, - c_game_event::ClientboundGameEvent, - c_horse_screen_open::ClientboundHorseScreenOpen, - c_hurt_animation::ClientboundHurtAnimation, - c_initialize_border::ClientboundInitializeBorder, - c_keep_alive::ClientboundKeepAlive, - c_level_chunk_with_light::ClientboundLevelChunkWithLight, - c_level_event::ClientboundLevelEvent, - c_level_particles::ClientboundLevelParticles, - c_light_update::ClientboundLightUpdate, - c_login::ClientboundLogin, - c_map_item_data::ClientboundMapItemData, - c_merchant_offers::ClientboundMerchantOffers, - c_move_entity_pos::ClientboundMoveEntityPos, - c_move_entity_pos_rot::ClientboundMoveEntityPosRot, - c_move_minecart::ClientboundMoveMinecart, - c_move_entity_rot::ClientboundMoveEntityRot, - c_move_vehicle::ClientboundMoveVehicle, - c_open_book::ClientboundOpenBook, - c_open_screen::ClientboundOpenScreen, - c_open_sign_editor::ClientboundOpenSignEditor, - c_ping::ClientboundPing, - c_pong_response::ClientboundPongResponse, - c_place_ghost_recipe::ClientboundPlaceGhostRecipe, - c_player_abilities::ClientboundPlayerAbilities, - c_player_chat::ClientboundPlayerChat, - c_player_combat_end::ClientboundPlayerCombatEnd, - c_player_combat_enter::ClientboundPlayerCombatEnter, - c_player_combat_kill::ClientboundPlayerCombatKill, - c_player_info_remove::ClientboundPlayerInfoRemove, - c_player_info_update::ClientboundPlayerInfoUpdate, - c_player_look_at::ClientboundPlayerLookAt, - c_player_position::ClientboundPlayerPosition, - c_player_rotation::ClientboundPlayerRotation, - c_recipe_book_add::ClientboundRecipeBookAdd, - c_recipe_book_remove::ClientboundRecipeBookRemove, - c_recipe_book_settings::ClientboundRecipeBookSettings, - c_remove_entities::ClientboundRemoveEntities, - c_remove_mob_effect::ClientboundRemoveMobEffect, - c_reset_score::ClientboundResetScore, - c_resource_pack_pop::ClientboundResourcePackPop, - c_resource_pack_push::ClientboundResourcePackPush, - c_respawn::ClientboundRespawn, - c_rotate_head::ClientboundRotateHead, - c_section_blocks_update::ClientboundSectionBlocksUpdate, - c_select_advancements_tab::ClientboundSelectAdvancementsTab, - c_server_data::ClientboundServerData, - c_set_action_bar_text::ClientboundSetActionBarText, - c_set_border_center::ClientboundSetBorderCenter, - c_set_border_lerp_size::ClientboundSetBorderLerpSize, - c_set_border_size::ClientboundSetBorderSize, - c_set_border_warning_delay::ClientboundSetBorderWarningDelay, - c_set_border_warning_distance::ClientboundSetBorderWarningDistance, - c_set_camera::ClientboundSetCamera, - c_set_chunk_cache_center::ClientboundSetChunkCacheCenter, - c_set_chunk_cache_radius::ClientboundSetChunkCacheRadius, - c_set_cursor_item::ClientboundSetCursorItem, - c_set_default_spawn_position::ClientboundSetDefaultSpawnPosition, - c_set_display_objective::ClientboundSetDisplayObjective, - c_set_entity_data::ClientboundSetEntityData, - c_set_entity_link::ClientboundSetEntityLink, - c_set_entity_motion::ClientboundSetEntityMotion, - c_set_equipment::ClientboundSetEquipment, - c_set_experience::ClientboundSetExperience, - c_set_health::ClientboundSetHealth, - c_set_held_slot::ClientboundSetHeldSlot, - c_set_objective::ClientboundSetObjective, - c_set_passengers::ClientboundSetPassengers, - c_set_player_inventory::ClientboundSetPlayerInventory, - c_set_player_team::ClientboundSetPlayerTeam, - c_set_score::ClientboundSetScore, - c_set_simulation_distance::ClientboundSetSimulationDistance, - c_set_subtitle_text::ClientboundSetSubtitleText, - c_set_time::ClientboundSetTime, - c_set_title_text::ClientboundSetTitleText, - c_set_titles_animation::ClientboundSetTitlesAnimation, - c_sound_entity::ClientboundSoundEntity, - c_sound::ClientboundSound, - c_start_configuration::ClientboundStartConfiguration, - c_stop_sound::ClientboundStopSound, - c_store_cookie::ClientboundStoreCookie, - c_system_chat::ClientboundSystemChat, - c_tab_list::ClientboundTabList, - c_tag_query::ClientboundTagQuery, - c_take_item_entity::ClientboundTakeItemEntity, - c_teleport_entity::ClientboundTeleportEntity, - c_ticking_state::ClientboundTickingState, - c_ticking_step::ClientboundTickingStep, - c_transfer::ClientboundTransfer, - c_update_advancements::ClientboundUpdateAdvancements, - c_update_attributes::ClientboundUpdateAttributes, - c_update_mob_effect::ClientboundUpdateMobEffect, - c_update_recipes::ClientboundUpdateRecipes, - c_update_tags::ClientboundUpdateTags, - c_projectile_power::ClientboundProjectilePower, - c_custom_report_details::ClientboundCustomReportDetails, - c_server_links::ClientboundServerLinks + damage_event, + game_event, + map_item_data, + tab_list, + tag_query, + take_item_entity, + add_entity, + add_experience_orb, + debug_sample, + delete_chat, + keep_alive, + level_chunk_with_light, + level_event, + level_particles, + merchant_offers, + recipe_book_add, + recipe_book_remove, + recipe_book_settings, + remove_entities, + remove_mob_effect, + reset_score, + resource_pack_pop, + resource_pack_push, + respawn, + section_blocks_update, + select_advancements_tab, + server_data, + server_links, + set_action_bar_text, + set_border_center, + set_border_lerp_size, + set_border_size, + set_border_warning_delay, + set_border_warning_distance, + set_camera, + set_chunk_cache_center, + set_chunk_cache_radius, + set_cursor_item, + set_default_spawn_position, + set_display_objective, + set_entity_data, + set_entity_link, + set_entity_motion, + set_equipment, + set_experience, + set_health, + set_held_slot, + set_objective, + set_passengers, + set_player_inventory, + set_player_team, + set_score, + set_simulation_distance, + set_subtitle_text, + set_time, + set_title_text, + set_titles_animation, + teleport_entity, + change_difficulty, + chunk_batch_finished, + chunk_batch_start, + chunks_biomes, + disconnect, + disguised_chat, + light_update, + ping, + ticking_state, + ticking_step, + block_changed_ack, + block_destruction, + block_entity_data, + block_event, + block_update, + clear_titles, + place_ghost_recipe, + player_abilities, + player_chat, + player_combat_end, + player_combat_enter, + player_combat_kill, + player_info_remove, + player_info_update, + player_look_at, + player_position, + player_rotation, + animate, + entity_event, + entity_position_sync, + initialize_border, + boss_event, + command_suggestions, + commands, + container_close, + container_set_content, + container_set_data, + container_set_slot, + cookie_request, + cooldown, + forget_level_chunk, + horse_screen_open, + login, + move_entity_pos, + move_entity_pos_rot, + move_entity_rot, + move_minecart_along_track, + move_vehicle, + pong_response, + rotate_head, + sound, + sound_entity, + open_book, + open_screen, + open_sign_editor, + update_advancements, + update_attributes, + update_mob_effect, + update_recipes, + update_tags, + projectile_power, + transfer, + start_configuration, + stop_sound, + store_cookie, + bundle_delimiter, + custom_chat_completions, + custom_payload, + custom_report_details, + hurt_animation, + award_stats, + explode, + system_chat, + ], + Serverbound => [ + paddle_boat, + accept_teleportation, + edit_book, + debug_sample_subscription, + keep_alive, + recipe_book_change_settings, + recipe_book_seen_recipe, + rename_item, + resource_pack, + seen_advancements, + select_trade, + set_beacon, + set_carried_item, + set_command_block, + set_command_minecart, + set_creative_mode_slot, + set_jigsaw_block, + set_structure_block, + teleport_to_entity, + change_difficulty, + chat, + chat_ack, + chat_command, + chat_command_signed, + chat_session_update, + chunk_batch_received, + jigsaw_generate, + pick_item_from_block, + pick_item_from_entity, + ping_request, + sign_update, + block_entity_tag_query, + client_command, + client_information, + client_tick_end, + place_recipe, + player_abilities, + player_action, + player_command, + player_input, + player_loaded, + entity_tag_query, + interact, + command_suggestion, + configuration_acknowledged, + container_button_click, + container_click, + container_close, + container_slot_state_changed, + cookie_response, + lock_difficulty, + move_player_pos, + move_player_pos_rot, + move_player_rot, + move_player_status_only, + move_vehicle, + pong, + use_item, + use_item_on, + bundle_item_selected, + custom_payload, + swing, ] ); diff --git a/azalea-protocol/src/packets/game/s_select_bundle_item.rs b/azalea-protocol/src/packets/game/s_bundle_item_selected.rs similarity index 82% rename from azalea-protocol/src/packets/game/s_select_bundle_item.rs rename to azalea-protocol/src/packets/game/s_bundle_item_selected.rs index 727cfc5a2..552e51f86 100644 --- a/azalea-protocol/src/packets/game/s_select_bundle_item.rs +++ b/azalea-protocol/src/packets/game/s_bundle_item_selected.rs @@ -2,7 +2,7 @@ use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] -pub struct ServerboundSelectBundleItem { +pub struct ServerboundBundleItemSelected { #[var] pub slot_id: i32, #[var] diff --git a/azalea-protocol/src/packets/game/s_client_information.rs b/azalea-protocol/src/packets/game/s_client_information.rs index 7844239f6..5861212c7 100755 --- a/azalea-protocol/src/packets/game/s_client_information.rs +++ b/azalea-protocol/src/packets/game/s_client_information.rs @@ -1,7 +1,7 @@ use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; -use crate::common::ClientInformation; +use crate::common::client_information::ClientInformation; #[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] pub struct ServerboundClientInformation { diff --git a/azalea-protocol/src/packets/game/s_client_tick_end.rs b/azalea-protocol/src/packets/game/s_client_tick_end.rs index 71ee54ba6..d8d930498 100644 --- a/azalea-protocol/src/packets/game/s_client_tick_end.rs +++ b/azalea-protocol/src/packets/game/s_client_tick_end.rs @@ -2,4 +2,4 @@ use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] -pub struct ServerboundTickEnd {} +pub struct ServerboundClientTickEnd {} diff --git a/azalea-protocol/src/packets/game/s_pick_item.rs b/azalea-protocol/src/packets/game/s_pick_item_from_block.rs similarity index 79% rename from azalea-protocol/src/packets/game/s_pick_item.rs rename to azalea-protocol/src/packets/game/s_pick_item_from_block.rs index 289da6e70..d923646bb 100755 --- a/azalea-protocol/src/packets/game/s_pick_item.rs +++ b/azalea-protocol/src/packets/game/s_pick_item_from_block.rs @@ -2,7 +2,7 @@ use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] -pub struct ServerboundPickItem { +pub struct ServerboundPickItemFromBlock { #[var] pub slot: u32, } diff --git a/azalea-protocol/src/packets/game/s_pick_item_from_entity.rs b/azalea-protocol/src/packets/game/s_pick_item_from_entity.rs new file mode 100644 index 000000000..420320631 --- /dev/null +++ b/azalea-protocol/src/packets/game/s_pick_item_from_entity.rs @@ -0,0 +1,9 @@ +use azalea_buf::AzBuf; +use azalea_protocol_macros::ServerboundGamePacket; + +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] +pub struct ServerboundPickItemFromEntity { + #[var] + pub id: u32, + pub include_data: bool, +} diff --git a/azalea-protocol/src/packets/game/s_player_loaded.rs b/azalea-protocol/src/packets/game/s_player_loaded.rs new file mode 100644 index 000000000..3e809b269 --- /dev/null +++ b/azalea-protocol/src/packets/game/s_player_loaded.rs @@ -0,0 +1,5 @@ +use azalea_buf::AzBuf; +use azalea_protocol_macros::ServerboundGamePacket; + +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] +pub struct ServerboundPlayerLoaded; diff --git a/azalea-protocol/src/packets/handshake/mod.rs b/azalea-protocol/src/packets/handshake/mod.rs index bb4e40f68..90a312e7e 100755 --- a/azalea-protocol/src/packets/handshake/mod.rs +++ b/azalea-protocol/src/packets/handshake/mod.rs @@ -1,9 +1,12 @@ +// NOTE: This file is generated automatically by codegen/packet.py. +// Don't edit it directly! + use azalea_protocol_macros::declare_state_packets; -declare_state_packets!( - HandshakePacket, - Serverbound => [ - s_client_intention::ServerboundClientIntention, +declare_state_packets!(HandshakePacket, + Clientbound => [ ], - Clientbound => [] + Serverbound => [ + intention, + ] ); diff --git a/azalea-protocol/src/packets/handshake/s_client_intention.rs b/azalea-protocol/src/packets/handshake/s_intention.rs similarity index 89% rename from azalea-protocol/src/packets/handshake/s_client_intention.rs rename to azalea-protocol/src/packets/handshake/s_intention.rs index 48fb28641..566ada308 100755 --- a/azalea-protocol/src/packets/handshake/s_client_intention.rs +++ b/azalea-protocol/src/packets/handshake/s_intention.rs @@ -6,7 +6,7 @@ use azalea_protocol_macros::ServerboundHandshakePacket; use crate::packets::ClientIntention; #[derive(Hash, Clone, Debug, AzBuf, ServerboundHandshakePacket)] -pub struct ServerboundClientIntention { +pub struct ServerboundIntention { #[var] pub protocol_version: i32, pub hostname: String, diff --git a/azalea-protocol/src/packets/login/mod.rs b/azalea-protocol/src/packets/login/mod.rs index 6d04b52f0..227415e70 100755 --- a/azalea-protocol/src/packets/login/mod.rs +++ b/azalea-protocol/src/packets/login/mod.rs @@ -1,20 +1,22 @@ +// NOTE: This file is generated automatically by codegen/packet.py. +// Don't edit it directly! + use azalea_protocol_macros::declare_state_packets; -declare_state_packets!( - LoginPacket, - Serverbound => [ - s_hello::ServerboundHello, - s_key::ServerboundKey, - s_custom_query_answer::ServerboundCustomQueryAnswer, - s_login_acknowledged::ServerboundLoginAcknowledged, - s_cookie_response::ServerboundCookieResponse, - ], +declare_state_packets!(LoginPacket, Clientbound => [ - c_login_disconnect::ClientboundLoginDisconnect, - c_hello::ClientboundHello, - c_login_finished::ClientboundLoginFinished, - c_login_compression::ClientboundLoginCompression, - c_custom_query::ClientboundCustomQuery, - c_cookie_request::ClientboundCookieRequest, + hello, + cookie_request, + login_compression, + login_disconnect, + login_finished, + custom_query, + ], + Serverbound => [ + hello, + key, + cookie_response, + login_acknowledged, + custom_query_answer, ] ); diff --git a/azalea-protocol/src/packets/status/mod.rs b/azalea-protocol/src/packets/status/mod.rs index d2e057acc..7bb1ea848 100755 --- a/azalea-protocol/src/packets/status/mod.rs +++ b/azalea-protocol/src/packets/status/mod.rs @@ -1,13 +1,15 @@ +// NOTE: This file is generated automatically by codegen/packet.py. +// Don't edit it directly! + use azalea_protocol_macros::declare_state_packets; -declare_state_packets!( - StatusPacket, - Serverbound => [ - s_status_request::ServerboundStatusRequest, - s_ping_request::ServerboundPingRequest, - ], +declare_state_packets!(StatusPacket, Clientbound => [ - c_status_response::ClientboundStatusResponse, - c_pong_response::ClientboundPongResponse, + pong_response, + status_response, + ], + Serverbound => [ + ping_request, + status_request, ] ); diff --git a/azalea-world/src/chunk_storage.rs b/azalea-world/src/chunk_storage.rs index b4ef35e14..7eb10471f 100755 --- a/azalea-world/src/chunk_storage.rs +++ b/azalea-world/src/chunk_storage.rs @@ -8,7 +8,7 @@ use std::{ }; use azalea_block::BlockState; -use azalea_buf::{BufReadError, AzaleaRead, AzaleaWrite}; +use azalea_buf::{AzaleaRead, AzaleaWrite, BufReadError}; use azalea_core::position::{BlockPos, ChunkBlockPos, ChunkPos, ChunkSectionBlockPos}; use nohash_hasher::IntMap; use parking_lot::RwLock; diff --git a/codegen/genpackets.py b/codegen/genpackets.py new file mode 100755 index 000000000..0f724aebd --- /dev/null +++ b/codegen/genpackets.py @@ -0,0 +1,18 @@ +import lib.code.version +import lib.code.packet +import lib.code.utils +import lib.download +import lib.extract + +def generate(): + version_id = lib.code.version.get_version_id() + packets_report = lib.extract.get_packets_report(version_id) + + lib.code.packet.set_packets(packets_report) + + lib.code.utils.fmt() + + print('Done!') + +if __name__ == '__main__': + generate() diff --git a/codegen/lib/code/packet.py b/codegen/lib/code/packet.py index fa214f4fb..ea657b801 100755 --- a/codegen/lib/code/packet.py +++ b/codegen/lib/code/packet.py @@ -9,179 +9,80 @@ def make_packet_mod_rs_line(packet_id: int, packet_class_name: str): return f' {padded_hex(packet_id)}: {to_snake_case(packet_class_name)}::{to_camel_case(packet_class_name)},' - -def fix_state(state: str): - return {'PLAY': 'game'}.get(state, state.lower()) - - -def generate_packet(burger_packets, mappings: Mappings, target_packet_id, target_packet_direction, target_packet_state): - for packet in burger_packets.values(): - if packet['id'] != target_packet_id: - continue - - direction = packet['direction'].lower() # serverbound or clientbound - state = fix_state(packet['state']) - - if state != target_packet_state or direction != target_packet_direction: - continue - - generated_packet_code = [] - uses = set() - extra_code = [] - - packet_derive_name = f'{to_camel_case(direction)}{to_camel_case(state)}Packet' - - generated_packet_code.append( - f'#[derive(Clone, Debug, AzBuf, {packet_derive_name})]') - uses.add(f'azalea_protocol_macros::{packet_derive_name}') - uses.add(f'azalea_buf::AzBuf') - - obfuscated_class_name = packet['class'].split('.')[0] - class_name = mappings.get_class( - obfuscated_class_name).split('.')[-1] - if '$' in class_name: - class_name, extra_part = class_name.split('$') - if class_name.endswith('Packet'): - class_name = class_name[:- - len('Packet')] + extra_part + 'Packet' - - generated_packet_code.append( - f'pub struct {to_camel_case(class_name)} {{') - - # call burger_instruction_to_code for each instruction - i = -1 - instructions = packet.get('instructions', []) - while (i + 1) < len(instructions): - i += 1 - - if instructions[i]['operation'] == 'write': - skip = burger_instruction_to_code( - instructions, i, generated_packet_code, mappings, obfuscated_class_name, uses, extra_code) - if skip: - i += skip - else: - generated_packet_code.append(f'// TODO: {instructions[i]}') - - generated_packet_code.append('}') - - if uses: - # empty line before the `use` statements - generated_packet_code.insert(0, '') - for use in uses: - generated_packet_code.insert(0, f'use {use};') - for line in extra_code: - generated_packet_code.append(line) - - print(generated_packet_code) - write_packet_file(state, to_snake_case(class_name), - '\n'.join(generated_packet_code)) - print() - +MOJMAP_TO_AZALEA_STATE_NAME_MAPPING = { + # shorter name, i like it more + 'configuration': 'config', + # in the files mojang calls the directory "game" so we do that too + 'play': 'game' +} +AZALEA_TO_MOJMAP_STATE_NAME_MAPPING = {v: k for k, v in MOJMAP_TO_AZALEA_STATE_NAME_MAPPING.items()} + +def generate_packet(packets_report, packet_name, direction, state): + mojmap_state = AZALEA_TO_MOJMAP_STATE_NAME_MAPPING.get(state, state) + _packet_report = packets_report[mojmap_state][direction]['minecraft:' + packet_name] + + code = [] + uses = set() + + packet_derive_name = f'{to_camel_case(direction)}{to_camel_case(state)}Packet' + + packet_struct_name = to_camel_case(f'{direction}_{packet_name}') + packet_module_name = f'{direction[0]}_{packet_name}' + + code.append(f'use azalea_buf::AzBuf;') + code.append(f'use azalea_protocol_macros::{packet_derive_name};') + code.append('') + + code.append( + f'#[derive(Clone, Debug, AzBuf, {packet_derive_name})]') + code.append( + f'pub struct {packet_struct_name} {{') + code.append(' TODO') + code.append('}') + + print(code) + write_packet_file(state, packet_module_name, '\n'.join(code)) + + # this won't handle writing to the packets/{state}/mod.rs file since we'd need to know the full packet list + +def set_packets(packets_report): + for mojmap_state in packets_report: + state = MOJMAP_TO_AZALEA_STATE_NAME_MAPPING.get(mojmap_state, mojmap_state) mod_rs_dir = get_dir_location( f'../azalea-protocol/src/packets/{state}/mod.rs') - with open(mod_rs_dir, 'r') as f: - mod_rs = f.read().splitlines() - - pub_mod_line = f'pub mod {to_snake_case(class_name)};' - if pub_mod_line not in mod_rs: - mod_rs.insert(0, pub_mod_line) - packet_mod_rs_line = make_packet_mod_rs_line( - packet['id'], class_name) - - in_serverbound = False - in_clientbound = False - for i, line in enumerate(mod_rs): - if line.strip() == 'Serverbound => {': - in_serverbound = True - continue - elif line.strip() == 'Clientbound => {': - in_clientbound = True - continue - elif line.strip() in ('}', '},'): - if (in_serverbound and direction == 'serverbound') or (in_clientbound and direction == 'clientbound'): - mod_rs.insert(i, packet_mod_rs_line) - break - in_serverbound = in_clientbound = False - continue - - if line.strip() == '' or line.strip().startswith('//') or (not in_serverbound and direction == 'serverbound') or (not in_clientbound and direction == 'clientbound'): - continue - - line_packet_id_hex = line.strip().split(':')[0] - assert line_packet_id_hex.startswith('0x') - line_packet_id = int(line_packet_id_hex[2:], 16) - if line_packet_id > packet['id']: - mod_rs.insert(i, packet_mod_rs_line) - break - - with open(mod_rs_dir, 'w') as f: - f.write('\n'.join(mod_rs)) - - -def set_packets(packet_ids: list[int], packet_class_names: list[str], direction: str, state: str): - assert len(packet_ids) == len(packet_class_names) - - # ids are repeated - assert len(packet_ids) == len(set(packet_ids)) - - # sort the packets by id - packet_ids, packet_class_names = [list(x) for x in zip( - *sorted(zip(packet_ids, packet_class_names), key=lambda pair: pair[0]))] # type: ignore - - mod_rs_dir = get_dir_location( - f'../azalea-protocol/src/packets/{state}/mod.rs') - with open(mod_rs_dir, 'r') as f: - mod_rs = f.read().splitlines() - new_mod_rs = [] - - required_modules = [] - - ignore_lines = False - - for line in mod_rs: - if line.strip() == 'Serverbound => {': - new_mod_rs.append(line) - if direction == 'serverbound': - ignore_lines = True - for packet_id, packet_class_name in zip(packet_ids, packet_class_names): - new_mod_rs.append( - make_packet_mod_rs_line(packet_id, packet_class_name) - ) - required_modules.append(packet_class_name) - else: - ignore_lines = False - continue - elif line.strip() == 'Clientbound => {': - new_mod_rs.append(line) - if direction == 'clientbound': - ignore_lines = True - for packet_id, packet_class_name in zip(packet_ids, packet_class_names): - new_mod_rs.append( - make_packet_mod_rs_line(packet_id, packet_class_name) - ) - required_modules.append(packet_class_name) - else: - ignore_lines = False - continue - elif line.strip() in ('}', '},'): - ignore_lines = False - elif line.strip().startswith('pub mod '): - continue - - if not ignore_lines: - new_mod_rs.append(line) - # 0x00: c_status_response::ClientboundStatusResponsePacket, - if line.strip().startswith('0x'): - required_modules.append( - line.strip().split(':')[1].split('::')[0].strip()) - - for i, required_module in enumerate(required_modules): - if required_module not in mod_rs: - new_mod_rs.insert(i, f'pub mod {required_module};') - - with open(mod_rs_dir, 'w') as f: - f.write('\n'.join(new_mod_rs)) + serverbound_packets = packet_direction_report_to_packet_names(packets_report[mojmap_state]['serverbound']) + clientbound_packets = packet_direction_report_to_packet_names(packets_report[mojmap_state].get('clientbound', {})) + + code = [] + code.append('// NOTE: This file is generated automatically by codegen/packet.py.') + code.append("// Don't edit it directly!") + code.append('') + code.append('use azalea_protocol_macros::declare_state_packets;') + code.append('') + code.append(f'declare_state_packets!({to_camel_case(state)}Packet,') + code.append(' Clientbound => [') + for packet_name in clientbound_packets: + code.append(f' {packet_name},') + code.append(' ],') + code.append(' Serverbound => [') + for packet_name in serverbound_packets: + code.append(f' {packet_name},') + code.append(' ]') + code.append(');') + code.append('') + + with open(mod_rs_dir, 'w') as f: + f.write('\n'.join(code)) + +def packet_direction_report_to_packet_names(report): + name_to_id = {} + for resource_location, packet in report.items(): + packet_id = packet['protocol_id'] + name_to_id[resource_location.split(':')[-1]] = packet_id + + names_sorted = [name for name in sorted(name_to_id.keys(), key=lambda item: item[1])] + return names_sorted def get_packets(direction: str, state: str): mod_rs_dir = get_dir_location( diff --git a/codegen/lib/code/utils.py b/codegen/lib/code/utils.py index 6c335e2d8..1a87b7f6e 100755 --- a/codegen/lib/code/utils.py +++ b/codegen/lib/code/utils.py @@ -166,8 +166,8 @@ def burger_type_to_rust_type(burger_type, field_name: Optional[str] = None, inst return field_type_rs, is_var, uses, extra_code -def write_packet_file(state, packet_name_snake_case, code): - with open(get_dir_location(f'../azalea-protocol/src/packets/{state}/{packet_name_snake_case}.rs'), 'w') as f: +def write_packet_file(state, packet_module_name, code): + with open(get_dir_location(f'../azalea-protocol/src/packets/{state}/{packet_module_name}.rs'), 'w') as f: f.write(code) diff --git a/codegen/lib/extract.py b/codegen/lib/extract.py index fdd788fe7..4119ad559 100755 --- a/codegen/lib/extract.py +++ b/codegen/lib/extract.py @@ -1,7 +1,7 @@ # Extracting data from the Minecraft jars from typing import TYPE_CHECKING -from lib.download import get_mappings_for_version, get_server_jar, get_burger, get_client_jar, get_pixlyzer, get_yarn_data, get_fabric_api_versions, get_fabric_loader_versions +from lib.download import get_server_jar, get_burger, get_client_jar, get_pixlyzer, get_yarn_data, get_fabric_api_versions, get_fabric_loader_versions from lib.utils import get_dir_location, to_camel_case, upper_first_letter from zipfile import ZipFile import subprocess @@ -23,17 +23,16 @@ def generate_data_from_server_jar(version_id: str): def get_block_states_report(version_id: str): - generate_data_from_server_jar(version_id) - with open(get_dir_location(f'__cache__/generated-{version_id}/reports/blocks.json'), 'r') as f: - return json.load(f) - - + return get_report(version_id, 'blocks') def get_registries_report(version_id: str): + return get_report(version_id, 'registries') +def get_packets_report(version_id: str): + return get_report(version_id, 'packets') +def get_report(version_id: str, name: str): generate_data_from_server_jar(version_id) - with open(get_dir_location(f'__cache__/generated-{version_id}/reports/registries.json'), 'r') as f: + with open(get_dir_location(f'__cache__/generated-{version_id}/reports/{name}.json'), 'r') as f: return json.load(f) - def get_registry_tags(version_id: str, name: str): generate_data_from_server_jar(version_id) tags_directory = get_dir_location(f'__cache__/generated-{version_id}/data/minecraft/tags/{name}') diff --git a/codegen/newpacket.py b/codegen/newpacket.py index d8edcde14..97408e051 100755 --- a/codegen/newpacket.py +++ b/codegen/newpacket.py @@ -5,18 +5,20 @@ import lib.extract import sys -version_id = lib.code.version.get_version_id() +def generate(): + version_id = lib.code.version.get_version_id() -mappings = lib.download.get_mappings_for_version(version_id) -burger_data = lib.extract.get_burger_data_for_version(version_id) + packets_report = lib.extract.get_packets_report(version_id) -burger_packets_data = burger_data[0]['packets']['packet'] -packet_id, direction, state = int(sys.argv[1], 0), sys.argv[2], sys.argv[3] -print( - f'Generating code for packet id: {packet_id} with direction {direction} and state {state}') -lib.code.packet.generate_packet(burger_packets_data, mappings, - packet_id, direction, state) + packet_id, direction, state = sys.argv[1], sys.argv[2], sys.argv[3] + print( + f'Generating code for packet id: {packet_id} with direction {direction} and state {state}') + lib.code.packet.generate_packet(packets_report, packet_id, direction, state) + lib.code.packet.set_packets(packets_report) -lib.code.utils.fmt() + lib.code.utils.fmt() -print('Done!') + print('Done!') + +if __name__ == '__main__': + generate() From d0472484fdaae89ef178212ebab730e14b61247a Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 27 Nov 2024 05:11:42 +0000 Subject: [PATCH 12/18] implement #[limit(i)] attribute for AzBuf derive macro --- azalea-buf/azalea-buf-macros/src/lib.rs | 2 +- azalea-buf/azalea-buf-macros/src/read.rs | 46 +++++++++++++++++++- azalea-buf/src/lib.rs | 2 +- azalea-buf/src/read.rs | 15 +++++++ azalea-protocol/src/packets/login/s_hello.rs | 1 + 5 files changed, 62 insertions(+), 4 deletions(-) diff --git a/azalea-buf/azalea-buf-macros/src/lib.rs b/azalea-buf/azalea-buf-macros/src/lib.rs index 9cdbb8af7..dec624e3d 100755 --- a/azalea-buf/azalea-buf-macros/src/lib.rs +++ b/azalea-buf/azalea-buf-macros/src/lib.rs @@ -19,7 +19,7 @@ pub fn derive_azaleawrite(input: TokenStream) -> TokenStream { write::create_impl_azaleawrite(&ident, &data).into() } -#[proc_macro_derive(AzBuf, attributes(var))] +#[proc_macro_derive(AzBuf, attributes(var, limit))] pub fn derive_azbuf(input: TokenStream) -> TokenStream { let DeriveInput { ident, data, .. } = parse_macro_input!(input); diff --git a/azalea-buf/azalea-buf-macros/src/read.rs b/azalea-buf/azalea-buf-macros/src/read.rs index 5ab2449a9..c093d4a19 100644 --- a/azalea-buf/azalea-buf-macros/src/read.rs +++ b/azalea-buf/azalea-buf-macros/src/read.rs @@ -9,14 +9,35 @@ fn read_named_fields( .map(|f| { let field_name = &f.ident; let field_type = &f.ty; + + let is_variable_length = f.attrs.iter().any(|a| a.path().is_ident("var")); + let limit = f + .attrs + .iter() + .find(|a| a.path().is_ident("limit")) + .map(|a| { + a.parse_args::() + .unwrap() + .base10_parse::() + .unwrap() + }); + + if is_variable_length && limit.is_some() { + panic!("Fields cannot have both var and limit attributes"); + } + // do a different buf.write_* for each field depending on the type // if it's a string, use buf.write_string match field_type { syn::Type::Path(_) | syn::Type::Array(_) => { - if f.attrs.iter().any(|a| a.path().is_ident("var")) { + if is_variable_length { quote! { let #field_name = azalea_buf::AzaleaReadVar::azalea_read_var(buf)?; } + } else if let Some(limit) = limit { + quote! { + let #field_name = azalea_buf::AzaleaReadLimited::azalea_read_limited(buf, #limit)?; + } } else { quote! { let #field_name = azalea_buf::AzaleaRead::azalea_read(buf)?; @@ -108,10 +129,31 @@ pub fn create_impl_azalearead(ident: &Ident, data: &Data) -> proc_macro2::TokenS syn::Fields::Unnamed(fields) => { let mut reader_code = quote! {}; for f in &fields.unnamed { - if f.attrs.iter().any(|attr| attr.path().is_ident("var")) { + let is_variable_length = + f.attrs.iter().any(|a| a.path().is_ident("var")); + let limit = + f.attrs + .iter() + .find(|a| a.path().is_ident("limit")) + .map(|a| { + a.parse_args::() + .unwrap() + .base10_parse::() + .unwrap() + }); + + if is_variable_length && limit.is_some() { + panic!("Fields cannot have both var and limit attributes"); + } + + if is_variable_length { reader_code.extend(quote! { Self::#variant_name(azalea_buf::AzaleaReadVar::azalea_read_var(buf)?), }); + } else if let Some(limit) = limit { + reader_code.extend(quote! { + Self::#variant_name(azalea_buf::AzaleaReadLimited::azalea_read_limited(buf, #limit)?), + }); } else { reader_code.extend(quote! { Self::#variant_name(azalea_buf::AzaleaRead::azalea_read(buf)?), diff --git a/azalea-buf/src/lib.rs b/azalea-buf/src/lib.rs index 3e938ae52..ef3bd3a8f 100755 --- a/azalea-buf/src/lib.rs +++ b/azalea-buf/src/lib.rs @@ -10,7 +10,7 @@ mod write; pub use azalea_buf_macros::*; pub use definitions::*; -pub use read::{AzaleaRead, AzaleaReadVar, BufReadError}; +pub use read::{AzaleaRead, AzaleaReadLimited, AzaleaReadVar, BufReadError}; pub use serializable_uuid::*; pub use write::{AzaleaWrite, AzaleaWriteVar}; diff --git a/azalea-buf/src/read.rs b/azalea-buf/src/read.rs index 879c3f7f2..4353539ae 100755 --- a/azalea-buf/src/read.rs +++ b/azalea-buf/src/read.rs @@ -119,6 +119,16 @@ where fn azalea_read_var(buf: &mut Cursor<&[u8]>) -> Result; } +// note that there's no Write equivalent for this trait since we don't really +// care if we're writing over the limit (and maybe we already know that the +// server implementation accepts it) +pub trait AzaleaReadLimited +where + Self: Sized, +{ + fn azalea_read_limited(buf: &mut Cursor<&[u8]>, limit: usize) -> Result; +} + impl AzaleaRead for i32 { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { Ok(buf.read_i32::()?) @@ -219,6 +229,11 @@ impl AzaleaRead for String { read_utf_with_len(buf, MAX_STRING_LENGTH.into()) } } +impl AzaleaReadLimited for String { + fn azalea_read_limited(buf: &mut Cursor<&[u8]>, limit: usize) -> Result { + read_utf_with_len(buf, limit as u32) + } +} impl AzaleaRead for u32 { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { diff --git a/azalea-protocol/src/packets/login/s_hello.rs b/azalea-protocol/src/packets/login/s_hello.rs index 15d27ce01..bae1947ba 100755 --- a/azalea-protocol/src/packets/login/s_hello.rs +++ b/azalea-protocol/src/packets/login/s_hello.rs @@ -4,6 +4,7 @@ use uuid::Uuid; #[derive(Clone, Debug, PartialEq, Eq, AzBuf, ServerboundLoginPacket)] pub struct ServerboundHello { + #[limit(16)] pub name: String, pub profile_id: Uuid, } From ab12de69f943f4c8acc525e64d2f1b696ea8babc Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 27 Nov 2024 06:07:30 +0000 Subject: [PATCH 13/18] fixes for 1.21.4 --- azalea-client/src/client.rs | 8 + .../src/packet_handling/configuration.rs | 45 +- azalea-physics/src/collision/blocks.rs | 2566 +++++++++-------- azalea-protocol/src/packets/config/mod.rs | 30 +- azalea-protocol/src/packets/game/mod.rs | 218 +- .../src/packets/login/c_cookie_request.rs | 4 +- azalea-protocol/src/packets/login/c_hello.rs | 3 +- azalea-protocol/src/packets/login/mod.rs | 10 +- azalea-protocol/src/packets/status/mod.rs | 4 +- codegen/genblocks.py | 2 +- codegen/lib/code/packet.py | 2 +- codegen/lib/code/shapes.py | 24 +- codegen/migrate.py | 77 +- 13 files changed, 1524 insertions(+), 1469 deletions(-) diff --git a/azalea-client/src/client.rs b/azalea-client/src/client.rs index b9aa47b3f..5158eedf7 100644 --- a/azalea-client/src/client.rs +++ b/azalea-client/src/client.rs @@ -20,6 +20,7 @@ use azalea_protocol::{ common::client_information::ClientInformation, connect::{Connection, ConnectionError, Proxy}, packets::{ + self, config::{ClientboundConfigPacket, ServerboundConfigPacket}, game::ServerboundGamePacket, handshake::{ @@ -463,6 +464,13 @@ impl Client { } ClientboundLoginPacket::CookieRequest(p) => { debug!("Got cookie request {:?}", p); + + conn.write(packets::login::ServerboundCookieResponse { + key: p.key, + // cookies aren't implemented + payload: None, + }) + .await?; } } }; diff --git a/azalea-client/src/packet_handling/configuration.rs b/azalea-client/src/packet_handling/configuration.rs index 3a719ce19..e427e36e4 100644 --- a/azalea-client/src/packet_handling/configuration.rs +++ b/azalea-client/src/packet_handling/configuration.rs @@ -5,7 +5,8 @@ use azalea_protocol::packets::config::s_finish_configuration::ServerboundFinishC use azalea_protocol::packets::config::s_keep_alive::ServerboundKeepAlive; use azalea_protocol::packets::config::s_select_known_packs::ServerboundSelectKnownPacks; use azalea_protocol::packets::config::{ - self, ClientboundConfigPacket, ServerboundConfigPacket, ServerboundResourcePack, + self, ClientboundConfigPacket, ServerboundConfigPacket, ServerboundCookieResponse, + ServerboundResourcePack, }; use azalea_protocol::packets::{ConnectionProtocol, Packet}; use azalea_protocol::read::deserialize_packet; @@ -36,8 +37,8 @@ pub fn send_packet_events( // since otherwise it'd cause issues with events in process_packet_events // running twice packet_events.clear(); - for (player_entity, raw_connection) in &query { - let packets_lock = raw_connection.incoming_packet_queue(); + for (player_entity, raw_conn) in &query { + let packets_lock = raw_conn.incoming_packet_queue(); let mut packets = packets_lock.lock(); if !packets.is_empty() { for raw_packet in packets.iter() { @@ -106,14 +107,14 @@ pub fn process_packet_events(ecs: &mut World) { let mut system_state: SystemState> = SystemState::new(ecs); let mut query = system_state.get_mut(ecs); - let mut raw_connection = query.get_mut(player_entity).unwrap(); + let mut raw_conn = query.get_mut(player_entity).unwrap(); - raw_connection + raw_conn .write_packet(ServerboundFinishConfiguration {}) .expect( "we should be in the right state and encoding this packet shouldn't fail", ); - raw_connection.set_state(ConnectionProtocol::Game); + raw_conn.set_state(ConnectionProtocol::Game); // these components are added now that we're going to be in the Game state ecs.entity_mut(player_entity) @@ -145,13 +146,13 @@ pub fn process_packet_events(ecs: &mut World) { EventWriter, )> = SystemState::new(ecs); let (query, mut keepalive_events) = system_state.get_mut(ecs); - let raw_connection = query.get(player_entity).unwrap(); + let raw_conn = query.get(player_entity).unwrap(); keepalive_events.send(KeepAliveEvent { entity: player_entity, id: p.id, }); - raw_connection + raw_conn .write_packet(ServerboundKeepAlive { id: p.id }) .unwrap(); } @@ -160,9 +161,9 @@ pub fn process_packet_events(ecs: &mut World) { let mut system_state: SystemState> = SystemState::new(ecs); let mut query = system_state.get_mut(ecs); - let raw_connection = query.get_mut(player_entity).unwrap(); + let raw_conn = query.get_mut(player_entity).unwrap(); - raw_connection + raw_conn .write_packet(config::s_pong::ServerboundPong { id: p.id }) .unwrap(); } @@ -171,10 +172,10 @@ pub fn process_packet_events(ecs: &mut World) { let mut system_state: SystemState> = SystemState::new(ecs); let mut query = system_state.get_mut(ecs); - let raw_connection = query.get_mut(player_entity).unwrap(); + let raw_conn = query.get_mut(player_entity).unwrap(); // always accept resource pack - raw_connection + raw_conn .write_packet(ServerboundResourcePack { id: p.id, action: config::s_resource_pack::Action::Accepted, @@ -192,6 +193,18 @@ pub fn process_packet_events(ecs: &mut World) { } ClientboundConfigPacket::CookieRequest(p) => { debug!("Got cookie request packet {p:?}"); + + let mut system_state: SystemState> = SystemState::new(ecs); + let mut query = system_state.get_mut(ecs); + let raw_conn = query.get_mut(player_entity).unwrap(); + + raw_conn + .write_packet(ServerboundCookieResponse { + key: p.key, + // cookies aren't implemented + payload: None, + }) + .unwrap(); } ClientboundConfigPacket::ResetChat(p) => { debug!("Got reset chat packet {p:?}"); @@ -207,10 +220,10 @@ pub fn process_packet_events(ecs: &mut World) { let mut system_state: SystemState> = SystemState::new(ecs); let mut query = system_state.get_mut(ecs); - let raw_connection = query.get_mut(player_entity).unwrap(); + let raw_conn = query.get_mut(player_entity).unwrap(); // resource pack management isn't implemented - raw_connection + raw_conn .write_packet(ServerboundSelectKnownPacks { known_packs: vec![], }) @@ -241,9 +254,9 @@ pub fn handle_send_packet_event( mut query: Query<&mut RawConnection>, ) { for event in send_packet_events.read() { - if let Ok(raw_connection) = query.get_mut(event.sent_by) { + if let Ok(raw_conn) = query.get_mut(event.sent_by) { // debug!("Sending packet: {:?}", event.packet); - if let Err(e) = raw_connection.write_packet(event.packet.clone()) { + if let Err(e) = raw_conn.write_packet(event.packet.clone()) { error!("Failed to send packet: {e}"); } } diff --git a/azalea-physics/src/collision/blocks.rs b/azalea-physics/src/collision/blocks.rs index 8fab8a029..bca7ffdaa 100644 --- a/azalea-physics/src/collision/blocks.rs +++ b/azalea-physics/src/collision/blocks.rs @@ -1,6 +1,6 @@ //! Autogenerated block collisions for every block -// This file is generated from codegen/lib/code/block_shapes.py. If you want to +// This file is generated from codegen/lib/code/shapes.py. If you want to // modify it, change that file. #![allow(clippy::explicit_auto_deref)] @@ -1748,19 +1748,21 @@ impl BlockWithShape for BlockState { } } -static SHAPES_MAP: [&Lazy; 26644] = [ +static SHAPES_MAP: [&Lazy; 27657] = [ &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, @@ -1917,48 +1919,51 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE3, &SHAPE4, - &SHAPE3, &SHAPE4, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE6, - &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE4, &SHAPE3, - &SHAPE4, &SHAPE3, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE5, - &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE5, &SHAPE6, - &SHAPE5, &SHAPE6, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE4, - &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE6, &SHAPE5, - &SHAPE6, &SHAPE5, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE3, - &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE3, &SHAPE4, - &SHAPE3, &SHAPE4, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE6, - &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE4, &SHAPE3, - &SHAPE4, &SHAPE3, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE5, - &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE5, &SHAPE6, - &SHAPE5, &SHAPE6, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE4, - &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE6, &SHAPE5, - &SHAPE6, &SHAPE5, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE3, - &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE3, &SHAPE4, - &SHAPE3, &SHAPE4, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE6, - &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE4, &SHAPE3, - &SHAPE4, &SHAPE3, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE5, - &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE5, &SHAPE6, - &SHAPE5, &SHAPE6, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE4, - &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE6, &SHAPE5, - &SHAPE6, &SHAPE5, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE3, - &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE3, &SHAPE4, - &SHAPE3, &SHAPE4, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE6, - &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE5, + &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE3, &SHAPE4, &SHAPE3, + &SHAPE4, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE6, + &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE4, &SHAPE3, &SHAPE4, + &SHAPE3, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE3, + &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE5, &SHAPE6, &SHAPE5, + &SHAPE6, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE4, + &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE6, &SHAPE5, &SHAPE6, + &SHAPE5, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE5, + &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE3, &SHAPE4, &SHAPE3, + &SHAPE4, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE6, + &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE4, &SHAPE3, &SHAPE4, + &SHAPE3, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE3, + &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE5, &SHAPE6, &SHAPE5, + &SHAPE6, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE4, + &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE6, &SHAPE5, &SHAPE6, + &SHAPE5, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE5, + &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE3, &SHAPE4, &SHAPE3, + &SHAPE4, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE6, + &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE4, &SHAPE3, &SHAPE4, + &SHAPE3, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE3, + &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE5, &SHAPE6, &SHAPE5, + &SHAPE6, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE4, + &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE6, &SHAPE5, &SHAPE6, + &SHAPE5, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE4, &SHAPE3, &SHAPE4, &SHAPE3, &SHAPE5, + &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE6, &SHAPE5, &SHAPE6, &SHAPE5, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE9, &SHAPE10, &SHAPE11, &SHAPE12, &SHAPE13, &SHAPE14, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE9, &SHAPE10, &SHAPE11, &SHAPE12, &SHAPE13, &SHAPE14, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE15, &SHAPE15, &SHAPE16, &SHAPE16, &SHAPE17, &SHAPE17, - &SHAPE18, &SHAPE18, &SHAPE19, &SHAPE19, &SHAPE20, &SHAPE20, &SHAPE21, &SHAPE21, &SHAPE22, - &SHAPE22, &SHAPE23, &SHAPE23, &SHAPE24, &SHAPE24, &SHAPE25, &SHAPE25, &SHAPE26, &SHAPE26, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE9, &SHAPE10, &SHAPE11, &SHAPE12, &SHAPE13, + &SHAPE14, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE9, &SHAPE10, &SHAPE11, &SHAPE12, &SHAPE13, &SHAPE14, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE15, &SHAPE15, &SHAPE16, &SHAPE16, + &SHAPE17, &SHAPE17, &SHAPE18, &SHAPE18, &SHAPE19, &SHAPE19, &SHAPE20, &SHAPE20, &SHAPE21, + &SHAPE21, &SHAPE22, &SHAPE22, &SHAPE23, &SHAPE23, &SHAPE24, &SHAPE24, &SHAPE25, &SHAPE25, + &SHAPE26, &SHAPE26, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, @@ -1984,7 +1989,6 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, @@ -2036,19 +2040,20 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, - &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, - &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, - &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, - &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, - &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, - &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, - &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, - &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, - &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE53, &SHAPE53, &SHAPE54, &SHAPE54, - &SHAPE55, &SHAPE55, &SHAPE53, &SHAPE53, &SHAPE55, &SHAPE55, &SHAPE54, &SHAPE54, &SHAPE53, - &SHAPE53, &SHAPE56, &SHAPE56, &SHAPE57, &SHAPE57, &SHAPE53, &SHAPE53, &SHAPE57, &SHAPE57, - &SHAPE56, &SHAPE56, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, + &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, + &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, + &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, + &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, + &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, + &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, + &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, + &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, + &SHAPE53, &SHAPE53, &SHAPE54, &SHAPE54, &SHAPE55, &SHAPE55, &SHAPE53, &SHAPE53, &SHAPE55, + &SHAPE55, &SHAPE54, &SHAPE54, &SHAPE53, &SHAPE53, &SHAPE56, &SHAPE56, &SHAPE57, &SHAPE57, + &SHAPE53, &SHAPE53, &SHAPE57, &SHAPE57, &SHAPE56, &SHAPE56, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, @@ -2177,11 +2182,10 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE62, &SHAPE62, &SHAPE62, &SHAPE62, &SHAPE62, &SHAPE62, &SHAPE62, &SHAPE62, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE62, &SHAPE62, &SHAPE62, &SHAPE62, &SHAPE62, &SHAPE62, + &SHAPE62, &SHAPE62, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, @@ -2204,38 +2208,42 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, - &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, - &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, - &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, - &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE65, - &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, - &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE64, - &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE67, &SHAPE67, - &SHAPE66, &SHAPE66, &SHAPE64, &SHAPE64, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, - &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, - &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, - &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, - &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, - &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, - &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, - &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, - &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, - &SHAPE47, &SHAPE47, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE64, + &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, + &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, + &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, + &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, + &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, + &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, + &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE64, &SHAPE64, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, + &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, + &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, + &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, + &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, + &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, + &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, + &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, + &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, @@ -2281,6 +2289,14 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, @@ -2305,52 +2321,60 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE69, &SHAPE69, - &SHAPE69, &SHAPE69, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE69, &SHAPE69, &SHAPE69, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE70, - &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE69, - &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE69, &SHAPE69, - &SHAPE69, &SHAPE69, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE69, &SHAPE69, &SHAPE69, - &SHAPE69, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE69, &SHAPE69, &SHAPE69, + &SHAPE69, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE69, + &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE70, + &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE70, &SHAPE70, + &SHAPE70, &SHAPE70, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, - &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, - &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, - &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE65, &SHAPE65, &SHAPE66, - &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, - &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, - &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, - &SHAPE64, &SHAPE64, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE64, &SHAPE64, + &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE65, + &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, + &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, + &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, + &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, + &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, + &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE7, - &SHAPE58, &SHAPE59, &SHAPE8, &SHAPE60, &SHAPE13, &SHAPE61, &SHAPE1, &SHAPE1, &SHAPE71, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE7, &SHAPE58, + &SHAPE59, &SHAPE8, &SHAPE60, &SHAPE13, &SHAPE61, &SHAPE1, &SHAPE1, &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE71, - &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE74, &SHAPE75, &SHAPE74, &SHAPE75, &SHAPE76, - &SHAPE77, &SHAPE76, &SHAPE77, &SHAPE78, &SHAPE79, &SHAPE78, &SHAPE79, &SHAPE80, &SHAPE81, - &SHAPE80, &SHAPE81, &SHAPE82, &SHAPE83, &SHAPE82, &SHAPE83, &SHAPE84, &SHAPE85, &SHAPE84, - &SHAPE85, &SHAPE86, &SHAPE87, &SHAPE86, &SHAPE87, &SHAPE88, &SHAPE89, &SHAPE88, &SHAPE89, - &SHAPE1, &SHAPE61, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE91, &SHAPE92, &SHAPE93, &SHAPE94, &SHAPE95, - &SHAPE96, &SHAPE97, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, + &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE74, &SHAPE75, &SHAPE74, &SHAPE75, &SHAPE76, &SHAPE77, + &SHAPE76, &SHAPE77, &SHAPE78, &SHAPE79, &SHAPE78, &SHAPE79, &SHAPE80, &SHAPE81, &SHAPE80, + &SHAPE81, &SHAPE82, &SHAPE83, &SHAPE82, &SHAPE83, &SHAPE84, &SHAPE85, &SHAPE84, &SHAPE85, + &SHAPE86, &SHAPE87, &SHAPE86, &SHAPE87, &SHAPE88, &SHAPE89, &SHAPE88, &SHAPE89, &SHAPE1, + &SHAPE61, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE91, &SHAPE92, &SHAPE93, &SHAPE94, &SHAPE95, &SHAPE96, + &SHAPE97, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, - &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE98, &SHAPE98, &SHAPE98, + &SHAPE1, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, + &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE67, + &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE67, &SHAPE67, + &SHAPE67, &SHAPE67, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE66, &SHAPE66, &SHAPE66, + &SHAPE66, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, + &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE98, + &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE99, &SHAPE99, + &SHAPE99, &SHAPE99, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE66, &SHAPE66, @@ -2392,29 +2416,28 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, - &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE65, - &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE65, &SHAPE65, - &SHAPE65, &SHAPE65, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE67, &SHAPE67, &SHAPE67, - &SHAPE67, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, - &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE98, - &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE99, &SHAPE99, - &SHAPE99, &SHAPE99, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE98, &SHAPE98, &SHAPE98, - &SHAPE98, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, - &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE65, - &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE67, &SHAPE67, - &SHAPE67, &SHAPE67, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE67, &SHAPE67, &SHAPE67, - &SHAPE67, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, - &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE99, - &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE98, &SHAPE98, - &SHAPE98, &SHAPE98, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE99, &SHAPE99, &SHAPE99, - &SHAPE99, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, - &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE67, - &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE67, &SHAPE67, - &SHAPE67, &SHAPE67, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE66, &SHAPE66, &SHAPE66, - &SHAPE66, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, - &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE98, - &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE99, &SHAPE99, - &SHAPE99, &SHAPE99, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE98, &SHAPE98, + &SHAPE98, &SHAPE98, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE99, &SHAPE99, &SHAPE99, + &SHAPE99, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, + &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE66, + &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE66, &SHAPE66, + &SHAPE66, &SHAPE66, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE64, &SHAPE64, &SHAPE64, + &SHAPE64, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, + &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE98, + &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE99, &SHAPE99, + &SHAPE99, &SHAPE99, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE98, &SHAPE98, &SHAPE98, + &SHAPE98, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, + &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE66, + &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE64, &SHAPE64, + &SHAPE64, &SHAPE64, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE64, &SHAPE64, &SHAPE64, + &SHAPE64, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, @@ -2434,16 +2457,16 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE100, &SHAPE101, &SHAPE100, - &SHAPE101, &SHAPE102, &SHAPE103, &SHAPE102, &SHAPE103, &SHAPE104, &SHAPE105, &SHAPE104, - &SHAPE105, &SHAPE106, &SHAPE107, &SHAPE106, &SHAPE107, &SHAPE108, &SHAPE109, &SHAPE108, - &SHAPE109, &SHAPE110, &SHAPE111, &SHAPE110, &SHAPE111, &SHAPE112, &SHAPE113, &SHAPE112, - &SHAPE113, &SHAPE114, &SHAPE2, &SHAPE114, &SHAPE2, &SHAPE115, &SHAPE115, &SHAPE116, &SHAPE116, - &SHAPE117, &SHAPE117, &SHAPE100, &SHAPE101, &SHAPE100, &SHAPE101, &SHAPE102, &SHAPE103, - &SHAPE102, &SHAPE103, &SHAPE104, &SHAPE105, &SHAPE104, &SHAPE105, &SHAPE106, &SHAPE107, - &SHAPE106, &SHAPE107, &SHAPE108, &SHAPE109, &SHAPE108, &SHAPE109, &SHAPE110, &SHAPE111, - &SHAPE110, &SHAPE111, &SHAPE112, &SHAPE113, &SHAPE112, &SHAPE113, &SHAPE114, &SHAPE2, - &SHAPE114, &SHAPE2, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE100, + &SHAPE101, &SHAPE100, &SHAPE101, &SHAPE102, &SHAPE103, &SHAPE102, &SHAPE103, &SHAPE104, + &SHAPE105, &SHAPE104, &SHAPE105, &SHAPE106, &SHAPE107, &SHAPE106, &SHAPE107, &SHAPE108, + &SHAPE109, &SHAPE108, &SHAPE109, &SHAPE110, &SHAPE111, &SHAPE110, &SHAPE111, &SHAPE112, + &SHAPE113, &SHAPE112, &SHAPE113, &SHAPE114, &SHAPE2, &SHAPE114, &SHAPE2, &SHAPE115, &SHAPE115, + &SHAPE116, &SHAPE116, &SHAPE117, &SHAPE117, &SHAPE100, &SHAPE101, &SHAPE100, &SHAPE101, + &SHAPE102, &SHAPE103, &SHAPE102, &SHAPE103, &SHAPE104, &SHAPE105, &SHAPE104, &SHAPE105, + &SHAPE106, &SHAPE107, &SHAPE106, &SHAPE107, &SHAPE108, &SHAPE109, &SHAPE108, &SHAPE109, + &SHAPE110, &SHAPE111, &SHAPE110, &SHAPE111, &SHAPE112, &SHAPE113, &SHAPE112, &SHAPE113, + &SHAPE114, &SHAPE2, &SHAPE114, &SHAPE2, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, @@ -2462,6 +2485,19 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, @@ -2492,35 +2528,76 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE1, &SHAPE1, &SHAPE119, - &SHAPE1, &SHAPE74, &SHAPE75, &SHAPE74, &SHAPE75, &SHAPE76, &SHAPE77, &SHAPE76, &SHAPE77, - &SHAPE78, &SHAPE79, &SHAPE78, &SHAPE79, &SHAPE80, &SHAPE81, &SHAPE80, &SHAPE81, &SHAPE82, - &SHAPE83, &SHAPE82, &SHAPE83, &SHAPE84, &SHAPE85, &SHAPE84, &SHAPE85, &SHAPE86, &SHAPE87, - &SHAPE86, &SHAPE87, &SHAPE88, &SHAPE89, &SHAPE88, &SHAPE89, &SHAPE29, &SHAPE29, &SHAPE30, - &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, - &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, - &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, - &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, - &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, - &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, - &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, - &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, - &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE13, - &SHAPE120, &SHAPE120, &SHAPE120, &SHAPE120, &SHAPE120, &SHAPE120, &SHAPE120, &SHAPE120, - &SHAPE121, &SHAPE121, &SHAPE121, &SHAPE121, &SHAPE121, &SHAPE121, &SHAPE121, &SHAPE121, - &SHAPE0, &SHAPE122, &SHAPE122, &SHAPE122, &SHAPE122, &SHAPE123, &SHAPE123, &SHAPE123, - &SHAPE123, &SHAPE1, &SHAPE72, &SHAPE1, &SHAPE1, &SHAPE124, &SHAPE125, &SHAPE126, &SHAPE127, - &SHAPE128, &SHAPE129, &SHAPE130, &SHAPE131, &SHAPE132, &SHAPE133, &SHAPE134, &SHAPE135, - &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, - &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, - &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, - &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, - &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, - &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, - &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, - &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, - &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE1, - &SHAPE1, &SHAPE53, &SHAPE53, &SHAPE53, &SHAPE53, &SHAPE53, &SHAPE53, &SHAPE53, &SHAPE53, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE74, &SHAPE75, &SHAPE74, &SHAPE75, &SHAPE76, &SHAPE77, + &SHAPE76, &SHAPE77, &SHAPE78, &SHAPE79, &SHAPE78, &SHAPE79, &SHAPE80, &SHAPE81, &SHAPE80, + &SHAPE81, &SHAPE82, &SHAPE83, &SHAPE82, &SHAPE83, &SHAPE84, &SHAPE85, &SHAPE84, &SHAPE85, + &SHAPE86, &SHAPE87, &SHAPE86, &SHAPE87, &SHAPE88, &SHAPE89, &SHAPE88, &SHAPE89, &SHAPE29, + &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, + &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, + &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, + &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, + &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, + &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, + &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, + &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, + &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE13, &SHAPE120, &SHAPE120, &SHAPE120, &SHAPE120, &SHAPE120, &SHAPE120, + &SHAPE120, &SHAPE120, &SHAPE121, &SHAPE121, &SHAPE121, &SHAPE121, &SHAPE121, &SHAPE121, + &SHAPE121, &SHAPE121, &SHAPE0, &SHAPE122, &SHAPE122, &SHAPE122, &SHAPE122, &SHAPE123, + &SHAPE123, &SHAPE123, &SHAPE123, &SHAPE1, &SHAPE72, &SHAPE1, &SHAPE1, &SHAPE124, &SHAPE125, + &SHAPE126, &SHAPE127, &SHAPE128, &SHAPE129, &SHAPE130, &SHAPE131, &SHAPE132, &SHAPE133, + &SHAPE134, &SHAPE135, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, + &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, + &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, + &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, + &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, + &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, + &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, + &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, + &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, + &SHAPE47, &SHAPE1, &SHAPE1, &SHAPE53, &SHAPE53, &SHAPE53, &SHAPE53, &SHAPE53, &SHAPE53, + &SHAPE53, &SHAPE53, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, @@ -2534,7 +2611,25 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, + &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, + &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, + &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, + &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, + &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, + &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, + &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, + &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, + &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, + &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, + &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, + &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, + &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, + &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, + &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, + &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, + &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, + &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, @@ -2543,110 +2638,92 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, - &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, - &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, - &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, - &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, - &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, - &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, - &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, - &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, - &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, - &SHAPE47, &SHAPE47, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, - &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, - &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, - &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, - &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, - &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, - &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, - &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, - &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, - &SHAPE47, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE136, &SHAPE137, - &SHAPE137, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE139, &SHAPE140, - &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, - &SHAPE142, &SHAPE142, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, - &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE143, &SHAPE144, - &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, - &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, - &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, - &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, - &SHAPE150, &SHAPE150, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, - &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, - &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, - &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, - &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE151, &SHAPE152, - &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, - &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, - &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, - &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, - &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, - &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, - &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, - &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, - &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, - &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, - &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, - &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, - &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, - &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, - &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE136, &SHAPE137, - &SHAPE137, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE0, &SHAPE138, - &SHAPE138, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, - &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE139, &SHAPE140, &SHAPE140, - &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, - &SHAPE142, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, - &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, - &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, - &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, - &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE143, &SHAPE144, &SHAPE144, - &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, - &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, - &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, - &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, - &SHAPE150, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, - &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, - &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, - &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, - &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, - &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, - &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, - &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, - &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, - &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE151, &SHAPE152, &SHAPE152, - &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, - &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, - &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, - &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, - &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, - &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, - &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, - &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, - &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, - &SHAPE166, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, - &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, + &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE136, &SHAPE137, &SHAPE137, + &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE0, &SHAPE138, &SHAPE138, + &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, + &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, + &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, + &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, + &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, + &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, + &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, + &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, + &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, + &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, + &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, + &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, + &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, + &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, + &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, + &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, + &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, + &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, + &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, + &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, + &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, + &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, + &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, + &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, + &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, + &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE0, &SHAPE138, + &SHAPE138, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, + &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, + &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, + &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, + &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, + &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, + &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, + &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, + &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, + &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, + &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, + &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, + &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, + &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, + &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, + &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, + &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, + &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, + &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, + &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, + &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, + &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, + &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, + &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, + &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, + &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, + &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE1, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, - &SHAPE27, &SHAPE27, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, @@ -2665,90 +2742,77 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, + &SHAPE0, &SHAPE0, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, - &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE170, &SHAPE170, &SHAPE171, &SHAPE171, &SHAPE172, - &SHAPE172, &SHAPE173, &SHAPE173, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, + &SHAPE169, &SHAPE170, &SHAPE170, &SHAPE171, &SHAPE171, &SHAPE172, &SHAPE172, &SHAPE173, + &SHAPE173, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, - &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE170, &SHAPE170, &SHAPE171, &SHAPE171, &SHAPE172, - &SHAPE172, &SHAPE173, &SHAPE173, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, + &SHAPE169, &SHAPE170, &SHAPE170, &SHAPE171, &SHAPE171, &SHAPE172, &SHAPE172, &SHAPE173, + &SHAPE173, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, - &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE170, &SHAPE170, &SHAPE171, &SHAPE171, &SHAPE172, - &SHAPE172, &SHAPE173, &SHAPE173, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, + &SHAPE169, &SHAPE170, &SHAPE170, &SHAPE171, &SHAPE171, &SHAPE172, &SHAPE172, &SHAPE173, + &SHAPE173, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, - &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE170, &SHAPE170, &SHAPE171, &SHAPE171, &SHAPE172, - &SHAPE172, &SHAPE173, &SHAPE173, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, + &SHAPE169, &SHAPE170, &SHAPE170, &SHAPE171, &SHAPE171, &SHAPE172, &SHAPE172, &SHAPE173, + &SHAPE173, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, - &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE170, &SHAPE170, &SHAPE171, &SHAPE171, &SHAPE172, - &SHAPE172, &SHAPE173, &SHAPE173, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, + &SHAPE169, &SHAPE170, &SHAPE170, &SHAPE171, &SHAPE171, &SHAPE172, &SHAPE172, &SHAPE173, + &SHAPE173, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, - &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE170, &SHAPE170, &SHAPE171, &SHAPE171, &SHAPE172, - &SHAPE172, &SHAPE173, &SHAPE173, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, + &SHAPE169, &SHAPE170, &SHAPE170, &SHAPE171, &SHAPE171, &SHAPE172, &SHAPE172, &SHAPE173, + &SHAPE173, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, - &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE175, &SHAPE175, &SHAPE176, &SHAPE176, &SHAPE177, - &SHAPE177, &SHAPE178, &SHAPE178, &SHAPE179, &SHAPE179, &SHAPE180, &SHAPE180, &SHAPE179, - &SHAPE179, &SHAPE180, &SHAPE180, &SHAPE179, &SHAPE179, &SHAPE180, &SHAPE180, &SHAPE53, - &SHAPE53, &SHAPE54, &SHAPE54, &SHAPE55, &SHAPE55, &SHAPE53, &SHAPE53, &SHAPE55, &SHAPE55, - &SHAPE54, &SHAPE54, &SHAPE53, &SHAPE53, &SHAPE56, &SHAPE56, &SHAPE57, &SHAPE57, &SHAPE53, - &SHAPE53, &SHAPE57, &SHAPE57, &SHAPE56, &SHAPE56, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE174, &SHAPE175, &SHAPE175, &SHAPE176, &SHAPE176, &SHAPE177, &SHAPE177, &SHAPE178, + &SHAPE178, &SHAPE179, &SHAPE179, &SHAPE180, &SHAPE180, &SHAPE179, &SHAPE179, &SHAPE180, + &SHAPE180, &SHAPE179, &SHAPE179, &SHAPE180, &SHAPE180, &SHAPE53, &SHAPE53, &SHAPE54, &SHAPE54, + &SHAPE55, &SHAPE55, &SHAPE53, &SHAPE53, &SHAPE55, &SHAPE55, &SHAPE54, &SHAPE54, &SHAPE53, + &SHAPE53, &SHAPE56, &SHAPE56, &SHAPE57, &SHAPE57, &SHAPE53, &SHAPE53, &SHAPE57, &SHAPE57, + &SHAPE56, &SHAPE56, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE7, &SHAPE7, &SHAPE7, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, - &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, - &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE1, - &SHAPE1, &SHAPE181, &SHAPE182, &SHAPE183, &SHAPE184, &SHAPE185, &SHAPE181, &SHAPE182, - &SHAPE183, &SHAPE184, &SHAPE185, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE29, - &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, - &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, - &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, - &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, - &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, - &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, - &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, - &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, - &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, + &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE1, &SHAPE1, &SHAPE181, &SHAPE182, + &SHAPE183, &SHAPE184, &SHAPE185, &SHAPE181, &SHAPE182, &SHAPE183, &SHAPE184, &SHAPE185, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, + &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, + &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, + &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, + &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, + &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, + &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, + &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, + &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, + &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE100, &SHAPE101, &SHAPE100, &SHAPE101, &SHAPE102, &SHAPE103, &SHAPE102, &SHAPE103, - &SHAPE104, &SHAPE105, &SHAPE104, &SHAPE105, &SHAPE106, &SHAPE107, &SHAPE106, &SHAPE107, - &SHAPE108, &SHAPE109, &SHAPE108, &SHAPE109, &SHAPE110, &SHAPE111, &SHAPE110, &SHAPE111, - &SHAPE112, &SHAPE113, &SHAPE112, &SHAPE113, &SHAPE114, &SHAPE2, &SHAPE114, &SHAPE2, &SHAPE100, - &SHAPE101, &SHAPE100, &SHAPE101, &SHAPE102, &SHAPE103, &SHAPE102, &SHAPE103, &SHAPE104, - &SHAPE105, &SHAPE104, &SHAPE105, &SHAPE106, &SHAPE107, &SHAPE106, &SHAPE107, &SHAPE108, - &SHAPE109, &SHAPE108, &SHAPE109, &SHAPE110, &SHAPE111, &SHAPE110, &SHAPE111, &SHAPE112, - &SHAPE113, &SHAPE112, &SHAPE113, &SHAPE114, &SHAPE2, &SHAPE114, &SHAPE2, &SHAPE100, &SHAPE101, - &SHAPE100, &SHAPE101, &SHAPE102, &SHAPE103, &SHAPE102, &SHAPE103, &SHAPE104, &SHAPE105, - &SHAPE104, &SHAPE105, &SHAPE106, &SHAPE107, &SHAPE106, &SHAPE107, &SHAPE108, &SHAPE109, - &SHAPE108, &SHAPE109, &SHAPE110, &SHAPE111, &SHAPE110, &SHAPE111, &SHAPE112, &SHAPE113, - &SHAPE112, &SHAPE113, &SHAPE114, &SHAPE2, &SHAPE114, &SHAPE2, &SHAPE100, &SHAPE101, &SHAPE100, - &SHAPE101, &SHAPE102, &SHAPE103, &SHAPE102, &SHAPE103, &SHAPE104, &SHAPE105, &SHAPE104, - &SHAPE105, &SHAPE106, &SHAPE107, &SHAPE106, &SHAPE107, &SHAPE108, &SHAPE109, &SHAPE108, - &SHAPE109, &SHAPE110, &SHAPE111, &SHAPE110, &SHAPE111, &SHAPE112, &SHAPE113, &SHAPE112, - &SHAPE113, &SHAPE114, &SHAPE2, &SHAPE114, &SHAPE2, &SHAPE100, &SHAPE101, &SHAPE100, &SHAPE101, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE100, &SHAPE101, &SHAPE100, &SHAPE101, &SHAPE102, &SHAPE103, &SHAPE102, &SHAPE103, &SHAPE104, &SHAPE105, &SHAPE104, &SHAPE105, &SHAPE106, &SHAPE107, &SHAPE106, &SHAPE107, &SHAPE108, &SHAPE109, &SHAPE108, &SHAPE109, &SHAPE110, &SHAPE111, &SHAPE110, &SHAPE111, &SHAPE112, &SHAPE113, &SHAPE112, &SHAPE113, @@ -2796,6 +2860,22 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE102, &SHAPE103, &SHAPE104, &SHAPE105, &SHAPE104, &SHAPE105, &SHAPE106, &SHAPE107, &SHAPE106, &SHAPE107, &SHAPE108, &SHAPE109, &SHAPE108, &SHAPE109, &SHAPE110, &SHAPE111, &SHAPE110, &SHAPE111, &SHAPE112, &SHAPE113, &SHAPE112, &SHAPE113, &SHAPE114, &SHAPE2, + &SHAPE114, &SHAPE2, &SHAPE100, &SHAPE101, &SHAPE100, &SHAPE101, &SHAPE102, &SHAPE103, + &SHAPE102, &SHAPE103, &SHAPE104, &SHAPE105, &SHAPE104, &SHAPE105, &SHAPE106, &SHAPE107, + &SHAPE106, &SHAPE107, &SHAPE108, &SHAPE109, &SHAPE108, &SHAPE109, &SHAPE110, &SHAPE111, + &SHAPE110, &SHAPE111, &SHAPE112, &SHAPE113, &SHAPE112, &SHAPE113, &SHAPE114, &SHAPE2, + &SHAPE114, &SHAPE2, &SHAPE100, &SHAPE101, &SHAPE100, &SHAPE101, &SHAPE102, &SHAPE103, + &SHAPE102, &SHAPE103, &SHAPE104, &SHAPE105, &SHAPE104, &SHAPE105, &SHAPE106, &SHAPE107, + &SHAPE106, &SHAPE107, &SHAPE108, &SHAPE109, &SHAPE108, &SHAPE109, &SHAPE110, &SHAPE111, + &SHAPE110, &SHAPE111, &SHAPE112, &SHAPE113, &SHAPE112, &SHAPE113, &SHAPE114, &SHAPE2, + &SHAPE114, &SHAPE2, &SHAPE100, &SHAPE101, &SHAPE100, &SHAPE101, &SHAPE102, &SHAPE103, + &SHAPE102, &SHAPE103, &SHAPE104, &SHAPE105, &SHAPE104, &SHAPE105, &SHAPE106, &SHAPE107, + &SHAPE106, &SHAPE107, &SHAPE108, &SHAPE109, &SHAPE108, &SHAPE109, &SHAPE110, &SHAPE111, + &SHAPE110, &SHAPE111, &SHAPE112, &SHAPE113, &SHAPE112, &SHAPE113, &SHAPE114, &SHAPE2, + &SHAPE114, &SHAPE2, &SHAPE100, &SHAPE101, &SHAPE100, &SHAPE101, &SHAPE102, &SHAPE103, + &SHAPE102, &SHAPE103, &SHAPE104, &SHAPE105, &SHAPE104, &SHAPE105, &SHAPE106, &SHAPE107, + &SHAPE106, &SHAPE107, &SHAPE108, &SHAPE109, &SHAPE108, &SHAPE109, &SHAPE110, &SHAPE111, + &SHAPE110, &SHAPE111, &SHAPE112, &SHAPE113, &SHAPE112, &SHAPE113, &SHAPE114, &SHAPE2, &SHAPE114, &SHAPE2, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, @@ -2822,7 +2902,15 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, - &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE29, + &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, @@ -2938,6 +3026,9 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, + &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, + &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, @@ -2946,19 +3037,7 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, - &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, - &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, - &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, - &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE83, - &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, - &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, - &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, - &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, - &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, - &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, - &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, - &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE80, + &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, @@ -2974,25 +3053,20 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, - &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE74, &SHAPE75, - &SHAPE74, &SHAPE75, &SHAPE76, &SHAPE77, &SHAPE76, &SHAPE77, &SHAPE78, &SHAPE79, &SHAPE78, - &SHAPE79, &SHAPE80, &SHAPE81, &SHAPE80, &SHAPE81, &SHAPE82, &SHAPE83, &SHAPE82, &SHAPE83, - &SHAPE84, &SHAPE85, &SHAPE84, &SHAPE85, &SHAPE86, &SHAPE87, &SHAPE86, &SHAPE87, &SHAPE88, - &SHAPE89, &SHAPE88, &SHAPE89, &SHAPE74, &SHAPE75, &SHAPE74, &SHAPE75, &SHAPE76, &SHAPE77, - &SHAPE76, &SHAPE77, &SHAPE78, &SHAPE79, &SHAPE78, &SHAPE79, &SHAPE80, &SHAPE81, &SHAPE80, - &SHAPE81, &SHAPE82, &SHAPE83, &SHAPE82, &SHAPE83, &SHAPE84, &SHAPE85, &SHAPE84, &SHAPE85, - &SHAPE86, &SHAPE87, &SHAPE86, &SHAPE87, &SHAPE88, &SHAPE89, &SHAPE88, &SHAPE89, &SHAPE74, - &SHAPE75, &SHAPE74, &SHAPE75, &SHAPE76, &SHAPE77, &SHAPE76, &SHAPE77, &SHAPE78, &SHAPE79, - &SHAPE78, &SHAPE79, &SHAPE80, &SHAPE81, &SHAPE80, &SHAPE81, &SHAPE82, &SHAPE83, &SHAPE82, - &SHAPE83, &SHAPE84, &SHAPE85, &SHAPE84, &SHAPE85, &SHAPE86, &SHAPE87, &SHAPE86, &SHAPE87, - &SHAPE88, &SHAPE89, &SHAPE88, &SHAPE89, &SHAPE74, &SHAPE75, &SHAPE74, &SHAPE75, &SHAPE76, - &SHAPE77, &SHAPE76, &SHAPE77, &SHAPE78, &SHAPE79, &SHAPE78, &SHAPE79, &SHAPE80, &SHAPE81, - &SHAPE80, &SHAPE81, &SHAPE82, &SHAPE83, &SHAPE82, &SHAPE83, &SHAPE84, &SHAPE85, &SHAPE84, - &SHAPE85, &SHAPE86, &SHAPE87, &SHAPE86, &SHAPE87, &SHAPE88, &SHAPE89, &SHAPE88, &SHAPE89, - &SHAPE74, &SHAPE75, &SHAPE74, &SHAPE75, &SHAPE76, &SHAPE77, &SHAPE76, &SHAPE77, &SHAPE78, - &SHAPE79, &SHAPE78, &SHAPE79, &SHAPE80, &SHAPE81, &SHAPE80, &SHAPE81, &SHAPE82, &SHAPE83, - &SHAPE82, &SHAPE83, &SHAPE84, &SHAPE85, &SHAPE84, &SHAPE85, &SHAPE86, &SHAPE87, &SHAPE86, - &SHAPE87, &SHAPE88, &SHAPE89, &SHAPE88, &SHAPE89, &SHAPE74, &SHAPE75, &SHAPE74, &SHAPE75, + &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE80, + &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, + &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, + &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, + &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE83, + &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, + &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, + &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, + &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, + &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE74, &SHAPE75, &SHAPE74, &SHAPE75, &SHAPE76, &SHAPE77, &SHAPE76, &SHAPE77, &SHAPE78, &SHAPE79, &SHAPE78, &SHAPE79, &SHAPE80, &SHAPE81, &SHAPE80, &SHAPE81, &SHAPE82, &SHAPE83, &SHAPE82, &SHAPE83, &SHAPE84, &SHAPE85, &SHAPE84, &SHAPE85, &SHAPE86, &SHAPE87, &SHAPE86, &SHAPE87, &SHAPE88, &SHAPE89, &SHAPE88, @@ -3003,6 +3077,27 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE75, &SHAPE76, &SHAPE77, &SHAPE76, &SHAPE77, &SHAPE78, &SHAPE79, &SHAPE78, &SHAPE79, &SHAPE80, &SHAPE81, &SHAPE80, &SHAPE81, &SHAPE82, &SHAPE83, &SHAPE82, &SHAPE83, &SHAPE84, &SHAPE85, &SHAPE84, &SHAPE85, &SHAPE86, &SHAPE87, &SHAPE86, &SHAPE87, &SHAPE88, &SHAPE89, + &SHAPE88, &SHAPE89, &SHAPE74, &SHAPE75, &SHAPE74, &SHAPE75, &SHAPE76, &SHAPE77, &SHAPE76, + &SHAPE77, &SHAPE78, &SHAPE79, &SHAPE78, &SHAPE79, &SHAPE80, &SHAPE81, &SHAPE80, &SHAPE81, + &SHAPE82, &SHAPE83, &SHAPE82, &SHAPE83, &SHAPE84, &SHAPE85, &SHAPE84, &SHAPE85, &SHAPE86, + &SHAPE87, &SHAPE86, &SHAPE87, &SHAPE88, &SHAPE89, &SHAPE88, &SHAPE89, &SHAPE74, &SHAPE75, + &SHAPE74, &SHAPE75, &SHAPE76, &SHAPE77, &SHAPE76, &SHAPE77, &SHAPE78, &SHAPE79, &SHAPE78, + &SHAPE79, &SHAPE80, &SHAPE81, &SHAPE80, &SHAPE81, &SHAPE82, &SHAPE83, &SHAPE82, &SHAPE83, + &SHAPE84, &SHAPE85, &SHAPE84, &SHAPE85, &SHAPE86, &SHAPE87, &SHAPE86, &SHAPE87, &SHAPE88, + &SHAPE89, &SHAPE88, &SHAPE89, &SHAPE74, &SHAPE75, &SHAPE74, &SHAPE75, &SHAPE76, &SHAPE77, + &SHAPE76, &SHAPE77, &SHAPE78, &SHAPE79, &SHAPE78, &SHAPE79, &SHAPE80, &SHAPE81, &SHAPE80, + &SHAPE81, &SHAPE82, &SHAPE83, &SHAPE82, &SHAPE83, &SHAPE84, &SHAPE85, &SHAPE84, &SHAPE85, + &SHAPE86, &SHAPE87, &SHAPE86, &SHAPE87, &SHAPE88, &SHAPE89, &SHAPE88, &SHAPE89, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE74, &SHAPE75, &SHAPE74, &SHAPE75, &SHAPE76, &SHAPE77, &SHAPE76, &SHAPE77, + &SHAPE78, &SHAPE79, &SHAPE78, &SHAPE79, &SHAPE80, &SHAPE81, &SHAPE80, &SHAPE81, &SHAPE82, + &SHAPE83, &SHAPE82, &SHAPE83, &SHAPE84, &SHAPE85, &SHAPE84, &SHAPE85, &SHAPE86, &SHAPE87, + &SHAPE86, &SHAPE87, &SHAPE88, &SHAPE89, &SHAPE88, &SHAPE89, &SHAPE74, &SHAPE75, &SHAPE74, + &SHAPE75, &SHAPE76, &SHAPE77, &SHAPE76, &SHAPE77, &SHAPE78, &SHAPE79, &SHAPE78, &SHAPE79, + &SHAPE80, &SHAPE81, &SHAPE80, &SHAPE81, &SHAPE82, &SHAPE83, &SHAPE82, &SHAPE83, &SHAPE84, + &SHAPE85, &SHAPE84, &SHAPE85, &SHAPE86, &SHAPE87, &SHAPE86, &SHAPE87, &SHAPE88, &SHAPE89, &SHAPE88, &SHAPE89, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE66, @@ -3045,47 +3140,52 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, - &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE64, - &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, - &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, - &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, - &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, - &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, - &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, - &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, - &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE64, - &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, - &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, - &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, - &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, - &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, - &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, - &SHAPE64, &SHAPE187, &SHAPE188, &SHAPE187, &SHAPE188, &SHAPE90, &SHAPE90, &SHAPE189, &SHAPE190, - &SHAPE191, &SHAPE192, &SHAPE193, &SHAPE194, &SHAPE195, &SHAPE196, &SHAPE197, &SHAPE198, - &SHAPE199, &SHAPE200, &SHAPE201, &SHAPE202, &SHAPE203, &SHAPE204, &SHAPE205, &SHAPE206, - &SHAPE207, &SHAPE208, &SHAPE209, &SHAPE210, &SHAPE211, &SHAPE212, &SHAPE213, &SHAPE214, - &SHAPE215, &SHAPE216, &SHAPE217, &SHAPE68, &SHAPE218, &SHAPE219, &SHAPE220, &SHAPE221, - &SHAPE222, &SHAPE223, &SHAPE224, &SHAPE225, &SHAPE226, &SHAPE227, &SHAPE228, &SHAPE229, - &SHAPE230, &SHAPE231, &SHAPE232, &SHAPE233, &SHAPE234, &SHAPE235, &SHAPE236, &SHAPE237, - &SHAPE238, &SHAPE239, &SHAPE240, &SHAPE241, &SHAPE242, &SHAPE243, &SHAPE244, &SHAPE245, - &SHAPE246, &SHAPE247, &SHAPE248, &SHAPE249, &SHAPE250, &SHAPE251, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, - &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, - &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, - &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, - &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, - &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, - &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, - &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, - &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, - &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE252, - &SHAPE252, &SHAPE0, &SHAPE253, &SHAPE0, &SHAPE253, &SHAPE0, &SHAPE253, &SHAPE0, &SHAPE253, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE62, &SHAPE0, &SHAPE1, &SHAPE1, + &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, + &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, + &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, + &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE65, + &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, + &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, + &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, + &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, + &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, + &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, + &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, + &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE65, + &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, + &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE64, + &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE187, &SHAPE188, &SHAPE187, &SHAPE188, + &SHAPE90, &SHAPE90, &SHAPE189, &SHAPE190, &SHAPE191, &SHAPE192, &SHAPE193, &SHAPE194, + &SHAPE195, &SHAPE196, &SHAPE197, &SHAPE198, &SHAPE199, &SHAPE200, &SHAPE201, &SHAPE202, + &SHAPE203, &SHAPE204, &SHAPE205, &SHAPE206, &SHAPE207, &SHAPE208, &SHAPE209, &SHAPE210, + &SHAPE211, &SHAPE212, &SHAPE213, &SHAPE214, &SHAPE215, &SHAPE216, &SHAPE217, &SHAPE68, + &SHAPE218, &SHAPE219, &SHAPE220, &SHAPE221, &SHAPE222, &SHAPE223, &SHAPE224, &SHAPE225, + &SHAPE226, &SHAPE227, &SHAPE228, &SHAPE229, &SHAPE230, &SHAPE231, &SHAPE232, &SHAPE233, + &SHAPE234, &SHAPE235, &SHAPE236, &SHAPE237, &SHAPE238, &SHAPE239, &SHAPE240, &SHAPE241, + &SHAPE242, &SHAPE243, &SHAPE244, &SHAPE245, &SHAPE246, &SHAPE247, &SHAPE248, &SHAPE249, + &SHAPE250, &SHAPE251, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, + &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, + &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, + &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, + &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, + &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, + &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, + &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, + &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, + &SHAPE47, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE252, &SHAPE252, &SHAPE0, &SHAPE253, &SHAPE0, + &SHAPE253, &SHAPE0, &SHAPE253, &SHAPE0, &SHAPE253, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE62, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, @@ -3105,14 +3205,14 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE1, &SHAPE255, &SHAPE255, &SHAPE255, &SHAPE256, &SHAPE256, &SHAPE256, &SHAPE256, - &SHAPE256, &SHAPE256, &SHAPE256, &SHAPE256, &SHAPE256, &SHAPE257, &SHAPE257, &SHAPE257, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE255, &SHAPE255, &SHAPE255, + &SHAPE256, &SHAPE256, &SHAPE256, &SHAPE256, &SHAPE256, &SHAPE256, &SHAPE256, &SHAPE256, + &SHAPE256, &SHAPE257, &SHAPE257, &SHAPE257, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, @@ -3123,45 +3223,11 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE258, &SHAPE258, &SHAPE259, &SHAPE259, &SHAPE260, &SHAPE260, &SHAPE261, &SHAPE261, - &SHAPE1, &SHAPE254, &SHAPE254, &SHAPE0, &SHAPE116, &SHAPE116, &SHAPE116, &SHAPE116, &SHAPE116, - &SHAPE116, &SHAPE116, &SHAPE116, &SHAPE116, &SHAPE116, &SHAPE116, &SHAPE116, &SHAPE27, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, - &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, - &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, - &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, - &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, - &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, - &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, - &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, - &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, - &SHAPE47, &SHAPE47, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, - &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, - &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, - &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, - &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, - &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, - &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, - &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, - &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, - &SHAPE47, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, - &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, - &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, - &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, - &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, - &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, - &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, - &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, - &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, - &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, - &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, - &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, - &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, - &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, - &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, - &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, - &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, - &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE29, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE258, &SHAPE258, &SHAPE259, &SHAPE259, + &SHAPE260, &SHAPE260, &SHAPE261, &SHAPE261, &SHAPE1, &SHAPE254, &SHAPE254, &SHAPE0, &SHAPE116, + &SHAPE116, &SHAPE116, &SHAPE116, &SHAPE116, &SHAPE116, &SHAPE116, &SHAPE116, &SHAPE116, + &SHAPE116, &SHAPE116, &SHAPE116, &SHAPE27, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, @@ -3250,15 +3316,91 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, - &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE186, &SHAPE186, - &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, + &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE29, &SHAPE29, + &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, + &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, + &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, + &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, + &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, + &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, + &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, + &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, + &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE29, &SHAPE29, &SHAPE30, + &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, + &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, + &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, + &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, + &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, + &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, + &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, + &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, + &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, + &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, + &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, + &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, + &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, + &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, + &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, + &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, + &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, + &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, + &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, + &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, + &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, + &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, + &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, + &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, + &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, + &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, + &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, - &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE136, + &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, + &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE136, + &SHAPE137, &SHAPE137, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE139, + &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, + &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, + &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE143, + &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, + &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, + &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, + &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, + &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, + &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, + &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, + &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, + &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE151, + &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, + &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, + &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, + &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, + &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, + &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, + &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, + &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, + &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, + &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, + &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, + &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, + &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, + &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, + &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, + &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, + &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, + &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, + &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE139, &SHAPE140, @@ -3743,64 +3885,24 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE136, &SHAPE137, &SHAPE137, - &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE0, &SHAPE138, &SHAPE138, - &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, - &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, - &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, - &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, - &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, - &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, - &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, - &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, - &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, - &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, - &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, - &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, - &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, - &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, - &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, - &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, - &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, - &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, - &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, - &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, - &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, - &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, - &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, - &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, - &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, - &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, - &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, - &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, - &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, - &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, - &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, - &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, - &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, - &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, - &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, - &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, - &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, - &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, - &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, - &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, + &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, + &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE263, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE264, &SHAPE264, &SHAPE265, &SHAPE265, &SHAPE266, - &SHAPE267, &SHAPE268, &SHAPE269, &SHAPE270, &SHAPE270, &SHAPE271, &SHAPE271, &SHAPE272, + &SHAPE264, &SHAPE264, &SHAPE265, &SHAPE265, &SHAPE266, &SHAPE267, &SHAPE268, &SHAPE269, + &SHAPE270, &SHAPE270, &SHAPE271, &SHAPE271, &SHAPE272, &SHAPE272, &SHAPE272, &SHAPE272, &SHAPE272, &SHAPE272, &SHAPE272, &SHAPE272, &SHAPE272, &SHAPE272, &SHAPE272, &SHAPE272, - &SHAPE272, &SHAPE272, &SHAPE272, &SHAPE272, &SHAPE272, &SHAPE272, &SHAPE272, &SHAPE1, - &SHAPE168, &SHAPE168, &SHAPE168, &SHAPE168, &SHAPE273, &SHAPE273, &SHAPE273, &SHAPE273, - &SHAPE274, &SHAPE274, &SHAPE274, &SHAPE274, &SHAPE275, &SHAPE275, &SHAPE275, &SHAPE275, - &SHAPE275, &SHAPE275, &SHAPE275, &SHAPE275, &SHAPE276, &SHAPE276, &SHAPE277, &SHAPE277, - &SHAPE278, &SHAPE278, &SHAPE279, &SHAPE279, &SHAPE280, &SHAPE280, &SHAPE280, &SHAPE280, - &SHAPE281, &SHAPE281, &SHAPE281, &SHAPE281, &SHAPE282, &SHAPE282, &SHAPE283, &SHAPE283, - &SHAPE282, &SHAPE282, &SHAPE283, &SHAPE283, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, + &SHAPE272, &SHAPE272, &SHAPE272, &SHAPE272, &SHAPE1, &SHAPE168, &SHAPE168, &SHAPE168, + &SHAPE168, &SHAPE273, &SHAPE273, &SHAPE273, &SHAPE273, &SHAPE274, &SHAPE274, &SHAPE274, + &SHAPE274, &SHAPE275, &SHAPE275, &SHAPE275, &SHAPE275, &SHAPE275, &SHAPE275, &SHAPE275, + &SHAPE275, &SHAPE276, &SHAPE276, &SHAPE277, &SHAPE277, &SHAPE278, &SHAPE278, &SHAPE279, + &SHAPE279, &SHAPE280, &SHAPE280, &SHAPE280, &SHAPE280, &SHAPE281, &SHAPE281, &SHAPE281, + &SHAPE281, &SHAPE282, &SHAPE282, &SHAPE283, &SHAPE283, &SHAPE282, &SHAPE282, &SHAPE283, + &SHAPE283, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, @@ -3808,82 +3910,82 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, - &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE167, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, - &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE167, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE1, + &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, - &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE74, &SHAPE75, &SHAPE74, &SHAPE75, &SHAPE76, &SHAPE77, - &SHAPE76, &SHAPE77, &SHAPE78, &SHAPE79, &SHAPE78, &SHAPE79, &SHAPE80, &SHAPE81, &SHAPE80, - &SHAPE81, &SHAPE82, &SHAPE83, &SHAPE82, &SHAPE83, &SHAPE84, &SHAPE85, &SHAPE84, &SHAPE85, - &SHAPE86, &SHAPE87, &SHAPE86, &SHAPE87, &SHAPE88, &SHAPE89, &SHAPE88, &SHAPE89, &SHAPE74, - &SHAPE75, &SHAPE74, &SHAPE75, &SHAPE76, &SHAPE77, &SHAPE76, &SHAPE77, &SHAPE78, &SHAPE79, - &SHAPE78, &SHAPE79, &SHAPE80, &SHAPE81, &SHAPE80, &SHAPE81, &SHAPE82, &SHAPE83, &SHAPE82, - &SHAPE83, &SHAPE84, &SHAPE85, &SHAPE84, &SHAPE85, &SHAPE86, &SHAPE87, &SHAPE86, &SHAPE87, - &SHAPE88, &SHAPE89, &SHAPE88, &SHAPE89, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE98, - &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE99, &SHAPE99, - &SHAPE99, &SHAPE99, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE98, &SHAPE98, &SHAPE98, - &SHAPE98, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, - &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE66, - &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE64, &SHAPE64, - &SHAPE64, &SHAPE64, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE64, &SHAPE64, &SHAPE64, - &SHAPE64, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, - &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE99, - &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE98, &SHAPE98, - &SHAPE98, &SHAPE98, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE99, &SHAPE99, &SHAPE99, - &SHAPE99, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, - &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE64, - &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE64, &SHAPE64, - &SHAPE64, &SHAPE64, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE0, &SHAPE0, &SHAPE80, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, + &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE74, &SHAPE75, &SHAPE74, &SHAPE75, &SHAPE76, &SHAPE77, &SHAPE76, &SHAPE77, &SHAPE78, + &SHAPE79, &SHAPE78, &SHAPE79, &SHAPE80, &SHAPE81, &SHAPE80, &SHAPE81, &SHAPE82, &SHAPE83, + &SHAPE82, &SHAPE83, &SHAPE84, &SHAPE85, &SHAPE84, &SHAPE85, &SHAPE86, &SHAPE87, &SHAPE86, + &SHAPE87, &SHAPE88, &SHAPE89, &SHAPE88, &SHAPE89, &SHAPE74, &SHAPE75, &SHAPE74, &SHAPE75, + &SHAPE76, &SHAPE77, &SHAPE76, &SHAPE77, &SHAPE78, &SHAPE79, &SHAPE78, &SHAPE79, &SHAPE80, + &SHAPE81, &SHAPE80, &SHAPE81, &SHAPE82, &SHAPE83, &SHAPE82, &SHAPE83, &SHAPE84, &SHAPE85, + &SHAPE84, &SHAPE85, &SHAPE86, &SHAPE87, &SHAPE86, &SHAPE87, &SHAPE88, &SHAPE89, &SHAPE88, + &SHAPE89, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, + &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE67, + &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE67, &SHAPE67, + &SHAPE67, &SHAPE67, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE66, &SHAPE66, &SHAPE66, + &SHAPE66, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, + &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE98, + &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE99, &SHAPE99, + &SHAPE99, &SHAPE99, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE98, &SHAPE98, &SHAPE98, + &SHAPE98, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, + &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE67, + &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE66, &SHAPE66, + &SHAPE66, &SHAPE66, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE66, &SHAPE66, &SHAPE66, + &SHAPE66, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, + &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE99, + &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, - &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, - &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, - &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, - &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, - &SHAPE83, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, - &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, - &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, - &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, - &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, - &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, - &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, - &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, - &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, - &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, - &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, - &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, - &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, - &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, - &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, - &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, - &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, - &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE0, + &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, + &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, + &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, + &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE29, &SHAPE29, + &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, + &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, + &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, + &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, + &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, + &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, + &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, + &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, + &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE29, &SHAPE29, &SHAPE30, + &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, + &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, + &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, + &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, + &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, + &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, + &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, + &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, + &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE64, &SHAPE64, &SHAPE65, - &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, - &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, - &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, - &SHAPE67, &SHAPE67, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, - &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, - &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE67, - &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, - &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE65, - &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, - &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, - &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, - &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, - &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, - &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, + &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, + &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, + &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE65, + &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, + &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, + &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, + &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, + &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, + &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, + &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, + &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE65, + &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, + &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE64, + &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, @@ -3891,69 +3993,118 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE284, &SHAPE284, &SHAPE284, &SHAPE284, - &SHAPE284, &SHAPE284, &SHAPE284, &SHAPE284, &SHAPE284, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE284, &SHAPE284, &SHAPE284, &SHAPE284, &SHAPE284, &SHAPE284, &SHAPE284, + &SHAPE284, &SHAPE284, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE71, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE1, &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, - &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, - &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, - &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, - &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, - &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, - &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, - &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, - &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, - &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE136, - &SHAPE137, &SHAPE137, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE139, - &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, - &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, - &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE143, - &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, - &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, - &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, - &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, - &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, - &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, - &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, - &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, - &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE151, - &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, - &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, - &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, - &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, - &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, - &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, - &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, - &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, - &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, - &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, - &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, - &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, - &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, - &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, - &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, - &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, - &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, - &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, - &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE186, - &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE186, - &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE71, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, + &SHAPE1, &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, + &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, + &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, + &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, + &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, + &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, + &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, + &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, + &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, + &SHAPE47, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE0, &SHAPE138, + &SHAPE138, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, + &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, + &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, + &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, + &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, + &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, + &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, + &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, + &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, + &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, + &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, + &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, + &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, + &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, + &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, + &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, + &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, + &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, + &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, + &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, + &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, + &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, + &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, + &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, + &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, + &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, + &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, + &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, + &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, + &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, + &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, + &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, + &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, + &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, + &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, + &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE0, &SHAPE138, + &SHAPE138, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, + &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, + &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, + &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, + &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, + &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, + &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, + &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, + &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, + &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, + &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, + &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, + &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, + &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, + &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, + &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, + &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, + &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, + &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, + &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, + &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, + &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, + &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, + &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, + &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, + &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, @@ -3962,298 +4113,245 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, - &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE136, &SHAPE137, - &SHAPE137, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE139, &SHAPE140, - &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, - &SHAPE142, &SHAPE142, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, - &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE143, &SHAPE144, - &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, - &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, - &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, - &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, - &SHAPE150, &SHAPE150, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, - &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, - &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, - &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, - &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE151, &SHAPE152, - &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, - &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, - &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, - &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, - &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, - &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, - &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, - &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, - &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, - &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, - &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, - &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, - &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, - &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, - &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE1, &SHAPE29, &SHAPE29, - &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, - &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, - &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, - &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, - &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, - &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, - &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, - &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, - &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE186, &SHAPE186, &SHAPE8, - &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, + &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE136, - &SHAPE137, &SHAPE137, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE0, - &SHAPE138, &SHAPE138, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, - &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE139, &SHAPE140, - &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, - &SHAPE142, &SHAPE142, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, - &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, - &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, - &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, - &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE143, &SHAPE144, - &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, - &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, - &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, - &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, - &SHAPE150, &SHAPE150, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, - &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, - &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, - &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, - &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, - &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, - &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, - &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE151, &SHAPE152, - &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, - &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, - &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, - &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, - &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, - &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, - &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, - &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, - &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, - &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, - &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, - &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, - &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, - &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, - &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, - &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, - &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, - &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, - &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, - &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, - &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, - &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, - &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, - &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, - &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, - &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, - &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, - &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, - &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, - &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, - &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, - &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, - &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, - &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, - &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, - &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, - &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, - &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, - &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, - &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, - &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, - &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE287, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE136, &SHAPE137, &SHAPE137, + &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE0, &SHAPE138, &SHAPE138, + &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, + &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, + &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, + &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, + &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, + &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, + &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, + &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, + &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, + &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, + &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, + &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, + &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, + &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, + &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, + &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, + &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, + &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, + &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, + &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, + &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, + &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, + &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, + &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, + &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, + &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE285, &SHAPE285, + &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE287, &SHAPE287, + &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE285, &SHAPE285, + &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE287, &SHAPE287, + &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE285, &SHAPE285, + &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE287, &SHAPE287, + &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE285, &SHAPE285, + &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE287, &SHAPE287, + &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE285, &SHAPE285, + &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE287, &SHAPE287, + &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE285, &SHAPE285, + &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE287, &SHAPE287, + &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE285, &SHAPE285, + &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE287, &SHAPE287, + &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE285, &SHAPE285, + &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE287, &SHAPE287, + &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE285, &SHAPE285, + &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE287, &SHAPE287, + &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE285, &SHAPE285, + &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE287, &SHAPE287, + &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE285, &SHAPE285, + &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE287, &SHAPE287, + &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE285, &SHAPE285, + &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE287, &SHAPE287, + &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE285, &SHAPE285, + &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE287, &SHAPE287, + &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE285, &SHAPE285, + &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE287, &SHAPE287, + &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE285, &SHAPE285, + &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE287, &SHAPE287, + &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE285, &SHAPE285, + &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE287, &SHAPE287, + &SHAPE287, &SHAPE287, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE118, &SHAPE285, &SHAPE285, + &SHAPE285, &SHAPE285, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE286, &SHAPE287, &SHAPE287, + &SHAPE287, &SHAPE287, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, - &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE1, &SHAPE1, &SHAPE289, - &SHAPE289, &SHAPE290, &SHAPE290, &SHAPE291, &SHAPE291, &SHAPE292, &SHAPE292, &SHAPE293, - &SHAPE293, &SHAPE294, &SHAPE294, &SHAPE295, &SHAPE295, &SHAPE296, &SHAPE296, &SHAPE297, - &SHAPE297, &SHAPE298, &SHAPE298, &SHAPE299, &SHAPE299, &SHAPE300, &SHAPE300, &SHAPE301, - &SHAPE301, &SHAPE302, &SHAPE302, &SHAPE303, &SHAPE303, &SHAPE304, &SHAPE304, &SHAPE305, - &SHAPE305, &SHAPE306, &SHAPE306, &SHAPE307, &SHAPE307, &SHAPE308, &SHAPE308, &SHAPE309, - &SHAPE309, &SHAPE310, &SHAPE310, &SHAPE311, &SHAPE311, &SHAPE312, &SHAPE312, &SHAPE1, - &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, - &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, - &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, - &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, - &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, - &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, - &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, - &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, - &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, - &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE136, - &SHAPE137, &SHAPE137, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE139, - &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, - &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, - &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE143, - &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, - &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, - &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, - &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, - &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, - &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, - &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, - &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, - &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE151, - &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, - &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, - &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, - &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, - &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, - &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, - &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, - &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, - &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, - &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, - &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, - &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, - &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, - &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, - &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, - &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, - &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, - &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, - &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE1, - &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, - &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, - &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, - &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, - &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, - &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, - &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, - &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, - &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, - &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE136, - &SHAPE137, &SHAPE137, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE139, - &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, - &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, - &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE143, - &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, - &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, - &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, - &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, - &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, - &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, - &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, - &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, - &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE151, - &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, - &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, - &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, - &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, - &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, - &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, - &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, - &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, - &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, - &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, - &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, - &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, - &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, - &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, - &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, - &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, - &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, - &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, - &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE1, &SHAPE1, - &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, - &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, - &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, - &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, - &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, - &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, - &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, - &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, - &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, - &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE136, - &SHAPE137, &SHAPE137, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE139, - &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, - &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, - &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE143, - &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, - &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, - &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, - &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, - &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, - &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, - &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, - &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, - &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE151, - &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, - &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, - &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, - &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, - &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, - &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, - &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, - &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, - &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, - &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, - &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, - &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, - &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, - &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, - &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, - &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, - &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, - &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, - &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE0, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, - &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, - &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, - &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, + &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE288, &SHAPE1, &SHAPE1, &SHAPE289, &SHAPE289, &SHAPE290, + &SHAPE290, &SHAPE291, &SHAPE291, &SHAPE292, &SHAPE292, &SHAPE293, &SHAPE293, &SHAPE294, + &SHAPE294, &SHAPE295, &SHAPE295, &SHAPE296, &SHAPE296, &SHAPE297, &SHAPE297, &SHAPE298, + &SHAPE298, &SHAPE299, &SHAPE299, &SHAPE300, &SHAPE300, &SHAPE301, &SHAPE301, &SHAPE302, + &SHAPE302, &SHAPE303, &SHAPE303, &SHAPE304, &SHAPE304, &SHAPE305, &SHAPE305, &SHAPE306, + &SHAPE306, &SHAPE307, &SHAPE307, &SHAPE308, &SHAPE308, &SHAPE309, &SHAPE309, &SHAPE310, + &SHAPE310, &SHAPE311, &SHAPE311, &SHAPE312, &SHAPE312, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, + &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, + &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, + &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, + &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, + &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, + &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, + &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, + &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, + &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, + &SHAPE47, &SHAPE47, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE0, + &SHAPE138, &SHAPE138, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE139, &SHAPE140, &SHAPE140, + &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, + &SHAPE142, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, + &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE143, &SHAPE144, &SHAPE144, + &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, + &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, + &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, + &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, + &SHAPE150, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, + &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, + &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, + &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, + &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE151, &SHAPE152, &SHAPE152, + &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, + &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, + &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, + &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, + &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, + &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, + &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, + &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, + &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, + &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, + &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, + &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, + &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, + &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, + &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, + &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, + &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, + &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, + &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, + &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, + &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, + &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, + &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, + &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, + &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, + &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, + &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, + &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, + &SHAPE47, &SHAPE47, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE0, + &SHAPE138, &SHAPE138, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE139, &SHAPE140, &SHAPE140, + &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, + &SHAPE142, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, + &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE143, &SHAPE144, &SHAPE144, + &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, + &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, + &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, + &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, + &SHAPE150, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, + &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, + &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, + &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, + &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE151, &SHAPE152, &SHAPE152, + &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, + &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, + &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, + &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, + &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, + &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, + &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, + &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, + &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, + &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, + &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, + &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, + &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, + &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, + &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, + &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, + &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, + &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, + &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, + &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, + &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, + &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, + &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, + &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, + &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, + &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, + &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, + &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, + &SHAPE47, &SHAPE47, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE0, + &SHAPE138, &SHAPE138, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE139, &SHAPE140, &SHAPE140, + &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, + &SHAPE142, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, + &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE143, &SHAPE144, &SHAPE144, + &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, + &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, + &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, + &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, + &SHAPE150, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, + &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, + &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, + &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, + &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE151, &SHAPE152, &SHAPE152, + &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, + &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, + &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, + &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, + &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, + &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, + &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, + &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, + &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, + &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, + &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, + &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, + &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, + &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, + &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, + &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, + &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, + &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, + &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, @@ -4298,8 +4396,11 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, - &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, + &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, + &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, + &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, + &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, @@ -4311,57 +4412,10 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, - &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE29, - &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, - &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, - &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, - &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, - &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, - &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, - &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, - &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, - &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE29, &SHAPE29, - &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, - &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, - &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, - &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, - &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, - &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, - &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, - &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, - &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE29, &SHAPE29, &SHAPE30, - &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, - &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, - &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, - &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, - &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, - &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, - &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, - &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, - &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, - &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, - &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, - &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, - &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, - &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, - &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, - &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, - &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, - &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, - &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, - &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE29, &SHAPE29, - &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, - &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, - &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, - &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, - &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, - &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, - &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, - &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, - &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE29, &SHAPE29, &SHAPE30, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, + &SHAPE1, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE8, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, @@ -4388,20 +4442,89 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, - &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, + &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, + &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, + &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, + &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, + &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, + &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, + &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, + &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, + &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, + &SHAPE47, &SHAPE47, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, + &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, + &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, + &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, + &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, + &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, + &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, + &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, + &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, + &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, + &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, + &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, + &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, + &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, + &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, + &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, + &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, + &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, + &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, + &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, + &SHAPE47, &SHAPE47, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, + &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, + &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, + &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, + &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, + &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, + &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, + &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, + &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, + &SHAPE47, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, + &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, + &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, + &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, + &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, + &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, + &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, + &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, + &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, - &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE64, - &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, - &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, - &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, - &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, - &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, - &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, - &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, - &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE64, - &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, - &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, - &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, + &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE186, + &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, + &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, + &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, + &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, + &SHAPE67, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, + &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, + &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, + &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE65, + &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, + &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, + &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, + &SHAPE67, &SHAPE67, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, + &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, + &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE67, + &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, + &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE65, + &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, + &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, + &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, + &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, + &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, + &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE64, + &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, + &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, + &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, + &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, + &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, + &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, + &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, + &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE64, + &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, + &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, + &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, @@ -4426,28 +4549,28 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, - &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, - &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, - &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, - &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, - &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE65, - &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, - &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE64, - &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, - &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, - &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, - &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, - &SHAPE67, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, - &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, - &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, - &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE65, - &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, - &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, - &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, - &SHAPE67, &SHAPE67, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, - &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, - &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE67, - &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, + &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE98, + &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE99, &SHAPE99, + &SHAPE99, &SHAPE99, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE98, &SHAPE98, &SHAPE98, + &SHAPE98, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, + &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE66, + &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE64, &SHAPE64, + &SHAPE64, &SHAPE64, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE64, &SHAPE64, &SHAPE64, + &SHAPE64, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, + &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE99, + &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE98, &SHAPE98, + &SHAPE98, &SHAPE98, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE99, &SHAPE99, &SHAPE99, + &SHAPE99, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, + &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE64, + &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE64, &SHAPE64, + &SHAPE64, &SHAPE64, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE65, &SHAPE65, &SHAPE65, + &SHAPE65, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, + &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE98, + &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE99, &SHAPE99, + &SHAPE99, &SHAPE99, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE98, &SHAPE98, &SHAPE98, + &SHAPE98, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, + &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE64, + &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE99, @@ -4483,259 +4606,238 @@ static SHAPES_MAP: [&Lazy; 26644] = [ &SHAPE66, &SHAPE66, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE99, - &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE98, &SHAPE98, - &SHAPE98, &SHAPE98, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE99, &SHAPE99, &SHAPE99, - &SHAPE99, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, - &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE66, - &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE66, &SHAPE66, - &SHAPE66, &SHAPE66, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE64, &SHAPE64, &SHAPE64, - &SHAPE64, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, - &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE98, - &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE99, &SHAPE99, - &SHAPE99, &SHAPE99, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE98, &SHAPE98, &SHAPE98, - &SHAPE98, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, - &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE66, - &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE64, &SHAPE64, - &SHAPE64, &SHAPE64, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE64, &SHAPE64, &SHAPE64, - &SHAPE64, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, - &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE99, - &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE98, &SHAPE98, - &SHAPE98, &SHAPE98, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE99, &SHAPE99, &SHAPE99, - &SHAPE99, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, - &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE64, - &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE64, &SHAPE64, - &SHAPE64, &SHAPE64, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE187, &SHAPE187, &SHAPE187, &SHAPE187, &SHAPE188, - &SHAPE188, &SHAPE188, &SHAPE188, &SHAPE187, &SHAPE187, &SHAPE187, &SHAPE187, &SHAPE188, - &SHAPE188, &SHAPE188, &SHAPE188, &SHAPE90, &SHAPE90, &SHAPE90, &SHAPE90, &SHAPE90, &SHAPE90, - &SHAPE90, &SHAPE90, &SHAPE262, &SHAPE262, &SHAPE262, &SHAPE262, &SHAPE313, &SHAPE313, - &SHAPE314, &SHAPE314, &SHAPE63, &SHAPE63, &SHAPE63, &SHAPE63, &SHAPE68, &SHAPE68, &SHAPE68, - &SHAPE68, &SHAPE73, &SHAPE73, &SHAPE73, &SHAPE73, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE1, &SHAPE187, &SHAPE187, &SHAPE187, &SHAPE187, &SHAPE188, &SHAPE188, &SHAPE188, + &SHAPE188, &SHAPE187, &SHAPE187, &SHAPE187, &SHAPE187, &SHAPE188, &SHAPE188, &SHAPE188, + &SHAPE188, &SHAPE90, &SHAPE90, &SHAPE90, &SHAPE90, &SHAPE90, &SHAPE90, &SHAPE90, &SHAPE90, + &SHAPE262, &SHAPE262, &SHAPE262, &SHAPE262, &SHAPE313, &SHAPE313, &SHAPE314, &SHAPE314, + &SHAPE63, &SHAPE63, &SHAPE63, &SHAPE63, &SHAPE68, &SHAPE68, &SHAPE68, &SHAPE68, &SHAPE73, + &SHAPE73, &SHAPE73, &SHAPE73, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE315, &SHAPE315, &SHAPE28, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE1, &SHAPE316, &SHAPE316, &SHAPE316, &SHAPE316, &SHAPE317, &SHAPE317, &SHAPE0, &SHAPE0, - &SHAPE316, &SHAPE316, &SHAPE316, &SHAPE316, &SHAPE317, &SHAPE317, &SHAPE0, &SHAPE0, &SHAPE316, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE315, + &SHAPE315, &SHAPE28, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE316, &SHAPE316, &SHAPE316, &SHAPE316, &SHAPE317, &SHAPE317, &SHAPE0, &SHAPE0, &SHAPE316, &SHAPE316, - &SHAPE316, &SHAPE316, &SHAPE317, &SHAPE317, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE316, &SHAPE316, &SHAPE317, &SHAPE317, &SHAPE0, &SHAPE0, &SHAPE316, &SHAPE316, &SHAPE316, + &SHAPE316, &SHAPE317, &SHAPE317, &SHAPE0, &SHAPE0, &SHAPE316, &SHAPE316, &SHAPE316, &SHAPE316, + &SHAPE317, &SHAPE317, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE61, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE29, - &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, - &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, - &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, - &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, - &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, - &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, - &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, - &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, - &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE186, &SHAPE186, - &SHAPE8, &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE136, &SHAPE137, - &SHAPE137, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE139, &SHAPE140, - &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, - &SHAPE142, &SHAPE142, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, - &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE143, &SHAPE144, - &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, - &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, - &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, - &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, - &SHAPE150, &SHAPE150, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, - &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, - &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, - &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, - &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE151, &SHAPE152, - &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, - &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, - &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, - &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, - &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, - &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, - &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, - &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, - &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, - &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, - &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, - &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, - &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, - &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, - &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, - &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE1, &SHAPE29, &SHAPE29, - &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, - &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, - &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, - &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, - &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, - &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, - &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, - &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, - &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE186, &SHAPE186, &SHAPE8, - &SHAPE8, &SHAPE1, &SHAPE1, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE136, &SHAPE137, &SHAPE137, - &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE139, &SHAPE140, &SHAPE140, - &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, - &SHAPE142, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, - &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE143, &SHAPE144, &SHAPE144, - &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, - &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, - &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, - &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, - &SHAPE150, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, - &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, - &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, - &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, - &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE151, &SHAPE152, &SHAPE152, - &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, - &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, - &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, - &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, - &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, - &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, - &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, - &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, - &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, - &SHAPE166, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, - &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, - &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, - &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, - &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, - &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, - &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, - &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, - &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, - &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, - &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, - &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, - &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, - &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, - &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, - &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, - &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, - &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, - &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, - &SHAPE1, &SHAPE1, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE0, - &SHAPE138, &SHAPE138, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE139, &SHAPE140, &SHAPE140, - &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, - &SHAPE142, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, - &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE143, &SHAPE144, &SHAPE144, - &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, - &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, - &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, - &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, - &SHAPE150, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, - &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, - &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, - &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, - &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE151, &SHAPE152, &SHAPE152, - &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, - &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, - &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, - &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, - &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, - &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, - &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, - &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, - &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, - &SHAPE166, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, - &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, - &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, - &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, - &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, - &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, - &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, - &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, - &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, - &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, - &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, - &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, - &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, - &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, - &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, - &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, - &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, - &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, - &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, - &SHAPE1, &SHAPE1, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE0, - &SHAPE138, &SHAPE138, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE139, &SHAPE140, &SHAPE140, - &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, - &SHAPE142, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, - &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE143, &SHAPE144, &SHAPE144, - &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, - &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, - &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, - &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, - &SHAPE150, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, - &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, - &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, - &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, - &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE151, &SHAPE152, &SHAPE152, - &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, - &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, - &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, - &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, - &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, - &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, - &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, - &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, - &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, - &SHAPE166, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, - &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, - &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, - &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, - &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, - &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, - &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, - &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, - &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, - &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, - &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, - &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE27, &SHAPE27, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE1, &SHAPE72, + &SHAPE1, &SHAPE61, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, + &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, + &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, + &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, + &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, + &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, + &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, + &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, + &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, + &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, + &SHAPE1, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE0, &SHAPE138, + &SHAPE138, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, + &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, + &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, + &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, + &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, + &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, + &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, + &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, + &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, + &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, + &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, + &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, + &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, + &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, + &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, + &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, + &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, + &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, + &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, + &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, + &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, + &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, + &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, + &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, + &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, + &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, + &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, + &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, + &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, + &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, + &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, + &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, + &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, + &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, + &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, + &SHAPE1, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE0, &SHAPE138, + &SHAPE138, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, + &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, + &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, + &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, + &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, + &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, + &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, + &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, + &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, + &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, + &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, + &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, + &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, + &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, + &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, + &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, + &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, + &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, + &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, + &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, + &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, + &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, + &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, + &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, + &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, + &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, + &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, + &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, + &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, + &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, + &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, + &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, + &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, + &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, + &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, + &SHAPE1, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE0, &SHAPE138, + &SHAPE138, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, + &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, + &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, + &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, + &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, + &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, + &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, + &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, + &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, + &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, + &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, + &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, + &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, + &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, + &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, + &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, + &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, + &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, + &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, + &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, + &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, + &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, + &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, + &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, + &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, + &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, + &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, + &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, + &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, + &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, + &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, + &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, + &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, + &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, + &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE186, &SHAPE186, &SHAPE8, &SHAPE8, &SHAPE1, + &SHAPE1, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE0, &SHAPE138, + &SHAPE138, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, + &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, + &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, + &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, + &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, + &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, + &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, + &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, + &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, + &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, + &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, + &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, + &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, + &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, + &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, + &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, + &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, + &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, + &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, + &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, + &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, + &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, + &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, + &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, + &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, + &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, + &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE27, &SHAPE27, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE1, &SHAPE72, &SHAPE72, &SHAPE72, &SHAPE72, &SHAPE72, &SHAPE72, &SHAPE72, &SHAPE72, &SHAPE72, &SHAPE72, &SHAPE72, - &SHAPE72, &SHAPE72, &SHAPE72, &SHAPE72, &SHAPE72, &SHAPE72, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE72, &SHAPE72, &SHAPE72, &SHAPE72, &SHAPE72, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, ]; diff --git a/azalea-protocol/src/packets/config/mod.rs b/azalea-protocol/src/packets/config/mod.rs index a3f02503c..4eda0f039 100755 --- a/azalea-protocol/src/packets/config/mod.rs +++ b/azalea-protocol/src/packets/config/mod.rs @@ -5,32 +5,32 @@ use azalea_protocol_macros::declare_state_packets; declare_state_packets!(ConfigPacket, Clientbound => [ + cookie_request, + custom_payload, + disconnect, + finish_configuration, keep_alive, - registry_data, + ping, reset_chat, + registry_data, resource_pack_pop, resource_pack_push, - select_known_packs, - server_links, - disconnect, - finish_configuration, - ping, - cookie_request, + store_cookie, + transfer, update_enabled_features, update_tags, - transfer, - store_cookie, - custom_payload, + select_known_packs, custom_report_details, + server_links, ], Serverbound => [ - keep_alive, - resource_pack, - select_known_packs, - finish_configuration, client_information, cookie_response, - pong, custom_payload, + finish_configuration, + keep_alive, + pong, + resource_pack, + select_known_packs, ] ); diff --git a/azalea-protocol/src/packets/game/mod.rs b/azalea-protocol/src/packets/game/mod.rs index b5bdb2b23..35c1a2fef 100755 --- a/azalea-protocol/src/packets/game/mod.rs +++ b/azalea-protocol/src/packets/game/mod.rs @@ -5,21 +5,74 @@ use azalea_protocol_macros::declare_state_packets; declare_state_packets!(GamePacket, Clientbound => [ - damage_event, - game_event, - map_item_data, - tab_list, - tag_query, - take_item_entity, + bundle_delimiter, add_entity, add_experience_orb, + animate, + award_stats, + block_changed_ack, + block_destruction, + block_entity_data, + block_event, + block_update, + boss_event, + change_difficulty, + chunk_batch_finished, + chunk_batch_start, + chunks_biomes, + clear_titles, + command_suggestions, + commands, + container_close, + container_set_content, + container_set_data, + container_set_slot, + cookie_request, + cooldown, + custom_chat_completions, + custom_payload, + damage_event, debug_sample, delete_chat, + disconnect, + disguised_chat, + entity_event, + entity_position_sync, + explode, + forget_level_chunk, + game_event, + horse_screen_open, + hurt_animation, + initialize_border, keep_alive, level_chunk_with_light, level_event, level_particles, + light_update, + login, + map_item_data, merchant_offers, + move_entity_pos, + move_entity_pos_rot, + move_minecart_along_track, + move_entity_rot, + move_vehicle, + open_book, + open_screen, + open_sign_editor, + ping, + pong_response, + place_ghost_recipe, + player_abilities, + player_chat, + player_combat_end, + player_combat_enter, + player_combat_kill, + player_info_remove, + player_info_update, + player_look_at, + player_position, + player_rotation, recipe_book_add, recipe_book_remove, recipe_book_settings, @@ -29,10 +82,10 @@ declare_state_packets!(GamePacket, resource_pack_pop, resource_pack_push, respawn, + rotate_head, section_blocks_update, select_advancements_tab, server_data, - server_links, set_action_bar_text, set_border_center, set_border_lerp_size, @@ -62,125 +115,42 @@ declare_state_packets!(GamePacket, set_time, set_title_text, set_titles_animation, + sound_entity, + sound, + start_configuration, + stop_sound, + store_cookie, + system_chat, + tab_list, + tag_query, + take_item_entity, teleport_entity, - change_difficulty, - chunk_batch_finished, - chunk_batch_start, - chunks_biomes, - disconnect, - disguised_chat, - light_update, - ping, ticking_state, ticking_step, - block_changed_ack, - block_destruction, - block_entity_data, - block_event, - block_update, - clear_titles, - place_ghost_recipe, - player_abilities, - player_chat, - player_combat_end, - player_combat_enter, - player_combat_kill, - player_info_remove, - player_info_update, - player_look_at, - player_position, - player_rotation, - animate, - entity_event, - entity_position_sync, - initialize_border, - boss_event, - command_suggestions, - commands, - container_close, - container_set_content, - container_set_data, - container_set_slot, - cookie_request, - cooldown, - forget_level_chunk, - horse_screen_open, - login, - move_entity_pos, - move_entity_pos_rot, - move_entity_rot, - move_minecart_along_track, - move_vehicle, - pong_response, - rotate_head, - sound, - sound_entity, - open_book, - open_screen, - open_sign_editor, + transfer, update_advancements, update_attributes, update_mob_effect, update_recipes, update_tags, projectile_power, - transfer, - start_configuration, - stop_sound, - store_cookie, - bundle_delimiter, - custom_chat_completions, - custom_payload, custom_report_details, - hurt_animation, - award_stats, - explode, - system_chat, + server_links, ], Serverbound => [ - paddle_boat, accept_teleportation, - edit_book, - debug_sample_subscription, - keep_alive, - recipe_book_change_settings, - recipe_book_seen_recipe, - rename_item, - resource_pack, - seen_advancements, - select_trade, - set_beacon, - set_carried_item, - set_command_block, - set_command_minecart, - set_creative_mode_slot, - set_jigsaw_block, - set_structure_block, - teleport_to_entity, + block_entity_tag_query, + bundle_item_selected, change_difficulty, - chat, chat_ack, chat_command, chat_command_signed, + chat, chat_session_update, chunk_batch_received, - jigsaw_generate, - pick_item_from_block, - pick_item_from_entity, - ping_request, - sign_update, - block_entity_tag_query, client_command, - client_information, client_tick_end, - place_recipe, - player_abilities, - player_action, - player_command, - player_input, - player_loaded, - entity_tag_query, - interact, + client_information, command_suggestion, configuration_acknowledged, container_button_click, @@ -188,17 +158,47 @@ declare_state_packets!(GamePacket, container_close, container_slot_state_changed, cookie_response, + custom_payload, + debug_sample_subscription, + edit_book, + entity_tag_query, + interact, + jigsaw_generate, + keep_alive, lock_difficulty, move_player_pos, move_player_pos_rot, move_player_rot, move_player_status_only, move_vehicle, + paddle_boat, + pick_item_from_block, + pick_item_from_entity, + ping_request, + place_recipe, + player_abilities, + player_action, + player_command, + player_input, + player_loaded, pong, - use_item, - use_item_on, - bundle_item_selected, - custom_payload, + recipe_book_change_settings, + recipe_book_seen_recipe, + rename_item, + resource_pack, + seen_advancements, + select_trade, + set_beacon, + set_carried_item, + set_command_block, + set_command_minecart, + set_creative_mode_slot, + set_jigsaw_block, + set_structure_block, + sign_update, swing, + teleport_to_entity, + use_item_on, + use_item, ] ); diff --git a/azalea-protocol/src/packets/login/c_cookie_request.rs b/azalea-protocol/src/packets/login/c_cookie_request.rs index f914def2e..d0bb0cd7f 100755 --- a/azalea-protocol/src/packets/login/c_cookie_request.rs +++ b/azalea-protocol/src/packets/login/c_cookie_request.rs @@ -1,8 +1,8 @@ use azalea_buf::AzBuf; -use azalea_chat::FormattedText; +use azalea_core::resource_location::ResourceLocation; use azalea_protocol_macros::ClientboundLoginPacket; #[derive(Clone, Debug, AzBuf, ClientboundLoginPacket)] pub struct ClientboundCookieRequest { - pub key: FormattedText, + pub key: ResourceLocation, } diff --git a/azalea-protocol/src/packets/login/c_hello.rs b/azalea-protocol/src/packets/login/c_hello.rs index a83612123..6011ec23d 100755 --- a/azalea-protocol/src/packets/login/c_hello.rs +++ b/azalea-protocol/src/packets/login/c_hello.rs @@ -3,8 +3,7 @@ use azalea_protocol_macros::ClientboundLoginPacket; #[derive(Clone, Debug, AzBuf, ClientboundLoginPacket)] pub struct ClientboundHello { - // TODO: make this len thing work - // #[len(20)] + #[limit(20)] pub server_id: String, pub public_key: Vec, pub challenge: Vec, diff --git a/azalea-protocol/src/packets/login/mod.rs b/azalea-protocol/src/packets/login/mod.rs index 227415e70..9edf50cf2 100755 --- a/azalea-protocol/src/packets/login/mod.rs +++ b/azalea-protocol/src/packets/login/mod.rs @@ -5,18 +5,18 @@ use azalea_protocol_macros::declare_state_packets; declare_state_packets!(LoginPacket, Clientbound => [ - hello, - cookie_request, - login_compression, login_disconnect, + hello, login_finished, + login_compression, custom_query, + cookie_request, ], Serverbound => [ hello, key, - cookie_response, - login_acknowledged, custom_query_answer, + login_acknowledged, + cookie_response, ] ); diff --git a/azalea-protocol/src/packets/status/mod.rs b/azalea-protocol/src/packets/status/mod.rs index 7bb1ea848..335600e31 100755 --- a/azalea-protocol/src/packets/status/mod.rs +++ b/azalea-protocol/src/packets/status/mod.rs @@ -5,11 +5,11 @@ use azalea_protocol_macros::declare_state_packets; declare_state_packets!(StatusPacket, Clientbound => [ - pong_response, status_response, + pong_response, ], Serverbound => [ - ping_request, status_request, + ping_request, ] ); diff --git a/codegen/genblocks.py b/codegen/genblocks.py index c86644519..a0732de32 100755 --- a/codegen/genblocks.py +++ b/codegen/genblocks.py @@ -27,7 +27,7 @@ def generate(): block_states_report, pixlyzer_block_datas, ordered_blocks, mappings) lib.code.shapes.generate_block_shapes( - pixlyzer_block_datas, shape_datas['shapes'], shape_datas['aabbs'], block_states_report, mappings) + pixlyzer_block_datas, shape_datas['shapes'], shape_datas['aabbs'], block_states_report) lib.code.utils.fmt() diff --git a/codegen/lib/code/packet.py b/codegen/lib/code/packet.py index ea657b801..71bc3a704 100755 --- a/codegen/lib/code/packet.py +++ b/codegen/lib/code/packet.py @@ -81,7 +81,7 @@ def packet_direction_report_to_packet_names(report): packet_id = packet['protocol_id'] name_to_id[resource_location.split(':')[-1]] = packet_id - names_sorted = [name for name in sorted(name_to_id.keys(), key=lambda item: item[1])] + names_sorted = [name for name in sorted(name_to_id, key=lambda x: name_to_id[x])] return names_sorted def get_packets(direction: str, state: str): diff --git a/codegen/lib/code/shapes.py b/codegen/lib/code/shapes.py index 1483bd74a..f5919bf9b 100755 --- a/codegen/lib/code/shapes.py +++ b/codegen/lib/code/shapes.py @@ -5,11 +5,11 @@ '../azalea-physics/src/collision/blocks.rs') -def generate_block_shapes(blocks_pixlyzer: dict, shapes: dict, aabbs: dict, block_states_report, mappings: Mappings): +def generate_block_shapes(blocks_pixlyzer: dict, shapes: dict, aabbs: dict, block_states_report): blocks, shapes = simplify_shapes(blocks_pixlyzer, shapes, aabbs) code = generate_block_shapes_code( - blocks, shapes, block_states_report, mappings) + blocks, shapes, block_states_report) with open(COLLISION_BLOCKS_RS_DIR, 'w') as f: f.write(code) @@ -63,7 +63,7 @@ def simplify_shapes(blocks: dict, shapes: dict, aabbs: dict): return new_blocks, new_shapes -def generate_block_shapes_code(blocks: dict, shapes: dict, block_states_report, mappings: Mappings): +def generate_block_shapes_code(blocks: dict, shapes: dict, block_states_report): # look at __cache__/generator-mod-*/blockCollisionShapes.json for format of blocks and shapes generated_shape_code = '' @@ -75,7 +75,9 @@ def generate_block_shapes_code(blocks: dict, shapes: dict, block_states_report, empty_shapes = [] full_shapes = [] - block_state_ids_to_shape_ids = [] + # the index into this list is the block state id + shapes_map = [] + for block_id, shape_ids in blocks.items(): if isinstance(shape_ids, int): shape_ids = [shape_ids] @@ -89,17 +91,19 @@ def generate_block_shapes_code(blocks: dict, shapes: dict, block_states_report, elif shape_id == 1 : full_shapes.append(block_state_id) - block_state_ids_to_shape_ids.append((block_state_id, shape_id)) - + while len(shapes_map) <= block_state_id: + # default to shape 1 for missing shapes (full block) + shapes_map.append(1) + shapes_map[block_state_id] = shape_id - generated_map_code = f'static SHAPES_MAP: [&Lazy; {len(block_state_ids_to_shape_ids)}] = [' + - block_state_ids_to_shape_ids = sorted(block_state_ids_to_shape_ids, key=lambda x: x[0]) + generated_map_code = f'static SHAPES_MAP: [&Lazy; {len(shapes_map)}] = [' empty_shape_match_code = convert_ints_to_rust_ranges(empty_shapes) block_shape_match_code = convert_ints_to_rust_ranges(full_shapes) - for block_state_id, shape_id in block_state_ids_to_shape_ids: + for block_state_id, shape_id in enumerate(shapes_map): generated_map_code += f'&SHAPE{shape_id},\n' generated_map_code += '];' @@ -109,7 +113,7 @@ def generate_block_shapes_code(blocks: dict, shapes: dict, block_states_report, return f''' //! Autogenerated block collisions for every block -// This file is generated from codegen/lib/code/block_shapes.py. If you want to +// This file is generated from codegen/lib/code/shapes.py. If you want to // modify it, change that file. #![allow(clippy::explicit_auto_deref)] diff --git a/codegen/migrate.py b/codegen/migrate.py index 3dcb854a4..d6a7725ea 100755 --- a/codegen/migrate.py +++ b/codegen/migrate.py @@ -31,84 +31,13 @@ new_mappings = lib.download.get_mappings_for_version(new_version_id) new_burger_data = lib.extract.get_burger_data_for_version(new_version_id) -old_packet_list = lib.extract.get_packet_list(old_version_id) -new_packet_list = lib.extract.get_packet_list(new_version_id) - - -# old_packets: dict[PacketIdentifier, str] = {} -# old_packets_data: dict[PacketIdentifier, dict] = {} -# new_packets: dict[PacketIdentifier, str] = {} -# new_packets_data: dict[PacketIdentifier, dict] = {} - -# for packet in old_packet_list: -# assert packet['class'].endswith('.class') -# packet_name = old_mappings.get_class(packet['class'][:-6]) -# packet_ident = PacketIdentifier( -# packet['id'], packet['direction'].lower(), fix_state(packet['state'])) -# old_packets[packet_ident] = packet_name -# old_packets_data[packet_ident] = packet -# for packet in new_packet_list: -# assert packet['class'].endswith('.class') -# packet_name = new_mappings.get_class(packet['class'][:-6]) -# packet_ident = PacketIdentifier( -# packet['id'], packet['direction'].lower(), fix_state(packet['state'])) -# new_packets[packet_ident] = packet_name -# new_packets_data[packet_ident] = packet - -# # find removed packets -# removed_packets: list[PacketIdentifier] = [] -# for packet, packet_name in old_packets.items(): -# if packet_name not in new_packets.values(): -# removed_packets.append(packet) -# print('Removed packet:', packet, packet_name) -# for (direction, state), packets in group_packets(removed_packets).items(): -# lib.code.packet.remove_packet_ids(packets, direction, state) - -print() - -# # find packets that changed ids -# changed_packets: dict[PacketIdentifier, int] = {} -# for old_packet, old_packet_name in old_packets.items(): -# for new_packet, new_packet_name in new_packets.items(): -# if old_packet_name == new_packet_name and old_packet.direction == new_packet.direction and old_packet.state == new_packet.state and old_packet.packet_id != new_packet.packet_id: -# changed_packets[old_packet] = new_packet.packet_id -# print('Changed packet id:', old_packet, '->', -# new_packet, f'({new_packet_name})') -# break -# for (direction, state), packets in group_packets(list(changed_packets.keys())).items(): -# id_map: dict[int, int] = {} -# for old_packet_id in packets: -# new_packet_id = changed_packets[PacketIdentifier( -# old_packet_id, direction, state)] -# id_map[old_packet_id] = new_packet_id -# lib.code.packet.change_packet_ids(id_map, direction, state) - - -# print() - -# # find added/changed packets -# added_or_changed_packets: list[PacketIdentifier] = [] -# for new_packet, packet_name in new_packets.items(): -# old_packet = None -# for old_packet_tmp, old_packet_name in old_packets.items(): -# if old_packet_name == packet_name: -# old_packet = old_packet_tmp -# break - -# if packet_name not in old_packets.values(): -# added_or_changed_packets.append(new_packet) -# print('Added packet:', new_packet, packet_name) -# elif old_packet and not lib.code.packet.are_packet_instructions_identical(new_packets_data[new_packet].get('instructions'), old_packets_data[old_packet].get('instructions')): -# added_or_changed_packets.append(new_packet) -# print('Changed packet:', new_packet, packet_name) -# for packet in added_or_changed_packets: -# lib.code.packet.generate_packet( -# new_burger_data[0]['packets']['packet'], new_mappings, packet.packet_id, packet.direction, packet.state) +new_packets_report = lib.extract.get_packets_report(new_version_id) +lib.code.packet.set_packets(new_packets_report) lib.code.version.set_protocol_version( new_burger_data[0]['version']['protocol']) -# print('Updated protocol!') +print('Updated protocol!') # old_ordered_blocks = lib.extract.get_ordered_blocks_burger(old_version_id) From 5825871dfcf5598e9768c7a3892203f48527ba4b Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 27 Nov 2024 06:13:29 +0000 Subject: [PATCH 14/18] fix examples --- azalea-block/README.md | 8 ++--- azalea-protocol/src/connect.rs | 58 +++++++++++++--------------------- 2 files changed, 26 insertions(+), 40 deletions(-) diff --git a/azalea-block/README.md b/azalea-block/README.md index 9be4c79bc..ae3b8c5f4 100755 --- a/azalea-block/README.md +++ b/azalea-block/README.md @@ -9,10 +9,10 @@ There's three block types, used for different things. You can (mostly) convert b ``` # use azalea_block::BlockState; let block_state: BlockState = azalea_block::blocks::CobblestoneWall { - east: azalea_block::properties::EastWall::Low, - north: azalea_block::properties::NorthWall::Low, - south: azalea_block::properties::SouthWall::Low, - west: azalea_block::properties::WestWall::Low, + east: azalea_block::properties::WallEast::Low, + north: azalea_block::properties::WallNorth::Low, + south: azalea_block::properties::WallSouth::Low, + west: azalea_block::properties::WallWest::Low, up: false, waterlogged: false, } diff --git a/azalea-protocol/src/connect.rs b/azalea-protocol/src/connect.rs index 5d2c8b1a3..51f45bf0e 100755 --- a/azalea-protocol/src/connect.rs +++ b/azalea-protocol/src/connect.rs @@ -64,10 +64,10 @@ pub struct WriteConnection { /// ClientIntention, PROTOCOL_VERSION, /// login::{ /// ClientboundLoginPacket, -/// s_hello::ServerboundHello, -/// s_key::ServerboundKeyPacket +/// ServerboundHello, +/// ServerboundKey /// }, -/// handshaking::client_intention::ClientIntention +/// handshake::ServerboundIntention /// } /// }; /// @@ -77,28 +77,20 @@ pub struct WriteConnection { /// let mut conn = Connection::new(&resolved_address).await?; /// /// // handshake -/// conn.write( -/// ClientIntention { -/// protocol_version: PROTOCOL_VERSION, -/// hostname: resolved_address.ip().to_string(), -/// port: resolved_address.port(), -/// intention: ClientIntention::Login, -/// } -/// .into(), -/// ) -/// .await?; +/// conn.write(ServerboundIntention { +/// protocol_version: PROTOCOL_VERSION, +/// hostname: resolved_address.ip().to_string(), +/// port: resolved_address.port(), +/// intention: ClientIntention::Login, +/// }).await?; /// /// let mut conn = conn.login(); /// /// // login -/// conn.write( -/// ServerboundHello { -/// name: "bot".to_string(), -/// profile_id: uuid::Uuid::nil(), -/// } -/// .into(), -/// ) -/// .await?; +/// conn.write(ServerboundHello { +/// name: "bot".to_string(), +/// profile_id: uuid::Uuid::nil(), +/// }).await?; /// /// let (conn, game_profile) = loop { /// let packet = conn.read().await?; @@ -106,14 +98,10 @@ pub struct WriteConnection { /// ClientboundLoginPacket::Hello(p) => { /// let e = azalea_crypto::encrypt(&p.public_key, &p.challenge).unwrap(); /// -/// conn.write( -/// ServerboundKeyPacket { -/// key_bytes: e.encrypted_public_key, -/// encrypted_challenge: e.encrypted_challenge, -/// } -/// .into(), -/// ) -/// .await?; +/// conn.write(ServerboundKey { +/// key_bytes: e.encrypted_public_key, +/// encrypted_challenge: e.encrypted_challenge, +/// }).await?; /// conn.set_encryption_key(e.secret_key); /// } /// ClientboundLoginPacket::LoginCompression(p) => { @@ -382,7 +370,7 @@ impl Connection { /// use azalea_protocol::connect::Connection; /// use azalea_protocol::packets::login::{ /// ClientboundLoginPacket, - /// s_key::ServerboundKeyPacket + /// s_key::ServerboundKey /// }; /// use uuid::Uuid; /// # use azalea_protocol::ServerAddress; @@ -411,12 +399,10 @@ impl Connection { /// e.secret_key, /// &p /// ).await?; - /// conn.write( - /// ServerboundKeyPacket { - /// key_bytes: e.encrypted_public_key, - /// encrypted_challenge: e.encrypted_challenge, - /// }.into() - /// ).await?; + /// conn.write(ServerboundKey { + /// key_bytes: e.encrypted_public_key, + /// encrypted_challenge: e.encrypted_challenge, + /// }).await?; /// conn.set_encryption_key(e.secret_key); /// } /// _ => {} From c8891dca1fe64db063840d407438bb831f6de598 Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 27 Nov 2024 06:52:35 +0000 Subject: [PATCH 15/18] update some physics code and fix ChatType --- azalea-core/src/delta.rs | 4 - azalea-core/src/position.rs | 101 ++++++++---------- azalea-physics/src/clip.rs | 33 ++---- azalea-physics/src/collision/mod.rs | 12 ++- azalea-physics/src/collision/shape.rs | 2 +- azalea-protocol/src/connect.rs | 2 +- .../src/packets/game/c_player_chat.rs | 90 +++++----------- .../src/packets/game/c_player_info_update.rs | 19 +++- azalea-protocol/src/read.rs | 2 +- azalea-registry/src/extra.rs | 34 ++++++ azalea-registry/src/lib.rs | 2 +- azalea/src/pathfinder/debug.rs | 2 +- azalea/src/pathfinder/goals.rs | 2 +- azalea/src/pathfinder/mod.rs | 2 +- azalea/src/pathfinder/moves/basic.rs | 6 +- azalea/src/pathfinder/moves/mod.rs | 2 +- 16 files changed, 149 insertions(+), 166 deletions(-) diff --git a/azalea-core/src/delta.rs b/azalea-core/src/delta.rs index cf46471bf..238262a2a 100755 --- a/azalea-core/src/delta.rs +++ b/azalea-core/src/delta.rs @@ -49,10 +49,6 @@ impl Vec3 { } } - pub fn length_squared(&self) -> f64 { - self.x * self.x + self.y * self.y + self.z * self.z - } - pub fn normalize(&self) -> Vec3 { let length = f64::sqrt(self.x * self.x + self.y * self.y + self.z * self.z); if length < 1e-4 { diff --git a/azalea-core/src/position.rs b/azalea-core/src/position.rs index 749a09479..c280a85a6 100755 --- a/azalea-core/src/position.rs +++ b/azalea-core/src/position.rs @@ -8,11 +8,9 @@ use std::{ hash::Hash, io::{Cursor, Write}, ops::{Add, AddAssign, Mul, Rem, Sub}, - str::FromStr, }; use azalea_buf::{AzBuf, AzaleaRead, AzaleaWrite, BufReadError}; -#[cfg(feature = "serde")] use serde::{Deserialize, Serialize}; use crate::resource_location::ResourceLocation; @@ -28,25 +26,25 @@ macro_rules! vec3_impl { /// Get the distance of this vector to the origin by doing `x^2 + y^2 + /// z^2`. #[inline] - pub fn length_sqr(&self) -> $type { + pub fn length_squared(&self) -> $type { self.x * self.x + self.y * self.y + self.z * self.z } /// Get the squared distance from this position to another position. - /// Equivalent to `(self - other).length_sqr()`. + /// Equivalent to `(self - other).length_squared()`. #[inline] - pub fn distance_to_sqr(&self, other: &Self) -> $type { - (self - other).length_sqr() + pub fn distance_squared_to(&self, other: &Self) -> $type { + (self - other).length_squared() } #[inline] - pub fn horizontal_distance_sqr(&self) -> $type { + pub fn horizontal_distance_squared(&self) -> $type { self.x * self.x + self.z * self.z } #[inline] - pub fn horizontal_distance_to_sqr(&self, other: &Self) -> $type { - (self - other).horizontal_distance_sqr() + pub fn horizontal_distance_squared_to(&self, other: &Self) -> $type { + (self - other).horizontal_distance_squared() } /// Return a new instance of this position with the y coordinate @@ -272,6 +270,46 @@ impl BlockPos { pub fn length_manhattan(&self) -> u32 { (self.x.abs() + self.y.abs() + self.z.abs()) as u32 } + + /// Make a new BlockPos with the lower coordinates for each axis. + /// + /// ``` + /// # use azalea_core::position::BlockPos; + /// assert_eq!( + /// BlockPos::min( + /// &BlockPos::new(1, 20, 300), + /// &BlockPos::new(50, 40, 30), + /// ), + /// BlockPos::new(1, 20, 30), + /// ); + /// ``` + pub fn min(&self, other: &Self) -> Self { + Self { + x: self.x.min(other.x), + y: self.y.min(other.y), + z: self.z.min(other.z), + } + } + + /// Make a new BlockPos with the higher coordinates for each axis. + /// + /// ``` + /// # use azalea_core::position::BlockPos; + /// assert_eq!( + /// BlockPos::max( + /// &BlockPos::new(1, 20, 300), + /// &BlockPos::new(50, 40, 30), + /// ), + /// BlockPos::new(50, 40, 300), + /// ); + /// ``` + pub fn max(&self, other: &Self) -> Self { + Self { + x: self.x.max(other.x), + y: self.y.max(other.y), + z: self.z.max(other.z), + } + } } /// Chunk coordinates are used to represent where a chunk is in the world. You @@ -645,51 +683,6 @@ impl AzaleaWrite for ChunkSectionPos { } } -fn parse_three_values(s: &str) -> Result<[T; 3], &'static str> -where - T: FromStr, - ::Err: fmt::Debug, -{ - let parts = s.split_whitespace().collect::>(); - if parts.len() != 3 { - return Err("Expected three values"); - } - - let x = parts[0].parse().map_err(|_| "Invalid X value")?; - let y = parts[1].parse().map_err(|_| "Invalid Y value")?; - let z = parts[2].parse().map_err(|_| "Invalid Z value")?; - - Ok([x, y, z]) -} - -/// Parses a string in the format "X Y Z" into a BlockPos. -/// -/// The input string should contain three integer values separated by spaces, -/// representing the x, y, and z components of the vector respectively. -/// This can be used to parse user input or from `BlockPos::to_string`. -impl FromStr for BlockPos { - type Err = &'static str; - - fn from_str(s: &str) -> Result { - let [x, y, z] = parse_three_values::(s)?; - Ok(BlockPos { x, y, z }) - } -} - -/// Parses a string in the format "X Y Z" into a Vec3. -/// -/// The input string should contain three floating-point values separated by -/// spaces, representing the x, y, and z components of the vector respectively. -/// This can be used to parse user input or from `Vec3::to_string`. -impl FromStr for Vec3 { - type Err = &'static str; - - fn from_str(s: &str) -> Result { - let [x, y, z] = parse_three_values::(s)?; - Ok(Vec3 { x, y, z }) - } -} - #[cfg(test)] mod tests { use super::*; diff --git a/azalea-physics/src/clip.rs b/azalea-physics/src/clip.rs index b68574b7d..f24721c5b 100644 --- a/azalea-physics/src/clip.rs +++ b/azalea-physics/src/clip.rs @@ -62,21 +62,15 @@ pub fn clip(chunk_storage: &ChunkStorage, context: ClipContext) -> BlockHitResul context.from, context.to, context, - |context, block_pos| { + |ctx, block_pos| { let block_state = chunk_storage.get_block_state(block_pos).unwrap_or_default(); // TODO: add fluid stuff to this (see getFluidState in vanilla source) - let block_shape = context.block_shape(block_state); - clip_with_interaction_override( - &context.from, - &context.to, - block_pos, - block_shape, - &block_state, - ) + let block_shape = ctx.block_shape(block_state); + clip_with_interaction_override(&ctx.from, &ctx.to, block_pos, block_shape, &block_state) // let block_distance = if let Some(block_hit_result) = - // block_hit_result { context.from.distance_to_sqr(& + // block_hit_result { context.from.distance_squared_to(& // block_hit_result.location) } else { - // f64::MAX + // f64::INFINITY // }; }, |context| { @@ -90,19 +84,6 @@ pub fn clip(chunk_storage: &ChunkStorage, context: ClipContext) -> BlockHitResul ) } -// default BlockHitResult clipWithInteractionOverride(Vec3 world, Vec3 from, -// BlockPos to, VoxelShape shape, BlockState block) { -// BlockHitResult blockHitResult = shape.clip(world, from, to); -// if (blockHitResult != null) { -// BlockHitResult var7 = block.getInteractionShape(this, to).clip(world, -// from, to); if (var7 != null -// && var7.getLocation().subtract(world).lengthSqr() < -// blockHitResult.getLocation().subtract(world).lengthSqr()) { return -// blockHitResult.withDirection(var7.getDirection()); } -// } - -// return blockHitResult; -// } fn clip_with_interaction_override( from: &Vec3, to: &Vec3, @@ -119,8 +100,8 @@ fn clip_with_interaction_override( let interaction_shape = block_state.shape(); let interaction_hit_result = interaction_shape.clip(from, to, block_pos); if let Some(interaction_hit_result) = interaction_hit_result { - if interaction_hit_result.location.distance_to_sqr(from) - < block_hit_result.location.distance_to_sqr(from) + if interaction_hit_result.location.distance_squared_to(from) + < block_hit_result.location.distance_squared_to(from) { return Some(block_hit_result.with_direction(interaction_hit_result.direction)); } diff --git a/azalea-physics/src/collision/mod.rs b/azalea-physics/src/collision/mod.rs index 3986dc477..7d7ddc5e4 100644 --- a/azalea-physics/src/collision/mod.rs +++ b/azalea-physics/src/collision/mod.rs @@ -58,7 +58,7 @@ fn collide(movement: &Vec3, world: &Instance, physics: &azalea_entity::Physics) // let entity_collisions = world.get_entity_collisions(self, // entity_bounding_box.expand_towards(movement)); let entity_collisions = Vec::new(); - let collided_delta = if movement.length_sqr() == 0.0 { + let collided_delta = if movement.length_squared() == 0.0 { *movement } else { collide_bounding_box( @@ -109,12 +109,16 @@ fn collide(movement: &Vec3, world: &Instance, physics: &azalea_entity::Physics) entity_collisions.clone(), ) .add(directly_up_delta); - if target_movement.horizontal_distance_sqr() > step_to_delta.horizontal_distance_sqr() { + if target_movement.horizontal_distance_squared() + > step_to_delta.horizontal_distance_squared() + { step_to_delta = target_movement; } } - if step_to_delta.horizontal_distance_sqr() > collided_delta.horizontal_distance_sqr() { + if step_to_delta.horizontal_distance_squared() + > collided_delta.horizontal_distance_squared() + { return step_to_delta.add(collide_bounding_box( &Vec3 { x: 0., @@ -162,7 +166,7 @@ pub fn move_colliding( let collide_result = collide(movement, world, physics); - let move_distance = collide_result.length_sqr(); + let move_distance = collide_result.length_squared(); if move_distance > EPSILON { // TODO: fall damage diff --git a/azalea-physics/src/collision/shape.rs b/azalea-physics/src/collision/shape.rs index fab8d8dc0..3f584952a 100755 --- a/azalea-physics/src/collision/shape.rs +++ b/azalea-physics/src/collision/shape.rs @@ -423,7 +423,7 @@ impl VoxelShape { return None; } let vector = to - from; - if vector.length_sqr() < EPSILON { + if vector.length_squared() < EPSILON { return None; } let right_after_start = from + &(vector * 0.0001); diff --git a/azalea-protocol/src/connect.rs b/azalea-protocol/src/connect.rs index 51f45bf0e..f64d9eb82 100755 --- a/azalea-protocol/src/connect.rs +++ b/azalea-protocol/src/connect.rs @@ -370,7 +370,7 @@ impl Connection { /// use azalea_protocol::connect::Connection; /// use azalea_protocol::packets::login::{ /// ClientboundLoginPacket, - /// s_key::ServerboundKey + /// ServerboundKey /// }; /// use uuid::Uuid; /// # use azalea_protocol::ServerAddress; diff --git a/azalea-protocol/src/packets/game/c_player_chat.rs b/azalea-protocol/src/packets/game/c_player_chat.rs index fe024cebb..0e9960f2c 100644 --- a/azalea-protocol/src/packets/game/c_player_chat.rs +++ b/azalea-protocol/src/packets/game/c_player_chat.rs @@ -8,6 +8,7 @@ use azalea_chat::{ use azalea_core::bitset::BitSet; use azalea_crypto::MessageSignature; use azalea_protocol_macros::ClientboundGamePacket; +use azalea_registry::{ChatType, OptionalRegistry}; use uuid::Uuid; #[derive(Clone, Debug, AzBuf, ClientboundGamePacket, PartialEq)] @@ -51,23 +52,35 @@ pub enum FilterMask { PartiallyFiltered(BitSet), } -#[derive(Copy, Clone, Debug, AzBuf, PartialEq, Eq)] -pub enum ChatType { - Chat = 0, - SayCommand = 1, - MsgCommandIncoming = 2, - MsgCommandOutgoing = 3, - TeamMsgCommandIncoming = 4, - TeamMsgCommandOutgoing = 5, - EmoteCommand = 6, -} - -#[derive(Clone, Debug, AzBuf, PartialEq)] +#[derive(Clone, Debug, PartialEq)] pub struct ChatTypeBound { pub chat_type: ChatType, pub name: FormattedText, pub target_name: Option, } +impl AzaleaRead for ChatTypeBound { + fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { + let Some(chat_type) = OptionalRegistry::::azalea_read(buf)?.0 else { + return Err(BufReadError::Custom("ChatType cannot be None".to_owned())); + }; + let name = FormattedText::azalea_read(buf)?; + let target_name = Option::::azalea_read(buf)?; + + Ok(ChatTypeBound { + chat_type, + name, + target_name, + }) + } +} +impl AzaleaWrite for ChatTypeBound { + fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> { + OptionalRegistry(Some(self.chat_type)).azalea_write(buf)?; + self.name.azalea_write(buf)?; + self.target_name.azalea_write(buf)?; + Ok(()) + } +} // must be in Client #[derive(Clone, Debug, PartialEq)] @@ -119,29 +132,6 @@ impl ClientboundPlayerChat { } } -impl ChatType { - #[must_use] - pub fn chat_translation_key(&self) -> &'static str { - match self { - ChatType::Chat => "chat.type.text", - ChatType::SayCommand => "chat.type.announcement", - ChatType::MsgCommandIncoming => "commands.message.display.incoming", - ChatType::MsgCommandOutgoing => "commands.message.display.outgoing", - ChatType::TeamMsgCommandIncoming => "chat.type.team.text", - ChatType::TeamMsgCommandOutgoing => "chat.type.team.sent", - ChatType::EmoteCommand => "chat.type.emote", - } - } - - #[must_use] - pub fn narrator_translation_key(&self) -> &'static str { - match self { - ChatType::EmoteCommand => "chat.type.emote", - _ => "chat.type.text.narrate", - } - } -} - impl AzaleaRead for PackedMessageSignature { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let id = u32::azalea_read_var(buf)?; @@ -168,33 +158,3 @@ impl AzaleaWrite for PackedMessageSignature { Ok(()) } } - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn test_read_player_chat_packet() { - let mut bytes = Cursor::new( - &[ - 55, 186, 28, 76, 92, 167, 177, 75, 188, 158, 200, 179, 191, 227, 16, 171, 145, 0, - 0, 4, 116, 101, 115, 116, 0, 0, 1, 140, 178, 225, 89, 103, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 10, 10, 0, 10, 104, 111, 118, 101, 114, 69, 118, 101, 110, 116, 10, 0, - 8, 99, 111, 110, 116, 101, 110, 116, 115, 8, 0, 4, 110, 97, 109, 101, 0, 12, 75, - 97, 115, 117, 109, 105, 77, 97, 114, 105, 115, 97, 11, 0, 2, 105, 100, 0, 0, 0, 4, - 186, 28, 76, 92, 167, 177, 75, 188, 158, 200, 179, 191, 227, 16, 171, 145, 8, 0, 4, - 116, 121, 112, 101, 0, 16, 109, 105, 110, 101, 99, 114, 97, 102, 116, 58, 112, 108, - 97, 121, 101, 114, 0, 8, 0, 6, 97, 99, 116, 105, 111, 110, 0, 11, 115, 104, 111, - 119, 95, 101, 110, 116, 105, 116, 121, 0, 10, 0, 10, 99, 108, 105, 99, 107, 69, - 118, 101, 110, 116, 8, 0, 6, 97, 99, 116, 105, 111, 110, 0, 15, 115, 117, 103, 103, - 101, 115, 116, 95, 99, 111, 109, 109, 97, 110, 100, 8, 0, 5, 118, 97, 108, 117, - 101, 0, 19, 47, 116, 101, 108, 108, 32, 75, 97, 115, 117, 109, 105, 77, 97, 114, - 105, 115, 97, 32, 0, 9, 0, 5, 101, 120, 116, 114, 97, 8, 0, 0, 0, 3, 0, 0, 0, 12, - 75, 97, 115, 117, 109, 105, 77, 97, 114, 105, 115, 97, 0, 0, 8, 0, 9, 105, 110, - 115, 101, 114, 116, 105, 111, 110, 0, 12, 75, 97, 115, 117, 109, 105, 77, 97, 114, - 105, 115, 97, 8, 0, 4, 116, 101, 120, 116, 0, 0, 0, 0, - ][..], - ); - let _packet = ClientboundPlayerChat::azalea_read(&mut bytes).unwrap(); - } -} diff --git a/azalea-protocol/src/packets/game/c_player_info_update.rs b/azalea-protocol/src/packets/game/c_player_info_update.rs index ba43564ca..73c463d5d 100644 --- a/azalea-protocol/src/packets/game/c_player_info_update.rs +++ b/azalea-protocol/src/packets/game/c_player_info_update.rs @@ -26,6 +26,7 @@ pub struct PlayerInfoEntry { pub game_mode: GameMode, pub display_name: Option, pub list_order: i32, + pub update_hat: bool, pub chat_session: Option, } @@ -56,6 +57,10 @@ pub struct UpdateDisplayNameAction { pub display_name: Option, } #[derive(Clone, Debug, AzBuf)] +pub struct UpdateHatAction { + pub update_hat: bool, +} +#[derive(Clone, Debug, AzBuf)] pub struct UpdateListOrderAction { #[var] pub list_order: i32, @@ -97,6 +102,10 @@ impl AzaleaRead for ClientboundPlayerInfoUpdate { let action = UpdateDisplayNameAction::azalea_read(buf)?; entry.display_name = action.display_name; } + if actions.update_hat { + let action = UpdateHatAction::azalea_read(buf)?; + entry.update_hat = action.update_hat; + } if actions.update_list_order { let action = UpdateListOrderAction::azalea_read(buf)?; entry.list_order = action.list_order; @@ -168,6 +177,7 @@ pub struct ActionEnumSet { pub update_listed: bool, pub update_latency: bool, pub update_display_name: bool, + pub update_hat: bool, pub update_list_order: bool, } @@ -181,7 +191,8 @@ impl AzaleaRead for ActionEnumSet { update_listed: set.index(3), update_latency: set.index(4), update_display_name: set.index(5), - update_list_order: set.index(6), + update_hat: set.index(6), + update_list_order: set.index(7), }) } } @@ -207,9 +218,12 @@ impl AzaleaWrite for ActionEnumSet { if self.update_display_name { set.set(5); } - if self.update_list_order { + if self.update_hat { set.set(6); } + if self.update_list_order { + set.set(7); + } set.azalea_write(buf)?; Ok(()) } @@ -228,6 +242,7 @@ mod tests { update_listed: false, update_latency: true, update_display_name: false, + update_hat: false, update_list_order: true, }; let mut buf = Vec::new(); diff --git a/azalea-protocol/src/read.rs b/azalea-protocol/src/read.rs index 3e333e528..d75e3bad8 100755 --- a/azalea-protocol/src/read.rs +++ b/azalea-protocol/src/read.rs @@ -351,7 +351,7 @@ where } if log::log_enabled!(log::Level::Trace) { - const DO_NOT_CUT_OFF_PACKET_LOGS: bool = false; + const DO_NOT_CUT_OFF_PACKET_LOGS: bool = true; let buf_string: String = { if !DO_NOT_CUT_OFF_PACKET_LOGS && buf.len() > 500 { diff --git a/azalea-registry/src/extra.rs b/azalea-registry/src/extra.rs index d5816e3b7..4b7e89a45 100644 --- a/azalea-registry/src/extra.rs +++ b/azalea-registry/src/extra.rs @@ -97,3 +97,37 @@ enum JukeboxSong { CreatorMusicBox => "creator_music_box", } } + +registry! { +enum ChatType { + Chat => "chat", + SayCommand => "say_command", + MsgCommandIncoming => "msg_command_incoming", + MsgCommandOutgoing => "msg_command_outgoing", + TeamMsgCommandIncoming => "team_msg_command_incoming", + TeamMsgCommandOutgoing => "team_msg_command_outgoing", + EmoteCommand => "emote_command", +} +} +impl ChatType { + #[must_use] + pub fn chat_translation_key(self) -> &'static str { + match self { + ChatType::Chat => "chat.type.text", + ChatType::SayCommand => "chat.type.announcement", + ChatType::MsgCommandIncoming => "commands.message.display.incoming", + ChatType::MsgCommandOutgoing => "commands.message.display.outgoing", + ChatType::TeamMsgCommandIncoming => "chat.type.team.text", + ChatType::TeamMsgCommandOutgoing => "chat.type.team.sent", + ChatType::EmoteCommand => "chat.type.emote", + } + } + + #[must_use] + pub fn narrator_translation_key(self) -> &'static str { + match self { + ChatType::EmoteCommand => "chat.type.emote", + _ => "chat.type.text.narrate", + } + } +} diff --git a/azalea-registry/src/lib.rs b/azalea-registry/src/lib.rs index 2df30cc73..ffead5b48 100755 --- a/azalea-registry/src/lib.rs +++ b/azalea-registry/src/lib.rs @@ -26,7 +26,7 @@ where /// A registry that might not be present. This is transmitted as a single /// varint in the protocol. #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] -pub struct OptionalRegistry(Option); +pub struct OptionalRegistry(pub Option); impl AzaleaRead for OptionalRegistry { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { diff --git a/azalea/src/pathfinder/debug.rs b/azalea/src/pathfinder/debug.rs index a5e51cdf9..ca08cbc51 100644 --- a/azalea/src/pathfinder/debug.rs +++ b/azalea/src/pathfinder/debug.rs @@ -60,7 +60,7 @@ pub fn debug_render_path_with_particles( let start_vec3 = start.center(); let end_vec3 = end.center(); - let step_count = (start_vec3.distance_to_sqr(&end_vec3).sqrt() * 4.0) as usize; + let step_count = (start_vec3.distance_squared_to(&end_vec3).sqrt() * 4.0) as usize; let target_block_state = chunks.get_block_state(&movement.target).unwrap_or_default(); let above_target_block_state = chunks diff --git a/azalea/src/pathfinder/goals.rs b/azalea/src/pathfinder/goals.rs index 7e33f7d80..531e40368 100644 --- a/azalea/src/pathfinder/goals.rs +++ b/azalea/src/pathfinder/goals.rs @@ -200,7 +200,7 @@ impl Goal for ReachBlockPosGoal { let max_pick_range = 6; let actual_pick_range = 4.5; - let distance = (self.pos - n).length_sqr(); + let distance = (self.pos - n).length_squared(); if distance > max_pick_range * max_pick_range { return false; } diff --git a/azalea/src/pathfinder/mod.rs b/azalea/src/pathfinder/mod.rs index 611ad5c50..88ae5da02 100644 --- a/azalea/src/pathfinder/mod.rs +++ b/azalea/src/pathfinder/mod.rs @@ -453,7 +453,7 @@ pub fn timeout_movement( // don't timeout if we're mining if let Some(mining) = mining { // also make sure we're close enough to the block that's being mined - if mining.pos.distance_to_sqr(&BlockPos::from(position)) < 6_i32.pow(2) { + if mining.pos.distance_squared_to(&BlockPos::from(position)) < 6_i32.pow(2) { // also reset the last_node_reached_at so we don't timeout after we finish // mining executing_path.last_node_reached_at = Instant::now(); diff --git a/azalea/src/pathfinder/moves/basic.rs b/azalea/src/pathfinder/moves/basic.rs index bb931caf9..4f0d522af 100644 --- a/azalea/src/pathfinder/moves/basic.rs +++ b/azalea/src/pathfinder/moves/basic.rs @@ -228,9 +228,9 @@ fn execute_descend_move(mut ctx: ExecuteCtx) { let start_center = start.center(); let center = target.center(); - let horizontal_distance_from_target = (center - position).horizontal_distance_sqr().sqrt(); + let horizontal_distance_from_target = (center - position).horizontal_distance_squared().sqrt(); let horizontal_distance_from_start = - (start.center() - position).horizontal_distance_sqr().sqrt(); + (start.center() - position).horizontal_distance_squared().sqrt(); let dest_ahead = Vec3::new( start_center.x + (center.x - start_center.x) * 1.5, @@ -402,7 +402,7 @@ fn execute_downward_move(mut ctx: ExecuteCtx) { let target_center = target.center(); let horizontal_distance_from_target = - (target_center - position).horizontal_distance_sqr().sqrt(); + (target_center - position).horizontal_distance_squared().sqrt(); if horizontal_distance_from_target > 0.25 { ctx.look_at(target_center); diff --git a/azalea/src/pathfinder/moves/mod.rs b/azalea/src/pathfinder/moves/mod.rs index 289741322..1a435b5fe 100644 --- a/azalea/src/pathfinder/moves/mod.rs +++ b/azalea/src/pathfinder/moves/mod.rs @@ -157,7 +157,7 @@ impl ExecuteCtx<'_, '_, '_, '_, '_, '_, '_> { /// of the current node first. pub fn mine_while_at_start(&mut self, block: BlockPos) -> bool { let horizontal_distance_from_start = (self.start.center() - self.position) - .horizontal_distance_sqr() + .horizontal_distance_squared() .sqrt(); let at_start_position = BlockPos::from(self.position) == self.start && horizontal_distance_from_start < 0.25; From b623845342ec978fd00ac2ca3c21d2707e9c4332 Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 27 Nov 2024 23:32:04 +0000 Subject: [PATCH 16/18] remove unused imports in codegen --- codegen/migrate.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/codegen/migrate.py b/codegen/migrate.py index d6a7725ea..127e6b288 100755 --- a/codegen/migrate.py +++ b/codegen/migrate.py @@ -1,5 +1,3 @@ -from lib.code.packet import fix_state -from lib.utils import PacketIdentifier, group_packets import lib.code.inventory import lib.code.language import lib.code.registry From 1f9cb0c8c3f31faaa5661ff0097432c2f7230c34 Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 27 Nov 2024 23:53:46 +0000 Subject: [PATCH 17/18] re-add some things to migrate.py and update +mc version numbers automatically --- Cargo.lock | 42 +++++++++---------- azalea-auth/Cargo.toml | 2 +- azalea-block/Cargo.toml | 2 +- azalea-block/azalea-block-macros/Cargo.toml | 2 +- azalea-brigadier/Cargo.toml | 2 +- azalea-buf/Cargo.toml | 2 +- azalea-buf/azalea-buf-macros/Cargo.toml | 2 +- azalea-chat/Cargo.toml | 2 +- azalea-client/Cargo.toml | 2 +- azalea-core/Cargo.toml | 2 +- azalea-crypto/Cargo.toml | 2 +- azalea-entity/Cargo.toml | 2 +- azalea-inventory/Cargo.toml | 2 +- .../azalea-inventory-macros/Cargo.toml | 2 +- azalea-language/Cargo.toml | 2 +- azalea-physics/Cargo.toml | 2 +- azalea-protocol/Cargo.toml | 2 +- .../azalea-protocol-macros/Cargo.toml | 2 +- azalea-registry/Cargo.toml | 2 +- .../azalea-registry-macros/Cargo.toml | 2 +- azalea-world/Cargo.toml | 2 +- azalea/Cargo.toml | 2 +- codegen/genblocks.py | 34 +++------------ codegen/lib/code/blocks.py | 27 ++++++++++-- codegen/lib/code/version.py | 23 +++++++++- codegen/migrate.py | 37 +++++++--------- 26 files changed, 108 insertions(+), 97 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e40c08387..672d54b02 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -190,7 +190,7 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "azalea" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" dependencies = [ "anyhow", "azalea-auth", @@ -229,7 +229,7 @@ dependencies = [ [[package]] name = "azalea-auth" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" dependencies = [ "azalea-buf", "azalea-crypto", @@ -249,7 +249,7 @@ dependencies = [ [[package]] name = "azalea-block" -version = "0.10.3+mc1.21.4" +version = "0.10.3+mc1.21.4-pre3" dependencies = [ "azalea-block-macros", "azalea-buf", @@ -258,7 +258,7 @@ dependencies = [ [[package]] name = "azalea-block-macros" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" dependencies = [ "proc-macro2", "quote", @@ -267,7 +267,7 @@ dependencies = [ [[package]] name = "azalea-brigadier" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" dependencies = [ "azalea-buf", "azalea-chat", @@ -278,7 +278,7 @@ dependencies = [ [[package]] name = "azalea-buf" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" dependencies = [ "azalea-buf-macros", "byteorder", @@ -291,7 +291,7 @@ dependencies = [ [[package]] name = "azalea-buf-macros" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" dependencies = [ "proc-macro2", "quote", @@ -300,7 +300,7 @@ dependencies = [ [[package]] name = "azalea-chat" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" dependencies = [ "azalea-buf", "azalea-language", @@ -313,7 +313,7 @@ dependencies = [ [[package]] name = "azalea-client" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" dependencies = [ "anyhow", "azalea-auth", @@ -347,7 +347,7 @@ dependencies = [ [[package]] name = "azalea-core" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" dependencies = [ "azalea-buf", "azalea-registry", @@ -361,7 +361,7 @@ dependencies = [ [[package]] name = "azalea-crypto" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" dependencies = [ "aes", "azalea-buf", @@ -378,7 +378,7 @@ dependencies = [ [[package]] name = "azalea-entity" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" dependencies = [ "azalea-block", "azalea-buf", @@ -401,7 +401,7 @@ dependencies = [ [[package]] name = "azalea-inventory" -version = "0.10.3+mc1.21.4" +version = "0.10.3+mc1.21.4-pre3" dependencies = [ "azalea-buf", "azalea-chat", @@ -414,7 +414,7 @@ dependencies = [ [[package]] name = "azalea-inventory-macros" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" dependencies = [ "proc-macro2", "quote", @@ -423,7 +423,7 @@ dependencies = [ [[package]] name = "azalea-language" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" dependencies = [ "serde", "serde_json", @@ -431,7 +431,7 @@ dependencies = [ [[package]] name = "azalea-physics" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" dependencies = [ "azalea-block", "azalea-core", @@ -447,7 +447,7 @@ dependencies = [ [[package]] name = "azalea-protocol" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" dependencies = [ "anyhow", "async-recursion", @@ -484,7 +484,7 @@ dependencies = [ [[package]] name = "azalea-protocol-macros" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" dependencies = [ "proc-macro2", "quote", @@ -493,7 +493,7 @@ dependencies = [ [[package]] name = "azalea-registry" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" dependencies = [ "azalea-buf", "azalea-registry-macros", @@ -503,7 +503,7 @@ dependencies = [ [[package]] name = "azalea-registry-macros" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" dependencies = [ "quote", "syn", @@ -511,7 +511,7 @@ dependencies = [ [[package]] name = "azalea-world" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" dependencies = [ "azalea-block", "azalea-buf", diff --git a/azalea-auth/Cargo.toml b/azalea-auth/Cargo.toml index 6573081dc..9aa645ee1 100644 --- a/azalea-auth/Cargo.toml +++ b/azalea-auth/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-auth" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-auth" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/azalea-block/Cargo.toml b/azalea-block/Cargo.toml index 9f5bf9674..6a136bc90 100644 --- a/azalea-block/Cargo.toml +++ b/azalea-block/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-block" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-block" -version = "0.10.3+mc1.21.4" +version = "0.10.3+mc1.21.4-pre3" [lib] diff --git a/azalea-block/azalea-block-macros/Cargo.toml b/azalea-block/azalea-block-macros/Cargo.toml index 8e3885c11..4b9c09a97 100644 --- a/azalea-block/azalea-block-macros/Cargo.toml +++ b/azalea-block/azalea-block-macros/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-block-macros" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-block/azalea-block-macros" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" [lib] proc-macro = true diff --git a/azalea-brigadier/Cargo.toml b/azalea-brigadier/Cargo.toml index 167559ea7..80a56fd77 100644 --- a/azalea-brigadier/Cargo.toml +++ b/azalea-brigadier/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-brigadier" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-brigadier" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/azalea-buf/Cargo.toml b/azalea-buf/Cargo.toml index c8b29c6f0..2c6361f2b 100644 --- a/azalea-buf/Cargo.toml +++ b/azalea-buf/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-buf" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-buf" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/azalea-buf/azalea-buf-macros/Cargo.toml b/azalea-buf/azalea-buf-macros/Cargo.toml index eca13dae7..de8a61f49 100644 --- a/azalea-buf/azalea-buf-macros/Cargo.toml +++ b/azalea-buf/azalea-buf-macros/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-buf-macros" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-buf" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" [lib] proc-macro = true diff --git a/azalea-chat/Cargo.toml b/azalea-chat/Cargo.toml index 370a8862d..5eef3d772 100644 --- a/azalea-chat/Cargo.toml +++ b/azalea-chat/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-chat" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-chat" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/azalea-client/Cargo.toml b/azalea-client/Cargo.toml index ee1e400a0..1bcd725b1 100644 --- a/azalea-client/Cargo.toml +++ b/azalea-client/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-client" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-client" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/azalea-core/Cargo.toml b/azalea-core/Cargo.toml index bc65399f4..a39ae096c 100644 --- a/azalea-core/Cargo.toml +++ b/azalea-core/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-core" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-core" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/azalea-crypto/Cargo.toml b/azalea-crypto/Cargo.toml index 6369377b6..69d189e19 100644 --- a/azalea-crypto/Cargo.toml +++ b/azalea-crypto/Cargo.toml @@ -3,7 +3,7 @@ description = "Cryptography features used in Minecraft." edition = "2021" license = "MIT" name = "azalea-crypto" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-crypto" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/azalea-entity/Cargo.toml b/azalea-entity/Cargo.toml index 77848aeef..03aa37b2a 100644 --- a/azalea-entity/Cargo.toml +++ b/azalea-entity/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "azalea-entity" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" edition = "2021" description = "Things related to Minecraft entities used by Azalea" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-entity" diff --git a/azalea-inventory/Cargo.toml b/azalea-inventory/Cargo.toml index 2c1b6fc29..d004dc8f5 100644 --- a/azalea-inventory/Cargo.toml +++ b/azalea-inventory/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-inventory" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-inventory-macros" -version = "0.10.3+mc1.21.4" +version = "0.10.3+mc1.21.4-pre3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/azalea-inventory/azalea-inventory-macros/Cargo.toml b/azalea-inventory/azalea-inventory-macros/Cargo.toml index c55729ee8..acbeff119 100644 --- a/azalea-inventory/azalea-inventory-macros/Cargo.toml +++ b/azalea-inventory/azalea-inventory-macros/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-inventory-macros" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-inventory/azalea-inventory-macros" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" [lib] proc-macro = true diff --git a/azalea-language/Cargo.toml b/azalea-language/Cargo.toml index bdc7bb4e1..27a636b4d 100644 --- a/azalea-language/Cargo.toml +++ b/azalea-language/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-language" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-language" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/azalea-physics/Cargo.toml b/azalea-physics/Cargo.toml index fe4e925ac..c95eb42ec 100644 --- a/azalea-physics/Cargo.toml +++ b/azalea-physics/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-physics" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-physics" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/azalea-protocol/Cargo.toml b/azalea-protocol/Cargo.toml index 4ed5081b0..3926fa613 100644 --- a/azalea-protocol/Cargo.toml +++ b/azalea-protocol/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-protocol" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-protocol" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/azalea-protocol/azalea-protocol-macros/Cargo.toml b/azalea-protocol/azalea-protocol-macros/Cargo.toml index 4bc8c3601..8b7194259 100644 --- a/azalea-protocol/azalea-protocol-macros/Cargo.toml +++ b/azalea-protocol/azalea-protocol-macros/Cargo.toml @@ -3,7 +3,7 @@ description = "Macros internally used in azalea-protocol." edition = "2021" license = "MIT" name = "azalea-protocol-macros" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-protocol/azalea-protocol-macros" [lib] diff --git a/azalea-registry/Cargo.toml b/azalea-registry/Cargo.toml index 0ded23c43..4a09fa39f 100644 --- a/azalea-registry/Cargo.toml +++ b/azalea-registry/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-registry" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-registry" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/azalea-registry/azalea-registry-macros/Cargo.toml b/azalea-registry/azalea-registry-macros/Cargo.toml index ad088b421..c86413bfc 100644 --- a/azalea-registry/azalea-registry-macros/Cargo.toml +++ b/azalea-registry/azalea-registry-macros/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-registry-macros" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-registry/azalea-registry-macros" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" [lib] proc-macro = true diff --git a/azalea-world/Cargo.toml b/azalea-world/Cargo.toml index c7b4680bc..1988c10ca 100644 --- a/azalea-world/Cargo.toml +++ b/azalea-world/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-world" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-world" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/azalea/Cargo.toml b/azalea/Cargo.toml index 2e2dd3452..3f78c2102 100644 --- a/azalea/Cargo.toml +++ b/azalea/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea" -version = "0.10.3+mc1.21.1" +version = "0.10.3+mc1.21.4-pre3" [package.metadata.release] pre-release-replacements = [ diff --git a/codegen/genblocks.py b/codegen/genblocks.py index a0732de32..1024072a4 100755 --- a/codegen/genblocks.py +++ b/codegen/genblocks.py @@ -7,24 +7,19 @@ import lib.extract import lib.utils -def generate(): - version_id = lib.code.version.get_version_id() - +def generate(version_id): # TODO: pixlyzer is broken so we use old data 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') - - mappings = lib.download.get_mappings_for_version(version_id) block_states_report = lib.extract.get_block_states_report(version_id) - registries = lib.extract.get_registries_report(version_id) - ordered_blocks = get_ordered_blocks(registries) + ordered_blocks = lib.code.blocks.get_ordered_blocks(registries) lib.code.blocks.generate_blocks( - block_states_report, pixlyzer_block_datas, ordered_blocks, mappings) + block_states_report, pixlyzer_block_datas, ordered_blocks) lib.code.shapes.generate_block_shapes( pixlyzer_block_datas, shape_datas['shapes'], shape_datas['aabbs'], block_states_report) @@ -33,23 +28,6 @@ def generate(): print('Done!') -def get_ordered_blocks(registries_report: dict[str, dict]) -> list[str]: - ''' - Returns a list of block ids (like ['air', 'stone', ...]) ordered by their protocol id. - ''' - blocks_registry = registries_report['minecraft:block'] - - blocks_to_ids = {} - for block_id, value in blocks_registry['entries'].items(): - prefix = 'minecraft:' - assert block_id.startswith(prefix) - block_id = block_id[len(prefix):] - protocol_id = value['protocol_id'] - blocks_to_ids[block_id] = protocol_id - - ordered_blocks = [] - for block_id in sorted(blocks_to_ids, key=blocks_to_ids.get): - ordered_blocks.append(block_id) - return ordered_blocks - -generate() + +if __name__ == '__main__': + generate(lib.code.version.get_version_id()) diff --git a/codegen/lib/code/blocks.py b/codegen/lib/code/blocks.py index 7b0ebe2f1..2733093bc 100755 --- a/codegen/lib/code/blocks.py +++ b/codegen/lib/code/blocks.py @@ -12,7 +12,7 @@ # - Block: Has properties and states. -def generate_blocks(blocks_report: dict, pixlyzer_block_datas: dict, ordered_blocks: list[str], mappings: Mappings): +def generate_blocks(blocks_report: dict, pixlyzer_block_datas: dict, ordered_blocks: list[str]): with open(BLOCKS_RS_DIR, 'r') as f: existing_code = f.read().splitlines() @@ -32,7 +32,7 @@ def generate_blocks(blocks_report: dict, pixlyzer_block_datas: dict, ordered_blo property_variants = block_data_report['properties'][property_id] property_struct_name = get_property_struct_name( - block_id, property_id, property_variants, mappings) + block_id, property_id, property_variants) if property_struct_name in properties: if not properties[property_struct_name] == property_variants: @@ -89,7 +89,7 @@ def generate_blocks(blocks_report: dict, pixlyzer_block_datas: dict, ordered_blo property_variants = block_data_report['properties'][property_id] property_struct_name = get_property_struct_name( - block_id, property_id, property_variants, mappings) + block_id, property_id, property_variants) is_boolean_property = property_variants == ['true', 'false'] @@ -156,7 +156,7 @@ def generate_blocks(blocks_report: dict, pixlyzer_block_datas: dict, ordered_blo with open(BLOCKS_RS_DIR, 'w') as f: f.write('\n'.join(new_code)) -def get_property_struct_name(block_id: str, property_id: str, property_variants: list[str], mappings: Mappings) -> str: +def get_property_struct_name(block_id: str, property_id: str, property_variants: list[str]) -> str: # these are hardcoded because otherwise they cause conflicts # some names inspired by https://github.com/feather-rs/feather/blob/main/feather/blocks/src/generated/table.rs if property_variants == ['north', 'east', 'south', 'west', 'up', 'down']: @@ -195,3 +195,22 @@ def get_property_struct_name(block_id: str, property_id: str, property_variants: def is_list_of_string_integers(l: list[str]) -> bool: return all(map(str.isdigit, l)) + +def get_ordered_blocks(registries_report: dict[str, dict]) -> list[str]: + ''' + Returns a list of block ids (like ['air', 'stone', ...]) ordered by their protocol id. + ''' + blocks_registry = registries_report['minecraft:block'] + + blocks_to_ids = {} + for block_id, value in blocks_registry['entries'].items(): + prefix = 'minecraft:' + assert block_id.startswith(prefix) + block_id = block_id[len(prefix):] + protocol_id = value['protocol_id'] + blocks_to_ids[block_id] = protocol_id + + ordered_blocks = [] + for block_id in sorted(blocks_to_ids, key=blocks_to_ids.get): + ordered_blocks.append(block_id) + return ordered_blocks diff --git a/codegen/lib/code/version.py b/codegen/lib/code/version.py index c2053da3c..ebd332397 100755 --- a/codegen/lib/code/version.py +++ b/codegen/lib/code/version.py @@ -31,7 +31,28 @@ def set_version_id(version_id: str) -> None: with open(README_DIR, 'wb') as f: f.write(readme_text.encode()) - + + # update the version in all Cargo.toml files + # version = "0.10.3+mc1.21.1" + for root, _, files in os.walk(get_dir_location('..')): + for file in files: + if file == 'Cargo.toml': + with open(os.path.join(root, file), 'r') as f: + cargo_toml = f.read().splitlines() + for i, line in enumerate(cargo_toml): + if line.strip().startswith('version = '): + replaced = re.sub(r'\+mc[^"]+?"', f'+mc{version_id}"', line) + cargo_toml[i] = replaced + break + else: + # didn't have a version line + continue + if cargo_toml[-1] != '': + # make sure there's always a trailing newline + cargo_toml.append('') + with open(os.path.join(root, file), 'w') as f: + f.write('\n'.join(cargo_toml)) + print('Updated version in README.md and Cargo.toml files') def get_protocol_version() -> str: # azalea-protocol/src/packets/mod.rs diff --git a/codegen/migrate.py b/codegen/migrate.py index 127e6b288..0d930ee12 100755 --- a/codegen/migrate.py +++ b/codegen/migrate.py @@ -37,25 +37,19 @@ 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) +print('Generating blocks and shapes...') +# TODO: pixlyzer is broken so we use old data +new_shape_datas = lib.extract.get_pixlyzer_data( + '1.20.3-pre4', 'shapes') +new_pixlyzer_block_datas = lib.extract.get_pixlyzer_data( + '1.20.3-pre4', 'blocks') +new_block_states_report = lib.extract.get_block_states_report(new_version_id) +new_registries = lib.extract.get_registries_report(new_version_id) +new_ordered_blocks = lib.code.blocks.get_ordered_blocks(new_registries) +lib.code.blocks.generate_blocks( + new_block_states_report, new_pixlyzer_block_datas, new_ordered_blocks) +lib.code.shapes.generate_block_shapes( + new_pixlyzer_block_datas, new_shape_datas['shapes'], new_shape_datas['aabbs'], new_block_states_report) print('Getting en_us.json...') language = lib.extract.get_en_us_lang(new_version_id) @@ -66,13 +60,12 @@ genregistries.generate(new_version_id) # print('Generating entity metadata...') -# burger_entities_data = new_burger_data[0]['entities'] -# lib.code.entity.generate_entity_metadata(burger_entities_data, new_mappings) +burger_entities_data = new_burger_data[0]['entities'] +lib.code.entity.generate_entity_metadata(burger_entities_data, new_mappings) print('Finishing touches, setting version in README and formatting code...') lib.code.version.set_version_id(new_version_id) - lib.code.utils.fmt() print('Done!') From 02e40594c26dce8ec950143883833c1b860f4844 Mon Sep 17 00:00:00 2001 From: mat Date: Thu, 28 Nov 2024 01:27:59 +0000 Subject: [PATCH 18/18] downgrade to 1.21.3 lol --- Cargo.lock | 76 +-- README.md | 2 +- azalea-auth/Cargo.toml | 2 +- azalea-block/Cargo.toml | 2 +- azalea-block/azalea-block-macros/Cargo.toml | 2 +- azalea-block/src/generated.rs | 94 +-- azalea-brigadier/Cargo.toml | 2 +- azalea-buf/Cargo.toml | 2 +- azalea-buf/azalea-buf-macros/Cargo.toml | 2 +- azalea-chat/Cargo.toml | 2 +- azalea-client/Cargo.toml | 2 +- azalea-core/Cargo.toml | 2 +- azalea-crypto/Cargo.toml | 2 +- azalea-entity/Cargo.toml | 2 +- azalea-entity/src/metadata.rs | 107 ++- azalea-entity/src/particle.rs | 1 - azalea-inventory/Cargo.toml | 2 +- .../azalea-inventory-macros/Cargo.toml | 2 +- azalea-language/Cargo.toml | 2 +- azalea-language/src/en_us.json | 42 +- azalea-physics/Cargo.toml | 2 +- azalea-physics/src/collision/blocks.rs | 641 ++++++++---------- azalea-protocol/Cargo.toml | 2 +- .../azalea-protocol-macros/Cargo.toml | 2 +- azalea-protocol/examples/handshake_proxy.rs | 4 +- azalea-protocol/src/packets/game/mod.rs | 4 +- ...pick_item_from_block.rs => s_pick_item.rs} | 2 +- azalea-protocol/src/packets/mod.rs | 6 +- azalea-protocol/src/write.rs | 120 ++-- azalea-registry/Cargo.toml | 2 +- .../azalea-registry-macros/Cargo.toml | 2 +- azalea-registry/src/lib.rs | 42 +- azalea-registry/src/tags/blocks.rs | 240 ++----- azalea-registry/src/tags/items.rs | 147 ++-- azalea-world/Cargo.toml | 2 +- azalea/Cargo.toml | 2 +- codegen/lib/code/version.py | 15 +- codegen/migrate.py | 1 + 38 files changed, 690 insertions(+), 896 deletions(-) rename azalea-protocol/src/packets/game/{s_pick_item_from_block.rs => s_pick_item.rs} (79%) diff --git a/Cargo.lock b/Cargo.lock index 672d54b02..f7243fd55 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -190,7 +190,7 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "azalea" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" dependencies = [ "anyhow", "azalea-auth", @@ -229,7 +229,7 @@ dependencies = [ [[package]] name = "azalea-auth" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" dependencies = [ "azalea-buf", "azalea-crypto", @@ -249,7 +249,7 @@ dependencies = [ [[package]] name = "azalea-block" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" dependencies = [ "azalea-block-macros", "azalea-buf", @@ -258,7 +258,7 @@ dependencies = [ [[package]] name = "azalea-block-macros" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" dependencies = [ "proc-macro2", "quote", @@ -267,7 +267,7 @@ dependencies = [ [[package]] name = "azalea-brigadier" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" dependencies = [ "azalea-buf", "azalea-chat", @@ -278,7 +278,7 @@ dependencies = [ [[package]] name = "azalea-buf" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" dependencies = [ "azalea-buf-macros", "byteorder", @@ -291,7 +291,7 @@ dependencies = [ [[package]] name = "azalea-buf-macros" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" dependencies = [ "proc-macro2", "quote", @@ -300,7 +300,7 @@ dependencies = [ [[package]] name = "azalea-chat" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" dependencies = [ "azalea-buf", "azalea-language", @@ -313,7 +313,7 @@ dependencies = [ [[package]] name = "azalea-client" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" dependencies = [ "anyhow", "azalea-auth", @@ -347,7 +347,7 @@ dependencies = [ [[package]] name = "azalea-core" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" dependencies = [ "azalea-buf", "azalea-registry", @@ -361,7 +361,7 @@ dependencies = [ [[package]] name = "azalea-crypto" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" dependencies = [ "aes", "azalea-buf", @@ -378,7 +378,7 @@ dependencies = [ [[package]] name = "azalea-entity" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" dependencies = [ "azalea-block", "azalea-buf", @@ -401,7 +401,7 @@ dependencies = [ [[package]] name = "azalea-inventory" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" dependencies = [ "azalea-buf", "azalea-chat", @@ -414,7 +414,7 @@ dependencies = [ [[package]] name = "azalea-inventory-macros" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" dependencies = [ "proc-macro2", "quote", @@ -423,7 +423,7 @@ dependencies = [ [[package]] name = "azalea-language" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" dependencies = [ "serde", "serde_json", @@ -431,7 +431,7 @@ dependencies = [ [[package]] name = "azalea-physics" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" dependencies = [ "azalea-block", "azalea-core", @@ -447,7 +447,7 @@ dependencies = [ [[package]] name = "azalea-protocol" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" dependencies = [ "anyhow", "async-recursion", @@ -484,7 +484,7 @@ dependencies = [ [[package]] name = "azalea-protocol-macros" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" dependencies = [ "proc-macro2", "quote", @@ -493,7 +493,7 @@ dependencies = [ [[package]] name = "azalea-registry" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" dependencies = [ "azalea-buf", "azalea-registry-macros", @@ -503,7 +503,7 @@ dependencies = [ [[package]] name = "azalea-registry-macros" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" dependencies = [ "quote", "syn", @@ -511,7 +511,7 @@ dependencies = [ [[package]] name = "azalea-world" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" dependencies = [ "azalea-block", "azalea-buf", @@ -1381,9 +1381,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.1" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" [[package]] name = "heck" @@ -1661,7 +1661,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.15.1", + "hashbrown 0.15.2", ] [[package]] @@ -1707,9 +1707,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "540654e97a3f4470a492cd30ff187bc95d89557a903a2bbf112e2fae98104ef2" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "js-sys" @@ -1731,9 +1731,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.164" +version = "0.2.166" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f" +checksum = "c2ccc108bbc0b1331bd061864e7cd823c0cab660bbe6970e66e2c0614decde36" [[package]] name = "libm" @@ -2346,9 +2346,9 @@ dependencies = [ [[package]] name = "rsa" -version = "0.9.6" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" +checksum = "47c75d7c5c6b673e58bf54d8544a9f432e3a925b0e80f7cd3602ab5c50c55519" dependencies = [ "const-oid", "digest", @@ -2405,9 +2405,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.18" +version = "0.23.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9cc1d47e243d655ace55ed38201c19ae02c148ae56412ab8750e8f0166ab7f" +checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" dependencies = [ "once_cell", "ring", @@ -2911,9 +2911,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "pin-project-lite", "tracing-attributes", @@ -2922,9 +2922,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", @@ -2933,9 +2933,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", "valuable", diff --git a/README.md b/README.md index 0453a6806..a8d40905b 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.4-pre3`._ +_Currently supported Minecraft version: `1.21.3`._ > [!WARNING] > Azalea is still very unfinished, though most crates are in a somewhat useable state diff --git a/azalea-auth/Cargo.toml b/azalea-auth/Cargo.toml index 9aa645ee1..ec39650cd 100644 --- a/azalea-auth/Cargo.toml +++ b/azalea-auth/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-auth" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-auth" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/azalea-block/Cargo.toml b/azalea-block/Cargo.toml index 6a136bc90..87e3a726b 100644 --- a/azalea-block/Cargo.toml +++ b/azalea-block/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-block" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-block" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" [lib] diff --git a/azalea-block/azalea-block-macros/Cargo.toml b/azalea-block/azalea-block-macros/Cargo.toml index 4b9c09a97..70adb167f 100644 --- a/azalea-block/azalea-block-macros/Cargo.toml +++ b/azalea-block/azalea-block-macros/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-block-macros" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-block/azalea-block-macros" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" [lib] proc-macro = true diff --git a/azalea-block/src/generated.rs b/azalea-block/src/generated.rs index de3605500..00f1299fa 100755 --- a/azalea-block/src/generated.rs +++ b/azalea-block/src/generated.rs @@ -326,8 +326,11 @@ make_block_states! { "south" => South(bool), "up" => Up(bool), "west" => West(bool), - "active" => Active(bool), - "natural" => Natural(bool), + "creaking" => Creaking { + Disabled, + Dormant, + Active, + }, "half" => TopBottom { Top, Bottom, @@ -911,31 +914,6 @@ make_block_states! { _7, }, "in_wall" => InWall(bool), - "type" => Type { - Top, - Bottom, - Double, - }, - "east" => WallEast { - None, - Low, - Tall, - }, - "north" => WallNorth { - None, - Low, - Tall, - }, - "south" => WallSouth { - None, - Low, - Tall, - }, - "west" => WallWest { - None, - Low, - Tall, - }, "age" => NetherWartAge { _0, _1, @@ -963,6 +941,26 @@ make_block_states! { }, "disarmed" => Disarmed(bool), "conditional" => Conditional(bool), + "east" => WallEast { + None, + Low, + Tall, + }, + "north" => WallNorth { + None, + Low, + Tall, + }, + "south" => WallSouth { + None, + Low, + Tall, + }, + "west" => WallWest { + None, + Low, + Tall, + }, "age" => CarrotsAge { _0, _1, @@ -1194,6 +1192,11 @@ make_block_states! { _14, _15, }, + "type" => Type { + Top, + Bottom, + Double, + }, "rotation" => WhiteBannerRotation { _0, _1, @@ -2438,9 +2441,8 @@ make_block_states! { soul_fire => BlockBehavior::new(), {}, spawner => BlockBehavior::new().requires_correct_tool_for_drops().strength(5.0, 5.0), {}, creaking_heart => BlockBehavior::new(), { - "active": Active(false), "axis": Axis::Y, - "natural": Natural(false), + "creaking": Creaking::Disabled, }, oak_stairs => BlockBehavior::new().strength(2.0, 3.0), { "facing": FacingCardinal::North, @@ -2970,15 +2972,6 @@ make_block_states! { "waterlogged": Waterlogged(false), "west": West(false), }, - resin_clump => BlockBehavior::new(), { - "down": Down(false), - "east": East(false), - "north": North(false), - "south": South(false), - "up": Up(false), - "waterlogged": Waterlogged(false), - "west": West(false), - }, oak_fence_gate => BlockBehavior::new().strength(2.0, 3.0), { "facing": FacingCardinal::North, "in_wall": InWall(false), @@ -3007,27 +3000,6 @@ make_block_states! { "snowy": Snowy(false), }, lily_pad => BlockBehavior::new(), {}, - resin_block => BlockBehavior::new(), {}, - resin_bricks => BlockBehavior::new(), {}, - resin_brick_stairs => BlockBehavior::new(), { - "facing": FacingCardinal::North, - "half": TopBottom::Bottom, - "shape": StairShape::Straight, - "waterlogged": Waterlogged(false), - }, - resin_brick_slab => BlockBehavior::new(), { - "type": Type::Bottom, - "waterlogged": Waterlogged(false), - }, - resin_brick_wall => BlockBehavior::new(), { - "east": WallEast::None, - "north": WallNorth::None, - "south": WallSouth::None, - "up": Up(true), - "waterlogged": Waterlogged(false), - "west": WallWest::None, - }, - chiseled_resin_bricks => BlockBehavior::new(), {}, nether_bricks => BlockBehavior::new().requires_correct_tool_for_drops().strength(2.0, 6.0), {}, nether_brick_fence => BlockBehavior::new().requires_correct_tool_for_drops().strength(2.0, 6.0), { "east": East(false), @@ -5574,9 +5546,5 @@ make_block_states! { pale_hanging_moss => BlockBehavior::new(), { "tip": Tip(true), }, - open_eyeblossom => BlockBehavior::new(), {}, - closed_eyeblossom => BlockBehavior::new(), {}, - potted_open_eyeblossom => BlockBehavior::new(), {}, - potted_closed_eyeblossom => BlockBehavior::new(), {}, } } diff --git a/azalea-brigadier/Cargo.toml b/azalea-brigadier/Cargo.toml index 80a56fd77..2b5bddcc5 100644 --- a/azalea-brigadier/Cargo.toml +++ b/azalea-brigadier/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-brigadier" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-brigadier" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/azalea-buf/Cargo.toml b/azalea-buf/Cargo.toml index 2c6361f2b..3c8572c88 100644 --- a/azalea-buf/Cargo.toml +++ b/azalea-buf/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-buf" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-buf" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/azalea-buf/azalea-buf-macros/Cargo.toml b/azalea-buf/azalea-buf-macros/Cargo.toml index de8a61f49..8920d0353 100644 --- a/azalea-buf/azalea-buf-macros/Cargo.toml +++ b/azalea-buf/azalea-buf-macros/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-buf-macros" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-buf" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" [lib] proc-macro = true diff --git a/azalea-chat/Cargo.toml b/azalea-chat/Cargo.toml index 5eef3d772..b4f38ac33 100644 --- a/azalea-chat/Cargo.toml +++ b/azalea-chat/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-chat" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-chat" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/azalea-client/Cargo.toml b/azalea-client/Cargo.toml index 1bcd725b1..3746a0762 100644 --- a/azalea-client/Cargo.toml +++ b/azalea-client/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-client" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-client" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/azalea-core/Cargo.toml b/azalea-core/Cargo.toml index a39ae096c..ddde62163 100644 --- a/azalea-core/Cargo.toml +++ b/azalea-core/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-core" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-core" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/azalea-crypto/Cargo.toml b/azalea-crypto/Cargo.toml index 69d189e19..a9c6b2543 100644 --- a/azalea-crypto/Cargo.toml +++ b/azalea-crypto/Cargo.toml @@ -3,7 +3,7 @@ description = "Cryptography features used in Minecraft." edition = "2021" license = "MIT" name = "azalea-crypto" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-crypto" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/azalea-entity/Cargo.toml b/azalea-entity/Cargo.toml index 03aa37b2a..14068d206 100644 --- a/azalea-entity/Cargo.toml +++ b/azalea-entity/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "azalea-entity" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" edition = "2021" description = "Things related to Minecraft entities used by Azalea" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-entity" diff --git a/azalea-entity/src/metadata.rs b/azalea-entity/src/metadata.rs index a70d853d3..4054bfb3c 100644 --- a/azalea-entity/src/metadata.rs +++ b/azalea-entity/src/metadata.rs @@ -2564,10 +2564,6 @@ impl Default for CowMetadataBundle { pub struct CanMove(pub bool); #[derive(Component, Deref, DerefMut, Clone)] pub struct IsActive(pub bool); -#[derive(Component, Deref, DerefMut, Clone)] -pub struct IsTearingDown(pub bool); -#[derive(Component, Deref, DerefMut, Clone)] -pub struct CreakingHomePos(pub Option); #[derive(Component)] pub struct Creaking; impl Creaking { @@ -2583,12 +2579,6 @@ impl Creaking { 17 => { entity.insert(IsActive(d.value.into_boolean()?)); } - 18 => { - entity.insert(IsTearingDown(d.value.into_boolean()?)); - } - 19 => { - entity.insert(CreakingHomePos(d.value.into_optional_block_pos()?)); - } _ => {} } Ok(()) @@ -2601,8 +2591,6 @@ pub struct CreakingMetadataBundle { parent: AbstractMonsterMetadataBundle, can_move: CanMove, is_active: IsActive, - is_tearing_down: IsTearingDown, - creaking_home_pos: CreakingHomePos, } impl Default for CreakingMetadataBundle { fn default() -> Self { @@ -2650,8 +2638,79 @@ impl Default for CreakingMetadataBundle { }, can_move: CanMove(true), is_active: IsActive(false), - is_tearing_down: IsTearingDown(false), - creaking_home_pos: CreakingHomePos(None), + } + } +} + +#[derive(Component)] +pub struct CreakingTransient; +impl CreakingTransient { + pub fn apply_metadata( + entity: &mut bevy_ecs::system::EntityCommands, + d: EntityDataItem, + ) -> Result<(), UpdateMetadataError> { + match d.index { + 0..=17 => Creaking::apply_metadata(entity, d)?, + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct CreakingTransientMetadataBundle { + _marker: CreakingTransient, + parent: CreakingMetadataBundle, +} +impl Default for CreakingTransientMetadataBundle { + fn default() -> Self { + Self { + _marker: CreakingTransient, + parent: CreakingMetadataBundle { + _marker: Creaking, + parent: AbstractMonsterMetadataBundle { + _marker: AbstractMonster, + parent: AbstractCreatureMetadataBundle { + _marker: AbstractCreature, + parent: AbstractInsentientMetadataBundle { + _marker: AbstractInsentient, + parent: AbstractLivingMetadataBundle { + _marker: AbstractLiving, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + auto_spin_attack: AutoSpinAttack(false), + abstract_living_using_item: AbstractLivingUsingItem(false), + health: Health(1.0), + effect_particles: EffectParticles(Default::default()), + effect_ambience: EffectAmbience(false), + arrow_count: ArrowCount(0), + stinger_count: StingerCount(0), + sleeping_pos: SleepingPos(None), + }, + no_ai: NoAi(false), + left_handed: LeftHanded(false), + aggressive: Aggressive(false), + }, + }, + }, + can_move: CanMove(true), + is_active: IsActive(false), + }, } } } @@ -8339,7 +8398,7 @@ impl Default for RavagerMetadataBundle { #[derive(Component, Deref, DerefMut, Clone)] pub struct SalmonFromBucket(pub bool); #[derive(Component, Deref, DerefMut, Clone)] -pub struct SalmonKind(pub i32); +pub struct SalmonKind(pub String); #[derive(Component)] pub struct Salmon; impl Salmon { @@ -8353,7 +8412,7 @@ impl Salmon { entity.insert(SalmonFromBucket(d.value.into_boolean()?)); } 17 => { - entity.insert(SalmonKind(d.value.into_int()?)); + entity.insert(SalmonKind(d.value.into_string()?)); } _ => {} } @@ -10450,7 +10509,7 @@ impl Default for TropicalFishMetadataBundle { } #[derive(Component, Deref, DerefMut, Clone)] -pub struct TurtleHomePos(pub BlockPos); +pub struct HomePos(pub BlockPos); #[derive(Component, Deref, DerefMut, Clone)] pub struct HasEgg(pub bool); #[derive(Component, Deref, DerefMut, Clone)] @@ -10471,7 +10530,7 @@ impl Turtle { match d.index { 0..=16 => AbstractAnimal::apply_metadata(entity, d)?, 17 => { - entity.insert(TurtleHomePos(d.value.into_block_pos()?)); + entity.insert(HomePos(d.value.into_block_pos()?)); } 18 => { entity.insert(HasEgg(d.value.into_boolean()?)); @@ -10498,7 +10557,7 @@ impl Turtle { pub struct TurtleMetadataBundle { _marker: Turtle, parent: AbstractAnimalMetadataBundle, - turtle_home_pos: TurtleHomePos, + home_pos: HomePos, has_egg: HasEgg, laying_egg: LayingEgg, travel_pos: TravelPos, @@ -10553,7 +10612,7 @@ impl Default for TurtleMetadataBundle { abstract_ageable_baby: AbstractAgeableBaby(false), }, }, - turtle_home_pos: TurtleHomePos(BlockPos::new(0, 0, 0)), + home_pos: HomePos(BlockPos::new(0, 0, 0)), has_egg: HasEgg(false), laying_egg: LayingEgg(false), travel_pos: TravelPos(BlockPos::new(0, 0, 0)), @@ -12644,6 +12703,11 @@ pub fn apply_metadata( 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)?; @@ -13338,6 +13402,9 @@ pub fn apply_default_metadata( azalea_registry::EntityKind::Creaking => { entity.insert(CreakingMetadataBundle::default()); } + azalea_registry::EntityKind::CreakingTransient => { + entity.insert(CreakingTransientMetadataBundle::default()); + } azalea_registry::EntityKind::Creeper => { entity.insert(CreeperMetadataBundle::default()); } diff --git a/azalea-entity/src/particle.rs b/azalea-entity/src/particle.rs index 76559e58d..fa948f858 100755 --- a/azalea-entity/src/particle.rs +++ b/azalea-entity/src/particle.rs @@ -163,7 +163,6 @@ impl From for Particle { ParticleKind::Fishing => Self::Fishing, ParticleKind::Flame => Self::Flame, ParticleKind::CherryLeaves => Self::CherryLeaves, - ParticleKind::PaleOakLeaves => Self::PaleOakLeaves, ParticleKind::SculkSoul => Self::SculkSoul, ParticleKind::SculkCharge => Self::SculkCharge(SculkChargeParticle::default()), ParticleKind::SculkChargePop => Self::SculkChargePop, diff --git a/azalea-inventory/Cargo.toml b/azalea-inventory/Cargo.toml index d004dc8f5..5633c6dd0 100644 --- a/azalea-inventory/Cargo.toml +++ b/azalea-inventory/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-inventory" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-inventory-macros" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/azalea-inventory/azalea-inventory-macros/Cargo.toml b/azalea-inventory/azalea-inventory-macros/Cargo.toml index acbeff119..92b17e978 100644 --- a/azalea-inventory/azalea-inventory-macros/Cargo.toml +++ b/azalea-inventory/azalea-inventory-macros/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-inventory-macros" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-inventory/azalea-inventory-macros" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" [lib] proc-macro = true diff --git a/azalea-language/Cargo.toml b/azalea-language/Cargo.toml index 27a636b4d..2038f31e5 100644 --- a/azalea-language/Cargo.toml +++ b/azalea-language/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-language" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-language" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/azalea-language/src/en_us.json b/azalea-language/src/en_us.json index 2826affe5..e1819511a 100755 --- a/azalea-language/src/en_us.json +++ b/azalea-language/src/en_us.json @@ -1429,7 +1429,6 @@ "block.minecraft.chiseled_polished_blackstone": "Chiseled Polished Blackstone", "block.minecraft.chiseled_quartz_block": "Chiseled Quartz Block", "block.minecraft.chiseled_red_sandstone": "Chiseled Red Sandstone", - "block.minecraft.chiseled_resin_bricks": "Chiseled Resin Bricks", "block.minecraft.chiseled_sandstone": "Chiseled Sandstone", "block.minecraft.chiseled_stone_bricks": "Chiseled Stone Bricks", "block.minecraft.chiseled_tuff": "Chiseled Tuff", @@ -1437,7 +1436,6 @@ "block.minecraft.chorus_flower": "Chorus Flower", "block.minecraft.chorus_plant": "Chorus Plant", "block.minecraft.clay": "Clay", - "block.minecraft.closed_eyeblossom": "Closed Eyeblossom", "block.minecraft.coal_block": "Block of Coal", "block.minecraft.coal_ore": "Coal Ore", "block.minecraft.coarse_dirt": "Coarse Dirt", @@ -1858,7 +1856,6 @@ "block.minecraft.obsidian": "Obsidian", "block.minecraft.ochre_froglight": "Ochre Froglight", "block.minecraft.ominous_banner": "Ominous Banner", - "block.minecraft.open_eyeblossom": "Open Eyeblossom", "block.minecraft.orange_banner": "Orange Banner", "block.minecraft.orange_bed": "Orange Bed", "block.minecraft.orange_candle": "Orange Candle", @@ -1974,7 +1971,6 @@ "block.minecraft.potted_brown_mushroom": "Potted Brown Mushroom", "block.minecraft.potted_cactus": "Potted Cactus", "block.minecraft.potted_cherry_sapling": "Potted Cherry Sapling", - "block.minecraft.potted_closed_eyeblossom": "Potted Closed Eyeblossom", "block.minecraft.potted_cornflower": "Potted Cornflower", "block.minecraft.potted_crimson_fungus": "Potted Crimson Fungus", "block.minecraft.potted_crimson_roots": "Potted Crimson Roots", @@ -1987,7 +1983,6 @@ "block.minecraft.potted_lily_of_the_valley": "Potted Lily of the Valley", "block.minecraft.potted_mangrove_propagule": "Potted Mangrove Propagule", "block.minecraft.potted_oak_sapling": "Potted Oak Sapling", - "block.minecraft.potted_open_eyeblossom": "Potted Open Eyeblossom", "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", @@ -2073,12 +2068,6 @@ "block.minecraft.reinforced_deepslate": "Reinforced Deepslate", "block.minecraft.repeater": "Redstone Repeater", "block.minecraft.repeating_command_block": "Repeating Command Block", - "block.minecraft.resin_block": "Block of Resin", - "block.minecraft.resin_brick_slab": "Resin Brick Slab", - "block.minecraft.resin_brick_stairs": "Resin Brick Stairs", - "block.minecraft.resin_brick_wall": "Resin Brick Wall", - "block.minecraft.resin_bricks": "Resin Bricks", - "block.minecraft.resin_clump": "Resin Clump", "block.minecraft.respawn_anchor": "Respawn Anchor", "block.minecraft.rooted_dirt": "Rooted Dirt", "block.minecraft.rose_bush": "Rose Bush", @@ -2442,7 +2431,6 @@ "commands.advancement.revoke.one.to.one.failure": "Couldn't revoke advancement %s from %s as they don't have it", "commands.advancement.revoke.one.to.one.success": "Revoked the advancement %s from %s", "commands.attribute.base_value.get.success": "Base value of attribute %s for entity %s is %s", - "commands.attribute.base_value.reset.success": "Base value for attribute %s for entity %s reset to default %s", "commands.attribute.base_value.set.success": "Base value for attribute %s for entity %s set to %s", "commands.attribute.failed.entity": "%s is not a valid entity for this command", "commands.attribute.failed.modifier_already_present": "Modifier %s is already present on attribute %s for entity %s", @@ -4370,8 +4358,6 @@ "item.minecraft.red_bundle": "Red Bundle", "item.minecraft.red_dye": "Red Dye", "item.minecraft.redstone": "Redstone Dust", - "item.minecraft.resin_brick": "Resin Brick", - "item.minecraft.resin_clump": "Resin Clump", "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", @@ -4583,9 +4569,6 @@ "item.modifiers.mainhand": "When in Main Hand:", "item.modifiers.offhand": "When in Off Hand:", "item.nbt_tags": "NBT: %s tag(s)", - "item.op_block_warning.line1": "Warning:", - "item.op_block_warning.line2": "Use of this item might lead to command execution", - "item.op_block_warning.line3": "Do not use unless you know the exact contents!", "item.unbreakable": "Unbreakable", "itemGroup.buildingBlocks": "Building Blocks", "itemGroup.coloredBlocks": "Colored Blocks", @@ -6016,7 +5999,6 @@ "structure_block.size.z": "structure size z", "structure_block.structure_name": "Structure Name", "subtitles.ambient.cave": "Eerie noise", - "subtitles.ambient.sound": "Eerie noise", "subtitles.block.amethyst_block.chime": "Amethyst chimes", "subtitles.block.amethyst_block.resonate": "Amethyst resonates", "subtitles.block.anvil.destroy": "Anvil destroyed", @@ -6068,7 +6050,7 @@ "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 grumbles", + "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", @@ -6080,16 +6062,12 @@ "subtitles.block.enchantment_table.use": "Enchanting Table used", "subtitles.block.end_portal_frame.fill": "Eye of Ender attaches", "subtitles.block.end_portal.spawn": "End Portal opens", - "subtitles.block.eyeblossom.close": "Eyeblossom closes", - "subtitles.block.eyeblossom.idle": "Eyeblossom whispers", - "subtitles.block.eyeblossom.open": "Eyeblossom opens", "subtitles.block.fence_gate.toggle": "Fence Gate creaks", "subtitles.block.fire.ambient": "Fire crackles", "subtitles.block.fire.extinguish": "Fire extinguished", "subtitles.block.frogspawn.hatch": "Tadpole hatches", "subtitles.block.furnace.fire_crackle": "Furnace crackles", "subtitles.block.generic.break": "Block broken", - "subtitles.block.generic.fall": "Something falls on a block", "subtitles.block.generic.footsteps": "Footsteps", "subtitles.block.generic.hit": "Block breaking", "subtitles.block.generic.place": "Block placed", @@ -6262,15 +6240,15 @@ "subtitles.entity.cow.death": "Cow dies", "subtitles.entity.cow.hurt": "Cow hurts", "subtitles.entity.cow.milk": "Cow gets milked", - "subtitles.entity.creaking.activate": "Creaking watches", + "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 calms", - "subtitles.entity.creaking.death": "Creaking crumbles", + "subtitles.entity.creaking.deactivate": "Creaking deactivates", + "subtitles.entity.creaking.death": "Creaking dies", "subtitles.entity.creaking.freeze": "Creaking stops", - "subtitles.entity.creaking.spawn": "Creaking manifests", - "subtitles.entity.creaking.sway": "Creaking is hit", - "subtitles.entity.creaking.twitch": "Creaking twitches", + "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", @@ -6337,7 +6315,6 @@ "subtitles.entity.firework_rocket.blast": "Firework blasts", "subtitles.entity.firework_rocket.launch": "Firework launches", "subtitles.entity.firework_rocket.twinkle": "Firework twinkles", - "subtitles.entity.fish.swim": "Splashes", "subtitles.entity.fishing_bobber.retrieve": "Bobber retrieved", "subtitles.entity.fishing_bobber.splash": "Fishing Bobber splashes", "subtitles.entity.fishing_bobber.throw": "Bobber thrown", @@ -6457,8 +6434,6 @@ "subtitles.entity.magma_cube.death": "Magma Cube dies", "subtitles.entity.magma_cube.hurt": "Magma Cube hurts", "subtitles.entity.magma_cube.squish": "Magma Cube squishes", - "subtitles.entity.minecart.inside": "Minecart jangles", - "subtitles.entity.minecart.inside_underwater": "Minecart jangles underwater", "subtitles.entity.minecart.riding": "Minecart rolls", "subtitles.entity.mooshroom.convert": "Mooshroom transforms", "subtitles.entity.mooshroom.eat": "Mooshroom eats", @@ -6615,7 +6590,6 @@ "subtitles.entity.skeleton_horse.ambient": "Skeleton Horse cries", "subtitles.entity.skeleton_horse.death": "Skeleton Horse dies", "subtitles.entity.skeleton_horse.hurt": "Skeleton Horse hurts", - "subtitles.entity.skeleton_horse.jump_water": "Skeleton Horse jumps", "subtitles.entity.skeleton_horse.swim": "Skeleton Horse swims", "subtitles.entity.skeleton.ambient": "Skeleton rattles", "subtitles.entity.skeleton.converted_to_stray": "Skeleton converts to Stray", @@ -6828,7 +6802,6 @@ "subtitles.item.crossbow.load": "Crossbow loads", "subtitles.item.crossbow.shoot": "Crossbow fires", "subtitles.item.dye.use": "Dye stains", - "subtitles.item.elytra.flying": "Swoosh", "subtitles.item.firecharge.use": "Fireball whooshes", "subtitles.item.flintandsteel.use": "Flint and Steel click", "subtitles.item.glow_ink_sac.use": "Glow Ink Sac splotches", @@ -6963,7 +6936,6 @@ "trim_material.minecraft.netherite": "Netherite Material", "trim_material.minecraft.quartz": "Quartz Material", "trim_material.minecraft.redstone": "Redstone Material", - "trim_material.minecraft.resin": "Resin Material", "trim_pattern.minecraft.bolt": "Bolt Armor Trim", "trim_pattern.minecraft.coast": "Coast Armor Trim", "trim_pattern.minecraft.dune": "Dune Armor Trim", diff --git a/azalea-physics/Cargo.toml b/azalea-physics/Cargo.toml index c95eb42ec..d668db1b7 100644 --- a/azalea-physics/Cargo.toml +++ b/azalea-physics/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-physics" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-physics" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/azalea-physics/src/collision/blocks.rs b/azalea-physics/src/collision/blocks.rs index eb6c43012..d3c976ac2 100644 --- a/azalea-physics/src/collision/blocks.rs +++ b/azalea-physics/src/collision/blocks.rs @@ -1768,15 +1768,15 @@ impl BlockWithShape for BlockState { } fn is_shape_empty(&self) -> bool { - matches!(self.id, 0|29..=42|45..=84|86..=117|1987..=2034|2047..=2053|2106..=2133|2398..=2915|3033..=4328|4333..=4340|4357..=4580|4613..=4676|4749..=4768|4849..=4904|4913..=5376|5441..=5696|5793..=5818|5883..=5896|5899..=5902|5907..=5941|5968..=5983|6027..=6031|6033..=6034|7046..=7229|7358..=7359|7362..=7363|7366..=7367|7370..=7371|7374..=7375|7378..=7379|7382..=7383|7386..=7387|8159..=8162|8180|8295..=8438|8699|8702|9023|9026|9370..=9553|9578..=9625|9942..=9973|10119..=10142|11246..=11277|11626..=11957|12195..=12196|12199..=12200|12203..=12204|12207..=12208|12211..=12212|12215..=12216|12219..=12220|12223..=12224|12227..=12228|12231..=12232|12235..=12236|12239..=12240|12243..=12244|12247..=12248|12251..=12252|12255..=12256|12259..=12260|12263..=12264|12267..=12268|12271..=12272|12275..=12276|12279..=12280|12283..=12284|12287..=12288|12291..=12292|12295..=12296|12299..=12300|12303..=12304|12307..=12308|12311..=12312|12315..=12316|12319..=12320|12323..=12324|12327..=12328|12331..=12332|12335..=12336|12339..=12340|12343..=12344|12347..=12348|12351..=12352|12355..=12356|12359..=12360|12363..=12364|12367..=12368|12371..=12372|12375..=12376|12379..=12380|12383..=12384|12419..=12420|12423..=12424|12427..=12428|12431..=12432|12435..=12436|12439..=12440|12443..=12444|12447..=12448|12451..=12452|12455..=12456|12459..=12460|12463..=12464|12467..=12468|12471..=12472|12475..=12476|12479..=12480|13508..=13509|13512|13514|13516|13518|13520..=13525|13527|13562|13773..=13799|13826..=13945|13957|13971..=13974|15179|15182|15503|15506|15827|15830|16151|16154|16475|16478|16799|16802|17123|17126|17447|17450|17771|17774|18095|18098|18419|18422|18743|18746|19067|19070|19588..=19591|19605|19607..=19608|19622|19624..=19678|19693..=19696|19889..=19890|19893..=19894|19897..=19898|19901..=19902|19905..=19906|19909..=19910|19913..=19914|19917..=19918|19921..=19922|19925..=19926|19929..=19930|19933..=19934|19937..=19938|19941..=19942|19945..=19946|19949..=19950|20113..=20160|20289..=20368|20560|20563|20980|20983|21385..=21410|21417|21420|22187|22190|22598|22601|23010|23013|23331|23813..=23940|25782..=25836|25840..=25855|25863..=25864|25871..=25872|25879..=25880|25887..=25914|26013|26016|26424|26427|26835|26838|27246|27249|27585) + 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..=21|26..=28|85|118..=156|160..=188|192..=245|249..=447|476..=1730|2041..=2046|2060..=2065|2090..=2105|2134..=2397|2916|4329..=4332|4349..=4356|5903..=5906|5949..=5950|5967|5984..=5985|6018|6020..=6026|6032|6035..=6042|6114..=6129|6770..=6973|7044..=7045|7630..=7631|8046|8189|8191..=8192|8285..=8286|8439|8680..=8692|10022..=10023|10034..=10038|10143..=10170|11243..=11245|11342..=11344|11589..=11590|11595..=11596|11601..=11606|11623..=11625|11958..=11960|12045..=12046|12051..=12052|12057..=12058|12063..=12064|12069..=12070|12075..=12076|12081..=12082|12093..=12094|12099..=12100|12105..=12106|12111..=12112|12117..=12118|12123..=12124|12129..=12130|12135..=12136|12141..=12142|12147..=12148|12153..=12154|12159..=12160|12165..=12166|12171..=12172|12177..=12178|12183..=12184|12189..=12194|13417..=13426|13507|13528..=13561|13563..=13772|13800|13816..=13825|13954|15099..=15100|15105..=15106|15111..=15112|15117..=15118|15123..=15124|15129..=15130|15135..=15136|15141..=15142|15147..=15148|15153..=15154|15159..=15160|15165..=15166|15171..=15172|19417..=19450|19479|19592..=19604|19606|19609..=19621|19623|19679..=19680|19685..=19686|19691..=19692|20369..=20384|20394..=20457|20459..=20467|20472..=20473|20882..=20887|20892..=20893|21298|21383..=21384|21735..=21737|22044..=22045|22094|22099..=22100|22505|22510..=22511|22916..=22917|22922..=22923|23328..=23330|23812|23941..=23942|23951..=23968|24293..=24294|24299..=24300|24305..=24306|24311..=24320|24645..=24646|24651..=24652|24657..=24658|24663..=24664|25689..=25736|25781|25856|25915|25917..=25920|26005..=26006|26331|26416..=26417|26742|26827..=26828|27153|27238..=27239|27564..=27573|27576..=27584|27586|27603..=27656) + 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) } } -static SHAPES_MAP: [&LazyLock; 27657] = [ +static SHAPES_MAP: [&LazyLock; 27113] = [ &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, @@ -2069,20 +2069,19 @@ static SHAPES_MAP: [&LazyLock; 27657] = [ &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, - &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, - &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, - &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, - &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, - &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, - &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, - &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, - &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, - &SHAPE53, &SHAPE53, &SHAPE54, &SHAPE54, &SHAPE55, &SHAPE55, &SHAPE53, &SHAPE53, &SHAPE55, - &SHAPE55, &SHAPE54, &SHAPE54, &SHAPE53, &SHAPE53, &SHAPE56, &SHAPE56, &SHAPE57, &SHAPE57, - &SHAPE53, &SHAPE53, &SHAPE57, &SHAPE57, &SHAPE56, &SHAPE56, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE29, &SHAPE29, + &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, + &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, + &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, + &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, + &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, + &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, + &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, + &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, + &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE53, &SHAPE53, &SHAPE54, + &SHAPE54, &SHAPE55, &SHAPE55, &SHAPE53, &SHAPE53, &SHAPE55, &SHAPE55, &SHAPE54, &SHAPE54, + &SHAPE53, &SHAPE53, &SHAPE56, &SHAPE56, &SHAPE57, &SHAPE57, &SHAPE53, &SHAPE53, &SHAPE57, + &SHAPE57, &SHAPE56, &SHAPE56, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, @@ -2211,9 +2210,10 @@ static SHAPES_MAP: [&LazyLock; 27657] = [ &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE62, &SHAPE62, &SHAPE62, &SHAPE62, &SHAPE62, &SHAPE62, - &SHAPE62, &SHAPE62, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE62, &SHAPE62, &SHAPE62, &SHAPE62, &SHAPE62, &SHAPE62, &SHAPE62, &SHAPE62, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, @@ -2236,42 +2236,42 @@ static SHAPES_MAP: [&LazyLock; 27657] = [ &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE64, - &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, - &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, - &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, - &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, - &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, - &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, - &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE64, &SHAPE64, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE64, &SHAPE64, + &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE65, + &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, + &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, + &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, + &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, + &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, + &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE65, + &SHAPE65, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE64, &SHAPE64, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE29, &SHAPE29, + &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, + &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, + &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, + &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, + &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, + &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, + &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, + &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, + &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, - &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, - &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, - &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, - &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, - &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, - &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, - &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, - &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, @@ -2317,14 +2317,13 @@ static SHAPES_MAP: [&LazyLock; 27657] = [ &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, @@ -2349,53 +2348,75 @@ static SHAPES_MAP: [&LazyLock; 27657] = [ &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE69, &SHAPE69, &SHAPE69, - &SHAPE69, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE69, - &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE70, - &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE70, &SHAPE70, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE70, - &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE69, &SHAPE69, &SHAPE69, - &SHAPE69, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE69, - &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE70, - &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE70, &SHAPE70, - &SHAPE70, &SHAPE70, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE69, + &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE69, &SHAPE69, + &SHAPE69, &SHAPE69, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE69, &SHAPE69, &SHAPE69, + &SHAPE69, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE70, &SHAPE70, + &SHAPE70, &SHAPE70, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE70, &SHAPE70, &SHAPE70, + &SHAPE70, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE70, + &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE69, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE70, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE64, &SHAPE64, - &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE65, - &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, - &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, - &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, - &SHAPE66, &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, - &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, - &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, + &SHAPE66, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, + &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, + &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, + &SHAPE65, &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE65, + &SHAPE65, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, &SHAPE66, &SHAPE66, &SHAPE67, &SHAPE67, + &SHAPE64, &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE67, &SHAPE67, &SHAPE64, + &SHAPE64, &SHAPE65, &SHAPE65, &SHAPE64, &SHAPE64, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, + &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE7, &SHAPE58, - &SHAPE59, &SHAPE8, &SHAPE60, &SHAPE13, &SHAPE61, &SHAPE1, &SHAPE1, &SHAPE71, &SHAPE71, - &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE71, - &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE74, &SHAPE75, &SHAPE74, &SHAPE75, &SHAPE76, &SHAPE77, - &SHAPE76, &SHAPE77, &SHAPE78, &SHAPE79, &SHAPE78, &SHAPE79, &SHAPE80, &SHAPE81, &SHAPE80, - &SHAPE81, &SHAPE82, &SHAPE83, &SHAPE82, &SHAPE83, &SHAPE84, &SHAPE85, &SHAPE84, &SHAPE85, - &SHAPE86, &SHAPE87, &SHAPE86, &SHAPE87, &SHAPE88, &SHAPE89, &SHAPE88, &SHAPE89, &SHAPE1, - &SHAPE61, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE91, &SHAPE92, &SHAPE93, &SHAPE94, &SHAPE95, &SHAPE96, - &SHAPE97, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE7, &SHAPE58, &SHAPE59, &SHAPE8, &SHAPE60, &SHAPE13, + &SHAPE61, &SHAPE1, &SHAPE1, &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE71, + &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE71, &SHAPE71, + &SHAPE71, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, + &SHAPE74, &SHAPE75, &SHAPE74, &SHAPE75, &SHAPE76, &SHAPE77, &SHAPE76, &SHAPE77, &SHAPE78, + &SHAPE79, &SHAPE78, &SHAPE79, &SHAPE80, &SHAPE81, &SHAPE80, &SHAPE81, &SHAPE82, &SHAPE83, + &SHAPE82, &SHAPE83, &SHAPE84, &SHAPE85, &SHAPE84, &SHAPE85, &SHAPE86, &SHAPE87, &SHAPE86, + &SHAPE87, &SHAPE88, &SHAPE89, &SHAPE88, &SHAPE89, &SHAPE1, &SHAPE61, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, + &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE91, &SHAPE92, &SHAPE93, &SHAPE94, &SHAPE95, &SHAPE96, &SHAPE97, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, - &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, + &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, + &SHAPE7, &SHAPE7, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE65, &SHAPE65, + &SHAPE65, &SHAPE65, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE65, &SHAPE65, &SHAPE65, + &SHAPE65, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, + &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE99, + &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE98, &SHAPE98, + &SHAPE98, &SHAPE98, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE99, &SHAPE99, &SHAPE99, + &SHAPE99, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, + &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE65, + &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE65, &SHAPE65, + &SHAPE65, &SHAPE65, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE67, &SHAPE67, &SHAPE67, + &SHAPE67, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, + &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE98, + &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE99, &SHAPE99, + &SHAPE99, &SHAPE99, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE98, &SHAPE98, &SHAPE98, + &SHAPE98, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, + &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE65, + &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE67, &SHAPE67, + &SHAPE67, &SHAPE67, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE67, &SHAPE67, &SHAPE67, + &SHAPE67, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, + &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE99, + &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE98, &SHAPE98, + &SHAPE98, &SHAPE98, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE99, &SHAPE99, &SHAPE99, + &SHAPE99, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE66, &SHAPE66, &SHAPE66, @@ -2423,49 +2444,28 @@ static SHAPES_MAP: [&LazyLock; 27657] = [ &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE64, &SHAPE64, &SHAPE64, - &SHAPE64, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, - &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE99, - &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE98, &SHAPE98, - &SHAPE98, &SHAPE98, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE99, &SHAPE99, &SHAPE99, - &SHAPE99, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, - &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE64, - &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE64, &SHAPE64, - &SHAPE64, &SHAPE64, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE65, &SHAPE65, &SHAPE65, - &SHAPE65, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, - &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE98, - &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE99, &SHAPE99, - &SHAPE99, &SHAPE99, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE98, &SHAPE98, &SHAPE98, - &SHAPE98, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, - &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE64, - &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE65, &SHAPE65, - &SHAPE65, &SHAPE65, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE65, &SHAPE65, &SHAPE65, - &SHAPE65, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, - &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE99, - &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE98, &SHAPE98, - &SHAPE98, &SHAPE98, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE99, &SHAPE99, &SHAPE99, - &SHAPE99, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, - &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE64, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE98, &SHAPE98, - &SHAPE98, &SHAPE98, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE99, &SHAPE99, &SHAPE99, - &SHAPE99, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, - &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE66, - &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE66, &SHAPE66, - &SHAPE66, &SHAPE66, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE64, &SHAPE64, &SHAPE64, - &SHAPE64, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, - &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE98, - &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE99, &SHAPE99, - &SHAPE99, &SHAPE99, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE98, &SHAPE98, &SHAPE98, - &SHAPE98, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, - &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE66, - &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE64, &SHAPE64, - &SHAPE64, &SHAPE64, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE64, &SHAPE64, &SHAPE64, - &SHAPE64, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE65, + &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE65, &SHAPE65, + &SHAPE65, &SHAPE65, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE67, &SHAPE67, &SHAPE67, + &SHAPE67, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE67, &SHAPE67, &SHAPE67, &SHAPE67, + &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE98, + &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE99, &SHAPE99, + &SHAPE99, &SHAPE99, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE98, &SHAPE98, &SHAPE98, + &SHAPE98, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, + &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE65, + &SHAPE65, &SHAPE65, &SHAPE65, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE67, &SHAPE67, + &SHAPE67, &SHAPE67, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE67, &SHAPE67, &SHAPE67, + &SHAPE67, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, + &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE98, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE66, &SHAPE99, + &SHAPE99, &SHAPE99, &SHAPE99, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE98, &SHAPE98, + &SHAPE98, &SHAPE98, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE64, &SHAPE99, &SHAPE99, &SHAPE99, + &SHAPE99, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, @@ -2485,16 +2485,16 @@ static SHAPES_MAP: [&LazyLock; 27657] = [ &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE100, - &SHAPE101, &SHAPE100, &SHAPE101, &SHAPE102, &SHAPE103, &SHAPE102, &SHAPE103, &SHAPE104, - &SHAPE105, &SHAPE104, &SHAPE105, &SHAPE106, &SHAPE107, &SHAPE106, &SHAPE107, &SHAPE108, - &SHAPE109, &SHAPE108, &SHAPE109, &SHAPE110, &SHAPE111, &SHAPE110, &SHAPE111, &SHAPE112, - &SHAPE113, &SHAPE112, &SHAPE113, &SHAPE114, &SHAPE2, &SHAPE114, &SHAPE2, &SHAPE115, &SHAPE115, - &SHAPE116, &SHAPE116, &SHAPE117, &SHAPE117, &SHAPE100, &SHAPE101, &SHAPE100, &SHAPE101, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE100, &SHAPE101, &SHAPE100, &SHAPE101, &SHAPE102, &SHAPE103, &SHAPE102, &SHAPE103, &SHAPE104, &SHAPE105, &SHAPE104, &SHAPE105, &SHAPE106, &SHAPE107, &SHAPE106, &SHAPE107, &SHAPE108, &SHAPE109, &SHAPE108, &SHAPE109, &SHAPE110, &SHAPE111, &SHAPE110, &SHAPE111, &SHAPE112, &SHAPE113, &SHAPE112, &SHAPE113, - &SHAPE114, &SHAPE2, &SHAPE114, &SHAPE2, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE114, &SHAPE2, &SHAPE114, &SHAPE2, &SHAPE115, &SHAPE115, &SHAPE116, &SHAPE116, &SHAPE117, + &SHAPE117, &SHAPE100, &SHAPE101, &SHAPE100, &SHAPE101, &SHAPE102, &SHAPE103, &SHAPE102, + &SHAPE103, &SHAPE104, &SHAPE105, &SHAPE104, &SHAPE105, &SHAPE106, &SHAPE107, &SHAPE106, + &SHAPE107, &SHAPE108, &SHAPE109, &SHAPE108, &SHAPE109, &SHAPE110, &SHAPE111, &SHAPE110, + &SHAPE111, &SHAPE112, &SHAPE113, &SHAPE112, &SHAPE113, &SHAPE114, &SHAPE2, &SHAPE114, &SHAPE2, + &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, @@ -2512,41 +2512,10 @@ static SHAPES_MAP: [&LazyLock; 27657] = [ &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, - &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, - &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, - &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, - &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, - &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, - &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, - &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, - &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, - &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, - &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, - &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, - &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE29, - &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, - &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, - &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, - &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, - &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, - &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, - &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, - &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, - &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE29, &SHAPE29, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, + &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, + &SHAPE80, &SHAPE80, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, + &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE0, &SHAPE0, &SHAPE83, &SHAPE83, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, @@ -2555,91 +2524,7 @@ static SHAPES_MAP: [&LazyLock; 27657] = [ &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, - &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE1, &SHAPE1, &SHAPE119, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE74, &SHAPE75, &SHAPE74, &SHAPE75, &SHAPE76, &SHAPE77, - &SHAPE76, &SHAPE77, &SHAPE78, &SHAPE79, &SHAPE78, &SHAPE79, &SHAPE80, &SHAPE81, &SHAPE80, - &SHAPE81, &SHAPE82, &SHAPE83, &SHAPE82, &SHAPE83, &SHAPE84, &SHAPE85, &SHAPE84, &SHAPE85, - &SHAPE86, &SHAPE87, &SHAPE86, &SHAPE87, &SHAPE88, &SHAPE89, &SHAPE88, &SHAPE89, &SHAPE29, - &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, - &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, - &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, - &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, - &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, - &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, - &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, - &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, - &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE13, &SHAPE120, &SHAPE120, &SHAPE120, &SHAPE120, &SHAPE120, &SHAPE120, - &SHAPE120, &SHAPE120, &SHAPE121, &SHAPE121, &SHAPE121, &SHAPE121, &SHAPE121, &SHAPE121, - &SHAPE121, &SHAPE121, &SHAPE0, &SHAPE122, &SHAPE122, &SHAPE122, &SHAPE122, &SHAPE123, - &SHAPE123, &SHAPE123, &SHAPE123, &SHAPE1, &SHAPE72, &SHAPE1, &SHAPE1, &SHAPE124, &SHAPE125, - &SHAPE126, &SHAPE127, &SHAPE128, &SHAPE129, &SHAPE130, &SHAPE131, &SHAPE132, &SHAPE133, - &SHAPE134, &SHAPE135, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, - &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, - &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, - &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, - &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, - &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, - &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, - &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, - &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, - &SHAPE47, &SHAPE1, &SHAPE1, &SHAPE53, &SHAPE53, &SHAPE53, &SHAPE53, &SHAPE53, &SHAPE53, - &SHAPE53, &SHAPE53, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, + &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, @@ -2657,7 +2542,11 @@ static SHAPES_MAP: [&LazyLock; 27657] = [ &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, - &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, + &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE1, &SHAPE1, &SHAPE119, &SHAPE1, &SHAPE74, + &SHAPE75, &SHAPE74, &SHAPE75, &SHAPE76, &SHAPE77, &SHAPE76, &SHAPE77, &SHAPE78, &SHAPE79, + &SHAPE78, &SHAPE79, &SHAPE80, &SHAPE81, &SHAPE80, &SHAPE81, &SHAPE82, &SHAPE83, &SHAPE82, + &SHAPE83, &SHAPE84, &SHAPE85, &SHAPE84, &SHAPE85, &SHAPE86, &SHAPE87, &SHAPE86, &SHAPE87, + &SHAPE88, &SHAPE89, &SHAPE88, &SHAPE89, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, @@ -2666,8 +2555,105 @@ static SHAPES_MAP: [&LazyLock; 27657] = [ &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, - &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE136, &SHAPE137, &SHAPE137, + &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE13, &SHAPE120, + &SHAPE120, &SHAPE120, &SHAPE120, &SHAPE120, &SHAPE120, &SHAPE120, &SHAPE120, &SHAPE121, + &SHAPE121, &SHAPE121, &SHAPE121, &SHAPE121, &SHAPE121, &SHAPE121, &SHAPE121, &SHAPE0, + &SHAPE122, &SHAPE122, &SHAPE122, &SHAPE122, &SHAPE123, &SHAPE123, &SHAPE123, &SHAPE123, + &SHAPE1, &SHAPE72, &SHAPE1, &SHAPE1, &SHAPE124, &SHAPE125, &SHAPE126, &SHAPE127, &SHAPE128, + &SHAPE129, &SHAPE130, &SHAPE131, &SHAPE132, &SHAPE133, &SHAPE134, &SHAPE135, &SHAPE29, + &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, + &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, + &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, + &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, + &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, + &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, + &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, + &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, + &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE1, &SHAPE1, + &SHAPE53, &SHAPE53, &SHAPE53, &SHAPE53, &SHAPE53, &SHAPE53, &SHAPE53, &SHAPE53, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, + &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, + &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, + &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, + &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, + &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, + &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, + &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, + &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, + &SHAPE47, &SHAPE47, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, + &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, + &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, + &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, + &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, + &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, + &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, + &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, + &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, + &SHAPE47, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, + &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, + &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, + &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, + &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, + &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, + &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, + &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, + &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE136, &SHAPE137, &SHAPE137, + &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE139, &SHAPE140, &SHAPE140, + &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, + &SHAPE142, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, + &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE143, &SHAPE144, &SHAPE144, + &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, + &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, + &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, + &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, + &SHAPE150, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, + &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, + &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, + &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, + &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE151, &SHAPE152, &SHAPE152, + &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, + &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, + &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, + &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, + &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, + &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, + &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, + &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, + &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, + &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, + &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, + &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, + &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, + &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, + &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, + &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, + &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, + &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, + &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, + &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, + &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, @@ -2708,51 +2694,10 @@ static SHAPES_MAP: [&LazyLock; 27657] = [ &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, - &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE136, &SHAPE137, &SHAPE137, &SHAPE0, &SHAPE138, - &SHAPE138, &SHAPE0, &SHAPE138, &SHAPE138, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, - &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, - &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE139, &SHAPE140, &SHAPE140, &SHAPE141, &SHAPE142, - &SHAPE142, &SHAPE141, &SHAPE142, &SHAPE142, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, - &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, - &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, - &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, - &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, - &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE143, &SHAPE144, &SHAPE144, &SHAPE145, &SHAPE146, - &SHAPE146, &SHAPE145, &SHAPE146, &SHAPE146, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, - &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, - &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE147, &SHAPE148, &SHAPE148, &SHAPE149, &SHAPE150, - &SHAPE150, &SHAPE149, &SHAPE150, &SHAPE150, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, - &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, - &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, - &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, - &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, - &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, - &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, - &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, - &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, - &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, - &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, - &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, - &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, - &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, - &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE151, &SHAPE152, &SHAPE152, &SHAPE153, &SHAPE154, - &SHAPE154, &SHAPE153, &SHAPE154, &SHAPE154, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, - &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, - &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE155, &SHAPE156, &SHAPE156, &SHAPE157, &SHAPE158, - &SHAPE158, &SHAPE157, &SHAPE158, &SHAPE158, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, - &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, - &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, - &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, - &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, - &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE159, &SHAPE160, &SHAPE160, &SHAPE161, &SHAPE162, - &SHAPE162, &SHAPE161, &SHAPE162, &SHAPE162, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, - &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, - &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE163, &SHAPE164, &SHAPE164, &SHAPE165, &SHAPE166, - &SHAPE166, &SHAPE165, &SHAPE166, &SHAPE166, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, - &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE1, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, - &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE1, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, + &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, &SHAPE27, + &SHAPE27, &SHAPE27, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, @@ -2770,77 +2715,97 @@ static SHAPES_MAP: [&LazyLock; 27657] = [ &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, - &SHAPE169, &SHAPE170, &SHAPE170, &SHAPE171, &SHAPE171, &SHAPE172, &SHAPE172, &SHAPE173, - &SHAPE173, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, + &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE170, &SHAPE170, + &SHAPE171, &SHAPE171, &SHAPE172, &SHAPE172, &SHAPE173, &SHAPE173, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, - &SHAPE169, &SHAPE170, &SHAPE170, &SHAPE171, &SHAPE171, &SHAPE172, &SHAPE172, &SHAPE173, - &SHAPE173, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, + &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE170, &SHAPE170, + &SHAPE171, &SHAPE171, &SHAPE172, &SHAPE172, &SHAPE173, &SHAPE173, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, - &SHAPE169, &SHAPE170, &SHAPE170, &SHAPE171, &SHAPE171, &SHAPE172, &SHAPE172, &SHAPE173, - &SHAPE173, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, + &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE170, &SHAPE170, + &SHAPE171, &SHAPE171, &SHAPE172, &SHAPE172, &SHAPE173, &SHAPE173, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, - &SHAPE169, &SHAPE170, &SHAPE170, &SHAPE171, &SHAPE171, &SHAPE172, &SHAPE172, &SHAPE173, - &SHAPE173, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, + &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE170, &SHAPE170, + &SHAPE171, &SHAPE171, &SHAPE172, &SHAPE172, &SHAPE173, &SHAPE173, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, - &SHAPE169, &SHAPE170, &SHAPE170, &SHAPE171, &SHAPE171, &SHAPE172, &SHAPE172, &SHAPE173, - &SHAPE173, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, + &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE170, &SHAPE170, + &SHAPE171, &SHAPE171, &SHAPE172, &SHAPE172, &SHAPE173, &SHAPE173, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, - &SHAPE169, &SHAPE170, &SHAPE170, &SHAPE171, &SHAPE171, &SHAPE172, &SHAPE172, &SHAPE173, - &SHAPE173, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, + &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE169, &SHAPE170, &SHAPE170, + &SHAPE171, &SHAPE171, &SHAPE172, &SHAPE172, &SHAPE173, &SHAPE173, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, - &SHAPE174, &SHAPE175, &SHAPE175, &SHAPE176, &SHAPE176, &SHAPE177, &SHAPE177, &SHAPE178, - &SHAPE178, &SHAPE179, &SHAPE179, &SHAPE180, &SHAPE180, &SHAPE179, &SHAPE179, &SHAPE180, - &SHAPE180, &SHAPE179, &SHAPE179, &SHAPE180, &SHAPE180, &SHAPE53, &SHAPE53, &SHAPE54, &SHAPE54, - &SHAPE55, &SHAPE55, &SHAPE53, &SHAPE53, &SHAPE55, &SHAPE55, &SHAPE54, &SHAPE54, &SHAPE53, - &SHAPE53, &SHAPE56, &SHAPE56, &SHAPE57, &SHAPE57, &SHAPE53, &SHAPE53, &SHAPE57, &SHAPE57, - &SHAPE56, &SHAPE56, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE174, &SHAPE175, &SHAPE175, + &SHAPE176, &SHAPE176, &SHAPE177, &SHAPE177, &SHAPE178, &SHAPE178, &SHAPE179, &SHAPE179, + &SHAPE180, &SHAPE180, &SHAPE179, &SHAPE179, &SHAPE180, &SHAPE180, &SHAPE179, &SHAPE179, + &SHAPE180, &SHAPE180, &SHAPE53, &SHAPE53, &SHAPE54, &SHAPE54, &SHAPE55, &SHAPE55, &SHAPE53, + &SHAPE53, &SHAPE55, &SHAPE55, &SHAPE54, &SHAPE54, &SHAPE53, &SHAPE53, &SHAPE56, &SHAPE56, + &SHAPE57, &SHAPE57, &SHAPE53, &SHAPE53, &SHAPE57, &SHAPE57, &SHAPE56, &SHAPE56, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, - &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, + &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE7, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, - &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE59, &SHAPE1, &SHAPE1, &SHAPE181, &SHAPE182, - &SHAPE183, &SHAPE184, &SHAPE185, &SHAPE181, &SHAPE182, &SHAPE183, &SHAPE184, &SHAPE185, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, - &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, - &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, - &SHAPE40, &SHAPE41, &SHAPE41, &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, - &SHAPE45, &SHAPE45, &SHAPE46, &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, - &SHAPE49, &SHAPE41, &SHAPE41, &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, - &SHAPE50, &SHAPE50, &SHAPE46, &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, - &SHAPE37, &SHAPE51, &SHAPE51, &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, - &SHAPE42, &SHAPE42, &SHAPE52, &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, - &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE59, &SHAPE59, &SHAPE1, &SHAPE1, &SHAPE181, &SHAPE182, &SHAPE183, &SHAPE184, &SHAPE185, + &SHAPE181, &SHAPE182, &SHAPE183, &SHAPE184, &SHAPE185, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE1, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, + &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, + &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, &SHAPE41, + &SHAPE42, &SHAPE42, &SHAPE43, &SHAPE43, &SHAPE44, &SHAPE44, &SHAPE45, &SHAPE45, &SHAPE46, + &SHAPE46, &SHAPE47, &SHAPE47, &SHAPE48, &SHAPE48, &SHAPE49, &SHAPE49, &SHAPE41, &SHAPE41, + &SHAPE30, &SHAPE30, &SHAPE43, &SHAPE43, &SHAPE32, &SHAPE32, &SHAPE50, &SHAPE50, &SHAPE46, + &SHAPE46, &SHAPE35, &SHAPE35, &SHAPE48, &SHAPE48, &SHAPE37, &SHAPE37, &SHAPE51, &SHAPE51, + &SHAPE31, &SHAPE31, &SHAPE40, &SHAPE40, &SHAPE33, &SHAPE33, &SHAPE42, &SHAPE42, &SHAPE52, + &SHAPE52, &SHAPE36, &SHAPE36, &SHAPE45, &SHAPE45, &SHAPE38, &SHAPE38, &SHAPE47, &SHAPE47, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, - &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, + &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE0, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, - &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE1, &SHAPE100, &SHAPE101, &SHAPE100, &SHAPE101, + &SHAPE1, &SHAPE1, &SHAPE100, &SHAPE101, &SHAPE100, &SHAPE101, &SHAPE102, &SHAPE103, &SHAPE102, + &SHAPE103, &SHAPE104, &SHAPE105, &SHAPE104, &SHAPE105, &SHAPE106, &SHAPE107, &SHAPE106, + &SHAPE107, &SHAPE108, &SHAPE109, &SHAPE108, &SHAPE109, &SHAPE110, &SHAPE111, &SHAPE110, + &SHAPE111, &SHAPE112, &SHAPE113, &SHAPE112, &SHAPE113, &SHAPE114, &SHAPE2, &SHAPE114, &SHAPE2, + &SHAPE100, &SHAPE101, &SHAPE100, &SHAPE101, &SHAPE102, &SHAPE103, &SHAPE102, &SHAPE103, + &SHAPE104, &SHAPE105, &SHAPE104, &SHAPE105, &SHAPE106, &SHAPE107, &SHAPE106, &SHAPE107, + &SHAPE108, &SHAPE109, &SHAPE108, &SHAPE109, &SHAPE110, &SHAPE111, &SHAPE110, &SHAPE111, + &SHAPE112, &SHAPE113, &SHAPE112, &SHAPE113, &SHAPE114, &SHAPE2, &SHAPE114, &SHAPE2, &SHAPE100, + &SHAPE101, &SHAPE100, &SHAPE101, &SHAPE102, &SHAPE103, &SHAPE102, &SHAPE103, &SHAPE104, + &SHAPE105, &SHAPE104, &SHAPE105, &SHAPE106, &SHAPE107, &SHAPE106, &SHAPE107, &SHAPE108, + &SHAPE109, &SHAPE108, &SHAPE109, &SHAPE110, &SHAPE111, &SHAPE110, &SHAPE111, &SHAPE112, + &SHAPE113, &SHAPE112, &SHAPE113, &SHAPE114, &SHAPE2, &SHAPE114, &SHAPE2, &SHAPE100, &SHAPE101, + &SHAPE100, &SHAPE101, &SHAPE102, &SHAPE103, &SHAPE102, &SHAPE103, &SHAPE104, &SHAPE105, + &SHAPE104, &SHAPE105, &SHAPE106, &SHAPE107, &SHAPE106, &SHAPE107, &SHAPE108, &SHAPE109, + &SHAPE108, &SHAPE109, &SHAPE110, &SHAPE111, &SHAPE110, &SHAPE111, &SHAPE112, &SHAPE113, + &SHAPE112, &SHAPE113, &SHAPE114, &SHAPE2, &SHAPE114, &SHAPE2, &SHAPE100, &SHAPE101, &SHAPE100, + &SHAPE101, &SHAPE102, &SHAPE103, &SHAPE102, &SHAPE103, &SHAPE104, &SHAPE105, &SHAPE104, + &SHAPE105, &SHAPE106, &SHAPE107, &SHAPE106, &SHAPE107, &SHAPE108, &SHAPE109, &SHAPE108, + &SHAPE109, &SHAPE110, &SHAPE111, &SHAPE110, &SHAPE111, &SHAPE112, &SHAPE113, &SHAPE112, + &SHAPE113, &SHAPE114, &SHAPE2, &SHAPE114, &SHAPE2, &SHAPE100, &SHAPE101, &SHAPE100, &SHAPE101, &SHAPE102, &SHAPE103, &SHAPE102, &SHAPE103, &SHAPE104, &SHAPE105, &SHAPE104, &SHAPE105, &SHAPE106, &SHAPE107, &SHAPE106, &SHAPE107, &SHAPE108, &SHAPE109, &SHAPE108, &SHAPE109, &SHAPE110, &SHAPE111, &SHAPE110, &SHAPE111, &SHAPE112, &SHAPE113, &SHAPE112, &SHAPE113, @@ -2884,26 +2849,6 @@ static SHAPES_MAP: [&LazyLock; 27657] = [ &SHAPE102, &SHAPE103, &SHAPE104, &SHAPE105, &SHAPE104, &SHAPE105, &SHAPE106, &SHAPE107, &SHAPE106, &SHAPE107, &SHAPE108, &SHAPE109, &SHAPE108, &SHAPE109, &SHAPE110, &SHAPE111, &SHAPE110, &SHAPE111, &SHAPE112, &SHAPE113, &SHAPE112, &SHAPE113, &SHAPE114, &SHAPE2, - &SHAPE114, &SHAPE2, &SHAPE100, &SHAPE101, &SHAPE100, &SHAPE101, &SHAPE102, &SHAPE103, - &SHAPE102, &SHAPE103, &SHAPE104, &SHAPE105, &SHAPE104, &SHAPE105, &SHAPE106, &SHAPE107, - &SHAPE106, &SHAPE107, &SHAPE108, &SHAPE109, &SHAPE108, &SHAPE109, &SHAPE110, &SHAPE111, - &SHAPE110, &SHAPE111, &SHAPE112, &SHAPE113, &SHAPE112, &SHAPE113, &SHAPE114, &SHAPE2, - &SHAPE114, &SHAPE2, &SHAPE100, &SHAPE101, &SHAPE100, &SHAPE101, &SHAPE102, &SHAPE103, - &SHAPE102, &SHAPE103, &SHAPE104, &SHAPE105, &SHAPE104, &SHAPE105, &SHAPE106, &SHAPE107, - &SHAPE106, &SHAPE107, &SHAPE108, &SHAPE109, &SHAPE108, &SHAPE109, &SHAPE110, &SHAPE111, - &SHAPE110, &SHAPE111, &SHAPE112, &SHAPE113, &SHAPE112, &SHAPE113, &SHAPE114, &SHAPE2, - &SHAPE114, &SHAPE2, &SHAPE100, &SHAPE101, &SHAPE100, &SHAPE101, &SHAPE102, &SHAPE103, - &SHAPE102, &SHAPE103, &SHAPE104, &SHAPE105, &SHAPE104, &SHAPE105, &SHAPE106, &SHAPE107, - &SHAPE106, &SHAPE107, &SHAPE108, &SHAPE109, &SHAPE108, &SHAPE109, &SHAPE110, &SHAPE111, - &SHAPE110, &SHAPE111, &SHAPE112, &SHAPE113, &SHAPE112, &SHAPE113, &SHAPE114, &SHAPE2, - &SHAPE114, &SHAPE2, &SHAPE100, &SHAPE101, &SHAPE100, &SHAPE101, &SHAPE102, &SHAPE103, - &SHAPE102, &SHAPE103, &SHAPE104, &SHAPE105, &SHAPE104, &SHAPE105, &SHAPE106, &SHAPE107, - &SHAPE106, &SHAPE107, &SHAPE108, &SHAPE109, &SHAPE108, &SHAPE109, &SHAPE110, &SHAPE111, - &SHAPE110, &SHAPE111, &SHAPE112, &SHAPE113, &SHAPE112, &SHAPE113, &SHAPE114, &SHAPE2, - &SHAPE114, &SHAPE2, &SHAPE100, &SHAPE101, &SHAPE100, &SHAPE101, &SHAPE102, &SHAPE103, - &SHAPE102, &SHAPE103, &SHAPE104, &SHAPE105, &SHAPE104, &SHAPE105, &SHAPE106, &SHAPE107, - &SHAPE106, &SHAPE107, &SHAPE108, &SHAPE109, &SHAPE108, &SHAPE109, &SHAPE110, &SHAPE111, - &SHAPE110, &SHAPE111, &SHAPE112, &SHAPE113, &SHAPE112, &SHAPE113, &SHAPE114, &SHAPE2, &SHAPE114, &SHAPE2, &SHAPE29, &SHAPE29, &SHAPE30, &SHAPE30, &SHAPE31, &SHAPE31, &SHAPE32, &SHAPE32, &SHAPE33, &SHAPE33, &SHAPE34, &SHAPE34, &SHAPE35, &SHAPE35, &SHAPE36, &SHAPE36, &SHAPE37, &SHAPE37, &SHAPE38, &SHAPE38, &SHAPE39, &SHAPE39, &SHAPE40, &SHAPE40, &SHAPE41, diff --git a/azalea-protocol/Cargo.toml b/azalea-protocol/Cargo.toml index 3926fa613..6a24c5ff8 100644 --- a/azalea-protocol/Cargo.toml +++ b/azalea-protocol/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-protocol" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-protocol" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/azalea-protocol/azalea-protocol-macros/Cargo.toml b/azalea-protocol/azalea-protocol-macros/Cargo.toml index 8b7194259..5f1d5b6ed 100644 --- a/azalea-protocol/azalea-protocol-macros/Cargo.toml +++ b/azalea-protocol/azalea-protocol-macros/Cargo.toml @@ -3,7 +3,7 @@ description = "Macros internally used in azalea-protocol." edition = "2021" license = "MIT" name = "azalea-protocol-macros" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-protocol/azalea-protocol-macros" [lib] diff --git a/azalea-protocol/examples/handshake_proxy.rs b/azalea-protocol/examples/handshake_proxy.rs index 9001ead2f..7ff7eaae6 100644 --- a/azalea-protocol/examples/handshake_proxy.rs +++ b/azalea-protocol/examples/handshake_proxy.rs @@ -16,7 +16,7 @@ use azalea_protocol::{ c_status_response::{ClientboundStatusResponse, Players, Version}, ServerboundStatusPacket, }, - ClientIntention, PROTOCOL_VERSION, + ClientIntention, PROTOCOL_VERSION, VERSION_NAME, }, read::ReadPacketError, }; @@ -37,7 +37,7 @@ const PROXY_DESC: &str = "An Azalea Minecraft Proxy"; static PROXY_FAVICON: LazyLock> = LazyLock::new(|| None); static PROXY_VERSION: LazyLock = LazyLock::new(|| Version { - name: "1.19.3".to_string(), + name: VERSION_NAME.to_string(), protocol: PROTOCOL_VERSION, }); diff --git a/azalea-protocol/src/packets/game/mod.rs b/azalea-protocol/src/packets/game/mod.rs index 35c1a2fef..757dd27f1 100755 --- a/azalea-protocol/src/packets/game/mod.rs +++ b/azalea-protocol/src/packets/game/mod.rs @@ -172,15 +172,13 @@ declare_state_packets!(GamePacket, move_player_status_only, move_vehicle, paddle_boat, - pick_item_from_block, - pick_item_from_entity, + pick_item, ping_request, place_recipe, player_abilities, player_action, player_command, player_input, - player_loaded, pong, recipe_book_change_settings, recipe_book_seen_recipe, diff --git a/azalea-protocol/src/packets/game/s_pick_item_from_block.rs b/azalea-protocol/src/packets/game/s_pick_item.rs similarity index 79% rename from azalea-protocol/src/packets/game/s_pick_item_from_block.rs rename to azalea-protocol/src/packets/game/s_pick_item.rs index d923646bb..289da6e70 100755 --- a/azalea-protocol/src/packets/game/s_pick_item_from_block.rs +++ b/azalea-protocol/src/packets/game/s_pick_item.rs @@ -2,7 +2,7 @@ use azalea_buf::AzBuf; use azalea_protocol_macros::ServerboundGamePacket; #[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] -pub struct ServerboundPickItemFromBlock { +pub struct ServerboundPickItem { #[var] pub slot: u32, } diff --git a/azalea-protocol/src/packets/mod.rs b/azalea-protocol/src/packets/mod.rs index 8ae0b48b6..14ae7c71b 100755 --- a/azalea-protocol/src/packets/mod.rs +++ b/azalea-protocol/src/packets/mod.rs @@ -11,10 +11,8 @@ use azalea_buf::{AzaleaReadVar, AzaleaWrite, AzaleaWriteVar, BufReadError}; use crate::read::ReadPacketError; -// TODO: rename the packet files to just like c_add_entity instead of -// c_add_entity_packet - -pub const PROTOCOL_VERSION: i32 = 1073742049; +pub const PROTOCOL_VERSION: i32 = 768; +pub const VERSION_NAME: &str = "1.21.3"; #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub enum ConnectionProtocol { diff --git a/azalea-protocol/src/write.rs b/azalea-protocol/src/write.rs index d2f6bd5ad..512d08ad7 100755 --- a/azalea-protocol/src/write.rs +++ b/azalea-protocol/src/write.rs @@ -1,6 +1,9 @@ //! Write packets to a stream. -use std::{fmt::Debug, io::Read}; +use std::{ + fmt::Debug, + io::{self, Read}, +}; use azalea_buf::AzaleaWriteVar; use azalea_crypto::Aes128CfbEnc; @@ -11,24 +14,19 @@ use tracing::trace; use crate::{packets::ProtocolPacket, read::MAXIMUM_UNCOMPRESSED_LENGTH}; -/// Prepend the length of the packet to it. -fn frame_prepender(mut data: Vec) -> Result, std::io::Error> { - let mut buf = Vec::new(); - (data.len() as u32).azalea_write_var(&mut buf)?; - buf.append(&mut data); - Ok(buf) -} - -#[derive(Error, Debug)] -pub enum PacketEncodeError { - #[error("{0}")] - Io(#[from] std::io::Error), - #[error("Packet too big (is {actual} bytes, should be less than {maximum}): {packet_string}")] - TooBig { - actual: usize, - maximum: usize, - packet_string: String, - }, +pub async fn write_packet( + packet: &P, + stream: &mut W, + compression_threshold: Option, + cipher: &mut Option, +) -> io::Result<()> +where + P: ProtocolPacket + Debug, + W: AsyncWrite + Unpin + Send, +{ + trace!("Sending packet: {packet:?}"); + let raw_packet = serialize_packet(packet).unwrap(); + write_raw_packet(&raw_packet, stream, compression_threshold, cipher).await } pub fn serialize_packet( @@ -47,10 +45,26 @@ pub fn serialize_packet( Ok(buf) } -#[derive(Error, Debug)] -pub enum PacketCompressError { - #[error("{0}")] - Io(#[from] std::io::Error), +pub async fn write_raw_packet( + raw_packet: &[u8], + stream: &mut W, + compression_threshold: Option, + cipher: &mut Option, +) -> io::Result<()> +where + W: AsyncWrite + Unpin + Send, +{ + trace!("Writing raw packet: {raw_packet:?}"); + let mut raw_packet = raw_packet.to_vec(); + if let Some(threshold) = compression_threshold { + raw_packet = compression_encoder(&raw_packet, threshold).unwrap(); + } + raw_packet = frame_prepender(raw_packet).unwrap(); + // if we were given a cipher, encrypt the packet + if let Some(cipher) = cipher { + azalea_crypto::encrypt_packet(cipher, &mut raw_packet); + } + stream.write_all(&raw_packet).await } pub fn compression_encoder( @@ -61,12 +75,13 @@ pub fn compression_encoder( // if it's less than the compression threshold, don't compress if n < compression_threshold as usize { let mut buf = Vec::new(); - 0.azalea_write_var(&mut buf)?; - std::io::Write::write_all(&mut buf, data)?; + 0_u32.azalea_write_var(&mut buf)?; + io::Write::write_all(&mut buf, data)?; Ok(buf) } else { // otherwise, compress let mut deflater = ZlibEncoder::new(data, Compression::default()); + // write deflated data to buf let mut compressed_data = Vec::new(); deflater.read_to_end(&mut compressed_data)?; @@ -80,39 +95,28 @@ pub fn compression_encoder( } } -pub async fn write_packet( - packet: &P, - stream: &mut W, - compression_threshold: Option, - cipher: &mut Option, -) -> std::io::Result<()> -where - P: ProtocolPacket + Debug, - W: AsyncWrite + Unpin + Send, -{ - trace!("Sending packet: {packet:?}"); - let raw_packet = serialize_packet(packet).unwrap(); - write_raw_packet(&raw_packet, stream, compression_threshold, cipher).await +/// Prepend the length of the packet to it. +fn frame_prepender(mut data: Vec) -> Result, io::Error> { + let mut buf = Vec::new(); + (data.len() as u32).azalea_write_var(&mut buf)?; + buf.append(&mut data); + Ok(buf) } -pub async fn write_raw_packet( - raw_packet: &[u8], - stream: &mut W, - compression_threshold: Option, - cipher: &mut Option, -) -> std::io::Result<()> -where - W: AsyncWrite + Unpin + Send, -{ - trace!("Writing raw packet: {raw_packet:?}"); - let mut raw_packet = raw_packet.to_vec(); - if let Some(threshold) = compression_threshold { - raw_packet = compression_encoder(&raw_packet, threshold).unwrap(); - } - raw_packet = frame_prepender(raw_packet).unwrap(); - // if we were given a cipher, encrypt the packet - if let Some(cipher) = cipher { - azalea_crypto::encrypt_packet(cipher, &mut raw_packet); - } - stream.write_all(&raw_packet).await +#[derive(Error, Debug)] +pub enum PacketEncodeError { + #[error("{0}")] + Io(#[from] io::Error), + #[error("Packet too big (is {actual} bytes, should be less than {maximum}): {packet_string}")] + TooBig { + actual: usize, + maximum: usize, + packet_string: String, + }, +} + +#[derive(Error, Debug)] +pub enum PacketCompressError { + #[error("{0}")] + Io(#[from] io::Error), } diff --git a/azalea-registry/Cargo.toml b/azalea-registry/Cargo.toml index 4a09fa39f..1afc14d07 100644 --- a/azalea-registry/Cargo.toml +++ b/azalea-registry/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-registry" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-registry" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/azalea-registry/azalea-registry-macros/Cargo.toml b/azalea-registry/azalea-registry-macros/Cargo.toml index c86413bfc..147a21adf 100644 --- a/azalea-registry/azalea-registry-macros/Cargo.toml +++ b/azalea-registry/azalea-registry-macros/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-registry-macros" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-registry/azalea-registry-macros" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" [lib] proc-macro = true diff --git a/azalea-registry/src/lib.rs b/azalea-registry/src/lib.rs index ffead5b48..e1fb2be5c 100755 --- a/azalea-registry/src/lib.rs +++ b/azalea-registry/src/lib.rs @@ -600,19 +600,12 @@ enum Block { MelonStem => "minecraft:melon_stem", Vine => "minecraft:vine", GlowLichen => "minecraft:glow_lichen", - ResinClump => "minecraft:resin_clump", OakFenceGate => "minecraft:oak_fence_gate", BrickStairs => "minecraft:brick_stairs", StoneBrickStairs => "minecraft:stone_brick_stairs", MudBrickStairs => "minecraft:mud_brick_stairs", Mycelium => "minecraft:mycelium", LilyPad => "minecraft:lily_pad", - ResinBlock => "minecraft:resin_block", - ResinBricks => "minecraft:resin_bricks", - ResinBrickStairs => "minecraft:resin_brick_stairs", - ResinBrickSlab => "minecraft:resin_brick_slab", - ResinBrickWall => "minecraft:resin_brick_wall", - ChiseledResinBricks => "minecraft:chiseled_resin_bricks", NetherBricks => "minecraft:nether_bricks", NetherBrickFence => "minecraft:nether_brick_fence", NetherBrickStairs => "minecraft:nether_brick_stairs", @@ -1358,10 +1351,6 @@ enum Block { PaleMossBlock => "minecraft:pale_moss_block", PaleMossCarpet => "minecraft:pale_moss_carpet", PaleHangingMoss => "minecraft:pale_hanging_moss", - OpenEyeblossom => "minecraft:open_eyeblossom", - ClosedEyeblossom => "minecraft:closed_eyeblossom", - PottedOpenEyeblossom => "minecraft:potted_open_eyeblossom", - PottedClosedEyeblossom => "minecraft:potted_closed_eyeblossom", } } @@ -1688,6 +1677,7 @@ enum EntityKind { 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", @@ -2165,8 +2155,6 @@ enum Item { RedWool => "minecraft:red_wool", BlackWool => "minecraft:black_wool", Dandelion => "minecraft:dandelion", - OpenEyeblossom => "minecraft:open_eyeblossom", - ClosedEyeblossom => "minecraft:closed_eyeblossom", Poppy => "minecraft:poppy", BlueOrchid => "minecraft:blue_orchid", Allium => "minecraft:allium", @@ -2315,13 +2303,6 @@ enum Item { Melon => "minecraft:melon", Vine => "minecraft:vine", GlowLichen => "minecraft:glow_lichen", - ResinClump => "minecraft:resin_clump", - ResinBlock => "minecraft:resin_block", - ResinBricks => "minecraft:resin_bricks", - ResinBrickStairs => "minecraft:resin_brick_stairs", - ResinBrickSlab => "minecraft:resin_brick_slab", - ResinBrickWall => "minecraft:resin_brick_wall", - ChiseledResinBricks => "minecraft:chiseled_resin_bricks", BrickStairs => "minecraft:brick_stairs", StoneBrickStairs => "minecraft:stone_brick_stairs", MudBrickStairs => "minecraft:mud_brick_stairs", @@ -3106,7 +3087,6 @@ enum Item { FireworkStar => "minecraft:firework_star", EnchantedBook => "minecraft:enchanted_book", NetherBrick => "minecraft:nether_brick", - ResinBrick => "minecraft:resin_brick", PrismarineShard => "minecraft:prismarine_shard", PrismarineCrystals => "minecraft:prismarine_crystals", Rabbit => "minecraft:rabbit", @@ -3689,7 +3669,6 @@ enum ParticleKind { Flame => "minecraft:flame", Infested => "minecraft:infested", CherryLeaves => "minecraft:cherry_leaves", - PaleOakLeaves => "minecraft:pale_oak_leaves", SculkSoul => "minecraft:sculk_soul", SculkCharge => "minecraft:sculk_charge", SculkChargePop => "minecraft:sculk_charge_pop", @@ -4337,7 +4316,6 @@ enum SoundEvent { EntityCreakingUnfreeze => "minecraft:entity.creaking.unfreeze", EntityCreakingSpawn => "minecraft:entity.creaking.spawn", EntityCreakingSway => "minecraft:entity.creaking.sway", - EntityCreakingTwitch => "minecraft:entity.creaking.twitch", BlockCreakingHeartBreak => "minecraft:block.creaking_heart.break", BlockCreakingHeartFall => "minecraft:block.creaking_heart.fall", BlockCreakingHeartHit => "minecraft:block.creaking_heart.hit", @@ -4476,11 +4454,6 @@ enum SoundEvent { EntityEvokerPrepareWololo => "minecraft:entity.evoker.prepare_wololo", EntityExperienceBottleThrow => "minecraft:entity.experience_bottle.throw", EntityExperienceOrbPickup => "minecraft:entity.experience_orb.pickup", - BlockEyeblossomOpenLong => "minecraft:block.eyeblossom.open_long", - BlockEyeblossomOpen => "minecraft:block.eyeblossom.open", - BlockEyeblossomCloseLong => "minecraft:block.eyeblossom.close_long", - BlockEyeblossomClose => "minecraft:block.eyeblossom.close", - BlockEyeblossomIdle => "minecraft:block.eyeblossom.idle", BlockFenceGateClose => "minecraft:block.fence_gate.close", BlockFenceGateOpen => "minecraft:block.fence_gate.open", ItemFirechargeUse => "minecraft:item.firecharge.use", @@ -5281,15 +5254,6 @@ enum SoundEvent { BlockSpawnerHit => "minecraft:block.spawner.hit", BlockSpawnerPlace => "minecraft:block.spawner.place", BlockSpawnerStep => "minecraft:block.spawner.step", - BlockResinBreak => "minecraft:block.resin.break", - BlockResinFall => "minecraft:block.resin.fall", - BlockResinPlace => "minecraft:block.resin.place", - BlockResinStep => "minecraft:block.resin.step", - BlockResinBricksBreak => "minecraft:block.resin_bricks.break", - BlockResinBricksFall => "minecraft:block.resin_bricks.fall", - BlockResinBricksHit => "minecraft:block.resin_bricks.hit", - BlockResinBricksPlace => "minecraft:block.resin_bricks.place", - BlockResinBricksStep => "minecraft:block.resin_bricks.step", BlockSporeBlossomBreak => "minecraft:block.spore_blossom.break", BlockSporeBlossomFall => "minecraft:block.spore_blossom.fall", BlockSporeBlossomHit => "minecraft:block.spore_blossom.hit", @@ -6142,6 +6106,7 @@ enum BlockKind { CaveVinesPlant => "minecraft:cave_vines_plant", CeilingHangingSign => "minecraft:ceiling_hanging_sign", Chain => "minecraft:chain", + CherryLeaves => "minecraft:cherry_leaves", Chest => "minecraft:chest", ChiseledBookShelf => "minecraft:chiseled_book_shelf", ChorusFlower => "minecraft:chorus_flower", @@ -6179,7 +6144,6 @@ enum BlockKind { EndPortal => "minecraft:end_portal", EndPortalFrame => "minecraft:end_portal_frame", EndRod => "minecraft:end_rod", - Eyeblossom => "minecraft:eyeblossom", Farm => "minecraft:farm", BonemealableFeaturePlacer => "minecraft:bonemealable_feature_placer", Fence => "minecraft:fence", @@ -6231,7 +6195,6 @@ enum BlockKind { MossyCarpet => "minecraft:mossy_carpet", MovingPiston => "minecraft:moving_piston", Mud => "minecraft:mud", - Multiface => "minecraft:multiface", Mushroom => "minecraft:mushroom", Mycelium => "minecraft:mycelium", NetherPortal => "minecraft:nether_portal", @@ -6242,7 +6205,6 @@ enum BlockKind { Nylium => "minecraft:nylium", Observer => "minecraft:observer", Piglinwallskull => "minecraft:piglinwallskull", - ParticleLeaves => "minecraft:particle_leaves", PinkPetals => "minecraft:pink_petals", PistonBase => "minecraft:piston_base", PistonHead => "minecraft:piston_head", diff --git a/azalea-registry/src/tags/blocks.rs b/azalea-registry/src/tags/blocks.rs index 336cab433..0697adeb3 100644 --- a/azalea-registry/src/tags/blocks.rs +++ b/azalea-registry/src/tags/blocks.rs @@ -24,7 +24,6 @@ pub static ALL_HANGING_SIGNS: LazyLock> = LazyLock::new(|| { Block::CherryHangingSign, Block::JungleHangingSign, Block::DarkOakHangingSign, - Block::PaleOakHangingSign, Block::CrimsonHangingSign, Block::WarpedHangingSign, Block::MangroveHangingSign, @@ -36,7 +35,6 @@ pub static ALL_HANGING_SIGNS: LazyLock> = LazyLock::new(|| { Block::CherryWallHangingSign, Block::JungleWallHangingSign, Block::DarkOakWallHangingSign, - Block::PaleOakWallHangingSign, Block::CrimsonWallHangingSign, Block::WarpedWallHangingSign, Block::MangroveWallHangingSign, @@ -51,7 +49,6 @@ pub static ALL_SIGNS: LazyLock> = LazyLock::new(|| { Block::AcaciaSign, Block::JungleSign, Block::DarkOakSign, - Block::PaleOakSign, Block::CrimsonSign, Block::WarpedSign, Block::MangroveSign, @@ -63,7 +60,6 @@ pub static ALL_SIGNS: LazyLock> = LazyLock::new(|| { Block::AcaciaWallSign, Block::JungleWallSign, Block::DarkOakWallSign, - Block::PaleOakWallSign, Block::CrimsonWallSign, Block::WarpedWallSign, Block::MangroveWallSign, @@ -76,7 +72,6 @@ pub static ALL_SIGNS: LazyLock> = LazyLock::new(|| { Block::CherryHangingSign, Block::JungleHangingSign, Block::DarkOakHangingSign, - Block::PaleOakHangingSign, Block::CrimsonHangingSign, Block::WarpedHangingSign, Block::MangroveHangingSign, @@ -88,7 +83,6 @@ pub static ALL_SIGNS: LazyLock> = LazyLock::new(|| { Block::CherryWallHangingSign, Block::JungleWallHangingSign, Block::DarkOakWallHangingSign, - Block::PaleOakWallHangingSign, Block::CrimsonWallHangingSign, Block::WarpedWallHangingSign, Block::MangroveWallHangingSign, @@ -143,7 +137,6 @@ pub static AZALEA_GROWS_ON: LazyLock> = LazyLock::new(|| { Block::Mycelium, Block::RootedDirt, Block::MossBlock, - Block::PaleMossBlock, Block::Mud, Block::MuddyMangroveRoots, Block::Sand, @@ -190,7 +183,6 @@ pub static AZALEA_ROOT_REPLACEABLE: LazyLock> = LazyLock::new(|| Block::Mycelium, Block::RootedDirt, Block::MossBlock, - Block::PaleMossBlock, Block::Mud, Block::MuddyMangroveRoots, Block::Terracotta, @@ -242,7 +234,6 @@ pub static BAMBOO_PLANTABLE_ON: LazyLock> = LazyLock::new(|| { Block::Mycelium, Block::RootedDirt, Block::MossBlock, - Block::PaleMossBlock, Block::Mud, Block::MuddyMangroveRoots, ]) @@ -334,37 +325,6 @@ pub static BEDS: LazyLock> = LazyLock::new(|| { Block::YellowBed, ]) }); -pub static BEE_ATTRACTIVE: LazyLock> = LazyLock::new(|| { - HashSet::from_iter(vec![ - Block::Dandelion, - Block::OpenEyeblossom, - Block::Poppy, - Block::BlueOrchid, - Block::Allium, - Block::AzureBluet, - Block::RedTulip, - Block::OrangeTulip, - Block::WhiteTulip, - Block::PinkTulip, - Block::OxeyeDaisy, - Block::Cornflower, - Block::LilyOfTheValley, - Block::WitherRose, - Block::Torchflower, - Block::Sunflower, - Block::Lilac, - Block::Peony, - Block::RoseBush, - Block::PitcherPlant, - Block::FloweringAzaleaLeaves, - Block::FloweringAzalea, - Block::MangrovePropagule, - Block::CherryLeaves, - Block::PinkPetals, - Block::ChorusFlower, - Block::SporeBlossom, - ]) -}); pub static BEE_GROWABLES: LazyLock> = LazyLock::new(|| { HashSet::from_iter(vec![ Block::SweetBerryBush, @@ -394,7 +354,6 @@ pub static BIG_DRIPLEAF_PLACEABLE: LazyLock> = LazyLock::new(|| { Block::Mycelium, Block::RootedDirt, Block::MossBlock, - Block::PaleMossBlock, Block::Mud, Block::MuddyMangroveRoots, ]) @@ -417,7 +376,6 @@ pub static BUTTONS: LazyLock> = LazyLock::new(|| { Block::JungleButton, Block::AcaciaButton, Block::DarkOakButton, - Block::PaleOakButton, Block::CrimsonButton, Block::WarpedButton, Block::MangroveButton, @@ -514,7 +472,6 @@ pub static CEILING_HANGING_SIGNS: LazyLock> = LazyLock::new(|| { Block::CherryHangingSign, Block::JungleHangingSign, Block::DarkOakHangingSign, - Block::PaleOakHangingSign, Block::CrimsonHangingSign, Block::WarpedHangingSign, Block::MangroveHangingSign, @@ -547,12 +504,10 @@ pub static COAL_ORES: LazyLock> = pub static COMBINATION_STEP_SOUND_BLOCKS: LazyLock> = LazyLock::new(|| { HashSet::from_iter(vec![ Block::MossCarpet, - Block::PaleMossCarpet, Block::Snow, Block::NetherSprouts, Block::WarpedRoots, Block::CrimsonRoots, - Block::ResinClump, Block::WhiteCarpet, Block::OrangeCarpet, Block::MagentaCarpet, @@ -576,7 +531,6 @@ pub static COMPLETES_FIND_TREE_TUTORIAL: LazyLock> = LazyLock::ne Block::JungleLeaves, Block::OakLeaves, Block::SpruceLeaves, - Block::PaleOakLeaves, Block::DarkOakLeaves, Block::AcaciaLeaves, Block::BirchLeaves, @@ -598,10 +552,6 @@ pub static COMPLETES_FIND_TREE_TUTORIAL: LazyLock> = LazyLock::ne Block::DarkOakWood, Block::StrippedDarkOakLog, Block::StrippedDarkOakWood, - Block::PaleOakLog, - Block::PaleOakWood, - Block::StrippedPaleOakLog, - Block::StrippedPaleOakWood, Block::OakLog, Block::OakWood, Block::StrippedOakLog, @@ -784,7 +734,6 @@ pub static DEAD_BUSH_MAY_PLACE_ON: LazyLock> = LazyLock::new(|| { Block::Mycelium, Block::RootedDirt, Block::MossBlock, - Block::PaleMossBlock, Block::Mud, Block::MuddyMangroveRoots, ]) @@ -802,7 +751,6 @@ pub static DIRT: LazyLock> = LazyLock::new(|| { Block::Mycelium, Block::RootedDirt, Block::MossBlock, - Block::PaleMossBlock, Block::Mud, Block::MuddyMangroveRoots, ]) @@ -826,7 +774,6 @@ pub static DOORS: LazyLock> = LazyLock::new(|| { Block::JungleDoor, Block::AcaciaDoor, Block::DarkOakDoor, - Block::PaleOakDoor, Block::CrimsonDoor, Block::WarpedDoor, Block::MangroveDoor, @@ -886,7 +833,6 @@ pub static ENCHANTMENT_POWER_TRANSMITTER: LazyLock> = LazyLock::n Block::Snow, Block::Vine, Block::GlowLichen, - Block::ResinClump, Block::Light, Block::TallGrass, Block::LargeFern, @@ -920,7 +866,6 @@ pub static ENDERMAN_HOLDABLE: LazyLock> = LazyLock::new(|| { Block::WarpedNylium, Block::WarpedRoots, Block::Dandelion, - Block::OpenEyeblossom, Block::Poppy, Block::BlueOrchid, Block::Allium, @@ -934,7 +879,6 @@ pub static ENDERMAN_HOLDABLE: LazyLock> = LazyLock::new(|| { Block::LilyOfTheValley, Block::WitherRose, Block::Torchflower, - Block::ClosedEyeblossom, Block::Dirt, Block::GrassBlock, Block::Podzol, @@ -942,7 +886,6 @@ pub static ENDERMAN_HOLDABLE: LazyLock> = LazyLock::new(|| { Block::Mycelium, Block::RootedDirt, Block::MossBlock, - Block::PaleMossBlock, Block::Mud, Block::MuddyMangroveRoots, ]) @@ -978,7 +921,6 @@ pub static FENCE_GATES: LazyLock> = LazyLock::new(|| { Block::AcaciaFenceGate, Block::BirchFenceGate, Block::DarkOakFenceGate, - Block::PaleOakFenceGate, Block::JungleFenceGate, Block::OakFenceGate, Block::SpruceFenceGate, @@ -995,7 +937,6 @@ pub static FENCES: LazyLock> = LazyLock::new(|| { Block::OakFence, Block::AcaciaFence, Block::DarkOakFence, - Block::PaleOakFence, Block::SpruceFence, Block::BirchFence, Block::JungleFence, @@ -1011,8 +952,6 @@ pub static FIRE: LazyLock> = pub static FLOWER_POTS: LazyLock> = LazyLock::new(|| { HashSet::from_iter(vec![ Block::FlowerPot, - Block::PottedOpenEyeblossom, - Block::PottedClosedEyeblossom, Block::PottedPoppy, Block::PottedBlueOrchid, Block::PottedAllium, @@ -1029,7 +968,6 @@ pub static FLOWER_POTS: LazyLock> = LazyLock::new(|| { Block::PottedJungleSapling, Block::PottedAcaciaSapling, Block::PottedDarkOakSapling, - Block::PottedPaleOakSapling, Block::PottedRedMushroom, Block::PottedBrownMushroom, Block::PottedDeadBush, @@ -1052,11 +990,6 @@ pub static FLOWER_POTS: LazyLock> = LazyLock::new(|| { }); pub static FLOWERS: LazyLock> = LazyLock::new(|| { HashSet::from_iter(vec![ - Block::Sunflower, - Block::Lilac, - Block::Peony, - Block::RoseBush, - Block::PitcherPlant, Block::FloweringAzaleaLeaves, Block::FloweringAzalea, Block::MangrovePropagule, @@ -1065,7 +998,6 @@ pub static FLOWERS: LazyLock> = LazyLock::new(|| { Block::ChorusFlower, Block::SporeBlossom, Block::Dandelion, - Block::OpenEyeblossom, Block::Poppy, Block::BlueOrchid, Block::Allium, @@ -1079,7 +1011,11 @@ pub static FLOWERS: LazyLock> = LazyLock::new(|| { Block::LilyOfTheValley, Block::WitherRose, Block::Torchflower, - Block::ClosedEyeblossom, + Block::Sunflower, + Block::Lilac, + Block::Peony, + Block::RoseBush, + Block::PitcherPlant, ]) }); pub static FOXES_SPAWNABLE_ON: LazyLock> = LazyLock::new(|| { @@ -1294,6 +1230,14 @@ pub static INCORRECT_FOR_GOLD_TOOL: LazyLock> = LazyLock::new(|| Block::WaxedExposedCopperTrapdoor, Block::WaxedWeatheredCopperTrapdoor, Block::WaxedOxidizedCopperTrapdoor, + Block::CopperDoor, + Block::ExposedCopperDoor, + Block::WeatheredCopperDoor, + Block::OxidizedCopperDoor, + Block::WaxedCopperDoor, + Block::WaxedExposedCopperDoor, + Block::WaxedWeatheredCopperDoor, + Block::WaxedOxidizedCopperDoor, ]) }); pub static INCORRECT_FOR_IRON_TOOL: LazyLock> = LazyLock::new(|| { @@ -1423,6 +1367,14 @@ pub static INCORRECT_FOR_WOODEN_TOOL: LazyLock> = LazyLock::new(| Block::WaxedExposedCopperTrapdoor, Block::WaxedWeatheredCopperTrapdoor, Block::WaxedOxidizedCopperTrapdoor, + Block::CopperDoor, + Block::ExposedCopperDoor, + Block::WeatheredCopperDoor, + Block::OxidizedCopperDoor, + Block::WaxedCopperDoor, + Block::WaxedExposedCopperDoor, + Block::WaxedWeatheredCopperDoor, + Block::WaxedOxidizedCopperDoor, ]) }); pub static INFINIBURN_END: LazyLock> = LazyLock::new(|| { @@ -1468,7 +1420,6 @@ pub static LAVA_POOL_STONE_CANNOT_REPLACE: LazyLock> = LazyLock:: Block::JungleLeaves, Block::OakLeaves, Block::SpruceLeaves, - Block::PaleOakLeaves, Block::DarkOakLeaves, Block::AcaciaLeaves, Block::BirchLeaves, @@ -1488,10 +1439,6 @@ pub static LAVA_POOL_STONE_CANNOT_REPLACE: LazyLock> = LazyLock:: Block::DarkOakWood, Block::StrippedDarkOakLog, Block::StrippedDarkOakWood, - Block::PaleOakLog, - Block::PaleOakWood, - Block::StrippedPaleOakLog, - Block::StrippedPaleOakWood, Block::OakLog, Block::OakWood, Block::StrippedOakLog, @@ -1527,7 +1474,6 @@ pub static LEAVES: LazyLock> = LazyLock::new(|| { Block::JungleLeaves, Block::OakLeaves, Block::SpruceLeaves, - Block::PaleOakLeaves, Block::DarkOakLeaves, Block::AcaciaLeaves, Block::BirchLeaves, @@ -1551,10 +1497,6 @@ pub static LOGS: LazyLock> = LazyLock::new(|| { Block::DarkOakWood, Block::StrippedDarkOakLog, Block::StrippedDarkOakWood, - Block::PaleOakLog, - Block::PaleOakWood, - Block::StrippedPaleOakLog, - Block::StrippedPaleOakWood, Block::OakLog, Block::OakWood, Block::StrippedOakLog, @@ -1591,10 +1533,6 @@ pub static LOGS_THAT_BURN: LazyLock> = LazyLock::new(|| { Block::DarkOakWood, Block::StrippedDarkOakLog, Block::StrippedDarkOakWood, - Block::PaleOakLog, - Block::PaleOakWood, - Block::StrippedPaleOakLog, - Block::StrippedPaleOakWood, Block::OakLog, Block::OakWood, Block::StrippedOakLog, @@ -1645,7 +1583,6 @@ pub static LUSH_GROUND_REPLACEABLE: LazyLock> = LazyLock::new(|| Block::Mycelium, Block::RootedDirt, Block::MossBlock, - Block::PaleMossBlock, Block::Mud, Block::MuddyMangroveRoots, ]) @@ -1769,7 +1706,6 @@ pub static MINEABLE_AXE: LazyLock> = LazyLock::new(|| { Block::BambooMosaicSlab, Block::BambooMosaicStairs, Block::ChiseledBookshelf, - Block::CreakingHeart, Block::WhiteBanner, Block::OrangeBanner, Block::MagentaBanner, @@ -1805,7 +1741,6 @@ pub static MINEABLE_AXE: LazyLock> = LazyLock::new(|| { Block::AcaciaFenceGate, Block::BirchFenceGate, Block::DarkOakFenceGate, - Block::PaleOakFenceGate, Block::JungleFenceGate, Block::OakFenceGate, Block::SpruceFenceGate, @@ -1820,7 +1755,6 @@ pub static MINEABLE_AXE: LazyLock> = LazyLock::new(|| { Block::JunglePlanks, Block::AcaciaPlanks, Block::DarkOakPlanks, - Block::PaleOakPlanks, Block::CrimsonPlanks, Block::WarpedPlanks, Block::MangrovePlanks, @@ -1832,7 +1766,6 @@ pub static MINEABLE_AXE: LazyLock> = LazyLock::new(|| { Block::JungleSapling, Block::AcaciaSapling, Block::DarkOakSapling, - Block::PaleOakSapling, Block::Azalea, Block::FloweringAzalea, Block::MangrovePropagule, @@ -1843,7 +1776,6 @@ pub static MINEABLE_AXE: LazyLock> = LazyLock::new(|| { Block::JungleButton, Block::AcaciaButton, Block::DarkOakButton, - Block::PaleOakButton, Block::CrimsonButton, Block::WarpedButton, Block::MangroveButton, @@ -1855,7 +1787,6 @@ pub static MINEABLE_AXE: LazyLock> = LazyLock::new(|| { Block::JungleDoor, Block::AcaciaDoor, Block::DarkOakDoor, - Block::PaleOakDoor, Block::CrimsonDoor, Block::WarpedDoor, Block::MangroveDoor, @@ -1864,7 +1795,6 @@ pub static MINEABLE_AXE: LazyLock> = LazyLock::new(|| { Block::OakFence, Block::AcaciaFence, Block::DarkOakFence, - Block::PaleOakFence, Block::SpruceFence, Block::BirchFence, Block::JungleFence, @@ -1879,7 +1809,6 @@ pub static MINEABLE_AXE: LazyLock> = LazyLock::new(|| { Block::JunglePressurePlate, Block::AcaciaPressurePlate, Block::DarkOakPressurePlate, - Block::PaleOakPressurePlate, Block::CrimsonPressurePlate, Block::WarpedPressurePlate, Block::MangrovePressurePlate, @@ -1891,7 +1820,6 @@ pub static MINEABLE_AXE: LazyLock> = LazyLock::new(|| { Block::JungleSlab, Block::AcaciaSlab, Block::DarkOakSlab, - Block::PaleOakSlab, Block::CrimsonSlab, Block::WarpedSlab, Block::MangroveSlab, @@ -1903,7 +1831,6 @@ pub static MINEABLE_AXE: LazyLock> = LazyLock::new(|| { Block::JungleStairs, Block::AcaciaStairs, Block::DarkOakStairs, - Block::PaleOakStairs, Block::CrimsonStairs, Block::WarpedStairs, Block::MangroveStairs, @@ -1912,7 +1839,6 @@ pub static MINEABLE_AXE: LazyLock> = LazyLock::new(|| { Block::AcaciaTrapdoor, Block::BirchTrapdoor, Block::DarkOakTrapdoor, - Block::PaleOakTrapdoor, Block::JungleTrapdoor, Block::OakTrapdoor, Block::SpruceTrapdoor, @@ -1937,7 +1863,6 @@ pub static MINEABLE_AXE: LazyLock> = LazyLock::new(|| { Block::AcaciaSign, Block::JungleSign, Block::DarkOakSign, - Block::PaleOakSign, Block::CrimsonSign, Block::WarpedSign, Block::MangroveSign, @@ -1949,7 +1874,6 @@ pub static MINEABLE_AXE: LazyLock> = LazyLock::new(|| { Block::AcaciaWallSign, Block::JungleWallSign, Block::DarkOakWallSign, - Block::PaleOakWallSign, Block::CrimsonWallSign, Block::WarpedWallSign, Block::MangroveWallSign, @@ -1962,7 +1886,6 @@ pub static MINEABLE_AXE: LazyLock> = LazyLock::new(|| { Block::CherryHangingSign, Block::JungleHangingSign, Block::DarkOakHangingSign, - Block::PaleOakHangingSign, Block::CrimsonHangingSign, Block::WarpedHangingSign, Block::MangroveHangingSign, @@ -1974,7 +1897,6 @@ pub static MINEABLE_AXE: LazyLock> = LazyLock::new(|| { Block::CherryWallHangingSign, Block::JungleWallHangingSign, Block::DarkOakWallHangingSign, - Block::PaleOakWallHangingSign, Block::CrimsonWallHangingSign, Block::WarpedWallHangingSign, Block::MangroveWallHangingSign, @@ -1983,10 +1905,6 @@ pub static MINEABLE_AXE: LazyLock> = LazyLock::new(|| { Block::DarkOakWood, Block::StrippedDarkOakLog, Block::StrippedDarkOakWood, - Block::PaleOakLog, - Block::PaleOakWood, - Block::StrippedPaleOakLog, - Block::StrippedPaleOakWood, Block::OakLog, Block::OakWood, Block::StrippedOakLog, @@ -2030,7 +1948,6 @@ pub static MINEABLE_HOE: LazyLock> = LazyLock::new(|| { Block::JungleLeaves, Block::OakLeaves, Block::SpruceLeaves, - Block::PaleOakLeaves, Block::DarkOakLeaves, Block::AcaciaLeaves, Block::BirchLeaves, @@ -2041,8 +1958,6 @@ pub static MINEABLE_HOE: LazyLock> = LazyLock::new(|| { Block::CalibratedSculkSensor, Block::MossBlock, Block::MossCarpet, - Block::PaleMossBlock, - Block::PaleMossCarpet, Block::Sculk, Block::SculkCatalyst, Block::SculkVein, @@ -2070,7 +1985,6 @@ pub static MINEABLE_PICKAXE: LazyLock> = LazyLock::new(|| { Block::NetherGoldOre, Block::LapisOre, Block::DeepslateLapisOre, - Block::ResinBricks, Block::LapisBlock, Block::Dispenser, Block::Sandstone, @@ -2432,11 +2346,6 @@ pub static MINEABLE_PICKAXE: LazyLock> = LazyLock::new(|| { Block::WaxedWeatheredCopperTrapdoor, Block::WaxedOxidizedCopperTrapdoor, Block::HeavyCore, - Block::ResinBricks, - Block::ResinBrickSlab, - Block::ResinBrickWall, - Block::ResinBrickStairs, - Block::ChiseledResinBricks, Block::StoneButton, Block::PolishedBlackstoneButton, Block::CobblestoneWall, @@ -2464,7 +2373,6 @@ pub static MINEABLE_PICKAXE: LazyLock> = LazyLock::new(|| { Block::TuffWall, Block::PolishedTuffWall, Block::TuffBrickWall, - Block::ResinBrickWall, Block::ShulkerBox, Block::BlackShulkerBox, Block::BlueShulkerBox, @@ -2551,7 +2459,6 @@ pub static MOB_INTERACTABLE_DOORS: LazyLock> = LazyLock::new(|| { Block::JungleDoor, Block::AcaciaDoor, Block::DarkOakDoor, - Block::PaleOakDoor, Block::CrimsonDoor, Block::WarpedDoor, Block::MangroveDoor, @@ -2578,7 +2485,6 @@ pub static MOSS_REPLACEABLE: LazyLock> = LazyLock::new(|| { Block::Mycelium, Block::RootedDirt, Block::MossBlock, - Block::PaleMossBlock, Block::Mud, Block::MuddyMangroveRoots, ]) @@ -2694,6 +2600,14 @@ pub static NEEDS_STONE_TOOL: LazyLock> = LazyLock::new(|| { Block::WaxedExposedCopperTrapdoor, Block::WaxedWeatheredCopperTrapdoor, Block::WaxedOxidizedCopperTrapdoor, + Block::CopperDoor, + Block::ExposedCopperDoor, + Block::WeatheredCopperDoor, + Block::OxidizedCopperDoor, + Block::WaxedCopperDoor, + Block::WaxedExposedCopperDoor, + Block::WaxedWeatheredCopperDoor, + Block::WaxedOxidizedCopperDoor, ]) }); pub static NETHER_CARVER_REPLACEABLES: LazyLock> = LazyLock::new(|| { @@ -2716,7 +2630,6 @@ pub static NETHER_CARVER_REPLACEABLES: LazyLock> = LazyLock::new( Block::Mycelium, Block::RootedDirt, Block::MossBlock, - Block::PaleMossBlock, Block::Mud, Block::MuddyMangroveRoots, Block::CrimsonNylium, @@ -2763,6 +2676,7 @@ pub static OVERWORLD_CARVER_REPLACEABLES: LazyLock> = LazyLock::n Block::Sandstone, Block::RedSandstone, Block::Calcite, + Block::Snow, Block::PackedIce, Block::RawIronBlock, Block::RawCopperBlock, @@ -2779,7 +2693,6 @@ pub static OVERWORLD_CARVER_REPLACEABLES: LazyLock> = LazyLock::n Block::Mycelium, Block::RootedDirt, Block::MossBlock, - Block::PaleMossBlock, Block::Mud, Block::MuddyMangroveRoots, Block::Sand, @@ -2807,9 +2720,6 @@ pub static OVERWORLD_CARVER_REPLACEABLES: LazyLock> = LazyLock::n Block::DeepslateIronOre, Block::CopperOre, Block::DeepslateCopperOre, - Block::Snow, - Block::SnowBlock, - Block::PowderSnow, ]) }); pub static OVERWORLD_NATURAL_LOGS: LazyLock> = LazyLock::new(|| { @@ -2820,19 +2730,10 @@ pub static OVERWORLD_NATURAL_LOGS: LazyLock> = LazyLock::new(|| { Block::JungleLog, Block::SpruceLog, Block::DarkOakLog, - Block::PaleOakLog, Block::MangroveLog, Block::CherryLog, ]) }); -pub static PALE_OAK_LOGS: LazyLock> = LazyLock::new(|| { - HashSet::from_iter(vec![ - Block::PaleOakLog, - Block::PaleOakWood, - Block::StrippedPaleOakLog, - Block::StrippedPaleOakWood, - ]) -}); pub static PARROTS_SPAWNABLE_ON: LazyLock> = LazyLock::new(|| { HashSet::from_iter(vec![ Block::GrassBlock, @@ -2840,7 +2741,6 @@ pub static PARROTS_SPAWNABLE_ON: LazyLock> = LazyLock::new(|| { Block::JungleLeaves, Block::OakLeaves, Block::SpruceLeaves, - Block::PaleOakLeaves, Block::DarkOakLeaves, Block::AcaciaLeaves, Block::BirchLeaves, @@ -2860,10 +2760,6 @@ pub static PARROTS_SPAWNABLE_ON: LazyLock> = LazyLock::new(|| { Block::DarkOakWood, Block::StrippedDarkOakLog, Block::StrippedDarkOakWood, - Block::PaleOakLog, - Block::PaleOakWood, - Block::StrippedPaleOakLog, - Block::StrippedPaleOakWood, Block::OakLog, Block::OakWood, Block::StrippedOakLog, @@ -2911,7 +2807,6 @@ pub static PLANKS: LazyLock> = LazyLock::new(|| { Block::JunglePlanks, Block::AcaciaPlanks, Block::DarkOakPlanks, - Block::PaleOakPlanks, Block::CrimsonPlanks, Block::WarpedPlanks, Block::MangrovePlanks, @@ -2938,7 +2833,6 @@ pub static PRESSURE_PLATES: LazyLock> = LazyLock::new(|| { Block::JunglePressurePlate, Block::AcaciaPressurePlate, Block::DarkOakPressurePlate, - Block::PaleOakPressurePlate, Block::CrimsonPressurePlate, Block::WarpedPressurePlate, Block::MangrovePressurePlate, @@ -2989,7 +2883,6 @@ pub static REPLACEABLE: LazyLock> = LazyLock::new(|| { Block::Snow, Block::Vine, Block::GlowLichen, - Block::ResinClump, Block::Light, Block::TallGrass, Block::LargeFern, @@ -3005,7 +2898,6 @@ pub static REPLACEABLE: LazyLock> = LazyLock::new(|| { }); pub static REPLACEABLE_BY_TREES: LazyLock> = LazyLock::new(|| { HashSet::from_iter(vec![ - Block::PaleMossCarpet, Block::ShortGrass, Block::Fern, Block::DeadBush, @@ -3028,7 +2920,6 @@ pub static REPLACEABLE_BY_TREES: LazyLock> = LazyLock::new(|| { Block::JungleLeaves, Block::OakLeaves, Block::SpruceLeaves, - Block::PaleOakLeaves, Block::DarkOakLeaves, Block::AcaciaLeaves, Block::BirchLeaves, @@ -3036,22 +2927,6 @@ pub static REPLACEABLE_BY_TREES: LazyLock> = LazyLock::new(|| { Block::FloweringAzaleaLeaves, Block::MangroveLeaves, Block::CherryLeaves, - Block::Dandelion, - Block::OpenEyeblossom, - Block::Poppy, - Block::BlueOrchid, - Block::Allium, - Block::AzureBluet, - Block::RedTulip, - Block::OrangeTulip, - Block::WhiteTulip, - Block::PinkTulip, - Block::OxeyeDaisy, - Block::Cornflower, - Block::LilyOfTheValley, - Block::WitherRose, - Block::Torchflower, - Block::ClosedEyeblossom, ]) }); pub static SAND: LazyLock> = LazyLock::new(|| { @@ -3070,7 +2945,6 @@ pub static SAPLINGS: LazyLock> = LazyLock::new(|| { Block::JungleSapling, Block::AcaciaSapling, Block::DarkOakSapling, - Block::PaleOakSapling, Block::Azalea, Block::FloweringAzalea, Block::MangrovePropagule, @@ -3104,7 +2978,6 @@ pub static SCULK_REPLACEABLE: LazyLock> = LazyLock::new(|| { Block::Mycelium, Block::RootedDirt, Block::MossBlock, - Block::PaleMossBlock, Block::Mud, Block::MuddyMangroveRoots, Block::Terracotta, @@ -3164,7 +3037,6 @@ pub static SCULK_REPLACEABLE_WORLD_GEN: LazyLock> = LazyLock::new Block::Mycelium, Block::RootedDirt, Block::MossBlock, - Block::PaleMossBlock, Block::Mud, Block::MuddyMangroveRoots, Block::Terracotta, @@ -3220,7 +3092,6 @@ pub static SIGNS: LazyLock> = LazyLock::new(|| { Block::AcaciaSign, Block::JungleSign, Block::DarkOakSign, - Block::PaleOakSign, Block::CrimsonSign, Block::WarpedSign, Block::MangroveSign, @@ -3232,7 +3103,6 @@ pub static SIGNS: LazyLock> = LazyLock::new(|| { Block::AcaciaWallSign, Block::JungleWallSign, Block::DarkOakWallSign, - Block::PaleOakWallSign, Block::CrimsonWallSign, Block::WarpedWallSign, Block::MangroveWallSign, @@ -3291,14 +3161,12 @@ pub static SLABS: LazyLock> = LazyLock::new(|| { Block::TuffSlab, Block::PolishedTuffSlab, Block::TuffBrickSlab, - Block::ResinBrickSlab, Block::OakSlab, Block::SpruceSlab, Block::BirchSlab, Block::JungleSlab, Block::AcaciaSlab, Block::DarkOakSlab, - Block::PaleOakSlab, Block::CrimsonSlab, Block::WarpedSlab, Block::MangroveSlab, @@ -3311,7 +3179,6 @@ pub static SMALL_DRIPLEAF_PLACEABLE: LazyLock> = pub static SMALL_FLOWERS: LazyLock> = LazyLock::new(|| { HashSet::from_iter(vec![ Block::Dandelion, - Block::OpenEyeblossom, Block::Poppy, Block::BlueOrchid, Block::Allium, @@ -3325,7 +3192,6 @@ pub static SMALL_FLOWERS: LazyLock> = LazyLock::new(|| { Block::LilyOfTheValley, Block::WitherRose, Block::Torchflower, - Block::ClosedEyeblossom, ]) }); pub static SMELTS_TO_GLASS: LazyLock> = @@ -3344,7 +3210,6 @@ pub static SNAPS_GOAT_HORN: LazyLock> = LazyLock::new(|| { Block::JungleLog, Block::SpruceLog, Block::DarkOakLog, - Block::PaleOakLog, Block::MangroveLog, Block::CherryLog, ]) @@ -3357,7 +3222,6 @@ pub static SNIFFER_DIGGABLE_BLOCK: LazyLock> = LazyLock::new(|| { Block::CoarseDirt, Block::RootedDirt, Block::MossBlock, - Block::PaleMossBlock, Block::Mud, Block::MuddyMangroveRoots, ]) @@ -3429,14 +3293,12 @@ pub static STAIRS: LazyLock> = LazyLock::new(|| { Block::TuffStairs, Block::PolishedTuffStairs, Block::TuffBrickStairs, - Block::ResinBrickStairs, Block::OakStairs, Block::SpruceStairs, Block::BirchStairs, Block::JungleStairs, Block::AcaciaStairs, Block::DarkOakStairs, - Block::PaleOakStairs, Block::CrimsonStairs, Block::WarpedStairs, Block::MangroveStairs, @@ -3452,7 +3314,6 @@ pub static STANDING_SIGNS: LazyLock> = LazyLock::new(|| { Block::AcaciaSign, Block::JungleSign, Block::DarkOakSign, - Block::PaleOakSign, Block::CrimsonSign, Block::WarpedSign, Block::MangroveSign, @@ -3517,6 +3378,7 @@ pub static SWORD_EFFICIENT: LazyLock> = LazyLock::new(|| { Block::CaveVines, Block::CaveVinesPlant, Block::SporeBlossom, + Block::MossCarpet, Block::PinkPetals, Block::BigDripleaf, Block::BigDripleafStem, @@ -3536,7 +3398,6 @@ pub static SWORD_EFFICIENT: LazyLock> = LazyLock::new(|| { Block::JungleLeaves, Block::OakLeaves, Block::SpruceLeaves, - Block::PaleOakLeaves, Block::DarkOakLeaves, Block::AcaciaLeaves, Block::BirchLeaves, @@ -3550,11 +3411,24 @@ pub static SWORD_EFFICIENT: LazyLock> = LazyLock::new(|| { Block::JungleSapling, Block::AcaciaSapling, Block::DarkOakSapling, - Block::PaleOakSapling, Block::Azalea, Block::FloweringAzalea, Block::MangrovePropagule, Block::CherrySapling, + Block::Dandelion, + Block::Poppy, + Block::BlueOrchid, + Block::Allium, + Block::AzureBluet, + Block::RedTulip, + Block::OrangeTulip, + Block::WhiteTulip, + Block::PinkTulip, + Block::OxeyeDaisy, + Block::Cornflower, + Block::LilyOfTheValley, + Block::WitherRose, + Block::Torchflower, Block::Beetroots, Block::Carrots, Block::Potatoes, @@ -3565,6 +3439,15 @@ pub static SWORD_EFFICIENT: LazyLock> = LazyLock::new(|| { Block::PitcherCrop, ]) }); +pub static TALL_FLOWERS: LazyLock> = LazyLock::new(|| { + HashSet::from_iter(vec![ + Block::Sunflower, + Block::Lilac, + Block::Peony, + Block::RoseBush, + Block::PitcherPlant, + ]) +}); pub static TERRACOTTA: LazyLock> = LazyLock::new(|| { HashSet::from_iter(vec![ Block::Terracotta, @@ -3602,7 +3485,6 @@ pub static TRAPDOORS: LazyLock> = LazyLock::new(|| { Block::AcaciaTrapdoor, Block::BirchTrapdoor, Block::DarkOakTrapdoor, - Block::PaleOakTrapdoor, Block::JungleTrapdoor, Block::OakTrapdoor, Block::SpruceTrapdoor, @@ -3638,7 +3520,6 @@ pub static UNSTABLE_BOTTOM_CENTER: LazyLock> = LazyLock::new(|| { Block::AcaciaFenceGate, Block::BirchFenceGate, Block::DarkOakFenceGate, - Block::PaleOakFenceGate, Block::JungleFenceGate, Block::OakFenceGate, Block::SpruceFenceGate, @@ -3671,7 +3552,6 @@ pub static WALL_HANGING_SIGNS: LazyLock> = LazyLock::new(|| { Block::CherryWallHangingSign, Block::JungleWallHangingSign, Block::DarkOakWallHangingSign, - Block::PaleOakWallHangingSign, Block::CrimsonWallHangingSign, Block::WarpedWallHangingSign, Block::MangroveWallHangingSign, @@ -3724,7 +3604,6 @@ pub static WALL_POST_OVERRIDE: LazyLock> = LazyLock::new(|| { Block::AcaciaSign, Block::JungleSign, Block::DarkOakSign, - Block::PaleOakSign, Block::CrimsonSign, Block::WarpedSign, Block::MangroveSign, @@ -3736,7 +3615,6 @@ pub static WALL_POST_OVERRIDE: LazyLock> = LazyLock::new(|| { Block::AcaciaWallSign, Block::JungleWallSign, Block::DarkOakWallSign, - Block::PaleOakWallSign, Block::CrimsonWallSign, Block::WarpedWallSign, Block::MangroveWallSign, @@ -3748,7 +3626,6 @@ pub static WALL_POST_OVERRIDE: LazyLock> = LazyLock::new(|| { Block::JunglePressurePlate, Block::AcaciaPressurePlate, Block::DarkOakPressurePlate, - Block::PaleOakPressurePlate, Block::CrimsonPressurePlate, Block::WarpedPressurePlate, Block::MangrovePressurePlate, @@ -3766,7 +3643,6 @@ pub static WALL_SIGNS: LazyLock> = LazyLock::new(|| { Block::AcaciaWallSign, Block::JungleWallSign, Block::DarkOakWallSign, - Block::PaleOakWallSign, Block::CrimsonWallSign, Block::WarpedWallSign, Block::MangroveWallSign, @@ -3801,7 +3677,6 @@ pub static WALLS: LazyLock> = LazyLock::new(|| { Block::TuffWall, Block::PolishedTuffWall, Block::TuffBrickWall, - Block::ResinBrickWall, ]) }); pub static WARPED_STEMS: LazyLock> = LazyLock::new(|| { @@ -3850,7 +3725,6 @@ pub static WOODEN_BUTTONS: LazyLock> = LazyLock::new(|| { Block::JungleButton, Block::AcaciaButton, Block::DarkOakButton, - Block::PaleOakButton, Block::CrimsonButton, Block::WarpedButton, Block::MangroveButton, @@ -3866,7 +3740,6 @@ pub static WOODEN_DOORS: LazyLock> = LazyLock::new(|| { Block::JungleDoor, Block::AcaciaDoor, Block::DarkOakDoor, - Block::PaleOakDoor, Block::CrimsonDoor, Block::WarpedDoor, Block::MangroveDoor, @@ -3879,7 +3752,6 @@ pub static WOODEN_FENCES: LazyLock> = LazyLock::new(|| { Block::OakFence, Block::AcaciaFence, Block::DarkOakFence, - Block::PaleOakFence, Block::SpruceFence, Block::BirchFence, Block::JungleFence, @@ -3898,7 +3770,6 @@ pub static WOODEN_PRESSURE_PLATES: LazyLock> = LazyLock::new(|| { Block::JunglePressurePlate, Block::AcaciaPressurePlate, Block::DarkOakPressurePlate, - Block::PaleOakPressurePlate, Block::CrimsonPressurePlate, Block::WarpedPressurePlate, Block::MangrovePressurePlate, @@ -3914,7 +3785,6 @@ pub static WOODEN_SLABS: LazyLock> = LazyLock::new(|| { Block::JungleSlab, Block::AcaciaSlab, Block::DarkOakSlab, - Block::PaleOakSlab, Block::CrimsonSlab, Block::WarpedSlab, Block::MangroveSlab, @@ -3930,7 +3800,6 @@ pub static WOODEN_STAIRS: LazyLock> = LazyLock::new(|| { Block::JungleStairs, Block::AcaciaStairs, Block::DarkOakStairs, - Block::PaleOakStairs, Block::CrimsonStairs, Block::WarpedStairs, Block::MangroveStairs, @@ -3943,7 +3812,6 @@ pub static WOODEN_TRAPDOORS: LazyLock> = LazyLock::new(|| { Block::AcaciaTrapdoor, Block::BirchTrapdoor, Block::DarkOakTrapdoor, - Block::PaleOakTrapdoor, Block::JungleTrapdoor, Block::OakTrapdoor, Block::SpruceTrapdoor, diff --git a/azalea-registry/src/tags/items.rs b/azalea-registry/src/tags/items.rs index f20b5f662..421b43afa 100644 --- a/azalea-registry/src/tags/items.rs +++ b/azalea-registry/src/tags/items.rs @@ -84,8 +84,14 @@ pub static BEDS: LazyLock> = LazyLock::new(|| { }); pub static BEE_FOOD: LazyLock> = LazyLock::new(|| { HashSet::from_iter(vec![ + Item::FloweringAzaleaLeaves, + Item::FloweringAzalea, + Item::MangrovePropagule, + Item::CherryLeaves, + Item::PinkPetals, + Item::ChorusFlower, + Item::SporeBlossom, Item::Dandelion, - Item::OpenEyeblossom, Item::Poppy, Item::BlueOrchid, Item::Allium, @@ -104,13 +110,6 @@ pub static BEE_FOOD: LazyLock> = LazyLock::new(|| { Item::Peony, Item::RoseBush, Item::PitcherPlant, - Item::FloweringAzaleaLeaves, - Item::FloweringAzalea, - Item::MangrovePropagule, - Item::CherryLeaves, - Item::PinkPetals, - Item::ChorusFlower, - Item::SporeBlossom, ]) }); pub static BIRCH_LOGS: LazyLock> = LazyLock::new(|| { @@ -129,7 +128,6 @@ pub static BOATS: LazyLock> = LazyLock::new(|| { Item::JungleBoat, Item::AcaciaBoat, Item::DarkOakBoat, - Item::PaleOakBoat, Item::MangroveBoat, Item::BambooRaft, Item::CherryBoat, @@ -139,7 +137,6 @@ pub static BOATS: LazyLock> = LazyLock::new(|| { Item::JungleChestBoat, Item::AcaciaChestBoat, Item::DarkOakChestBoat, - Item::PaleOakChestBoat, Item::MangroveChestBoat, Item::BambooChestRaft, Item::CherryChestBoat, @@ -221,7 +218,6 @@ pub static BUTTONS: LazyLock> = LazyLock::new(|| { Item::JungleButton, Item::AcaciaButton, Item::DarkOakButton, - Item::PaleOakButton, Item::CrimsonButton, Item::WarpedButton, Item::MangroveButton, @@ -282,7 +278,6 @@ pub static CHEST_BOATS: LazyLock> = LazyLock::new(|| { Item::JungleChestBoat, Item::AcaciaChestBoat, Item::DarkOakChestBoat, - Item::PaleOakChestBoat, Item::MangroveChestBoat, Item::BambooChestRaft, Item::CherryChestBoat, @@ -319,7 +314,6 @@ pub static COMPLETES_FIND_TREE_TUTORIAL: LazyLock> = LazyLock::new Item::JungleLeaves, Item::OakLeaves, Item::SpruceLeaves, - Item::PaleOakLeaves, Item::DarkOakLeaves, Item::AcaciaLeaves, Item::BirchLeaves, @@ -341,10 +335,6 @@ pub static COMPLETES_FIND_TREE_TUTORIAL: LazyLock> = LazyLock::new Item::DarkOakWood, Item::StrippedDarkOakLog, Item::StrippedDarkOakWood, - Item::PaleOakLog, - Item::PaleOakWood, - Item::StrippedPaleOakLog, - Item::StrippedPaleOakWood, Item::OakLog, Item::OakWood, Item::StrippedOakLog, @@ -517,7 +507,6 @@ pub static DIRT: LazyLock> = LazyLock::new(|| { Item::Mycelium, Item::RootedDirt, Item::MossBlock, - Item::PaleMossBlock, Item::Mud, Item::MuddyMangroveRoots, ]) @@ -539,7 +528,6 @@ pub static DOORS: LazyLock> = LazyLock::new(|| { Item::JungleDoor, Item::AcaciaDoor, Item::DarkOakDoor, - Item::PaleOakDoor, Item::CrimsonDoor, Item::WarpedDoor, Item::MangroveDoor, @@ -547,8 +535,6 @@ pub static DOORS: LazyLock> = LazyLock::new(|| { Item::CherryDoor, ]) }); -pub static DROWNED_PREFERRED_WEAPONS: LazyLock> = - LazyLock::new(|| HashSet::from_iter(vec![Item::Trident])); pub static DUPLICATES_ALLAYS: LazyLock> = LazyLock::new(|| HashSet::from_iter(vec![Item::AmethystShard])); pub static DYEABLE: LazyLock> = LazyLock::new(|| { @@ -948,7 +934,6 @@ pub static FENCE_GATES: LazyLock> = LazyLock::new(|| { Item::AcaciaFenceGate, Item::BirchFenceGate, Item::DarkOakFenceGate, - Item::PaleOakFenceGate, Item::JungleFenceGate, Item::OakFenceGate, Item::SpruceFenceGate, @@ -965,7 +950,6 @@ pub static FENCES: LazyLock> = LazyLock::new(|| { Item::OakFence, Item::AcaciaFence, Item::DarkOakFence, - Item::PaleOakFence, Item::SpruceFence, Item::BirchFence, Item::JungleFence, @@ -986,6 +970,36 @@ pub static FISHES: LazyLock> = LazyLock::new(|| { Item::TropicalFish, ]) }); +pub static FLOWERS: LazyLock> = LazyLock::new(|| { + HashSet::from_iter(vec![ + Item::FloweringAzaleaLeaves, + Item::FloweringAzalea, + Item::MangrovePropagule, + Item::CherryLeaves, + Item::PinkPetals, + Item::ChorusFlower, + Item::SporeBlossom, + Item::Dandelion, + Item::Poppy, + Item::BlueOrchid, + Item::Allium, + Item::AzureBluet, + Item::RedTulip, + Item::OrangeTulip, + Item::WhiteTulip, + Item::PinkTulip, + Item::OxeyeDaisy, + Item::Cornflower, + Item::LilyOfTheValley, + Item::WitherRose, + Item::Torchflower, + Item::Sunflower, + Item::Lilac, + Item::Peony, + Item::RoseBush, + Item::PitcherPlant, + ]) +}); pub static FOOT_ARMOR: LazyLock> = LazyLock::new(|| { HashSet::from_iter(vec![ Item::LeatherBoots, @@ -1033,7 +1047,6 @@ pub static HANGING_SIGNS: LazyLock> = LazyLock::new(|| { Item::CherryHangingSign, Item::JungleHangingSign, Item::DarkOakHangingSign, - Item::PaleOakHangingSign, Item::CrimsonHangingSign, Item::WarpedHangingSign, Item::MangroveHangingSign, @@ -1102,7 +1115,6 @@ pub static LEAVES: LazyLock> = LazyLock::new(|| { Item::JungleLeaves, Item::OakLeaves, Item::SpruceLeaves, - Item::PaleOakLeaves, Item::DarkOakLeaves, Item::AcaciaLeaves, Item::BirchLeaves, @@ -1142,10 +1154,6 @@ pub static LOGS: LazyLock> = LazyLock::new(|| { Item::DarkOakWood, Item::StrippedDarkOakLog, Item::StrippedDarkOakWood, - Item::PaleOakLog, - Item::PaleOakWood, - Item::StrippedPaleOakLog, - Item::StrippedPaleOakWood, Item::OakLog, Item::OakWood, Item::StrippedOakLog, @@ -1182,10 +1190,6 @@ pub static LOGS_THAT_BURN: LazyLock> = LazyLock::new(|| { Item::DarkOakWood, Item::StrippedDarkOakLog, Item::StrippedDarkOakWood, - Item::PaleOakLog, - Item::PaleOakWood, - Item::StrippedPaleOakLog, - Item::StrippedPaleOakWood, Item::OakLog, Item::OakWood, Item::StrippedOakLog, @@ -1298,14 +1302,6 @@ pub static OAK_LOGS: LazyLock> = LazyLock::new(|| { }); pub static OCELOT_FOOD: LazyLock> = LazyLock::new(|| HashSet::from_iter(vec![Item::Cod, Item::Salmon])); -pub static PALE_OAK_LOGS: LazyLock> = LazyLock::new(|| { - HashSet::from_iter(vec![ - Item::PaleOakLog, - Item::PaleOakWood, - Item::StrippedPaleOakLog, - Item::StrippedPaleOakWood, - ]) -}); pub static PANDA_EATS_FROM_GROUND: LazyLock> = LazyLock::new(|| HashSet::from_iter(vec![Item::Cake, Item::Bamboo])); pub static PANDA_FOOD: LazyLock> = @@ -1365,8 +1361,6 @@ pub static PIGLIN_LOVED: LazyLock> = LazyLock::new(|| { Item::DeepslateGoldOre, ]) }); -pub static PIGLIN_PREFERRED_WEAPONS: LazyLock> = - LazyLock::new(|| HashSet::from_iter(vec![Item::Crossbow])); pub static PIGLIN_REPELLENTS: LazyLock> = LazyLock::new(|| { HashSet::from_iter(vec![Item::SoulTorch, Item::SoulLantern, Item::SoulCampfire]) }); @@ -1378,8 +1372,6 @@ pub static PIGLIN_SAFE_ARMOR: LazyLock> = LazyLock::new(|| { Item::GoldenBoots, ]) }); -pub static PILLAGER_PREFERRED_WEAPONS: LazyLock> = - LazyLock::new(|| HashSet::from_iter(vec![Item::Crossbow])); pub static PLANKS: LazyLock> = LazyLock::new(|| { HashSet::from_iter(vec![ Item::OakPlanks, @@ -1388,7 +1380,6 @@ pub static PLANKS: LazyLock> = LazyLock::new(|| { Item::JunglePlanks, Item::AcaciaPlanks, Item::DarkOakPlanks, - Item::PaleOakPlanks, Item::CrimsonPlanks, Item::WarpedPlanks, Item::MangrovePlanks, @@ -1440,7 +1431,6 @@ pub static SAPLINGS: LazyLock> = LazyLock::new(|| { Item::JungleSapling, Item::AcaciaSapling, Item::DarkOakSapling, - Item::PaleOakSapling, Item::Azalea, Item::FloweringAzalea, Item::MangrovePropagule, @@ -1488,7 +1478,6 @@ pub static SIGNS: LazyLock> = LazyLock::new(|| { Item::AcaciaSign, Item::JungleSign, Item::DarkOakSign, - Item::PaleOakSign, Item::CrimsonSign, Item::WarpedSign, Item::MangroveSign, @@ -1496,8 +1485,6 @@ pub static SIGNS: LazyLock> = LazyLock::new(|| { Item::CherrySign, ]) }); -pub static SKELETON_PREFERRED_WEAPONS: LazyLock> = - LazyLock::new(|| HashSet::from_iter(vec![Item::Bow])); pub static SKULLS: LazyLock> = LazyLock::new(|| { HashSet::from_iter(vec![ Item::PlayerHead, @@ -1560,14 +1547,12 @@ pub static SLABS: LazyLock> = LazyLock::new(|| { Item::TuffSlab, Item::PolishedTuffSlab, Item::TuffBrickSlab, - Item::ResinBrickSlab, Item::OakSlab, Item::SpruceSlab, Item::BirchSlab, Item::JungleSlab, Item::AcaciaSlab, Item::DarkOakSlab, - Item::PaleOakSlab, Item::CrimsonSlab, Item::WarpedSlab, Item::MangroveSlab, @@ -1578,7 +1563,6 @@ pub static SLABS: LazyLock> = LazyLock::new(|| { pub static SMALL_FLOWERS: LazyLock> = LazyLock::new(|| { HashSet::from_iter(vec![ Item::Dandelion, - Item::OpenEyeblossom, Item::Poppy, Item::BlueOrchid, Item::Allium, @@ -1592,7 +1576,6 @@ pub static SMALL_FLOWERS: LazyLock> = LazyLock::new(|| { Item::LilyOfTheValley, Item::WitherRose, Item::Torchflower, - Item::ClosedEyeblossom, ]) }); pub static SMELTS_TO_GLASS: LazyLock> = @@ -1656,14 +1639,12 @@ pub static STAIRS: LazyLock> = LazyLock::new(|| { Item::TuffStairs, Item::PolishedTuffStairs, Item::TuffBrickStairs, - Item::ResinBrickStairs, Item::OakStairs, Item::SpruceStairs, Item::BirchStairs, Item::JungleStairs, Item::AcaciaStairs, Item::DarkOakStairs, - Item::PaleOakStairs, Item::CrimsonStairs, Item::WarpedStairs, Item::MangroveStairs, @@ -1709,6 +1690,15 @@ pub static SWORDS: LazyLock> = LazyLock::new(|| { Item::IronSword, ]) }); +pub static TALL_FLOWERS: LazyLock> = LazyLock::new(|| { + HashSet::from_iter(vec![ + Item::Sunflower, + Item::Lilac, + Item::Peony, + Item::RoseBush, + Item::PitcherPlant, + ]) +}); pub static TERRACOTTA: LazyLock> = LazyLock::new(|| { HashSet::from_iter(vec![ Item::Terracotta, @@ -1744,7 +1734,6 @@ pub static TRAPDOORS: LazyLock> = LazyLock::new(|| { Item::AcaciaTrapdoor, Item::BirchTrapdoor, Item::DarkOakTrapdoor, - Item::PaleOakTrapdoor, Item::JungleTrapdoor, Item::OakTrapdoor, Item::SpruceTrapdoor, @@ -1757,17 +1746,38 @@ pub static TRAPDOORS: LazyLock> = LazyLock::new(|| { }); pub static TRIM_MATERIALS: LazyLock> = LazyLock::new(|| { HashSet::from_iter(vec![ - Item::AmethystShard, + Item::IronIngot, Item::CopperIngot, - Item::Diamond, - Item::Emerald, Item::GoldIngot, - Item::IronIngot, Item::LapisLazuli, + Item::Emerald, + Item::Diamond, Item::NetheriteIngot, - Item::Quartz, Item::Redstone, - Item::ResinBrick, + Item::Quartz, + Item::AmethystShard, + ]) +}); +pub static TRIM_TEMPLATES: LazyLock> = LazyLock::new(|| { + HashSet::from_iter(vec![ + Item::WardArmorTrimSmithingTemplate, + Item::SpireArmorTrimSmithingTemplate, + Item::CoastArmorTrimSmithingTemplate, + Item::EyeArmorTrimSmithingTemplate, + Item::DuneArmorTrimSmithingTemplate, + Item::WildArmorTrimSmithingTemplate, + Item::RibArmorTrimSmithingTemplate, + Item::TideArmorTrimSmithingTemplate, + Item::SentryArmorTrimSmithingTemplate, + Item::VexArmorTrimSmithingTemplate, + Item::SnoutArmorTrimSmithingTemplate, + Item::WayfinderArmorTrimSmithingTemplate, + Item::ShaperArmorTrimSmithingTemplate, + Item::SilenceArmorTrimSmithingTemplate, + Item::RaiserArmorTrimSmithingTemplate, + Item::HostArmorTrimSmithingTemplate, + Item::FlowArmorTrimSmithingTemplate, + Item::BoltArmorTrimSmithingTemplate, ]) }); pub static TRIMMABLE_ARMOR: LazyLock> = LazyLock::new(|| { @@ -1851,7 +1861,6 @@ pub static WALLS: LazyLock> = LazyLock::new(|| { Item::TuffWall, Item::PolishedTuffWall, Item::TuffBrickWall, - Item::ResinBrickWall, ]) }); pub static WARPED_STEMS: LazyLock> = LazyLock::new(|| { @@ -1864,8 +1873,6 @@ pub static WARPED_STEMS: LazyLock> = LazyLock::new(|| { }); pub static WART_BLOCKS: LazyLock> = LazyLock::new(|| HashSet::from_iter(vec![Item::NetherWartBlock, Item::WarpedWartBlock])); -pub static WITHER_SKELETON_DISLIKED_WEAPONS: LazyLock> = - LazyLock::new(|| HashSet::from_iter(vec![Item::Bow, Item::Crossbow])); pub static WOLF_FOOD: LazyLock> = LazyLock::new(|| { HashSet::from_iter(vec![ Item::Cod, @@ -1896,7 +1903,6 @@ pub static WOODEN_BUTTONS: LazyLock> = LazyLock::new(|| { Item::JungleButton, Item::AcaciaButton, Item::DarkOakButton, - Item::PaleOakButton, Item::CrimsonButton, Item::WarpedButton, Item::MangroveButton, @@ -1912,7 +1918,6 @@ pub static WOODEN_DOORS: LazyLock> = LazyLock::new(|| { Item::JungleDoor, Item::AcaciaDoor, Item::DarkOakDoor, - Item::PaleOakDoor, Item::CrimsonDoor, Item::WarpedDoor, Item::MangroveDoor, @@ -1925,7 +1930,6 @@ pub static WOODEN_FENCES: LazyLock> = LazyLock::new(|| { Item::OakFence, Item::AcaciaFence, Item::DarkOakFence, - Item::PaleOakFence, Item::SpruceFence, Item::BirchFence, Item::JungleFence, @@ -1944,7 +1948,6 @@ pub static WOODEN_PRESSURE_PLATES: LazyLock> = LazyLock::new(|| { Item::JunglePressurePlate, Item::AcaciaPressurePlate, Item::DarkOakPressurePlate, - Item::PaleOakPressurePlate, Item::CrimsonPressurePlate, Item::WarpedPressurePlate, Item::MangrovePressurePlate, @@ -1960,7 +1963,6 @@ pub static WOODEN_SLABS: LazyLock> = LazyLock::new(|| { Item::JungleSlab, Item::AcaciaSlab, Item::DarkOakSlab, - Item::PaleOakSlab, Item::CrimsonSlab, Item::WarpedSlab, Item::MangroveSlab, @@ -1976,7 +1978,6 @@ pub static WOODEN_STAIRS: LazyLock> = LazyLock::new(|| { Item::JungleStairs, Item::AcaciaStairs, Item::DarkOakStairs, - Item::PaleOakStairs, Item::CrimsonStairs, Item::WarpedStairs, Item::MangroveStairs, @@ -1992,7 +1993,6 @@ pub static WOODEN_TOOL_MATERIALS: LazyLock> = LazyLock::new(|| { Item::JunglePlanks, Item::AcaciaPlanks, Item::DarkOakPlanks, - Item::PaleOakPlanks, Item::CrimsonPlanks, Item::WarpedPlanks, Item::MangrovePlanks, @@ -2005,7 +2005,6 @@ pub static WOODEN_TRAPDOORS: LazyLock> = LazyLock::new(|| { Item::AcaciaTrapdoor, Item::BirchTrapdoor, Item::DarkOakTrapdoor, - Item::PaleOakTrapdoor, Item::JungleTrapdoor, Item::OakTrapdoor, Item::SpruceTrapdoor, diff --git a/azalea-world/Cargo.toml b/azalea-world/Cargo.toml index 1988c10ca..37bcd5a59 100644 --- a/azalea-world/Cargo.toml +++ b/azalea-world/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea-world" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea-world" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/azalea/Cargo.toml b/azalea/Cargo.toml index 3f78c2102..c0953f540 100644 --- a/azalea/Cargo.toml +++ b/azalea/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "MIT" name = "azalea" repository = "https://github.com/azalea-rs/azalea/tree/main/azalea" -version = "0.10.3+mc1.21.4-pre3" +version = "0.10.3+mc1.21.3" [package.metadata.release] pre-release-replacements = [ diff --git a/codegen/lib/code/version.py b/codegen/lib/code/version.py index ebd332397..d4a37232d 100755 --- a/codegen/lib/code/version.py +++ b/codegen/lib/code/version.py @@ -70,7 +70,7 @@ def set_protocol_version(protocol_version: str) -> None: with open(get_dir_location('../azalea-protocol/src/packets/mod.rs'), 'r') as f: mod_rs = f.read().splitlines() for i, line in enumerate(mod_rs): - if line.strip().startswith('pub const PROTOCOL_VERSION'): + if line.strip().startswith('pub const PROTOCOL_VERSION:'): mod_rs[i] = f'pub const PROTOCOL_VERSION: i32 = {protocol_version};' break else: @@ -79,3 +79,16 @@ def set_protocol_version(protocol_version: str) -> None: with open(get_dir_location('../azalea-protocol/src/packets/mod.rs'), 'w') as f: f.write('\n'.join(mod_rs)) +def set_version_name(version_name: str) -> None: + with open(get_dir_location('../azalea-protocol/src/packets/mod.rs'), 'r') as f: + mod_rs = f.read().splitlines() + for i, line in enumerate(mod_rs): + if line.strip().startswith('pub const VERSION_NAME:'): + mod_rs[i] = f'pub const VERSION_NAME: &str = "{version_name}";' + break + else: + raise Exception( + 'Could not find version name in azalea-protocol/src/packets/mod.rs') + + with open(get_dir_location('../azalea-protocol/src/packets/mod.rs'), 'w') as f: + f.write('\n'.join(mod_rs)) diff --git a/codegen/migrate.py b/codegen/migrate.py index 0d930ee12..53d5b588c 100755 --- a/codegen/migrate.py +++ b/codegen/migrate.py @@ -34,6 +34,7 @@ lib.code.version.set_protocol_version( new_burger_data[0]['version']['protocol']) +lib.code.version.set_version_name(new_version_id) print('Updated protocol!')