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 bool
93
94 MCNAPI ::ItemStack _tryRemoveItem(::ContainerValidationSlotInfo& slotInfo, int amount);
95
96 MCNAPI int _trySetItem(
98 ::ItemStack const& stack,
99 bool isWholeStackTransfer,
100 bool allowPartialSuccess,
101 bool isInternalTransfer
102 );
103
104 MCNAPI ::ContainerValidationResult _tryTransferSpecial(
105 ::ContainerValidationSlotData const& srcSlotData,
106 int transferAmount,
107 ::ContainerScreenRequestActionType actionType
108 );
109
110 MCNAPI ::std::shared_ptr<::SimpleSparseContainer>
112
114
115 MCNAPI ::ContainerValidationResult tryConsume(::ContainerValidationSlotData const& srcSlotData, int transferAmount);
116
117 MCNAPI ::ContainerValidationResult
118 tryDrop(::ContainerValidationSlotData const& srcSlotData, int transferAmount, bool dropRandomly);
119
120 MCNAPI ::ContainerValidationResult
122
123 MCNAPI ::ContainerValidationResult tryTransfer(
124 ::ContainerValidationSlotData const& srcSlotData,
125 ::ContainerValidationSlotData const& dstSlotData,
126 int transferAmount,
127 bool isAllowingPartialTransfer
128 );
129 // NOLINTEND
130
131public:
132 // static functions
133 // NOLINTBEGIN
134 MCNAPI static ::std::unique_ptr<::ContainerScreenValidation> makeContainerScreenValidation(
135 ::ContainerScreenContext const& screenContext,
136 ::ContainerValidationCaller caller,
137 ::std::unordered_map<::FullContainerName, ::std::shared_ptr<::Container>> predictiveContainers
138 );
139 // NOLINTEND
140
141public:
142 // constructor thunks
143 // NOLINTBEGIN
144 MCNAPI void* $ctor(
145 ::ContainerScreenContext const& screenContext,
146 ::ContainerValidationCaller caller,
147 ::std::unordered_map<::FullContainerName, ::std::shared_ptr<::Container>> predictiveContainers
148 );
149 // NOLINTEND
150
151public:
152 // destructor thunk
153 // NOLINTBEGIN
154 MCNAPI void $dtor();
155 // NOLINTEND
156
157public:
158 // virtual function thunks
159 // NOLINTBEGIN
160 MCNAPI ::ContainerValidationResult
161 $tryCraft(::std::unique_ptr<::ContainerValidationCraftInputs> craftInputs, uchar const);
162
163 MCNAPI ::ContainerValidationCraftResult
164 $getCraftResults(::std::unique_ptr<::ContainerValidationCraftInputs> craftInputs, uchar const);
165
166 MCNAPI ::ContainerValidationResult $tryActivate();
167 // NOLINTEND
168
169public:
170 // vftables
171 // NOLINTBEGIN
172 MCNAPI static void** $vftable();
173 // NOLINTEND
174};
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 bool _tryMoveItem(::ContainerValidationSlotInfo &srcValidatorPair, ::ContainerValidationSlotInfo &dstValidatorPair)
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:30
Definition ItemStack.h:25
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