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;
16class MerchantRecipe;
18struct RecipeNetIdTag;
19// clang-format on
20
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&);
36
37public:
38 // virtual functions
39 // NOLINTBEGIN
40 // vIndex: 0
41 virtual ~CraftHandlerTrade() /*override*/ = default;
42
43 // vIndex: 4
44 virtual ::ItemStackNetResult
45 _handleCraftAction(::ItemStackRequestActionCraftBase const& requestAction) /*override*/;
46
47 // vIndex: 1
48 virtual ::ItemStackNetResult handleConsumedItem(
49 ::FullContainerName const& openContainerNetId,
50 uchar const slot,
51 ::ItemStack const& consumedItem
52 ) /*override*/;
53
54 // vIndex: 5
55 virtual void _postCraftRequest(bool const wasSuccess) /*override*/;
56 // NOLINTEND
57
58public:
59 // member functions
60 // NOLINTBEGIN
61 MCAPI ::std::tuple<::ItemStackNetResult, ::MerchantRecipe const*>
62 _getMerchantRecipeFromNetId(::RecipeNetId const& tradeRecipeNetId);
63
64 MCAPI ::ItemStackNetResult _handleTrade1(::ItemStackRequestActionCraft<::RecipeNetId, 12> const& requestAction);
65
66 MCAPI ::ItemStackNetResult _initResultItem(::RecipeNetId const& tradeRecipeNetId, uchar numCrafts);
67
68 MCAPI ::ItemStackNetResult _initTrade2Consumes();
69 // NOLINTEND
70
71public:
72 // virtual function thunks
73 // NOLINTBEGIN
74 MCAPI ::ItemStackNetResult $_handleCraftAction(::ItemStackRequestActionCraftBase const& requestAction);
75
76 MCAPI ::ItemStackNetResult $handleConsumedItem(
77 ::FullContainerName const& openContainerNetId,
78 uchar const slot,
79 ::ItemStack const& consumedItem
80 );
81
82 MCAPI void $_postCraftRequest(bool const wasSuccess);
83 // NOLINTEND
84
85public:
86 // vftables
87 // NOLINTBEGIN
88 MCAPI static void** $vftable();
89 // NOLINTEND
90};
Definition ContainerScreenContext.h:17
Definition CraftHandlerBase.h:20
Definition CraftHandlerTrade.h:21
Definition ItemStackRequestActionCraftBase.h:16
Definition ItemStackRequestActionCraft.h:6
Definition ItemStack.h:25
Definition MerchantRecipe.h:20
Definition TypedServerNetId.h:6
Definition FullContainerName.h:8
Definition RecipeNetIdTag.h:5