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 // virtual functions
32 // NOLINTBEGIN
33 virtual ~PlayerInventory() /*override*/ = default;
34
35 virtual void containerSizeChanged(int size) /*override*/;
36
37 virtual void containerContentChanged(int slot) /*override*/;
38
39 virtual void createTransactionContext(
40 ::std::function<void(::Container&, int, ::ItemStack const&, ::ItemStack const&)> callback,
41 ::std::function<void()> execute
42 );
43 // NOLINTEND
44
45public:
46 // member functions
47 // NOLINTBEGIN
48#ifdef LL_PLAT_C
49 MCAPI bool dropSlot(int slot, bool onlyClearContainer, bool dropAll, ::ContainerID containerId, bool randomly);
50#endif
51
52 MCAPI int getItemCount(::std::function<bool(::ItemStack const&)> comparator);
53
54 MCAPI ::ItemStack const& getSelectedItem() const;
55
56 MCAPI void init(::std::weak_ptr<::HudContainerManagerModel> hud);
57
58 MCAPI bool selectSlot(int slot, ::ContainerID containerId);
59 // NOLINTEND
60
61public:
62 // virtual function thunks
63 // NOLINTBEGIN
64 MCFOLD void $containerSizeChanged(int size);
65
66 MCAPI void $containerContentChanged(int slot);
67
68 MCAPI void $createTransactionContext(
69 ::std::function<void(::Container&, int, ::ItemStack const&, ::ItemStack const&)> callback,
70 ::std::function<void()> execute
71 );
72
73
74 // NOLINTEND
75
76public:
77 // vftables
78 // NOLINTBEGIN
79 MCAPI static void** $vftableForContainerSizeChangeListener();
80
81 MCAPI static void** $vftableForContainerContentChangeListener();
82 // NOLINTEND
83};
Definition ContainerContentChangeListener.h:5
Definition ContainerSizeChangeListener.h:5
Definition Container.h:33
Definition HudContainerManagerModel.h:19
Definition Inventory.h:13
Definition ItemStack.h:26
Definition PlayerInventory.h:18