From 7857a014b92e64361ee237ceae7ef1acc185ac46 Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Tue, 5 Dec 2023 10:59:05 -0600 Subject: 1.20.3 (#110) * 23w40a * 23w41a * 23w42a * 23w43a * 23w44a * serialize FormattedText as nbt in network * use azalea-nbt/serde in azalea-chat * 23w45a * fix 23w45a to compile * handle Object in codegen * 1.20.3-pre2 * remove unused clientbound_resource_pack_packet.rs * merge main and make azalea-chat use simdnbt * 1.20.3-rc1 * fix tests * use simdnbt 0.3 * fix ServerboundSetJigsawBlockPacket * 1.20.3 --- azalea-inventory/src/lib.rs | 3 +++ azalea-inventory/src/operations.rs | 25 ++++++++++++++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) (limited to 'azalea-inventory/src') diff --git a/azalea-inventory/src/lib.rs b/azalea-inventory/src/lib.rs index dbbf1f5c..b2ea215a 100644 --- a/azalea-inventory/src/lib.rs +++ b/azalea-inventory/src/lib.rs @@ -89,6 +89,9 @@ declare_menus! { Generic3x3 { contents: 9, }, + Crafter3x3 { + contents: 9, + }, Anvil { first: 1, second: 1, diff --git a/azalea-inventory/src/operations.rs b/azalea-inventory/src/operations.rs index 29d61bd8..ca21a3e7 100644 --- a/azalea-inventory/src/operations.rs +++ b/azalea-inventory/src/operations.rs @@ -4,13 +4,13 @@ use azalea_buf::McBuf; use crate::{ item::MaxStackSizeExt, AnvilMenuLocation, BeaconMenuLocation, BlastFurnaceMenuLocation, - BrewingStandMenuLocation, CartographyTableMenuLocation, CraftingMenuLocation, - EnchantmentMenuLocation, FurnaceMenuLocation, Generic3x3MenuLocation, Generic9x1MenuLocation, - Generic9x2MenuLocation, Generic9x3MenuLocation, Generic9x4MenuLocation, Generic9x5MenuLocation, - Generic9x6MenuLocation, GrindstoneMenuLocation, HopperMenuLocation, ItemSlot, ItemSlotData, - LecternMenuLocation, LoomMenuLocation, Menu, MenuLocation, MerchantMenuLocation, Player, - PlayerMenuLocation, ShulkerBoxMenuLocation, SmithingMenuLocation, SmokerMenuLocation, - StonecutterMenuLocation, + BrewingStandMenuLocation, CartographyTableMenuLocation, Crafter3x3MenuLocation, + CraftingMenuLocation, EnchantmentMenuLocation, FurnaceMenuLocation, Generic3x3MenuLocation, + Generic9x1MenuLocation, Generic9x2MenuLocation, Generic9x3MenuLocation, Generic9x4MenuLocation, + Generic9x5MenuLocation, Generic9x6MenuLocation, GrindstoneMenuLocation, HopperMenuLocation, + ItemSlot, ItemSlotData, LecternMenuLocation, LoomMenuLocation, Menu, MenuLocation, + MerchantMenuLocation, Player, PlayerMenuLocation, ShulkerBoxMenuLocation, SmithingMenuLocation, + SmokerMenuLocation, StonecutterMenuLocation, }; #[derive(Debug, Clone)] @@ -386,6 +386,17 @@ impl Menu { ); } }, + MenuLocation::Crafter3x3(l) => match l { + Crafter3x3MenuLocation::Contents => { + self.try_move_item_to_slots(slot_index, self.player_slots_range()); + } + Crafter3x3MenuLocation::Player => { + self.try_move_item_to_slots_or_toggle_hotbar( + slot_index, + Menu::GENERIC3X3_CONTENTS_SLOTS, + ); + } + }, MenuLocation::Anvil(l) => match l { AnvilMenuLocation::Player => { self.try_move_item_to_slots_or_toggle_hotbar( -- cgit v1.2.3