3#include "mc/_HeaderOutputPredefine.h"
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/BlockActorType.h"
14#include "mc/world/level/block/actor/VanillaBlockActor.h"
33class FurnaceBlockActor :
public ::VanillaBlockActor,
public ::Container {
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;
68 FurnaceBlockActor& operator=(FurnaceBlockActor
const&);
69 FurnaceBlockActor(FurnaceBlockActor
const&);
75 virtual bool isTypeOrDerived(::BlockActorType type)
const ;
77 virtual ::ItemStack
const& getItem(
int slot)
const ;
79 virtual void setItem(
int slot,
::ItemStack const& item) ;
81 virtual ::std::string getName()
const ;
83 virtual int getMaxStackSize()
const ;
85 virtual int getContainerSize()
const ;
89 virtual void startOpen(
::Actor& actor) ;
91 virtual void stopOpen(
::Actor& actor) ;
93 virtual bool canPushInItem(
int slot,
int face,
::ItemStack const& item)
const ;
95 virtual bool canPullOutItem(
int slot,
int face,
::ItemStack const& item)
const ;
97 virtual ::Container* getContainer() ;
99 virtual ::Container
const* getContainer()
const ;
111 virtual void onMove() ;
113 virtual void serverInitItemStackIds(
116 ::std::function<
void(
int,
::ItemStack const&)> onNetIdChanged
121 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(
::BlockSource& region) ;
125 virtual ~FurnaceBlockActor() ;
134 ::BlockActorType blockActorType,
137 ::SharedTypes::Legacy::LevelSoundEvent smeltSound,
138 ::SharedTypes::Legacy::ContainerType containerType,
152 MCAPI
int withdrawStoredXPReward();
158 MCAPI
static float _getXPRewardMultiplier(
::ItemStackBase const& item);
162 MCAPI
static float getItemBurnDuration(
::Item const& item,
float burnInterval);
166 MCAPI
static bool isItemAllowedInFuelSlot(
int slot,
::ItemStackBase const& item,
int amount);
197 ::BlockActorType blockActorType,
200 ::SharedTypes::Legacy::LevelSoundEvent smeltSound,
201 ::SharedTypes::Legacy::ContainerType containerType,
219 MCNAPI ::ItemStack
const&
$getItem(
int slot)
const;
258 ::std::function<
void(
int,
::ItemStack const&)> onNetIdChanged
Definition BlockActorDataPacket.h:19
Definition BlockSource.h:72
Definition CompoundTag.h:18
Definition DataLoadHelper.h:20
MCAPI FurnaceBlockActor(::BlockPos const &pos)
MCAPI void $serverInitItemStackIds(int containerSlot, int count, ::std::function< void(int, ::ItemStack const &)> onNetIdChanged)
MCAPI::std::string $getName() const
MCAPI void $startOpen(::Actor &actor)
MCAPI int $getContainerSize() const
MCAPI ::std::unique_ptr<::BlockActorDataPacket > $_getUpdatePacket(::BlockSource ®ion)
MCAPI void $_onUpdatePacket(::CompoundTag const &data, ::BlockSource ®ion)
MCAPI void $load(::ILevel &level, ::CompoundTag const &base, ::DataLoadHelper &dataLoadHelper)
static MCAPI ::std::string const & ITEMS_LIST_KEY()
static MCAPI ::std::string const & FILTERED_CUSTOM_NAME_KEY()
static MCAPI ::std::string const & BURN_DURATION_KEY()
MCAPI bool isEmptiedByHopper(::BlockSource ®ion)
MCAPI void $fixupOnLoad(::LevelChunk &lc)
MCAPI void checkForSmeltEverythingAchievement(::BlockSource ®ion)
MCAPI void $onCustomTagLoadDone(::BlockSource ®ion)
MCAPI::Container const * $getContainer() const
MCAPI bool $save(::CompoundTag &tag, ::SaveContext const &saveContext) const
static MCAPI ::std::string const & LAST_FUEL_KEY()
static MCAPI ::std::string const & COOK_TIME_KEY()
MCAPI void * $ctor(::BlockPos const &pos)
MCAPI bool canBurn(::Recipes const &recipes)
static MCAPI void ** $vftableForIVanillaMainBlockActorComponent()
static MCAPI int getXPRewardFromSmeltingItems(::ItemStackBase const &item, int numItemsSmelted)
MCAPI bool $isTypeOrDerived(::BlockActorType type) const
MCAPI bool $canPushInItem(int slot, int face, ::ItemStack const &item) const
MCAPI void $setItem(int slot, ::ItemStack const &item)
static MCAPI ::std::string const & SLOT_KEY()
MCAPI void onFurnaceBlockRemoved(::BlockSource ®ion)
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 ®ion, ::BlockPos const &position)
MCAPI void $onRemoved(::BlockSource &)
static MCAPI void ** $vftable()
static MCAPI void ** $vftableForIVanillaTickBlockActorComponent()
MCAPI int $getMaxStackSize() const
static MCAPI ::std::string const & BURN_TIME_KEY()
static MCAPI ::std::string const & STORED_XP_DEPRECATED_KEY()
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::Container * $getContainer()
MCAPI void $stopOpen(::Actor &actor)
static MCAPI void ** $vftableForIVanillaRenderBlockActorComponent()
static MCAPI void ** $vftableForBlockActor()
Definition HashedString.h:5
Definition ItemStackBase.h:45
Definition ItemStack.h:26
Definition LevelChunk.h:76
Definition SaveContext.h:5