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 MCFOLD void $endRequestBatch();
80
81 MCFOLD void $_postCraftRequest(bool const wasSuccess);
82
83 MCFOLD ::Recipes const* $_getLevelRecipes() const;
84
85
86 // NOLINTEND
87
88public:
89 // vftables
90 // NOLINTBEGIN
91 MCAPI static void** $vftable();
92 // NOLINTEND
93};
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