diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2023-12-05 10:59:05 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-05 10:59:05 -0600 |
| commit | 7857a014b92e64361ee237ceae7ef1acc185ac46 (patch) | |
| tree | 5d70ea6b41943493873810e6a03c3483ff90a235 /azalea-inventory/src | |
| parent | ea3e8600126a58f5666d50fbf70dff8209d8979f (diff) | |
| download | azalea-drasl-7857a014b92e64361ee237ceae7ef1acc185ac46.tar.xz | |
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
Diffstat (limited to 'azalea-inventory/src')
| -rw-r--r-- | azalea-inventory/src/lib.rs | 3 | ||||
| -rw-r--r-- | azalea-inventory/src/operations.rs | 25 |
2 files changed, 21 insertions, 7 deletions
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( |
