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