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