LeviLamina
Loading...
Searching...
No Matches
CraftHandlerTrade.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/TypedServerNetId.h"
8#include "mc/world/inventory/network/crafting/CraftHandlerBase.h"
9#include "mc/world/inventory/network/crafting/ItemStackRequestActionCraft.h"
10
11// auto generated forward declare list
12// clang-format off
14class ItemStack;
18struct RecipeNetIdTag;
19// clang-format on
20
21class CraftHandlerTrade : public ::CraftHandlerBase {
22public:
23 // member variables
24 // NOLINTBEGIN
25 ::ll::TypedStorage<8, 8, ::ContainerScreenContext const&> mScreenContext;
26 ::ll::TypedStorage<1, 1, bool> mIsTrade2;
27 ::ll::TypedStorage<8, 16, ::std::optional<uint64>> mTradeIndex;
28 ::ll::TypedStorage<4, 4, int> mNumCrafts;
29 // NOLINTEND
30
31public:
32 // prevent constructor by default
33 CraftHandlerTrade& operator=(CraftHandlerTrade const&);
34 CraftHandlerTrade(CraftHandlerTrade const&);
35 CraftHandlerTrade();
36
37public:
38 // virtual functions
39 // NOLINTBEGIN
40 virtual ~CraftHandlerTrade() /*override*/;
41
42 virtual ::ItemStackNetResult
43 _handleCraftAction(::ItemStackRequestActionCraftBase const& requestAction) /*override*/;
44
45 virtual ::ItemStackNetResult handleConsumedItem(
46 ::FullContainerName const& openContainerNetId,
47 uchar const slot,
48 ::ItemStack const& consumedItem
49 ) /*override*/;
50
51 virtual void _postCraftRequest(bool const wasSuccess) /*override*/;
52 // NOLINTEND
53
54public:
55 // member functions
56 // NOLINTBEGIN
57 MCAPI ::ItemStackNetResult _handleAutoTrade2(::ItemStackRequestActionCraftRecipeAuto const& requestAction);
58
59 MCAPI ::ItemStackNetResult _handleTrade1(::ItemStackRequestActionCraft<::RecipeNetId, 12> const& requestAction);
60
61 MCAPI ::ItemStackNetResult _initResultItem(::RecipeNetId const& tradeRecipeNetId, uchar numCrafts);
62
63 MCAPI ::ItemStackNetResult _initTrade2Consumes();
64 // NOLINTEND
65
66public:
67 // destructor thunk
68 // NOLINTBEGIN
69 MCAPI void $dtor();
70 // NOLINTEND
71
72public:
73 // virtual function thunks
74 // NOLINTBEGIN
75 MCAPI ::ItemStackNetResult $_handleCraftAction(::ItemStackRequestActionCraftBase const& requestAction);
76
77 MCAPI ::ItemStackNetResult $handleConsumedItem(
78 ::FullContainerName const& openContainerNetId,
79 uchar const slot,
80 ::ItemStack const& consumedItem
81 );
82
83 MCAPI void $_postCraftRequest(bool const wasSuccess);
84
85
86 // NOLINTEND
87
88public:
89 // vftables
90 // NOLINTBEGIN
91 MCAPI static void** $vftable();
92 // NOLINTEND
93};
Definition ContainerScreenContext.h:19
Definition ItemStackRequestActionCraftBase.h:16
Definition ItemStackRequestActionCraftRecipeAuto.h:18
Definition ItemStackRequestActionCraft.h:6
Definition ItemStack.h:35
Definition FullContainerName.h:8
Definition RecipeNetIdTag.h:5