3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/world/Container.h"
7#include "mc/world/ContainerContentChangeListener.h"
8#include "mc/world/inventory/simulation/SparseContainerBackingSetType.h"
21 using SparseContainerData = ::std::unordered_map<int, ::ItemStack>;
26 ::ll::TypedStorage<8, 8, ::Container&> mBackingContainer;
27 ::ll::TypedStorage<4, 4, ::SparseContainerBackingSetType const> mBackingSetType;
28 ::ll::TypedStorage<8, 64, ::std::unordered_map<int, ::ItemStack>> mItems;
29 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ISparseContainerSetListener>> mSparseContainerSetListener;
30 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::IPlayerContainerSetter>> mPlayerSetter;
46 virtual ::ItemStack
const& getItem(
int slot)
const ;
49 virtual void setItem(
int modelSlot,
::ItemStack const& item) ;
52 virtual void startOpen(
::Player& player) ;
55 virtual void stopOpen(
::Player& player) ;
58 virtual int getContainerSize()
const ;
61 virtual int getMaxStackSize()
const ;
64 virtual void containerContentChanged(
int slot) ;
67 virtual void serverInitItemStackIds(
70 ::std::function<
void(
int,
::ItemStack const&)> onNetIdChanged
79 ::SparseContainerBackingSetType backingSetType,
80 ::std::unique_ptr<::ISparseContainerSetListener> sparseContainerSetListener,
81 ::std::unique_ptr<::IPlayerContainerSetter> playerSetter
92 ::SparseContainerBackingSetType backingSetType,
93 ::std::unique_ptr<::ISparseContainerSetListener> sparseContainerSetListener,
94 ::std::unique_ptr<::IPlayerContainerSetter> playerSetter
101 MCNAPI ::ItemStack
const&
$getItem(
int slot)
const;
118 ::std::function<
void(
int,
::ItemStack const&)> onNetIdChanged
Definition ContainerContentChangeListener.h:5
Definition Container.h:30
Definition IPlayerContainerSetter.h:10
Definition ISparseContainerSetListener.h:11
Definition ItemStack.h:25
Definition SimpleSparseContainer.h:18
MCAPI void * $ctor(::Container &backingContainer, ::SparseContainerBackingSetType backingSetType, ::std::unique_ptr<::ISparseContainerSetListener > sparseContainerSetListener, ::std::unique_ptr<::IPlayerContainerSetter > playerSetter)
MCAPI int $getContainerSize() const
MCAPI void $stopOpen(::Player &player)
MCAPI void $setItem(int modelSlot, ::ItemStack const &item)
MCAPI int $getMaxStackSize() const
MCAPI void _setBackingContainerSlot(int slot, ::ItemStack const &newItem)
static MCAPI void ** $vftableForContainer()
MCAPI void $startOpen(::Player &player)
MCAPI::ItemStack const & $getItem(int slot) const
MCAPI void $containerContentChanged(int slot)
static MCAPI void ** $vftableForContainerContentChangeListener()
MCAPI SimpleSparseContainer(::Container &backingContainer, ::SparseContainerBackingSetType backingSetType, ::std::unique_ptr<::ISparseContainerSetListener > sparseContainerSetListener, ::std::unique_ptr<::IPlayerContainerSetter > playerSetter)
MCAPI void $serverInitItemStackIds(int containerSlot, int count, ::std::function< void(int, ::ItemStack const &)> onNetIdChanged)