LeviLamina
Loading...
Searching...
No Matches
HopperBlockActor.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#include "mc/world/actor/Hopper.h"
9#include "mc/world/level/block/actor/BlockActor.h"
10
11// auto generated forward declare list
12// clang-format off
14class BlockPos;
15class BlockSource;
16class CompoundTag;
17class DataLoadHelper;
19class ILevel;
20class ItemStack;
21class Player;
22class SaveContext;
23struct Tick;
24// clang-format on
25
26class HopperBlockActor : public ::BlockActor, public ::Container, public ::Hopper {
27public:
28 // member variables
29 // NOLINTBEGIN
30 ::ll::TypedStorage<8, 760, ::ItemStack[5]> mItems;
31 ::ll::TypedStorage<8, 8, ::Tick> mLastTick;
32 // NOLINTEND
33
34public:
35 // virtual functions
36 // NOLINTBEGIN
37 // vIndex: 7
38 virtual void tick(::BlockSource& region) /*override*/;
39
40 // vIndex: 1
41 virtual void load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
42
43 // vIndex: 2
44 virtual bool save(::CompoundTag& tag, ::SaveContext const& saveContext) const /*override*/;
45
46 // vIndex: 7
47 virtual ::ItemStack const& getItem(int slot) const /*override*/;
48
49 // vIndex: 12
50 virtual void setItem(int modelSlot, ::ItemStack const& item) /*override*/;
51
52 // vIndex: 26
53 virtual ::std::string getName() const /*override*/;
54
55 // vIndex: 20
56 virtual int getContainerSize() const /*override*/;
57
58 // vIndex: 21
59 virtual int getMaxStackSize() const /*override*/;
60
61 // vIndex: 22
62 virtual void startOpen(::Player&) /*override*/;
63
64 // vIndex: 23
65 virtual void stopOpen(::Player& player) /*override*/;
66
67 // vIndex: 33
68 virtual ::Container* getContainer() /*override*/;
69
70 // vIndex: 32
71 virtual ::Container const* getContainer() const /*override*/;
72
73 // vIndex: 31
74 virtual void setContainerChanged(int slot) /*override*/;
75
76 // vIndex: 13
77 virtual void onRemoved(::BlockSource&) /*override*/;
78
79 // vIndex: 18
80 virtual void onNeighborChanged(::BlockSource& region, ::BlockPos const&) /*override*/;
81
82 // vIndex: 12
83 virtual void onMove() /*override*/;
84
85 // vIndex: 2
86 virtual void serverInitItemStackIds(
87 int containerSlot,
88 int count,
89 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
90 ) /*override*/;
91
92 // vIndex: 43
93 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(::BlockSource&) /*override*/;
94
95 // vIndex: 44
96 virtual void _onUpdatePacket(::CompoundTag const& data, ::BlockSource&) /*override*/;
97
98 // vIndex: 0
99 virtual ~HopperBlockActor() /*override*/ = default;
100 // NOLINTEND
101
102public:
103 // member functions
104 // NOLINTBEGIN
105 MCAPI explicit HopperBlockActor(::BlockPos const& pos);
106
107 MCAPI void _ensureTickingOrder(::BlockSource& region, int maxRecursion);
108
109 MCAPI void _tick(::BlockSource& region, int maxRecursion);
110
111 MCAPI ::FurnaceBlockActor* getAttachedFurnace(::BlockSource& region);
112
113 MCAPI bool isAttachedToChestAndFurnace(::BlockSource& region);
114
115 MCAPI bool isAttachedToContainerType(::BlockSource& region, ::SharedTypes::Legacy::ContainerType containerType);
116
117 MCAPI bool isSourceOfContainerType(::BlockSource& region, ::SharedTypes::Legacy::ContainerType containerType);
118
119 MCAPI void updateCooldownAfterMove(::Tick const& currentTick, int time);
120 // NOLINTEND
121
122public:
123 // constructor thunks
124 // NOLINTBEGIN
125 MCAPI void* $ctor(::BlockPos const& pos);
126 // NOLINTEND
127
128public:
129 // destructor thunk
130 // NOLINTBEGIN
131
132 // NOLINTEND
133
134public:
135 // virtual function thunks
136 // NOLINTBEGIN
137 MCAPI void $tick(::BlockSource& region);
138
139 MCAPI void $load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
140
141 MCAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
142
143 MCAPI ::ItemStack const& $getItem(int slot) const;
144
145 MCAPI void $setItem(int modelSlot, ::ItemStack const& item);
146
147 MCAPI ::std::string $getName() const;
148
149 MCFOLD int $getContainerSize() const;
150
151 MCFOLD int $getMaxStackSize() const;
152
153 MCFOLD void $startOpen(::Player&);
154
155 MCFOLD void $stopOpen(::Player& player);
156
157 MCFOLD ::Container* $getContainer();
158
159 MCFOLD ::Container const* $getContainer() const;
160
161 MCFOLD void $setContainerChanged(int slot);
162
163 MCFOLD void $onRemoved(::BlockSource&);
164
165 MCAPI void $onNeighborChanged(::BlockSource& region, ::BlockPos const&);
166
167 MCFOLD void $onMove();
168
169 MCAPI void $serverInitItemStackIds(
170 int containerSlot,
171 int count,
172 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
173 );
174
175 MCFOLD ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(::BlockSource&);
176
177 MCFOLD void $_onUpdatePacket(::CompoundTag const& data, ::BlockSource&);
178 // NOLINTEND
179
180public:
181 // vftables
182 // NOLINTBEGIN
183 MCAPI static void** $vftableForBlockActor();
184
185 MCAPI static void** $vftableForContainer();
186 // NOLINTEND
187};
Definition BlockActorDataPacket.h:19
Definition BlockActor.h:32
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition CompoundTag.h:13
Definition Container.h:30
Definition DataLoadHelper.h:20
Definition FurnaceBlockActor.h:33
Definition HopperBlockActor.h:26
Definition Hopper.h:14
Definition ILevel.h:203
Definition ItemStack.h:25
Definition Player.h:119
Definition SaveContext.h:5
Definition Tick.h:5