LeviLamina
Loading...
Searching...
No Matches
ContainerScreenValidation.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/inventory/network/ContainerScreenContext.h"
7#include "mc/world/inventory/simulation/ContainerScreenRequestActionType.h"
8#include "mc/world/inventory/simulation/ContainerValidationCaller.h"
9#include "mc/world/inventory/simulation/ContainerValidationDebug.h"
10
11// auto generated forward declare list
12// clang-format off
13class Container;
16class ItemStack;
25// clang-format on
26
28public:
29 // member variables
30 // NOLINTBEGIN
31 ::ll::TypedStorage<8, 40, ::ContainerScreenContext> mScreenContext;
32 ::ll::TypedStorage<4, 4, ::ContainerValidationCaller> mCaller;
33 ::ll::TypedStorage<8, 64, ::std::unordered_map<::FullContainerName, uint64>> mContainerIndexMap;
34 ::ll::TypedStorage<
35 8,
36 64,
37 ::std::unordered_map<::FullContainerName, ::std::shared_ptr<::ContainerValidationBase const>>>
38 mContainerValidatorMap;
39 ::ll::TypedStorage<8, 64, ::std::unordered_map<::FullContainerName, ::std::shared_ptr<::Container>>>
40 mPredictiveContainers;
41 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ContainerScreenValidatorBase>> mContainerScreenValidator;
42 ::ll::TypedStorage<8, 24, ::std::vector<::ContainerValidationLayer>> mValidationStack;
43 ::ll::TypedStorage<4, 12, ::ContainerValidationDebug const> mDebug;
44 // NOLINTEND
45
46public:
47 // prevent constructor by default
49
50public:
51 // virtual functions
52 // NOLINTBEGIN
53 // vIndex: 0
55
56 // vIndex: 1
57 virtual ::ContainerValidationResult
58 tryCraft(::std::unique_ptr<::ContainerValidationCraftInputs> craftInputs, uchar const);
59
60 // vIndex: 2
61 virtual ::ContainerValidationCraftResult
62 getCraftResults(::std::unique_ptr<::ContainerValidationCraftInputs> craftInputs, uchar const);
63
64 // vIndex: 3
65 virtual ::ContainerValidationResult tryActivate();
66 // NOLINTEND
67
68public:
69 // member functions
70 // NOLINTBEGIN
72 ::ContainerScreenContext const& screenContext,
73 ::ContainerValidationCaller caller,
74 ::std::unordered_map<::FullContainerName, ::std::shared_ptr<::Container>> predictiveContainers
75 );
76
77 MCNAPI void _commit();
78
79 MCNAPI ::ContainerValidationSlotInfo
81
82 MCNAPI bool _dropItems();
83
84 MCNAPI ::std::shared_ptr<::ContainerValidationBase const>
86
87 MCNAPI bool _propagateContainers();
88
89 MCNAPI int _tryAddItem(::ContainerValidationSlotInfo& slotInfo, int addCount, bool allowPartialSuccess);
90
91 MCNAPI ::ItemStack _tryRemoveItem(::ContainerValidationSlotInfo& slotInfo, int amount);
92
93 MCNAPI int _trySetItem(
95 ::ItemStack const& stack,
96 bool isWholeStackTransfer,
97 bool allowPartialSuccess,
98 bool isInternalTransfer
99 );
100
101 MCNAPI ::ContainerValidationResult _tryTransferSpecial(
102 ::ContainerValidationSlotData const& srcSlotData,
103 int transferAmount,
104 ::ContainerScreenRequestActionType actionType
105 );
106
107 MCNAPI ::std::shared_ptr<::SimpleSparseContainer>
109
111
112 MCNAPI ::ContainerValidationResult tryConsume(::ContainerValidationSlotData const& srcSlotData, int transferAmount);
113
114 MCNAPI ::ContainerValidationResult
115 tryDrop(::ContainerValidationSlotData const& srcSlotData, int transferAmount, bool dropRandomly);
116
117 MCNAPI ::ContainerValidationResult
119
120 MCNAPI ::ContainerValidationResult tryTransfer(
121 ::ContainerValidationSlotData const& srcSlotData,
122 ::ContainerValidationSlotData const& dstSlotData,
123 int transferAmount,
124 bool isAllowingPartialTransfer
125 );
126 // NOLINTEND
127
128public:
129 // static functions
130 // NOLINTBEGIN
131 MCNAPI static ::std::unique_ptr<::ContainerScreenValidation> makeContainerScreenValidation(
132 ::ContainerScreenContext const& screenContext,
133 ::ContainerValidationCaller caller,
134 ::std::unordered_map<::FullContainerName, ::std::shared_ptr<::Container>> predictiveContainers
135 );
136 // NOLINTEND
137
138public:
139 // constructor thunks
140 // NOLINTBEGIN
141 MCNAPI void* $ctor(
142 ::ContainerScreenContext const& screenContext,
143 ::ContainerValidationCaller caller,
144 ::std::unordered_map<::FullContainerName, ::std::shared_ptr<::Container>> predictiveContainers
145 );
146 // NOLINTEND
147
148public:
149 // destructor thunk
150 // NOLINTBEGIN
151 MCNAPI void $dtor();
152 // NOLINTEND
153
154public:
155 // virtual function thunks
156 // NOLINTBEGIN
157 MCNAPI ::ContainerValidationResult
158 $tryCraft(::std::unique_ptr<::ContainerValidationCraftInputs> craftInputs, uchar const);
159
160 MCNAPI ::ContainerValidationCraftResult
161 $getCraftResults(::std::unique_ptr<::ContainerValidationCraftInputs> craftInputs, uchar const);
162
163 MCNAPI ::ContainerValidationResult $tryActivate();
164 // NOLINTEND
165
166public:
167 // vftables
168 // NOLINTBEGIN
169 MCNAPI static void** $vftable();
170 // NOLINTEND
171};
Definition ContainerScreenContext.h:17
Definition ContainerScreenValidation.h:27
MCAPI bool tryCommitActionResults()
MCAPI int _tryAddItem(::ContainerValidationSlotInfo &slotInfo, int addCount, bool allowPartialSuccess)
MCAPI ContainerScreenValidation(::ContainerScreenContext const &screenContext, ::ContainerValidationCaller caller, ::std::unordered_map<::FullContainerName, ::std::shared_ptr<::Container > > predictiveContainers)
MCAPI::ContainerValidationResult $tryCraft(::std::unique_ptr<::ContainerValidationCraftInputs > craftInputs, uchar const)
MCAPI ::std::shared_ptr<::ContainerValidationBase const > _getOrCreateContainerValidator(::FullContainerName const &containerEnumName)
MCAPI void * $ctor(::ContainerScreenContext const &screenContext, ::ContainerValidationCaller caller, ::std::unordered_map<::FullContainerName, ::std::shared_ptr<::Container > > predictiveContainers)
MCAPI::ContainerValidationCraftResult $getCraftResults(::std::unique_ptr<::ContainerValidationCraftInputs > craftInputs, uchar const)
MCAPI ::std::shared_ptr<::SimpleSparseContainer > getOrCreateSparseContainer(::FullContainerName const &containerEnumName)
MCAPI int _trySetItem(::ContainerValidationSlotInfo &slotInfo, ::ItemStack const &stack, bool isWholeStackTransfer, bool allowPartialSuccess, bool isInternalTransfer)
MCAPI::ItemStack _tryRemoveItem(::ContainerValidationSlotInfo &slotInfo, int amount)
MCAPI::ContainerValidationResult tryTransfer(::ContainerValidationSlotData const &srcSlotData, ::ContainerValidationSlotData const &dstSlotData, int transferAmount, bool isAllowingPartialTransfer)
static MCAPI void ** $vftable()
static MCAPI ::std::unique_ptr<::ContainerScreenValidation > makeContainerScreenValidation(::ContainerScreenContext const &screenContext, ::ContainerValidationCaller caller, ::std::unordered_map<::FullContainerName, ::std::shared_ptr<::Container > > predictiveContainers)
MCAPI bool _propagateContainers()
MCAPI::ContainerValidationResult _tryTransferSpecial(::ContainerValidationSlotData const &srcSlotData, int transferAmount, ::ContainerScreenRequestActionType actionType)
MCAPI::ContainerValidationResult tryDrop(::ContainerValidationSlotData const &srcSlotData, int transferAmount, bool dropRandomly)
MCAPI::ContainerValidationResult trySwap(::ContainerValidationSlotData const &srcSlotData, ::ContainerValidationSlotData const &dstSlotData)
MCAPI::ContainerValidationResult tryConsume(::ContainerValidationSlotData const &srcSlotData, int transferAmount)
MCAPI::ContainerValidationResult $tryActivate()
MCAPI::ContainerValidationSlotInfo _createContainerValidatorSlotInfo(::ContainerValidationSlotData const &slotData)
Definition ContainerScreenValidatorBase.h:18
Definition ContainerValidationBase.h:12
Definition Container.h:31
Definition ItemStack.h:23
Definition SimpleSparseContainer.h:18
Definition ContainerValidationCraftInputs.h:5
Definition ContainerValidationCraftResult.h:14
Definition ContainerValidationLayer.h:15
Definition ContainerValidationResult.h:14
Definition ContainerValidationSlotData.h:8
Definition ContainerValidationSlotInfo.h:14
Definition FullContainerName.h:8