LeviLamina
Loading...
Searching...
No Matches
FurnaceBlockActor.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/string/HashedString.h"
7#include "mc/deps/shared_types/legacy/ContainerType.h"
8#include "mc/deps/shared_types/legacy/LevelSoundEvent.h"
9#include "mc/legacy/ActorUniqueID.h"
10#include "mc/world/Container.h"
11#include "mc/world/item/ItemInstance.h"
12#include "mc/world/item/ItemStack.h"
13#include "mc/world/level/block/actor/BlockActor.h"
14#include "mc/world/level/block/actor/BlockActorType.h"
15
16// auto generated forward declare list
17// clang-format off
18class Actor;
19class Block;
20class BlockActorDataPacket;
21class BlockPos;
22class BlockSource;
23class CompoundTag;
24class DataLoadHelper;
25class ILevel;
26class Item;
27class ItemStackBase;
28class LevelChunk;
29class Recipes;
30class SaveContext;
31// clang-format on
32
34public:
35 // FurnaceBlockActor inner types define
36 enum : int {
37 SlotIngredient = 0,
38 SlotFuel = 1,
39 SlotResult = 2,
40 NumItems = 3,
41 };
42
43public:
44 // member variables
45 // NOLINTBEGIN
46 ::ll::TypedStorage<4, 4, int> mLitTime;
47 ::ll::TypedStorage<4, 4, int> mLitDuration;
48 ::ll::TypedStorage<4, 4, int> mCookingProgress;
49 ::ll::TypedStorage<4, 4, uint> mStoredXP;
50 ::ll::TypedStorage<8, 456, ::ItemStack[3]> mItems;
51 ::ll::TypedStorage<1, 3, bool[3]> mDirty;
52 ::ll::TypedStorage<8, 64, ::std::unordered_set<::ActorUniqueID>> mActors;
53 ::ll::TypedStorage<8, 48, ::HashedString const> mRecipeTag;
54 ::ll::TypedStorage<4, 4, int const> mBurnInterval;
55 ::ll::TypedStorage<1, 1, bool> mOpenByLocalPlayer;
56 ::ll::TypedStorage<4, 4, ::SharedTypes::Legacy::LevelSoundEvent> mSmeltSoundEvent;
57 ::ll::TypedStorage<4, 4, int> mSoundTick;
58 ::ll::TypedStorage<4, 4, int> mSoundTickTarget;
59 ::ll::TypedStorage<8, 8, ::Block const&> mUnlitFurnace;
60 ::ll::TypedStorage<8, 8, ::Block const&> mLitFurnace;
61 ::ll::TypedStorage<8, 128, ::ItemInstance> mLastFuelItem;
62 ::ll::TypedStorage<1, 1, bool> mNoDrop;
63 ::ll::TypedStorage<1, 1, bool> mNeedsLitStateFixup;
64 // NOLINTEND
65
66public:
67 // prevent constructor by default
68 FurnaceBlockActor& operator=(FurnaceBlockActor const&);
71
72public:
73 // virtual functions
74 // NOLINTBEGIN
75 // vIndex: 7
76 virtual ::ItemStack const& getItem(int slot) const /*override*/;
77
78 // vIndex: 12
79 virtual void setItem(int modelSlot, ::ItemStack const& item) /*override*/;
80
81 // vIndex: 25
82 virtual ::std::string getName() const /*override*/;
83
84 // vIndex: 21
85 virtual int getMaxStackSize() const /*override*/;
86
87 // vIndex: 20
88 virtual int getContainerSize() const /*override*/;
89
90 // vIndex: 13
91 virtual void onRemoved(::BlockSource&) /*override*/;
92
93 // vIndex: 22
94 virtual void startOpen(::Actor& actor) /*override*/;
95
96 // vIndex: 23
97 virtual void stopOpen(::Actor& actor) /*override*/;
98
99 // vIndex: 32
100 virtual bool canPushInItem(int slot, int face, ::ItemStack const& item) const /*override*/;
101
102 // vIndex: 33
103 virtual bool canPullOutItem(int slot, int face, ::ItemStack const& item) const /*override*/;
104
105 // vIndex: 31
106 virtual ::Container* getContainer() /*override*/;
107
108 // vIndex: 30
109 virtual ::Container const* getContainer() const /*override*/;
110
111 // vIndex: 1
112 virtual void load(::ILevel& level, ::CompoundTag const& base, ::DataLoadHelper& dataLoadHelper) /*override*/;
113
114 // vIndex: 6
115 virtual void onCustomTagLoadDone(::BlockSource& region) /*override*/;
116
117 // vIndex: 2
118 virtual bool save(::CompoundTag& tag, ::SaveContext const& saveContext) const /*override*/;
119
120 // vIndex: 9
121 virtual void tick(::BlockSource& region) /*override*/;
122
123 // vIndex: 18
124 virtual void onNeighborChanged(::BlockSource& region, ::BlockPos const& position) /*override*/;
125
126 // vIndex: 12
127 virtual void onMove() /*override*/;
128
129 // vIndex: 2
130 virtual void serverInitItemStackIds(
131 int containerSlot,
132 int count,
133 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
134 ) /*override*/;
135
136 // vIndex: 40
137 virtual void fixupOnLoad(::LevelChunk& lc) /*override*/;
138
139 // vIndex: 41
140 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(::BlockSource& region) /*override*/;
141
142 // vIndex: 42
143 virtual void _onUpdatePacket(::CompoundTag const& data, ::BlockSource& region) /*override*/;
144
145 // vIndex: 0
146 virtual ~FurnaceBlockActor() /*override*/;
147 // NOLINTEND
148
149public:
150 // member functions
151 // NOLINTBEGIN
152 MCAPI FurnaceBlockActor(
153 ::BlockActorType blockActorType,
154 ::BlockPos const& pos,
155 ::HashedString const& recipeTag,
156 ::SharedTypes::Legacy::LevelSoundEvent smeltSound,
157 ::SharedTypes::Legacy::ContainerType containerType,
158 int burnInterval,
159 ::Block const& unlitFurnace,
160 ::Block const& litFurnace
161 );
162
163 MCAPI void _tryBroadcastBurnSound(::BlockSource& region);
164
165 MCAPI void burn(::Recipes const& recipes);
166
167 MCAPI bool canBurn(::Recipes const& recipes);
168
169 MCAPI void checkForAlternativeFuelAchievement(::BlockSource& region, ::ItemStack const& item);
170
171 MCAPI void checkForSmeltEverythingAchievement(::BlockSource& region);
172
173 MCAPI int withdrawStoredXPReward();
174 // NOLINTEND
175
176public:
177 // static functions
178 // NOLINTBEGIN
179 MCAPI static float _getXPRewardMultiplier(::ItemStackBase const& item);
180
181 MCAPI static int getAvailableFuelSetCount(int slot, ::ItemStackBase const& item);
182
183 MCAPI static float getBurnDuration(::ItemStackBase const& itemInstance, float burnInterval);
184
185 MCAPI static float getItemBurnDuration(::Item const& item, float burnInterval);
186
187 MCAPI static int getXPRewardFromSmeltingItems(::ItemStackBase const& item, int numItemsSmelted);
188 // NOLINTEND
189
190public:
191 // static variables
192 // NOLINTBEGIN
193 MCAPI static ::std::string const& BURN_DURATION_KEY();
194
195 MCAPI static int const& BURN_INTERVAL();
196
197 MCAPI static ::std::string const& BURN_TIME_KEY();
198
199 MCAPI static ::std::string const& COOK_TIME_KEY();
200
201 MCAPI static ::std::string const& CUSTOM_NAME_KEY();
202
203 MCAPI static float const& DEFAULT_SMELTING_TIME();
204
205 MCAPI static ::std::string const& FILTERED_CUSTOM_NAME_KEY();
206
207 MCAPI static ::std::string const& ITEMS_LIST_KEY();
208
209 MCAPI static ::std::string const& LAST_FUEL_KEY();
210
211 MCAPI static ::std::string const& SLOT_KEY();
212
213 MCAPI static ::std::string const& STORED_XP_DEPRECATED_KEY();
214
215 MCAPI static ::std::string const& STORED_XP_KEY();
216 // NOLINTEND
217
218public:
219 // constructor thunks
220 // NOLINTBEGIN
221 MCAPI void* $ctor(
222 ::BlockActorType blockActorType,
223 ::BlockPos const& pos,
224 ::HashedString const& recipeTag,
225 ::SharedTypes::Legacy::LevelSoundEvent smeltSound,
226 ::SharedTypes::Legacy::ContainerType containerType,
227 int burnInterval,
228 ::Block const& unlitFurnace,
229 ::Block const& litFurnace
230 );
231 // NOLINTEND
232
233public:
234 // destructor thunk
235 // NOLINTBEGIN
236 MCAPI void $dtor();
237 // NOLINTEND
238
239public:
240 // virtual function thunks
241 // NOLINTBEGIN
242 MCFOLD ::ItemStack const& $getItem(int slot) const;
243
244 MCAPI void $setItem(int modelSlot, ::ItemStack const& item);
245
246 MCAPI ::std::string $getName() const;
247
248 MCFOLD int $getMaxStackSize() const;
249
250 MCFOLD int $getContainerSize() const;
251
252 MCFOLD void $onRemoved(::BlockSource&);
253
254 MCAPI void $startOpen(::Actor& actor);
255
256 MCAPI void $stopOpen(::Actor& actor);
257
258 MCAPI bool $canPushInItem(int slot, int face, ::ItemStack const& item) const;
259
260 MCAPI bool $canPullOutItem(int slot, int face, ::ItemStack const& item) const;
261
262 MCFOLD ::Container* $getContainer();
263
264 MCFOLD ::Container const* $getContainer() const;
265
266 MCAPI void $load(::ILevel& level, ::CompoundTag const& base, ::DataLoadHelper& dataLoadHelper);
267
268 MCAPI void $onCustomTagLoadDone(::BlockSource& region);
269
270 MCAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
271
272 MCAPI void $tick(::BlockSource& region);
273
274 MCAPI void $onNeighborChanged(::BlockSource& region, ::BlockPos const& position);
275
276 MCFOLD void $onMove();
277
278 MCAPI void $serverInitItemStackIds(
279 int containerSlot,
280 int count,
281 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
282 );
283
284 MCAPI void $fixupOnLoad(::LevelChunk& lc);
285
286 MCAPI ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(::BlockSource& region);
287
288 MCAPI void $_onUpdatePacket(::CompoundTag const& data, ::BlockSource& region);
289 // NOLINTEND
290
291public:
292 // vftables
293 // NOLINTBEGIN
294 MCNAPI static void** $vftableForContainer();
295
296 MCNAPI static void** $vftableForBlockActor();
297 // NOLINTEND
298};
Definition Actor.h:102
Definition BlockActor.h:32
Definition BlockPos.h:17
Definition BlockSource.h:66
Definition Block.h:37
Definition CompoundTag.h:13
Definition Container.h:31
Definition DataLoadHelper.h:20
Definition FurnaceBlockActor.h:33
static MCAPI void ** $vftableForContainer()
static MCAPI void ** $vftableForBlockActor()
Definition HashedString.h:5
Definition ILevel.h:207
Definition ItemStackBase.h:34
Definition ItemStack.h:23
Definition Item.h:66
Definition LevelChunk.h:77
Definition Recipes.h:35
Definition SaveContext.h:5