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 MCAPI_C bool dropSlot(int slot, bool onlyClearContainer, bool dropAll, ::ContainerID containerId, bool randomly);
49
50 MCAPI int getItemCount(::std::function<bool(::ItemStack const&)> comparator);
51
52 MCAPI ::ItemStack const& getSelectedItem() const;
53
54 MCAPI void init(::std::weak_ptr<::HudContainerManagerModel> hud);
55
56 MCAPI bool selectSlot(int slot, ::ContainerID containerId);
57 // NOLINTEND
58
59public:
60 // virtual function thunks
61 // NOLINTBEGIN
62 MCFOLD void $containerSizeChanged(int size);
63
64 MCAPI void $containerContentChanged(int slot);
65
66 MCAPI void $createTransactionContext(
67 ::std::function<void(::Container&, int, ::ItemStack const&, ::ItemStack const&)> callback,
68 ::std::function<void()> execute
69 );
70
71
72 // NOLINTEND
73
74public:
75 // vftables
76 // NOLINTBEGIN
77 MCAPI static void** $vftableForContainerSizeChangeListener();
78
79 MCAPI static void** $vftableForContainerContentChangeListener();
80 // NOLINTEND
81};
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