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(::FullContainerName const&, uchar const, ::ItemStack const&);
49
50 virtual ::ItemStackNetResult preHandleAction(::ItemStackRequestActionType);
51
52 virtual void endRequestBatch();
53
54 virtual ::ItemStackNetResult _handleCraftAction(::ItemStackRequestActionCraftBase const&) = 0;
55
56 virtual void _postCraftRequest(bool const wasSuccess);
57
58 virtual ::Recipes const* _getLevelRecipes() const;
59 // NOLINTEND
60
61public:
62 // member functions
63 // NOLINTBEGIN
64 MCAPI ::std::tuple<::ItemStackNetResult, ::Recipe const*> _getRecipeFromNetId(::RecipeNetId const& recipeNetId);
65
66 MCAPI ::ItemStackNetResult
67 handleCraftAction(::ItemStackRequestActionCraftBase const& requestAction, ::ItemStackNetResult currentResult);
68
69 MCAPI void postRequest(bool wasSuccess);
70 // NOLINTEND
71
72public:
73 // virtual function thunks
74 // NOLINTBEGIN
75 MCFOLD void $endRequestBatch();
76
77 MCFOLD void $_postCraftRequest(bool const wasSuccess);
78
79 MCFOLD ::Recipes const* $_getLevelRecipes() const;
80
81
82 // NOLINTEND
83
84public:
85 // vftables
86 // NOLINTBEGIN
87 MCNAPI static void** $vftable();
88 // NOLINTEND
89};
static MCAPI void ** $vftable()
Definition ItemStackRequestActionCraftBase.h:16
Definition ItemStackRequestActionCraftHandler.h:22
Definition ItemStack.h:26
Definition Recipe.h:31
Definition Recipes.h:35
Definition AllowedAnywhereConsume.h:5
Definition ExpectedAnywhereConsume.h:5
Definition ExpectedSlotConsume.h:5
Definition FullContainerName.h:8
Definition RecipeNetIdTag.h:5