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
10// auto generated forward declare list
11// clang-format off
13class ItemStack;
16struct RecipeNetIdTag;
17// clang-format on
18
19class CraftHandlerTrade : public ::CraftHandlerBase {
20public:
21 // member variables
22 // NOLINTBEGIN
23 ::ll::TypedStorage<8, 8, ::ContainerScreenContext const&> mScreenContext;
24 ::ll::TypedStorage<1, 1, bool> mIsTrade2;
25 ::ll::TypedStorage<8, 16, ::std::optional<uint64>> mTradeIndex;
26 ::ll::TypedStorage<4, 4, int> mNumCrafts;
27 // NOLINTEND
28
29public:
30 // prevent constructor by default
31 CraftHandlerTrade& operator=(CraftHandlerTrade const&);
32 CraftHandlerTrade(CraftHandlerTrade const&);
33 CraftHandlerTrade();
34
35public:
36 // virtual functions
37 // NOLINTBEGIN
38 virtual ~CraftHandlerTrade() /*override*/ = default;
39
40 virtual ::ItemStackNetResult
41 _handleCraftAction(::ItemStackRequestActionCraftBase const& requestAction) /*override*/;
42
43 virtual ::ItemStackNetResult handleConsumedItem(
44 ::FullContainerName const& openContainerNetId,
45 uchar const slot,
46 ::ItemStack const& consumedItem
47 ) /*override*/;
48
49 virtual void _postCraftRequest(bool const wasSuccess) /*override*/;
50 // NOLINTEND
51
52public:
53 // member functions
54 // NOLINTBEGIN
55 MCAPI ::ItemStackNetResult _initResultItem(::RecipeNetId const& tradeRecipeNetId, uchar const numCrafts);
56
57 MCAPI ::ItemStackNetResult _initTrade2Consumes();
58 // NOLINTEND
59
60public:
61 // virtual function thunks
62 // NOLINTBEGIN
63 MCAPI ::ItemStackNetResult $_handleCraftAction(::ItemStackRequestActionCraftBase const& requestAction);
64
65 MCAPI ::ItemStackNetResult $handleConsumedItem(
66 ::FullContainerName const& openContainerNetId,
67 uchar const slot,
68 ::ItemStack const& consumedItem
69 );
70
71 MCAPI void $_postCraftRequest(bool const wasSuccess);
72
73
74 // NOLINTEND
75};
Definition ContainerScreenContext.h:16
Definition ItemStackRequestActionCraftBase.h:16
Definition ItemStack.h:26
Definition FullContainerName.h:8
Definition RecipeNetIdTag.h:5