aboutsummaryrefslogtreecommitdiff
path: root/azalea-inventory/src
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-inventory/src')
-rw-r--r--azalea-inventory/src/lib.rs3
-rw-r--r--azalea-inventory/src/operations.rs25
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(