LeviLamina
Loading...
Searching...
No Matches
PlayerInventory.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/ContainerContentChangeListener.h"
7#include "mc/world/ContainerID.h"
8#include "mc/world/ContainerSizeChangeListener.h"
9#include "mc/world/item/ItemStack.h"
10
11// auto generated forward declare list
12// clang-format off
13class Container;
15class Inventory;
16// clang-format on
17
19public:
20 // member variables
21 // NOLINTBEGIN
22 ::ll::TypedStorage<4, 4, int> mSelected;
23 ::ll::TypedStorage<8, 152, ::ItemStack> mInfiniteItem;
24 ::ll::TypedStorage<1, 1, ::ContainerID> mSelectedContainerId;
25 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::Inventory>> mInventory;
26 ::ll::TypedStorage<8, 24, ::std::vector<::ItemStack>> mComplexItems;
27 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::HudContainerManagerModel>> mHudContainerManager;
28 // NOLINTEND
29
30public:
31 // prevent constructor by default
33
34public:
35 // virtual functions
36 // NOLINTBEGIN
37 // vIndex: 1
38 virtual ~PlayerInventory() /*override*/;
39
40 // vIndex: 0
41 virtual void containerSizeChanged(int size) /*override*/;
42
43 // vIndex: 0
44 virtual void containerContentChanged(int slot) /*override*/;
45
46 // vIndex: 2
47 virtual void createTransactionContext(
48 ::std::function<void(::Container&, int, ::ItemStack const&, ::ItemStack const&)> callback,
49 ::std::function<void()> execute
50 );
51 // NOLINTEND
52
53public:
54 // member functions
55 // NOLINTBEGIN
56 MCNAPI explicit PlayerInventory(::std::unique_ptr<::Inventory> inv);
57
58 MCNAPI int getItemCount(::std::function<bool(::ItemStack const&)> comparator);
59
60 MCNAPI ::ItemStack const& getSelectedItem() const;
61
62 MCNAPI void init(::std::weak_ptr<::HudContainerManagerModel> hud);
63
64 MCNAPI bool removeResource(int type);
65
66 MCNAPI bool selectSlot(int slot, ::ContainerID containerId);
67 // NOLINTEND
68
69public:
70 // constructor thunks
71 // NOLINTBEGIN
72 MCNAPI void* $ctor(::std::unique_ptr<::Inventory> inv);
73 // NOLINTEND
74
75public:
76 // destructor thunk
77 // NOLINTBEGIN
78 MCNAPI void $dtor();
79 // NOLINTEND
80
81public:
82 // virtual function thunks
83 // NOLINTBEGIN
84 MCNAPI void $containerSizeChanged(int size);
85
86 MCNAPI void $containerContentChanged(int slot);
87
89 ::std::function<void(::Container&, int, ::ItemStack const&, ::ItemStack const&)> callback,
90 ::std::function<void()> execute
91 );
92 // NOLINTEND
93
94public:
95 // vftables
96 // NOLINTBEGIN
98
100 // NOLINTEND
101};
Definition ContainerContentChangeListener.h:5
Definition ContainerSizeChangeListener.h:5
Definition Container.h:30
Definition HudContainerManagerModel.h:18
Definition Inventory.h:13
Definition ItemStack.h:25
Definition PlayerInventory.h:18
MCAPI bool selectSlot(int slot, ::ContainerID containerId)
MCAPI void * $ctor(::std::unique_ptr<::Inventory > inv)
MCAPI void $containerSizeChanged(int size)
MCAPI bool removeResource(int type)
static MCAPI void ** $vftableForContainerSizeChangeListener()
MCAPI void $dtor()
static MCAPI void ** $vftableForContainerContentChangeListener()
MCAPI int getItemCount(::std::function< bool(::ItemStack const &)> comparator)
MCAPI PlayerInventory(::std::unique_ptr<::Inventory > inv)
MCAPI void $createTransactionContext(::std::function< void(::Container &, int, ::ItemStack const &, ::ItemStack const &)> callback, ::std::function< void()> execute)
MCAPI::ItemStack const & getSelectedItem() const
MCAPI void init(::std::weak_ptr<::HudContainerManagerModel > hud)
MCAPI void $containerContentChanged(int slot)