LeviLamina
Loading...
Searching...
No Matches
ItemStack.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/inventory/network/ItemStackNetIdVariant.h"
7#include "mc/world/inventory/network/TypedServerNetId.h"
8#include "mc/world/item/ItemStackBase.h"
9
10// auto generated forward declare list
11// clang-format off
12class Actor;
13class Block;
14class BlockPalette;
15class CompoundTag;
16class ILevel;
18class Item;
19class ItemInstance;
21class Vec3;
24// clang-format on
25
26class ItemStack : public ::ItemStackBase {
27public:
28 // member variables
29 // NOLINTBEGIN
30 ::ll::TypedStorage<8, 24, ::ItemStackNetIdVariant> mNetIdVariant;
31 // NOLINTEND
32
33public:
34 // virtual functions
35 // NOLINTBEGIN
36 virtual void reinit(::Block const& block, int count) /*override*/;
37
38 virtual void reinit(::Item const& item, int count, int auxValue) /*override*/;
39
40 virtual void reinit(::std::string_view const name, int count, int auxValue) /*override*/;
41
42 virtual void setNull(::std::optional<::std::string> reason) /*override*/;
43
44 virtual ::std::string toString() const /*override*/;
45
46 virtual ::std::string toDebugString() const /*override*/;
47
48 virtual ~ItemStack() /*override*/;
49 // NOLINTEND
50
51public:
52 // member functions
53 // NOLINTBEGIN
54 MCAPI ItemStack();
55
56 MCAPI ItemStack(::ItemStack const& rhs);
57
58#ifdef LL_PLAT_C
59 MCAPI explicit ItemStack(::ItemInstance const& rhs);
60#endif
61
62 MCAPI ItemStack(::Block const& block, int count, ::CompoundTag const* _userData);
63
64 MCAPI ItemStack(::Item const& item, int count = 1, int auxValue = 0, ::CompoundTag const* _userData = nullptr);
65
66#ifdef LL_PLAT_C
67 MCAPI void clientInitNetId(::ItemStackNetId const& serverNetId);
68#endif
69
70 MCAPI int getMaxUseDuration() const;
71
72 MCAPI ::ItemStack getStrippedNetworkItem() const;
73
74 MCAPI bool matchesNetIdVariant(::ItemStack const& other) const;
75
76 MCAPI ::ItemStack& operator=(::ItemStack const& rhs);
77
78 MCAPI bool sameItemAndAuxAndBlockData(::ItemStack const& otherItemStack) const;
79
80 MCAPI void serverInitNetId();
81
82 MCAPI void useAsFuel();
83
84 MCAPI ::InteractionResult useOn(
85 ::Actor& entity,
86 int x,
87 int y,
88 int z,
89 uchar face,
90 ::Vec3 const& clickPos,
91 ::ItemUsedOnEventContext itemUsedOnEventContext
92 );
93 // NOLINTEND
94
95public:
96 // static functions
97 // NOLINTBEGIN
98 MCAPI static ::ItemStack
99 fromDescriptor(::NetworkItemStackDescriptor const& descriptor, ::BlockPalette& blockPalette, bool isClientSide);
100
101 MCAPI static ::ItemStack fromTag(::CompoundTag const& tag);
102
103 MCAPI static ::ItemStack fromTag(::CompoundTag const& tag, ::ILevel& level);
104 // NOLINTEND
105
106public:
107 // static variables
108 // NOLINTBEGIN
109 MCAPI static ::ItemStack const& EMPTY_ITEM();
110 // NOLINTEND
111
112public:
113 // constructor thunks
114 // NOLINTBEGIN
115 MCAPI void* $ctor();
116
117 MCAPI void* $ctor(::ItemStack const& rhs);
118
119#ifdef LL_PLAT_C
120 MCAPI void* $ctor(::ItemInstance const& rhs);
121#endif
122
123 MCAPI void* $ctor(::Block const& block, int count, ::CompoundTag const* _userData);
124
125 MCAPI void* $ctor(::Item const& item, int count, int auxValue, ::CompoundTag const* _userData);
126 // NOLINTEND
127
128public:
129 // destructor thunk
130 // NOLINTBEGIN
131 MCFOLD void $dtor();
132 // NOLINTEND
133
134public:
135 // virtual function thunks
136 // NOLINTBEGIN
137 MCAPI void $reinit(::Block const& block, int count);
138
139 MCAPI void $reinit(::Item const& item, int count, int auxValue);
140
141 MCAPI void $reinit(::std::string_view const name, int count, int auxValue);
142
143 MCAPI void $setNull(::std::optional<::std::string> reason);
144
145 MCAPI ::std::string $toString() const;
146
147 MCAPI ::std::string $toDebugString() const;
148
149
150 // NOLINTEND
151
152public:
153 // vftables
154 // NOLINTBEGIN
155 MCNAPI static void** $vftable();
156 // NOLINTEND
157};
Definition Actor.h:106
Definition BlockPalette.h:19
Definition Block.h:43
Definition CompoundTag.h:23
Definition ILevel.h:218
Definition InteractionResult.h:5
Definition ItemInstance.h:15
static MCAPI void ** $vftable()
Definition Item.h:68
Definition NetworkItemStackDescriptor.h:17
Definition Vec3.h:10
Definition ItemStackNetIdTag.h:5
Definition ItemUsedOnEventContext.h:8