LeviLamina
Loading...
Searching...
No Matches
ShelfBlockActor.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/ecs/WeakEntityRef.h"
7#include "mc/world/Container.h"
8#include "mc/world/item/ClockSpriteCalculator.h"
9#include "mc/world/item/CompassSpriteCalculator.h"
10#include "mc/world/level/block/actor/BlockActor.h"
11
12// auto generated forward declare list
13// clang-format off
14class Actor;
15class BlockActorDataPacket;
16class BlockPos;
17class BlockSource;
18class CompoundTag;
19class DataLoadHelper;
20class ILevel;
21class ItemStack;
22class SaveContext;
23// clang-format on
24
26public:
27 // member variables
28 // NOLINTBEGIN
29 ::ll::TypedStorage<4, 12, ::ClockSpriteCalculator> mClockSpriteCalc;
30 ::ll::TypedStorage<8, 32, ::CompassSpriteCalculator> mCompassSpriteCalc;
31 ::ll::TypedStorage<8, 32, ::CompassSpriteCalculator> mRecoveryCompassSpriteCalc;
32 ::ll::TypedStorage<1, 1, bool> mUpdateCalculators;
33 ::ll::TypedStorage<8, 24, ::std::vector<::ItemStack>> mItems;
34 ::ll::TypedStorage<1, 1, bool> mIgnoreLighting;
35 ::ll::TypedStorage<8, 24, ::WeakEntityRef> mDisplayEntity;
36 ::ll::TypedStorage<1, 1, bool> mEmitSingleItemSwapVibration;
37 // NOLINTEND
38
39public:
40 // prevent constructor by default
42
43public:
44 // virtual functions
45 // NOLINTBEGIN
46 // vIndex: 25
47 virtual ::std::string getName() const /*override*/;
48
49 // vIndex: 9
50 virtual void tick(::BlockSource& region) /*override*/;
51
52 // vIndex: 10
53 virtual void onChanged(::BlockSource& region) /*override*/;
54
55 // vIndex: 13
56 virtual void onRemoved(::BlockSource& region) /*override*/;
57
58 // vIndex: 31
59 virtual ::Container* getContainer() /*override*/;
60
61 // vIndex: 30
62 virtual ::Container const* getContainer() const /*override*/;
63
64 // vIndex: 7
65 virtual ::ItemStack const& getItem(int slot) const /*override*/;
66
67 // vIndex: 12
68 virtual void setItem(int slot, ::ItemStack const& item) /*override*/;
69
70 // vIndex: 21
71 virtual int getMaxStackSize() const /*override*/;
72
73 // vIndex: 20
74 virtual int getContainerSize() const /*override*/;
75
76 // vIndex: 22
77 virtual void startOpen(::Actor&) /*override*/;
78
79 // vIndex: 23
80 virtual void stopOpen(::Actor& actor) /*override*/;
81
82 // vIndex: 2
83 virtual void serverInitItemStackIds(
84 int containerSlot,
85 int count,
86 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
87 ) /*override*/;
88
89 // vIndex: 1
90 virtual void load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
91
92 // vIndex: 2
93 virtual bool save(::CompoundTag& tag, ::SaveContext const& saveContext) const /*override*/;
94
95 // vIndex: 41
96 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(::BlockSource&) /*override*/;
97
98 // vIndex: 42
99 virtual void _onUpdatePacket(::CompoundTag const& data, ::BlockSource& region) /*override*/;
100
101 // vIndex: 0
102 virtual ~ShelfBlockActor() /*override*/;
103 // NOLINTEND
104
105public:
106 // member functions
107 // NOLINTBEGIN
108 MCAPI explicit ShelfBlockActor(::BlockPos const& pos);
109
110 MCAPI void _loadItems(::CompoundTag const& base, ::ILevel& level);
111
112 MCAPI void _setItemInternal(int slot, ::ItemStack const& item, bool isLoading, bool emitVibrations);
113
114 MCAPI void updateItemCalculators(::ItemStack const& item, ::BlockSource const& region);
115 // NOLINTEND
116
117public:
118 // constructor thunks
119 // NOLINTBEGIN
120 MCAPI void* $ctor(::BlockPos const& pos);
121 // NOLINTEND
122
123public:
124 // destructor thunk
125 // NOLINTBEGIN
126 MCAPI void $dtor();
127 // NOLINTEND
128
129public:
130 // virtual function thunks
131 // NOLINTBEGIN
132 MCAPI ::std::string $getName() const;
133
134 MCAPI void $tick(::BlockSource& region);
135
136 MCAPI void $onChanged(::BlockSource& region);
137
138 MCAPI void $onRemoved(::BlockSource& region);
139
140 MCFOLD ::Container* $getContainer();
141
142 MCFOLD ::Container const* $getContainer() const;
143
144 MCAPI ::ItemStack const& $getItem(int slot) const;
145
146 MCAPI void $setItem(int slot, ::ItemStack const& item);
147
148 MCFOLD int $getMaxStackSize() const;
149
150 MCFOLD int $getContainerSize() const;
151
152 MCFOLD void $startOpen(::Actor&);
153
154 MCFOLD void $stopOpen(::Actor& actor);
155
156 MCAPI void $serverInitItemStackIds(
157 int containerSlot,
158 int count,
159 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
160 );
161
162 MCAPI void $load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
163
164 MCAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
165
166 MCFOLD ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(::BlockSource&);
167
168 MCFOLD void $_onUpdatePacket(::CompoundTag const& data, ::BlockSource& region);
169 // NOLINTEND
170
171public:
172 // vftables
173 // NOLINTBEGIN
174 MCNAPI static void** $vftableForBlockActor();
175
176 MCNAPI static void** $vftableForContainer();
177 // NOLINTEND
178};
Definition Actor.h:102
Definition BlockActor.h:32
Definition BlockPos.h:17
Definition BlockSource.h:66
Definition CompoundTag.h:13
Definition Container.h:31
Definition DataLoadHelper.h:20
Definition ILevel.h:207
Definition ItemStack.h:23
Definition SaveContext.h:5
Definition ShelfBlockActor.h:25
static MCAPI void ** $vftableForBlockActor()
static MCAPI void ** $vftableForContainer()