LeviLamina
Loading...
Searching...
No Matches
CraftHandlerCrafting.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/inventory/network/ItemStackNetResult.h"
7#include "mc/world/inventory/network/ItemStackRequestActionType.h"
8#include "mc/world/inventory/network/TypedServerNetId.h"
9#include "mc/world/inventory/network/crafting/CraftHandlerBase.h"
10#include "mc/world/inventory/network/crafting/ItemStackRequestActionCraft.h"
11
12// auto generated forward declare list
13// clang-format off
15class ItemInstance;
16class ItemStack;
19class Player;
20class Recipe;
21class Recipes;
24struct RecipeNetIdTag;
25// clang-format on
26
27class CraftHandlerCrafting : public ::CraftHandlerBase {
28public:
29 // member variables
30 // NOLINTBEGIN
31 ::ll::TypedStorage<1, 1, bool> mWorkbench;
32 ::ll::TypedStorage<8, 8, ::Player&> mPlayer;
33 ::ll::TypedStorage<4, 4, ::RecipeNetId> mRecipeNetId;
34 ::ll::TypedStorage<1, 1, uchar> mDeferredCraftCount;
35 ::ll::TypedStorage<8, 24, ::std::vector<::ItemStack>> mConsumedItems;
36 // NOLINTEND
37
38public:
39 // prevent constructor by default
40 CraftHandlerCrafting& operator=(CraftHandlerCrafting const&);
41 CraftHandlerCrafting(CraftHandlerCrafting const&);
42 CraftHandlerCrafting();
43
44public:
45 // virtual functions
46 // NOLINTBEGIN
47 virtual ~CraftHandlerCrafting() /*override*/;
48
49 virtual ::ItemStackNetResult handleConsumedItem(
50 ::FullContainerName const& openContainerNetId,
51 uchar const slot,
52 ::ItemStack const& consumedItem
53 ) /*override*/;
54
55 virtual ::ItemStackNetResult preHandleAction(::ItemStackRequestActionType requestActionType) /*override*/;
56
57 virtual ::ItemStackNetResult
58 _handleCraftAction(::ItemStackRequestActionCraftBase const& requestAction) /*override*/;
59
60 virtual ::Recipes const* _getLevelRecipes() const /*override*/;
61 // NOLINTEND
62
63public:
64 // member functions
65 // NOLINTBEGIN
66 MCAPI ::ItemStackNetResult _handleAutoCraft(::ItemStackRequestActionCraftRecipeAuto const& requestAction);
67
68 MCAPI void _handleCarefulRestoration(::ItemInstance const& itemInstance) const;
69
70 MCAPI ::ItemStackNetResult
71 _handleCraftCreative(::ItemStackRequestActionCraft<::CreativeItemNetId, 14> const& requestAction);
72
73 MCAPI ::ItemStackNetResult
74 _handleCraftOutput(::ItemStackRequestActionCraft<::RecipeNetId, 12> const& requestAction);
75
76 MCAPI bool _recipeMatches(::Recipe const* recipe, ::CraftingContainer& currentCraftingItems);
77 // NOLINTEND
78
79public:
80 // destructor thunk
81 // NOLINTBEGIN
82 MCAPI void $dtor();
83 // NOLINTEND
84
85public:
86 // virtual function thunks
87 // NOLINTBEGIN
88 MCAPI ::ItemStackNetResult $handleConsumedItem(
89 ::FullContainerName const& openContainerNetId,
90 uchar const slot,
91 ::ItemStack const& consumedItem
92 );
93
94 MCAPI ::ItemStackNetResult $preHandleAction(::ItemStackRequestActionType requestActionType);
95
96 MCAPI ::ItemStackNetResult $_handleCraftAction(::ItemStackRequestActionCraftBase const& requestAction);
97
98 MCAPI ::Recipes const* $_getLevelRecipes() const;
99
100
101 // NOLINTEND
102
103public:
104 // vftables
105 // NOLINTBEGIN
106 MCAPI static void** $vftable();
107 // NOLINTEND
108};
Definition CraftingContainer.h:14
Definition ItemInstance.h:15
Definition ItemStackRequestActionCraftBase.h:16
Definition ItemStackRequestActionCraftRecipeAuto.h:18
Definition ItemStackRequestActionCraft.h:6
Definition ItemStack.h:35
Definition Player.h:137
Definition Recipe.h:32
Definition Recipes.h:36
Definition CreativeItemNetIdTag.h:5
Definition FullContainerName.h:8
Definition RecipeNetIdTag.h:5