LeviLamina
Loading...
Searching...
No Matches
ItemStackRequestActionCraftHandler.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
9// auto generated forward declare list
10// clang-format off
13class ItemInstance;
19class Player;
21// clang-format on
22
23class ItemStackRequestActionCraftHandler {
24public:
25 // member variables
26 // NOLINTBEGIN
27 ::ll::TypedStorage<8, 8, ::ItemStackRequestActionHandler&> mRequestActionHandler;
28 ::ll::TypedStorage<8, 8, ::Player&> mPlayer;
29 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::CraftHandlerBase>> mCraftHandler;
30 ::ll::TypedStorage<1, 1, bool> mIsCraftRequest;
31 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::SimpleSparseContainer>> mCreatedOutputSparseContainer;
32 ::ll::TypedStorage<8, 24, ::std::vector<::std::pair<::ItemInstance, uint>>> mCraftResults;
33 // NOLINTEND
34
35public:
36 // prevent constructor by default
37 ItemStackRequestActionCraftHandler& operator=(ItemStackRequestActionCraftHandler const&);
38 ItemStackRequestActionCraftHandler(ItemStackRequestActionCraftHandler const&);
39 ItemStackRequestActionCraftHandler();
40
41public:
42 // virtual functions
43 // NOLINTBEGIN
44 virtual ~ItemStackRequestActionCraftHandler() = default;
45 // NOLINTEND
46
47public:
48 // member functions
49 // NOLINTBEGIN
50 MCAPI ::ItemStackNetResult _initCraftResults(::std::vector<::ItemInstance> const& results, uchar numCrafts);
51
52 MCAPI ::ItemInstance* _initSingleCraftResult(::ItemInstance const& itemInstance);
53
54 MCAPI ::ItemStackNetResult _setCreatedItemOutputSlot(uchar resultsIndex);
55
56 MCAPI ::ItemStackNetResult endRequest(::ItemStackNetResult currentResult);
57
58 MCAPI ::ItemStackNetResult handleConsume(::ItemStackRequestActionConsume const& requestAction);
59
60 MCAPI ::ItemStackNetResult handleCraftAction(::ItemStackRequestActionCraftBase const& requestAction);
61
62 MCAPI ::ItemStackNetResult
63 handleCraftResults(::ItemStackRequestActionCraftResults_DEPRECATEDASKTYLAING const& requestAction);
64
65#ifdef LL_PLAT_S
66 MCAPI ::ItemStackNetResult handleCreate(::ItemStackRequestActionCreate const& requestAction);
67#endif
68
69 MCAPI bool isCraftRequest() const;
70
71 MCAPI void onContainerScreenOpen(::ContainerScreenContext const& screenContext);
72
73 MCAPI ::ItemStackNetResult preHandleAction(::ItemStackRequestActionType requestActionType);
74 // NOLINTEND
75
76public:
77 // vftables
78 // NOLINTBEGIN
79 MCNAPI static void** $vftable();
80 // NOLINTEND
81};
Definition ContainerScreenContext.h:16
Definition CraftHandlerBase.h:21
Definition ItemInstance.h:15
Definition ItemStackRequestActionConsume.h:13
Definition ItemStackRequestActionCraftBase.h:16
static MCAPI void ** $vftable()
Definition ItemStackRequestActionCraftResults_DEPRECATEDASKTYLAING.h:20
Definition ItemStackRequestActionCreate.h:15
Definition ItemStackRequestActionHandler.h:42
Definition Player.h:129
Definition SimpleSparseContainer.h:18