3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/world/Container.h"
7#include "mc/world/level/block/actor/VanillaBlockActor.h"
22class ChiseledBookshelfBlockActor :
public ::VanillaBlockActor,
public ::Container {
26 ::ll::TypedStorage<8, 24, ::std::vector<::ItemStack>> mItems;
27 ::ll::TypedStorage<4, 4, uint> mLastInteractedSlot;
32 ChiseledBookshelfBlockActor();
37 virtual ::ItemStack
const& getItem(
int slot)
const ;
39 virtual void setItem(
int slot,
::ItemStack const& item) ;
41 virtual ::std::string getName()
const ;
43 virtual int getMaxStackSize()
const ;
45 virtual int getContainerSize()
const ;
47 virtual void startOpen(
::Actor&) ;
49 virtual void stopOpen(
::Actor& actor) ;
51 virtual ::Container* getContainer() ;
53 virtual ::Container
const* getContainer()
const ;
55 virtual void serverInitItemStackIds(
58 ::std::function<
void(
int,
::ItemStack const&)> onNetIdChanged
61 virtual bool isEmpty()
const ;
63 virtual bool canPushInItem(
int slot,
int,
::ItemStack const& item)
const ;
65 virtual bool canPullOutItem(
int slot,
int,
::ItemStack const&)
const ;
67 virtual bool addItemToFirstEmptySlot(
::ItemStack const& item) ;
75 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(
::BlockSource&) ;
103 MCNAPI ::ItemStack
const&
$getItem(
int slot)
const;
124 ::std::function<
void(
int,
::ItemStack const&)> onNetIdChanged
Definition BlockActorDataPacket.h:19
Definition BlockSource.h:72
MCAPI::ItemStack const & $getItem(int slot) const
MCAPI ::std::unique_ptr<::BlockActorDataPacket > $_getUpdatePacket(::BlockSource &)
MCAPI bool $isEmpty() const
MCAPI::std::string $getName() const
MCAPI ChiseledBookshelfBlockActor(::BlockPos const &pos)
MCAPI void $setItem(int slot, ::ItemStack const &item)
MCAPI void $stopOpen(::Actor &actor)
MCAPI void $_onUpdatePacket(::CompoundTag const &data, ::BlockSource ®ion)
MCAPI bool $canPushInItem(int slot, int, ::ItemStack const &item) const
MCAPI int $getMaxStackSize() const
MCAPI::Container * $getContainer()
MCAPI void $onChanged(::BlockSource ®ion)
MCAPI void _setItemInternal(int slot, ::ItemStack const &item, bool isLoading)
MCAPI int $getContainerSize() const
MCAPI void $serverInitItemStackIds(int containerSlot, int count, ::std::function< void(int, ::ItemStack const &)> onNetIdChanged)
MCAPI void * $ctor(::BlockPos const &pos)
MCAPI void $startOpen(::Actor &)
MCAPI bool $addItemToFirstEmptySlot(::ItemStack const &item)
MCAPI bool $save(::CompoundTag &tag, ::SaveContext const &saveContext) const
MCAPI bool $canPullOutItem(int slot, int, ::ItemStack const &) const
static MCAPI bool allowedItem(::ItemStack const &item)
MCAPI void $load(::ILevel &level, ::CompoundTag const &tag, ::DataLoadHelper &dataLoadHelper)
MCAPI::Container const * $getContainer() const
Definition CompoundTag.h:18
Definition DataLoadHelper.h:20
Definition ItemStack.h:26
Definition SaveContext.h:5