Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
FilteredContainerModel Class Reference
Inheritance diagram for FilteredContainerModel:

Public Types

using FilterFunction = ::std::function<::FilterResult(::ItemInstance const&, bool)>
using OnItemExpandedCallback = ::std::function<void(::std::string const&, int, int)>

Public Member Functions

virtual void containerContentChanged (int slot)
virtual::ItemInstance const & getItemInstance (int modelSlot) const
virtual void setItemInstance (int modelSlot, ::ItemInstance const &item)
virtual void refreshContainer (bool fullRefresh)
virtual int getContainerSize () const
virtual int getFilteredContainerSize () const
virtual bool isExpanableItemFiltered (int index) const
virtual int getIndexForCreativeItem (::ItemStackBase const &item) const
virtual void _init ()
MCAPI FilteredContainerModel (::FullContainerName const &containerName, int size, ::ContainerCategory containerCategory, ::Bedrock::NotNullNonOwnerPtr<::CreativeItemRegistry > creativeItemRegistry, bool doExpandoGroups, bool filter, ::std::function<::FilterResult(::ItemInstance const &, bool)> rule)
MCAPI void _refreshContainer (bool fullRefresh)
MCAPI void * $ctor (::FullContainerName const &containerName, int size, ::ContainerCategory containerCategory, ::Bedrock::NotNullNonOwnerPtr<::CreativeItemRegistry > creativeItemRegistry, bool doExpandoGroups, bool filter, ::std::function<::FilterResult(::ItemInstance const &, bool)> rule)
MCAPI void $containerContentChanged (int slot)
MCAPI::ItemInstance const & $getItemInstance (int modelSlot) const
MCAPI void $setItemInstance (int modelSlot, ::ItemInstance const &item)
MCAPI void $refreshContainer (bool fullRefresh)
MCAPI int $getContainerSize () const
MCAPI int $getFilteredContainerSize () const
MCAPI bool $isExpanableItemFiltered (int index) const
MCAPI int $getIndexForCreativeItem (::ItemStackBase const &item) const
MCAPI void $_init ()
virtual bool isItemInstanceBased () const
virtual void setItem (int modelSlot, ::ItemStack const &item)
virtual::ItemStack const & getItemStack (int modelSlot) const
virtual ::std::vector<::ItemStack > const & getItems () const
virtual::ItemStackBase const & getItemStackBase (int modelSlot) const
virtual::ContainerExpandStatus getItemExpandStatus (int itemId) const
virtual::std::string const & getItemGroupName (int itemId) const
virtual void switchItemExpando (int itemId)
MCAPI void _generateCurrentItems ()
MCAPI bool $isItemInstanceBased () const
MCAPI void $setItem (int modelSlot, ::ItemStack const &item)
MCAPI::ItemStack const & $getItemStack (int modelSlot) const
MCAPI ::std::vector<::ItemStack > const & $getItems () const
MCAPI::ItemStackBase const & $getItemStackBase (int modelSlot) const
MCAPI::ContainerExpandStatus $getItemExpandStatus (int itemId) const
MCAPI::std::string const & $getItemGroupName (int itemId) const
MCAPI void $switchItemExpando (int itemId)
virtual void postInit ()
virtual void releaseResources ()
virtual void tick (int selectedSlot)
virtual::ContainerWeakRef getContainerWeakRef () const
virtual bool isValid ()
virtual bool isItemFiltered (::ItemStackBase const &item) const
virtual bool isSlotDisabled (int slot) const
virtual::Container * _getContainer () const
virtual int _getContainerOffset () const
virtual void _onItemChanged (int modelSlot, ::ItemStack const &oldItem, ::ItemStack const &newItem)
MCAPI void _onClientUIItemNetworkChanged (int containerSlot, ::ItemStack const &oldItem, ::ItemStack const &newItem)
MCAPI void networkUpdateItem (int modelSlot, ::ItemStack const &oldItem, ::ItemStack const &newItem)
MCAPI void registerOnContainerChangedCallback (::std::function< void(int, ::ItemStack const &, ::ItemStack const &)> callback)
MCAPI void registerPlayerNotificationCallback (::std::function< void(int, ::ItemStack const &, ::ItemStack const &)> callback)
MCAPI void setClientUIContainer (::SparseContainerClient *clientUIContainer)
MCAPI void * $ctor (::FullContainerName const &fullContainerName, int containerSize, ::ContainerCategory containerCategory, bool isClientSide)
MCAPI void $dtor ()
MCFOLD void $postInit ()
MCAPI void $releaseResources ()
MCFOLD void $tick (int selectedSlot)
MCAPI::ContainerWeakRef $getContainerWeakRef () const
MCAPI bool $isValid ()
MCFOLD bool $isItemFiltered (::ItemStackBase const &item) const
MCFOLD bool $isSlotDisabled (int slot) const
MCAPI::Container * $_getContainer () const
MCFOLD int $_getContainerOffset () const
MCAPI void $_onItemChanged (int modelSlot, ::ItemStack const &oldItem, ::ItemStack const &newItem)

Public Attributes

::ll::TypedStorage< 1, 1, bool > mDoExpandoGroups
::ll::TypedStorage< 1, 1, bool > mIsFiltering
::ll::TypedStorage< 4, 4, int > mFilteredItemCount
::ll::TypedStorage< 8, 24, ::std::vector<::std::pair<::ItemInstance, uint > > > mSavedItems
::ll::TypedStorage< 8, 24, ::std::vector<::std::pair<::ItemInstance, uint > > > mActiveFilteredExpandableSetHeads
::ll::TypedStorage< 8, 64, ::std::function<::FilterResult(::ItemInstance const &, bool)> > mFilterRule
::ll::TypedStorage< 8, 24, ::std::vector<::std::pair<::ItemInstance, uint > > > mItems
::ll::TypedStorage< 8, 24, ::std::vector<::ExpandoModelElement > > mCurrentItems
::ll::TypedStorage< 8, 24, ::Bedrock::NotNullNonOwnerPtr<::CreativeItemRegistry > > mCreativeItemRegistry
::ll::TypedStorage< 8, 24, ::std::vector<::ExpandoModelElement > > mExpandedItems
::ll::TypedStorage< 8, 64, ::std::function< void(::std::string const &, int, int)> > mOnItemExpanded
::ll::TypedStorage< 1, 1, bool const > mIsClientSide
::ll::TypedStorage< 8, 32, ::std::string > mContainerStringName
::ll::TypedStorage< 4, 12, ::FullContainerName const > mFullContainerName
::ll::TypedStorage< 8, 64, ::std::unordered_map< ::SharedTypes::Legacy::ContainerType, ::std::function< void(int, ::ItemStack const &, ::ItemStack const &)> > > mTrackedOnContainerChangedCallbacks
::ll::TypedStorage< 8, 24, ::std::vector<::std::function< void(int, ::ItemStack const &, ::ItemStack const &)> > > mOnContainerChangedCallbacks
::ll::TypedStorage< 8, 64, ::std::function< void(int, ::ItemStack const &, ::ItemStack const &)> > mPlayerNotificationCallbacks
::ll::TypedStorage< 4, 4, ::ContainerCategory > mContainerCategory
::ll::TypedStorage< 8, 24, ::std::vector<::SlotData > > mItemSource
::ll::TypedStorage< 8, 8, ::SparseContainerClient * > mClientUIContainer

Constructor & Destructor Documentation

◆ FilteredContainerModel()

MCAPI FilteredContainerModel::FilteredContainerModel ( ::FullContainerName const & containerName,
int size,
::ContainerCategory containerCategory,
::Bedrock::NotNullNonOwnerPtr<::CreativeItemRegistry > creativeItemRegistry,
bool doExpandoGroups,
bool filter,
::std::function<::FilterResult(::ItemInstance const &, bool)> rule )
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.

Member Function Documentation

◆ containerContentChanged()

virtual void FilteredContainerModel::containerContentChanged ( int slot)
virtual

Reimplemented from ExpandoContainerModel.

◆ setItemInstance()

virtual void FilteredContainerModel::setItemInstance ( int modelSlot,
::ItemInstance const & item )
virtual

Reimplemented from ExpandoContainerModel.

◆ refreshContainer()

virtual void FilteredContainerModel::refreshContainer ( bool fullRefresh)
virtual

Reimplemented from ExpandoContainerModel.

◆ getContainerSize()

virtual int FilteredContainerModel::getContainerSize ( ) const
virtual

Reimplemented from ExpandoContainerModel.

◆ getFilteredContainerSize()

virtual int FilteredContainerModel::getFilteredContainerSize ( ) const
virtual

Reimplemented from ExpandoContainerModel.

◆ isExpanableItemFiltered()

virtual bool FilteredContainerModel::isExpanableItemFiltered ( int index) const
virtual

Reimplemented from ContainerModel.

◆ getIndexForCreativeItem()

virtual int FilteredContainerModel::getIndexForCreativeItem ( ::ItemStackBase const & item) const
virtual

Reimplemented from ExpandoContainerModel.

◆ _init()

virtual void FilteredContainerModel::_init ( )
virtual

Reimplemented from ExpandoContainerModel.

◆ _refreshContainer()

MCAPI void FilteredContainerModel::_refreshContainer ( bool fullRefresh)
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.

◆ $ctor()

MCAPI void * FilteredContainerModel::$ctor ( ::FullContainerName const & containerName,
int size,
::ContainerCategory containerCategory,
::Bedrock::NotNullNonOwnerPtr<::CreativeItemRegistry > creativeItemRegistry,
bool doExpandoGroups,
bool filter,
::std::function<::FilterResult(::ItemInstance const &, bool)> rule )
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.

◆ $containerContentChanged()

MCAPI void FilteredContainerModel::$containerContentChanged ( int slot)
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.

◆ $getItemInstance()

MCAPI::ItemInstance const & FilteredContainerModel::$getItemInstance ( int modelSlot) 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.

◆ $setItemInstance()

MCAPI void FilteredContainerModel::$setItemInstance ( int modelSlot,
::ItemInstance 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.

◆ $refreshContainer()

MCAPI void FilteredContainerModel::$refreshContainer ( bool fullRefresh)
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 FilteredContainerModel::$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.

◆ $getFilteredContainerSize()

MCAPI int FilteredContainerModel::$getFilteredContainerSize ( ) 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.

◆ $isExpanableItemFiltered()

MCAPI bool FilteredContainerModel::$isExpanableItemFiltered ( int index) 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.

◆ $getIndexForCreativeItem()

MCAPI int FilteredContainerModel::$getIndexForCreativeItem ( ::ItemStackBase const & item) 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.

◆ $_init()

MCAPI void FilteredContainerModel::$_init ( )
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.

◆ isItemInstanceBased()

virtual bool ExpandoContainerModel::isItemInstanceBased ( ) const
virtualinherited

Reimplemented from ContainerModel.

◆ setItem()

virtual void ExpandoContainerModel::setItem ( int modelSlot,
::ItemStack const & item )
virtualinherited

Reimplemented from ContainerModel.

◆ switchItemExpando()

virtual void ExpandoContainerModel::switchItemExpando ( int itemId)
virtualinherited

Reimplemented from ContainerModel.

◆ _generateCurrentItems()

MCAPI void ExpandoContainerModel::_generateCurrentItems ( )
inherited
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.

◆ $isItemInstanceBased()

MCAPI bool ExpandoContainerModel::$isItemInstanceBased ( ) const
inherited
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 ExpandoContainerModel::$setItem ( int modelSlot,
::ItemStack const & item )
inherited
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.

◆ $getItemStack()

MCAPI::ItemStack const & ExpandoContainerModel::$getItemStack ( int modelSlot) const
inherited
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.

◆ $getItems()

MCAPI ::std::vector<::ItemStack > const & ExpandoContainerModel::$getItems ( ) const
inherited
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.

◆ $getItemStackBase()

MCAPI::ItemStackBase const & ExpandoContainerModel::$getItemStackBase ( int modelSlot) const
inherited
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.

◆ $getItemExpandStatus()

MCAPI::ContainerExpandStatus ExpandoContainerModel::$getItemExpandStatus ( int itemId) const
inherited
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.

◆ $getItemGroupName()

MCAPI::std::string const & ExpandoContainerModel::$getItemGroupName ( int itemId) const
inherited
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.

◆ $switchItemExpando()

MCAPI void ExpandoContainerModel::$switchItemExpando ( int itemId)
inherited
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.

◆ _onClientUIItemNetworkChanged()

MCAPI void ContainerModel::_onClientUIItemNetworkChanged ( int containerSlot,
::ItemStack const & oldItem,
::ItemStack const & newItem )
inherited
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.

◆ networkUpdateItem()

MCAPI void ContainerModel::networkUpdateItem ( int modelSlot,
::ItemStack const & oldItem,
::ItemStack const & newItem )
inherited
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.

◆ registerOnContainerChangedCallback()

MCAPI void ContainerModel::registerOnContainerChangedCallback ( ::std::function< void(int, ::ItemStack const &, ::ItemStack const &)> callback)
inherited
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.

◆ registerPlayerNotificationCallback()

MCAPI void ContainerModel::registerPlayerNotificationCallback ( ::std::function< void(int, ::ItemStack const &, ::ItemStack const &)> callback)
inherited
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.

◆ setClientUIContainer()

MCAPI void ContainerModel::setClientUIContainer ( ::SparseContainerClient * clientUIContainer)
inherited
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.

◆ $getContainerWeakRef()

MCAPI::ContainerWeakRef ContainerModel::$getContainerWeakRef ( ) const
inherited
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.

◆ $isValid()

MCAPI bool ContainerModel::$isValid ( )
inherited
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.

◆ $_getContainer()

MCAPI::Container * ContainerModel::$_getContainer ( ) const
inherited
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.

◆ $_onItemChanged()

MCAPI void ContainerModel::$_onItemChanged ( int modelSlot,
::ItemStack const & oldItem,
::ItemStack const & newItem )
inherited
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: