LeviLamina
Loading...
Searching...
No Matches
CraftHandlerBase.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
9// auto generated forward declare list
10// clang-format off
11class ItemStack;
14class Recipes;
19// clang-format on
20
21class CraftHandlerBase {
22public:
23 // member variables
24 // NOLINTBEGIN
25 ::ll::TypedStorage<8, 8, ::ItemStackRequestActionCraftHandler&> mCraftRequestHandler;
26 ::ll::TypedStorage<1, 1, ::ItemStackRequestActionType> mCraftActionType;
27 ::ll::TypedStorage<1, 1, bool> mNonImplementedTrustClientResults;
28 ::ll::TypedStorage<8, 24, ::std::vector<::ExpectedSlotConsume>> mExpectedSlotConsumes;
29 ::ll::TypedStorage<8, 24, ::std::vector<::ExpectedAnywhereConsume>> mExpectedAnywhereConsumes;
30 ::ll::TypedStorage<8, 24, ::std::vector<::AllowedAnywhereConsume>> mAllowedAnywhereConsumes;
31 ::ll::TypedStorage<1, 1, bool> mIsCraftRequest;
32 // NOLINTEND
33
34public:
35 // prevent constructor by default
36 CraftHandlerBase& operator=(CraftHandlerBase const&);
37 CraftHandlerBase(CraftHandlerBase const&);
38 CraftHandlerBase();
39
40public:
41 // virtual functions
42 // NOLINTBEGIN
43 virtual ~CraftHandlerBase();
44
45 virtual ::ItemStackNetResult handleConsumedItem(
46 ::FullContainerName const& openContainerNetId,
47 uchar const slot,
48 ::ItemStack const& consumedItem
49 );
50
51 virtual ::ItemStackNetResult preHandleAction(::ItemStackRequestActionType requestActionType);
52
53 virtual void endRequestBatch();
54
55 virtual ::ItemStackNetResult _handleCraftAction(::ItemStackRequestActionCraftBase const& requestAction) = 0;
56
57 virtual void _postCraftRequest(bool const wasSuccess);
58
59 virtual ::Recipes const* _getLevelRecipes() const;
60 // NOLINTEND
61
62public:
63 // member functions
64 // NOLINTBEGIN
65 MCAPI ::ItemStackNetResult
66 handleCraftAction(::ItemStackRequestActionCraftBase const& requestAction, ::ItemStackNetResult currentResult);
67
68 MCAPI void postRequest(bool wasSuccess);
69 // NOLINTEND
70
71public:
72 // destructor thunk
73 // NOLINTBEGIN
74 MCFOLD void $dtor();
75 // NOLINTEND
76
77public:
78 // virtual function thunks
79 // NOLINTBEGIN
80 MCAPI ::ItemStackNetResult $handleConsumedItem(
81 ::FullContainerName const& openContainerNetId,
82 uchar const slot,
83 ::ItemStack const& consumedItem
84 );
85
86 MCFOLD ::ItemStackNetResult $preHandleAction(::ItemStackRequestActionType requestActionType);
87
88 MCFOLD void $endRequestBatch();
89
90 MCFOLD void $_postCraftRequest(bool const wasSuccess);
91
92 MCFOLD ::Recipes const* $_getLevelRecipes() const;
93
94
95 // NOLINTEND
96
97public:
98 // vftables
99 // NOLINTBEGIN
100 MCAPI static void** $vftable();
101 // NOLINTEND
102};
Definition ItemStackRequestActionCraftBase.h:16
Definition ItemStackRequestActionCraftHandler.h:24
Definition ItemStack.h:35
Definition Recipes.h:36
Definition AllowedAnywhereConsume.h:10
Definition ExpectedAnywhereConsume.h:10
Definition ExpectedSlotConsume.h:11
Definition FullContainerName.h:8