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