LeviLamina
Loading...
Searching...
No Matches
SimpleContainer.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/shared_types/legacy/ContainerType.h"
7#include "mc/world/Container.h"
8
9// auto generated forward declare list
10// clang-format off
11class Actor;
12class ItemStack;
13namespace Bedrock::Safety { class RedactableString; }
14// clang-format on
15
16class SimpleContainer : public ::Container {
17public:
18 // member variables
19 // NOLINTBEGIN
20 ::ll::TypedStorage<4, 4, int> mSize;
21 ::ll::TypedStorage<8, 24, ::std::vector<::ItemStack>> mItems;
22 // NOLINTEND
23
24public:
25 // prevent constructor by default
26 SimpleContainer();
27
28public:
29 // virtual functions
30 // NOLINTBEGIN
31 virtual ::ItemStack const& getItem(int slot) const /*override*/;
32
33 virtual void setItem(int slot, ::ItemStack const& item) /*override*/;
34
35 virtual int getContainerSize() const /*override*/;
36
37 virtual int getMaxStackSize() const /*override*/;
38
39 virtual void startOpen(::Actor&) /*override*/;
40
41 virtual void stopOpen(::Actor& actor) /*override*/;
42
43 virtual void serverInitItemStackIds(
44 int containerSlot,
45 int count,
46 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
47 ) /*override*/;
48 // NOLINTEND
49
50public:
51 // member functions
52 // NOLINTBEGIN
53 MCAPI SimpleContainer(
54 ::std::string const& name,
55 bool customName,
56 int size,
57 ::SharedTypes::Legacy::ContainerType containerType
58 );
59
60#ifdef LL_PLAT_C
61 MCAPI SimpleContainer(
63 bool customName,
64 int size,
65 ::SharedTypes::Legacy::ContainerType containerType
66 );
67
68 MCAPI void clearContent();
69#endif
70 // NOLINTEND
71
72public:
73 // constructor thunks
74 // NOLINTBEGIN
75 MCAPI void*
76 $ctor(::std::string const& name, bool customName, int size, ::SharedTypes::Legacy::ContainerType containerType);
77
78#ifdef LL_PLAT_C
79 MCAPI void* $ctor(
81 bool customName,
82 int size,
83 ::SharedTypes::Legacy::ContainerType containerType
84 );
85#endif
86 // NOLINTEND
87
88public:
89 // virtual function thunks
90 // NOLINTBEGIN
91 MCAPI ::ItemStack const& $getItem(int slot) const;
92
93 MCAPI void $setItem(int slot, ::ItemStack const& item);
94
95 MCFOLD int $getContainerSize() const;
96
97 MCFOLD int $getMaxStackSize() const;
98
99 MCFOLD void $startOpen(::Actor&);
100
101 MCFOLD void $stopOpen(::Actor& actor);
102
103 MCAPI void $serverInitItemStackIds(
104 int containerSlot,
105 int count,
106 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
107 );
108
109
110 // NOLINTEND
111
112public:
113 // vftables
114 // NOLINTBEGIN
115 MCAPI static void** $vftable();
116 // NOLINTEND
117};
Definition Actor.h:123
Definition RedactableString.h:10
Definition ItemStack.h:35