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/simulation/ContainerScreenRequestActionType.h"
7#include "mc/world/inventory/simulation/ContainerValidationCaller.h"
8
9// auto generated forward declare list
10// clang-format off
11class Container;
14class ItemStack;
22// clang-format on
23
25public:
26 // member variables
27 // NOLINTBEGIN
36 // NOLINTEND
37
38public:
39 // prevent constructor by default
43
44public:
45 // virtual functions
46 // NOLINTBEGIN
47 // vIndex: 0
49
50 // vIndex: 1
51 virtual ::ContainerValidationResult
52 tryCraft(::std::unique_ptr<::ContainerValidationCraftInputs> craftInputs, uchar const);
53
54 // vIndex: 2
55 virtual ::ContainerValidationCraftResult
56 getCraftResults(::std::unique_ptr<::ContainerValidationCraftInputs> craftInputs, uchar const);
57
58 // vIndex: 3
59 virtual ::ContainerValidationResult tryActivate();
60 // NOLINTEND
61
62public:
63 // member functions
64 // NOLINTBEGIN
66 ::ContainerScreenContext const& screenContext,
67 ::ContainerValidationCaller caller,
68 ::std::unordered_map<::FullContainerName, ::std::shared_ptr<::Container>> predictiveContainers
69 );
70
71 MCAPI void _commit();
72
73 MCAPI ::ContainerValidationSlotInfo _createContainerValidatorSlotInfo(::ContainerValidationSlotData const& slotData
74 );
75
76 MCAPI bool _dropItems();
77
78 MCAPI ::std::shared_ptr<::ContainerValidationBase const>
79 _getOrCreateContainerValidator(::FullContainerName const& containerEnumName);
80
81 MCAPI bool _propagateContainers();
82
83 MCAPI int _tryAddItem(::ContainerValidationSlotInfo& slotInfo, int addCount, bool allowPartialSuccess);
84
85 MCAPI bool
86 _tryMoveItem(::ContainerValidationSlotInfo& srcValidatorPair, ::ContainerValidationSlotInfo& dstValidatorPair);
87
88 MCAPI ::ItemStack _tryRemoveItem(::ContainerValidationSlotInfo& slotInfo, int amount);
89
90 MCAPI int _trySetItem(
92 ::ItemStack const& stack,
93 bool isWholeStackTransfer,
94 bool allowPartialSuccess,
95 bool isInternalTransfer
96 );
97
98 MCAPI ::ContainerValidationResult _tryTransferSpecial(
99 ::ContainerValidationSlotData const& srcSlotData,
100 int transferAmount,
101 ::ContainerScreenRequestActionType actionType
102 );
103
104 MCAPI ::std::shared_ptr<::SimpleSparseContainer>
105 getOrCreateSparseContainer(::FullContainerName const& containerEnumName);
106
107 MCAPI bool tryCommitActionResults();
108
109 MCAPI ::ContainerValidationResult tryConsume(::ContainerValidationSlotData const& srcSlotData, int transferAmount);
110
111 MCAPI ::ContainerValidationResult
112 tryDrop(::ContainerValidationSlotData const& srcSlotData, int transferAmount, bool dropRandomly);
113
114 MCAPI ::ContainerValidationResult
115 trySwap(::ContainerValidationSlotData const& srcSlotData, ::ContainerValidationSlotData const& dstSlotData);
116
117 MCAPI ::ContainerValidationResult tryTransfer(
118 ::ContainerValidationSlotData const& srcSlotData,
119 ::ContainerValidationSlotData const& dstSlotData,
120 int transferAmount,
121 bool isAllowingPartialTransfer
122 );
123 // NOLINTEND
124
125public:
126 // static functions
127 // NOLINTBEGIN
128 MCAPI static ::std::unique_ptr<::ContainerScreenValidation> makeContainerScreenValidation(
129 ::ContainerScreenContext const& screenContext,
130 ::ContainerValidationCaller caller,
131 ::std::unordered_map<::FullContainerName, ::std::shared_ptr<::Container>> predictiveContainers
132 );
133 // NOLINTEND
134
135public:
136 // constructor thunks
137 // NOLINTBEGIN
138 MCAPI void* $ctor(
139 ::ContainerScreenContext const& screenContext,
140 ::ContainerValidationCaller caller,
141 ::std::unordered_map<::FullContainerName, ::std::shared_ptr<::Container>> predictiveContainers
142 );
143 // NOLINTEND
144
145public:
146 // destructor thunk
147 // NOLINTBEGIN
148 MCAPI void $dtor();
149 // NOLINTEND
150
151public:
152 // virtual function thunks
153 // NOLINTBEGIN
154 MCAPI ::ContainerValidationResult
155 $tryCraft(::std::unique_ptr<::ContainerValidationCraftInputs> craftInputs, uchar const);
156
157 MCAPI ::ContainerValidationCraftResult
158 $getCraftResults(::std::unique_ptr<::ContainerValidationCraftInputs> craftInputs, uchar const);
159
160 MCFOLD ::ContainerValidationResult $tryActivate();
161 // NOLINTEND
162
163public:
164 // vftables
165 // NOLINTBEGIN
166 MCAPI static void** $vftable();
167 // NOLINTEND
168};
Definition ContainerScreenContext.h:11
Definition ContainerScreenValidation.h:24
Definition ContainerValidationBase.h:12
Definition Container.h:30
Definition ItemStack.h:25
Definition SimpleSparseContainer.h:18
Definition ContainerValidationCraftInputs.h:5
Definition ContainerValidationCraftResult.h:5
Definition ContainerValidationResult.h:5
Definition ContainerValidationSlotData.h:5
Definition ContainerValidationSlotInfo.h:5
Definition FullContainerName.h:8
Definition Alias.h:14