LeviLamina
Loading...
Searching...
No Matches
BaseContainerMenu.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/pub_sub/Publisher.h"
7#include "mc/deps/shared_types/legacy/ContainerType.h"
8#include "mc/world/ContainerContentChangeListener.h"
9#include "mc/world/ContainerID.h"
10#include "mc/world/containers/managers/IContainerManager.h"
11
12// auto generated forward declare list
13// clang-format off
14class Container;
16class ItemStack;
17class Player;
19namespace Bedrock::PubSub { class Subscription; }
20namespace Bedrock::PubSub::ThreadModel { struct SingleThreaded; }
21// clang-format on
22
24public:
25 // member variables
26 // NOLINTBEGIN
27 ::ll::TypedStorage<8, 8, ::Player&> mPlayer;
28 ::ll::TypedStorage<8, 24, ::std::vector<::ItemStack>> mLastSlots;
29 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::PlayerContainerRefresher>> mContainerRefresher;
30 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::DynamicContainerTracker>> mDynamicContainerTracker;
31 ::ll::TypedStorage<1, 1, ::ContainerID> mContainerId;
32 ::ll::TypedStorage<1, 1, ::SharedTypes::Legacy::ContainerType> mContainerType;
33 ::ll::TypedStorage<4, 4, int> mTicksSinceLastCleanup;
34 ::ll::TypedStorage<
35 8,
36 8,
37 ::std::unique_ptr<::Bedrock::PubSub::Publisher<
38 void(::SharedTypes::Legacy::ContainerType),
40 0>>>
41 mContainerTypeSubscribers;
42 // NOLINTEND
43
44public:
45 // prevent constructor by default
46 BaseContainerMenu& operator=(BaseContainerMenu const&);
49
50public:
51 // virtual functions
52 // NOLINTBEGIN
53 // vIndex: 1
54 virtual ~BaseContainerMenu() /*override*/;
55
56 // vIndex: 2
57 virtual void removeSlot(int, int) = 0;
58
59 // vIndex: 3
60 virtual bool isSlotDirty(int slot);
61
62 // vIndex: 4
63 virtual bool isResultSlot(int slot);
64
65 // vIndex: 0
66 virtual void containerContentChanged(int slot) /*override*/;
67
68 // vIndex: 6
69 virtual void serverInitItemStackIds() = 0;
70
71 // vIndex: 7
72 virtual ::std::vector<::ItemStack> getItemCopies() const = 0;
73
74 // vIndex: 8
75 virtual void setSlot(int, ::ItemStack const&, bool) = 0;
76
77 // vIndex: 9
78 virtual ::ItemStack const& getSlot(int) const = 0;
79
80 // vIndex: 10
81 virtual void setData(int id, int value) /*override*/;
82
83 // vIndex: 1
84 virtual ::ContainerID getContainerId() const /*override*/;
85
86 // vIndex: 2
87 virtual void setContainerId(::ContainerID id) /*override*/;
88
89 // vIndex: 3
90 virtual ::SharedTypes::Legacy::ContainerType getContainerType() const /*override*/;
91
92 // vIndex: 4
93 virtual void setContainerType(::SharedTypes::Legacy::ContainerType type) /*override*/;
94
95 // vIndex: 5
96 virtual ::Bedrock::PubSub::Subscription
97 registerContainerTypeListener(::std::function<void(::SharedTypes::Legacy::ContainerType)> callback) const
98 /*override*/;
99
100 // vIndex: 13
101 virtual void broadcastChanges() /*override*/;
102
103 // vIndex: 5
104 virtual ::Container* _getContainer() const = 0;
105 // NOLINTEND
106
107public:
108 // member functions
109 // NOLINTBEGIN
110 MCNAPI BaseContainerMenu(::Player& player, ::SharedTypes::Legacy::ContainerType containerType);
111
112 MCNAPI void _saveLastSlots(::Container* container);
113 // NOLINTEND
114
115public:
116 // constructor thunks
117 // NOLINTBEGIN
118 MCNAPI void* $ctor(::Player& player, ::SharedTypes::Legacy::ContainerType containerType);
119 // NOLINTEND
120
121public:
122 // destructor thunk
123 // NOLINTBEGIN
124 MCNAPI void $dtor();
125 // NOLINTEND
126
127public:
128 // virtual function thunks
129 // NOLINTBEGIN
130 MCNAPI bool $isSlotDirty(int slot);
131
132 MCNAPI bool $isResultSlot(int slot);
133
134 MCNAPI void $containerContentChanged(int slot);
135
136 MCNAPI void $setData(int id, int value);
137
138 MCNAPI ::ContainerID $getContainerId() const;
139
140 MCNAPI void $setContainerId(::ContainerID id);
141
142 MCNAPI ::SharedTypes::Legacy::ContainerType $getContainerType() const;
143
144 MCNAPI void $setContainerType(::SharedTypes::Legacy::ContainerType type);
145
146 MCNAPI ::Bedrock::PubSub::Subscription
147 $registerContainerTypeListener(::std::function<void(::SharedTypes::Legacy::ContainerType)> callback) const;
148
149 MCNAPI void $broadcastChanges();
150 // NOLINTEND
151
152public:
153 // vftables
154 // NOLINTBEGIN
156
157 MCNAPI static void** $vftableForIContainerManager();
158 // NOLINTEND
159};
Definition BaseContainerMenu.h:23
static MCAPI void ** $vftableForContainerContentChangeListener()
MCAPI void $setContainerType(::SharedTypes::Legacy::ContainerType type)
static MCAPI void ** $vftableForIContainerManager()
MCAPI void _saveLastSlots(::Container *container)
MCAPI void $setData(int id, int value)
MCAPI void * $ctor(::Player &player, ::SharedTypes::Legacy::ContainerType containerType)
MCAPI void $broadcastChanges()
MCAPI BaseContainerMenu(::Player &player, ::SharedTypes::Legacy::ContainerType containerType)
MCAPI bool $isSlotDirty(int slot)
MCAPI void $containerContentChanged(int slot)
MCAPI bool $isResultSlot(int slot)
MCAPI::Bedrock::PubSub::Subscription $registerContainerTypeListener(::std::function< void(::SharedTypes::Legacy::ContainerType)> callback) const
MCAPI::SharedTypes::Legacy::ContainerType $getContainerType() const
MCAPI void $setContainerId(::ContainerID id)
MCAPI::ContainerID $getContainerId() const
MCAPI void $dtor()
Definition Publisher.h:8
Definition ContainerContentChangeListener.h:5
Definition Container.h:30
Definition DynamicContainerTracker.h:20
Definition IContainerManager.h:16
Definition ItemStack.h:25
Definition Player.h:119
Definition PlayerContainerRefresher.h:13