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