LeviLamina
Loading...
Searching...
No Matches
LevelContainerModel.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/pub_sub/Subscription.h"
7#include "mc/legacy/ActorUniqueID.h"
8#include "mc/world/containers/ContainerEnumName.h"
9#include "mc/world/containers/models/ContainerCategory.h"
10#include "mc/world/containers/models/ContainerModel.h"
11#include "mc/world/level/BlockPos.h"
12#include "mc/world/level/block/actor/BlockActorType.h"
13
14// auto generated forward declare list
15// clang-format off
16class Container;
18class ItemStack;
19class Player;
20// clang-format on
21
22class LevelContainerModel : public ::ContainerModel {
23public:
24 // member variables
25 // NOLINTBEGIN
26 ::ll::TypedStorage<8, 8, ::Player&> mPlayer;
27 ::ll::TypedStorage<4, 12, ::BlockPos> mBlockPos;
28 ::ll::TypedStorage<1, 1, ::BlockActorType> mBlockEntityType;
29 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mEntityUniqueId;
30 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mContainerRemovedSubscription;
31 // NOLINTEND
32
33public:
34 // prevent constructor by default
35 LevelContainerModel& operator=(LevelContainerModel const&);
36 LevelContainerModel(LevelContainerModel const&);
37 LevelContainerModel();
38
39public:
40 // virtual functions
41 // NOLINTBEGIN
42 virtual ~LevelContainerModel() /*override*/ = default;
43
44 virtual void releaseResources() /*override*/;
45
46 virtual void containerContentChanged(int slot) /*override*/;
47
48 virtual bool isValid() /*override*/;
49
50 virtual ::ContainerWeakRef getContainerWeakRef() const /*override*/;
51
52 virtual void postInit() /*override*/;
53
54 virtual bool isSlotDisabled(int slot) const /*override*/;
55
56 virtual int _getContainerOffset() const /*override*/;
57
58 virtual void _onItemChanged(int modelSlot, ::ItemStack const& oldItem, ::ItemStack const& newItem) /*override*/;
59
60 virtual ::Container* _getContainer() const /*override*/;
61 // NOLINTEND
62
63public:
64 // member functions
65 // NOLINTBEGIN
66 MCAPI LevelContainerModel(
67 ::ContainerEnumName containerName,
68 int containerSize,
69 ::Player& player,
70 ::ActorUniqueID entityId,
71 ::ContainerCategory category
72 );
73
74 MCAPI LevelContainerModel(
75 ::ContainerEnumName containerName,
76 int containerSize,
77 ::Player& player,
78 ::BlockActorType type,
79 ::BlockPos const& blockPos,
80 ::ContainerCategory category
81 );
82
83 MCAPI void _refreshContainer();
84
85 MCAPI void containerRemoved();
86 // NOLINTEND
87
88public:
89 // static functions
90 // NOLINTBEGIN
91 MCAPI static ::Container* getContainerHelper(::Player& player, ::ActorUniqueID const& actorUniqueId);
92 // NOLINTEND
93
94public:
95 // constructor thunks
96 // NOLINTBEGIN
97 MCAPI void* $ctor(
98 ::ContainerEnumName containerName,
99 int containerSize,
100 ::Player& player,
101 ::ActorUniqueID entityId,
102 ::ContainerCategory category
103 );
104
105 MCAPI void* $ctor(
106 ::ContainerEnumName containerName,
107 int containerSize,
108 ::Player& player,
109 ::BlockActorType type,
110 ::BlockPos const& blockPos,
111 ::ContainerCategory category
112 );
113 // NOLINTEND
114
115public:
116 // virtual function thunks
117 // NOLINTBEGIN
118 MCAPI void $releaseResources();
119
120 MCAPI void $containerContentChanged(int slot);
121
122 MCAPI bool $isValid();
123
124 MCAPI ::ContainerWeakRef $getContainerWeakRef() const;
125
126 MCAPI void $postInit();
127
128 MCAPI bool $isSlotDisabled(int slot) const;
129
130 MCAPI int $_getContainerOffset() const;
131
132 MCFOLD void $_onItemChanged(int modelSlot, ::ItemStack const& oldItem, ::ItemStack const& newItem);
133
134 MCAPI ::Container* $_getContainer() const;
135
136
137 // NOLINTEND
138
139public:
140 // vftables
141 // NOLINTBEGIN
142 MCAPI static void** $vftable();
143 // NOLINTEND
144};
Definition BlockPos.h:21
Definition ContainerWeakRef.h:20
Definition Container.h:34
Definition ItemStack.h:35
Definition Player.h:137
Definition ActorUniqueID.h:10