Skip to content
LeviMC
English
AutoLightDark
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/models/ContainerModel.h"
9#include "mc/world/level/BlockPos.h"
10#include "mc/world/level/block/actor/BlockActorType.h"
11
12// auto generated forward declare list
13// clang-format off
14class Container;
16class ItemStack;
17class Player;
18// clang-format on
19
20class LevelContainerModel : public ::ContainerModel {
21public:
22 // member variables
23 // NOLINTBEGIN
24 ::ll::TypedStorage<8, 8, ::Player&> mPlayer;
25 ::ll::TypedStorage<4, 12, ::BlockPos> mBlockPos;
26 ::ll::TypedStorage<1, 1, ::BlockActorType> mBlockEntityType;
27 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mEntityUniqueId;
28 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mContainerRemovedSubscription;
29 // NOLINTEND
30
31public:
32 // prevent constructor by default
33 LevelContainerModel& operator=(LevelContainerModel const&);
34 LevelContainerModel(LevelContainerModel const&);
35 LevelContainerModel();
36
37public:
38 // virtual functions
39 // NOLINTBEGIN
40 virtual ~LevelContainerModel() /*override*/ = default;
41
42 virtual void releaseResources() /*override*/;
43
44 virtual void containerContentChanged(int slot) /*override*/;
45
46 virtual bool isValid() /*override*/;
47
48 virtual ::ContainerWeakRef getContainerWeakRef() const /*override*/;
49
50 virtual void postInit() /*override*/;
51
52 virtual bool isSlotDisabled(int slot) const /*override*/;
53
54 virtual int _getContainerOffset() const /*override*/;
55
56 virtual void _onItemChanged(int modelSlot, ::ItemStack const& oldItem, ::ItemStack const& newItem) /*override*/;
57
58 virtual ::Container* _getContainer() const /*override*/;
59 // NOLINTEND
60
61public:
62 // member functions
63 // NOLINTBEGIN
64 MCNAPI void containerRemoved();
65 // NOLINTEND
66
67public:
68 // static functions
69 // NOLINTBEGIN
70 MCNAPI static ::Container* getContainerHelper(::Player& player, ::ActorUniqueID const& actorUniqueId);
71
72 MCNAPI static ::Container*
73 getContainerHelper(::Player& player, ::BlockActorType blockActorType, ::BlockPos const& blockPos);
74 // NOLINTEND
75
76public:
77 // virtual function thunks
78 // NOLINTBEGIN
79 MCNAPI void $releaseResources();
80
81 MCNAPI void $containerContentChanged(int slot);
82
83 MCNAPI bool $isValid();
84
85 MCNAPI ::ContainerWeakRef $getContainerWeakRef() const;
86
87 MCNAPI void $postInit();
88
89 MCNAPI bool $isSlotDisabled(int slot) const;
90
91 MCNAPI int $_getContainerOffset() const;
92
93 MCAPI void $_onItemChanged(int modelSlot, ::ItemStack const& oldItem, ::ItemStack const& newItem);
94
95 MCNAPI ::Container* $_getContainer() const;
96
97
98 // NOLINTEND
99
100public:
101 // vftables
102 // NOLINTBEGIN
103 MCAPI static void** $vftable();
104 // NOLINTEND
105};
Definition BlockPos.h:14
Definition ContainerWeakRef.h:17
Definition Container.h:36
Definition ItemStack.h:26
MCAPI::Container * $_getContainer() const
static MCAPI ::Container * getContainerHelper(::Player &player, ::BlockActorType blockActorType, ::BlockPos const &blockPos)
MCAPI void $releaseResources()
MCAPI bool $isValid()
static MCAPI ::Container * getContainerHelper(::Player &player, ::ActorUniqueID const &actorUniqueId)
MCAPI void $containerContentChanged(int slot)
MCAPI void containerRemoved()
MCAPI int $_getContainerOffset() const
MCAPI bool $isSlotDisabled(int slot) const
MCAPI void $postInit()
MCAPI::ContainerWeakRef $getContainerWeakRef() const
Definition Player.h:131
Definition ActorUniqueID.h:5