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