LeviLamina
Loading...
Searching...
No Matches
ItemStackNetManagerBase.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/game_refs/OwnerPtr.h"
7#include "mc/deps/game_refs/WeakRef.h"
8#include "mc/deps/shared_types/legacy/ContainerType.h"
9#include "mc/world/inventory/network/TypedClientNetId.h"
10
11// auto generated forward declare list
12// clang-format off
13class BlockSource;
16class EntityRegistry;
17class ItemStack;
21class Player;
22class SparseContainer;
26// clang-format on
27
29public:
30 // ItemStackNetManagerBase inner types define
31 using LegacyRequestScope = ::gsl::final_action<::std::function<void()>>;
32
33 using BaseContainerSetter = ::std::function<void(::ItemStack const&)>;
34
35public:
36 // member variables
37 // NOLINTBEGIN
38 ::ll::TypedStorage<1, 1, bool const> mIsEnabled;
39 ::ll::TypedStorage<1, 1, bool const> mIsClientSide;
40 ::ll::TypedStorage<8, 8, ::Player&> mPlayer;
41 ::ll::TypedStorage<8, 16, ::WeakRef<::EntityRegistry>> mLevelWeakRegistry;
42 ::ll::TypedStorage<8, 16, ::OwnerPtr<::EntityRegistry>> mEntityRegistry;
43 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ItemStackNetManagerScreenStack>> mScreenStack;
44 ::ll::TypedStorage<1, 1, bool> mCurrentRequestHasCraftAction;
45 ::ll::TypedStorage<4, 16, ::ItemStackLegacyRequestId> mLegacyTransactionRequestId;
46 // NOLINTEND
47
48public:
49 // prevent constructor by default
53
54public:
55 // virtual functions
56 // NOLINTBEGIN
57 // vIndex: 0
59
60 // vIndex: 1
61 virtual bool isEnabled() const;
62
63 // vIndex: 2
64 virtual ::ItemStackRequestId getRequestId() const = 0;
65
66 // vIndex: 3
67 virtual bool retainSetItemStackNetIdVariant() const;
68
69 // vIndex: 4
70 virtual bool allowInventoryTransactionManager() const = 0;
71
72 // vIndex: 5
73 virtual ::gsl::final_action<::std::function<void()>> _tryBeginClientLegacyTransactionRequest();
74
75 // vIndex: 6
76 virtual void onContainerScreenOpen(::ContainerScreenContext const& screenContext);
77
78 // vIndex: 7
79 virtual void onContainerScreenClose();
80
81 // vIndex: 8
82 virtual ::SparseContainer* initOpenContainer(::BlockSource&, ::FullContainerName const&, ::ContainerWeakRef const&);
83
84 // vIndex: 9
85 virtual void _addLegacyTransactionRequestSetItemSlot(
87 ::SharedTypes::Legacy::ContainerType containerType,
88 int slot
89 );
90
91 // vIndex: 10
92 virtual void _initScreen(::ItemStackNetManagerScreen&);
93 // NOLINTEND
94
95public:
96 // member functions
97 // NOLINTBEGIN
98 MCAPI ItemStackNetManagerBase(::Player& player, bool isClientSide, bool isEnabled);
99
100 MCAPI bool _isRequestActionAllowed(::ItemStackRequestAction const& requestAction);
101
102 MCAPI void _pushScreen(::ContainerScreenContext screenContext);
103
104 MCAPI ::ContainerScreenContext const& getScreenContext() const;
105 // NOLINTEND
106
107public:
108 // static functions
109 // NOLINTBEGIN
110 MCAPI static ::gsl::final_action<::std::function<void()>> _tryBeginClientLegacyTransactionRequest(::Player* player);
111
112 MCAPI static bool setPlayerContainer(
113 ::Player& player,
114 ::SharedTypes::Legacy::ContainerType containerType,
115 int slot,
116 ::ItemStack const& item,
117 ::ItemStack& slotItem,
118 ::std::function<void(::ItemStack const&)> const& callback
119 );
120 // NOLINTEND
121
122public:
123 // constructor thunks
124 // NOLINTBEGIN
125 MCAPI void* $ctor(::Player& player, bool isClientSide, bool isEnabled);
126 // NOLINTEND
127
128public:
129 // destructor thunk
130 // NOLINTBEGIN
131 MCAPI void $dtor();
132 // NOLINTEND
133
134public:
135 // virtual function thunks
136 // NOLINTBEGIN
137 MCFOLD bool $isEnabled() const;
138
139 MCFOLD bool $retainSetItemStackNetIdVariant() const;
140
141 MCAPI ::gsl::final_action<::std::function<void()>> $_tryBeginClientLegacyTransactionRequest();
142
143 MCFOLD void $onContainerScreenOpen(::ContainerScreenContext const& screenContext);
144
145 MCAPI void $onContainerScreenClose();
146
147 MCFOLD ::SparseContainer* $initOpenContainer(::BlockSource&, ::FullContainerName const&, ::ContainerWeakRef const&);
148
149 MCFOLD void $_addLegacyTransactionRequestSetItemSlot(
151 ::SharedTypes::Legacy::ContainerType containerType,
152 int slot
153 );
154
155 MCFOLD void $_initScreen(::ItemStackNetManagerScreen&);
156 // NOLINTEND
157
158public:
159 // vftables
160 // NOLINTBEGIN
161 MCNAPI static void** $vftable();
162 // NOLINTEND
163};
Definition BlockSource.h:67
Definition ContainerScreenContext.h:17
Definition ContainerWeakRef.h:17
Definition EntityRegistry.h:11
Definition ItemStackNetManagerBase.h:28
static MCAPI void ** $vftable()
Definition ItemStackNetManagerScreenStack.h:10
Definition ItemStackNetManagerScreen.h:9
Definition ItemStackRequestAction.h:18
Definition ItemStack.h:25
Definition Player.h:119
Definition SparseContainer.h:20
Definition FullContainerName.h:8
Definition ItemStackLegacyRequestIdTag.h:5
Definition ItemStackRequestIdTag.h:5