LeviLamina
Loading...
Searching...
No Matches
DataDrivenBlockContainer Class Reference
Inheritance diagram for DataDrivenBlockContainer:

Public Types

using ItemStackNetIdChangedCallback = ::std::function<void(int, ::ItemStack const&)>
using TransactionContext
using Iterator = ContainerIterator<Container>
using ConstIterator = ContainerIterator<Container const>
using ReverseIterator = std::reverse_iterator<Iterator>
using ConstReverseIterator = std::reverse_iterator<ConstIterator>

Public Member Functions

virtual::ItemStack const & getItem (int slot) const
virtual void setItem (int slot, ::ItemStack const &item)
virtual int getContainerSize () const
virtual int getMaxStackSize () const
virtual void startOpen (::Actor &)
virtual void serverInitItemStackIds (int containerSlot, int count, ::std::function< void(int, ::ItemStack const &)> onNetIdChanged)
MCAPI void load (::CompoundTag const &tag, ::ILevel &level)
MCAPI void save (::CompoundTag &tag, ::SaveContext const &saveContext) const
MCAPI::ItemStack const & $getItem (int slot) const
MCAPI void $setItem (int slot, ::ItemStack const &item)
MCAPI int $getContainerSize () const
MCAPI int $getMaxStackSize () const
MCAPI void $startOpen (::Actor &)
MCAPI void $serverInitItemStackIds (int containerSlot, int count, ::std::function< void(int, ::ItemStack const &)> onNetIdChanged)
std::string const & getTypeName () const
LLNDAPI optional_ref< ItemStackgetItemNonConst (int index)
ItemStackoperator[] (int index)
ItemStack const & operator[] (int index) const
constexpr Iterator begin () noexcept
constexpr ConstIterator cbegin () const noexcept
constexpr Iterator end () noexcept
constexpr ConstIterator cend () const noexcept
constexpr ReverseIterator rbegin () noexcept
constexpr ConstReverseIterator crbegin () const noexcept
constexpr ReverseIterator rend () noexcept
constexpr ConstReverseIterator crend () const noexcept
virtual void init ()
virtual void addContentChangeListener (::ContainerContentChangeListener *listener)
virtual void removeContentChangeListener (::ContainerContentChangeListener *listener)
virtual ::Bedrock::PubSub::Connector< void()> * getContainerRemovedConnector ()
virtual bool hasRemovedSubscribers () const
virtual bool hasRoomForItem (::ItemStack const &item) const
virtual bool addItem (::ItemStack &item)
virtual bool addItemWithForceBalance (::ItemStack &item)
virtual bool addItemToFirstEmptySlot (::ItemStack const &item)
virtual void setItemWithForceBalance (int slot, ::ItemStack const &item, bool forceBalanced)
virtual void removeItem (int slot, int count)
virtual void removeAllItems ()
virtual void removeAllItemsWithForceBalance ()
virtual void containerRemoved ()
virtual void dropSlotContent (::BlockSource &region, ::Vec3 const &pos, bool randomizeDrop, int slot)
virtual void dropContents (::BlockSource &region, ::Vec3 const &pos, bool randomizeDrop)
virtual void stopOpen (::Actor &actor)
virtual ::std::vector<::ItemStackgetSlotCopies () const
virtual ::std::vector<::ItemStack const * > const getSlots () const
virtual int getEmptySlotsCount () const
virtual int getItemCount (::ItemStack const &compare) const
MCAPI int getItemCount (::ItemDescriptor const &descriptor) const
virtual int firstEmptySlot () const
virtual int firstItem () const
virtual int findFirstSlotForItem (::ItemStack const &item) const
virtual int reverseFindFirstSlotForItem (::ItemStack const &item) const
virtual bool canPushInItem (int slot, int face, ::ItemStack const &item) const
virtual bool canPullOutItem (int slot, int face, ::ItemStack const &item) const
virtual void setContainerChanged (int slot)
virtual void setContainerMoved ()
virtual void setCustomName (::Bedrock::Safety::RedactableString const &name)
virtual bool hasCustomName () const
virtual void readAdditionalSaveData (::CompoundTag const &tag)
virtual void addAdditionalSaveData (::CompoundTag &tag)
virtual void initializeContainerContents (::BlockSource &region)
virtual bool isEmpty () const
virtual bool isSlotDisabled (int slot) const
MCAPI void _dropSlotContent (::BlockSource &region, ::Random &random, ::Vec3 const &pos, bool randomizeDrop, int slot)
MCAPI void _serverInitId (int slot, ::ItemStack &item, ::std::function< void(int, ::ItemStack const &)> onNetIdChanged)
MCAPI void createTransactionContext (::brstd::copyable_function< void(::Container &, int, ::ItemStack const &, ::ItemStack const &)> callback, ::brstd::function_ref< void()> execute)
MCAPI int getRedstoneSignalFromContainer (::BlockSource &region)
MCAPI void serverInitItemStackIdsAll (::std::function< void(int, ::ItemStack const &)> onNetIdChanged)
MCAPI void * $ctor (::Container const &)
MCAPI void * $ctor (::SharedTypes::Legacy::ContainerType type)
MCAPI void * $ctor (::SharedTypes::Legacy::ContainerType type, ::std::string const &name, bool customName)
MCAPI void $dtor ()
MCFOLD void $init ()
MCAPI void $addContentChangeListener (::ContainerContentChangeListener *listener)
MCAPI void $removeContentChangeListener (::ContainerContentChangeListener *listener)
MCAPI ::Bedrock::PubSub::Connector< void()> * $getContainerRemovedConnector ()
MCAPI bool $hasRemovedSubscribers () const
MCAPI bool $hasRoomForItem (::ItemStack const &item) const
MCAPI bool $addItem (::ItemStack &item)
MCAPI bool $addItemWithForceBalance (::ItemStack &item)
MCAPI bool $addItemToFirstEmptySlot (::ItemStack const &item)
MCFOLD void $setItemWithForceBalance (int slot, ::ItemStack const &item, bool forceBalanced)
MCAPI void $removeItem (int slot, int count)
MCAPI void $removeAllItems ()
MCAPI void $removeAllItemsWithForceBalance ()
MCAPI void $containerRemoved ()
MCAPI void $dropSlotContent (::BlockSource &region, ::Vec3 const &pos, bool randomizeDrop, int slot)
MCAPI void $dropContents (::BlockSource &region, ::Vec3 const &pos, bool randomizeDrop)
MCAPI void $stopOpen (::Actor &actor)
MCAPI ::std::vector<::ItemStack$getSlotCopies () const
MCAPI ::std::vector<::ItemStack const * > const $getSlots () const
MCAPI int $getEmptySlotsCount () const
MCAPI int $getItemCount (::ItemStack const &compare) const
MCAPI int $firstEmptySlot () const
MCAPI int $firstItem () const
MCAPI int $findFirstSlotForItem (::ItemStack const &item) const
MCAPI int $reverseFindFirstSlotForItem (::ItemStack const &item) const
MCFOLD bool $canPushInItem (int slot, int face, ::ItemStack const &item) const
MCFOLD bool $canPullOutItem (int slot, int face, ::ItemStack const &item) const
MCAPI void $setContainerChanged (int slot)
MCAPI void $setContainerMoved ()
MCAPI void $setCustomName (::Bedrock::Safety::RedactableString const &name)
MCAPI bool $hasCustomName () const
MCAPI void $readAdditionalSaveData (::CompoundTag const &tag)
MCAPI void $addAdditionalSaveData (::CompoundTag &tag)
MCFOLD void $initializeContainerContents (::BlockSource &region)
MCAPI bool $isEmpty () const
MCFOLD bool $isSlotDisabled (int slot) const

Static Public Member Functions

static MCAPI void ** $vftable ()
static MCAPI ::SharedTypes::Legacy::ContainerType getContainerTypeId (::std::string const &name)
static MCAPI ::BidirectionalUnorderedMap<::SharedTypes::Legacy::ContainerType, ::std::string > const & containerTypeMap ()

Public Attributes

::ll::TypedStorage< 8, 24, ::std::vector<::ItemStack > > mItems
::SharedTypes::Legacy::ContainerType mContainerType
::SharedTypes::Legacy::ContainerType mGameplayContainerType
::std::unordered_set<::ContainerContentChangeListener * > mContentChangeListeners
::std::unordered_set<::ContainerSizeChangeListener * > mSizeChangeListeners
::std::unordered_set<::ContainerCloseListener * > mCloseListeners
::Container::PublisherWrapper mRemovedPublisher
::std::deque< TransactionContext > mTransactionContextStack
::Bedrock::Safety::RedactableString mName
bool mCustomName
::ContainerOwner mContainerOwner
::ContainerRuntimeId mContainerRuntimeId

Member Typedef Documentation

◆ TransactionContext

using Container::TransactionContext
inherited
Initial value:
::brstd::copyable_function<void(::Container&, int, ::ItemStack const&, ::ItemStack const&)>
Definition ItemStack.h:26
Definition copyable_function.h:8

Member Function Documentation

◆ getItem()

virtual::ItemStack const & DataDrivenBlockContainer::getItem ( int slot) const
virtual

Implements Container.

◆ setItem()

virtual void DataDrivenBlockContainer::setItem ( int slot,
::ItemStack const & item )
virtual

Implements Container.

◆ getContainerSize()

virtual int DataDrivenBlockContainer::getContainerSize ( ) const
virtual

Implements Container.

◆ getMaxStackSize()

virtual int DataDrivenBlockContainer::getMaxStackSize ( ) const
virtual

Implements Container.

◆ startOpen()

virtual void DataDrivenBlockContainer::startOpen ( ::Actor & )
virtual

Implements Container.

◆ serverInitItemStackIds()

virtual void DataDrivenBlockContainer::serverInitItemStackIds ( int containerSlot,
int count,
::std::function< void(int, ::ItemStack const &)> onNetIdChanged )
virtual

Implements Container.

◆ load()

MCAPI void DataDrivenBlockContainer::load ( ::CompoundTag const & tag,
::ILevel & level )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ save()

MCAPI void DataDrivenBlockContainer::save ( ::CompoundTag & tag,
::SaveContext const & saveContext ) const
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $getItem()

MCAPI::ItemStack const & DataDrivenBlockContainer::$getItem ( int slot) const
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $setItem()

MCAPI void DataDrivenBlockContainer::$setItem ( int slot,
::ItemStack const & item )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $getContainerSize()

MCAPI int DataDrivenBlockContainer::$getContainerSize ( ) const
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $getMaxStackSize()

MCAPI int DataDrivenBlockContainer::$getMaxStackSize ( ) const
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $startOpen()

MCAPI void DataDrivenBlockContainer::$startOpen ( ::Actor & )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $serverInitItemStackIds()

MCAPI void DataDrivenBlockContainer::$serverInitItemStackIds ( int containerSlot,
int count,
::std::function< void(int, ::ItemStack const &)> onNetIdChanged )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $vftable()

MCAPI void ** DataDrivenBlockContainer::$vftable ( )
static
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

The documentation for this class was generated from the following file: