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/item/ItemStackBase.h"
8
9// auto generated forward declare list
10// clang-format off
11class Actor;
12class BlockLegacy;
13class BlockPalette;
14class CompoundTag;
15class ILevel;
17class Item;
18class ItemInstance;
19class Mob;
21class 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 matchesNetIdVariant(::ItemStack const& other) const;
79
80 MCAPI ::ItemStack& operator=(::ItemStack const& rhs);
81
82 MCAPI void playSoundIncrementally(::Mob& mob) const;
83
84 MCAPI bool sameItemAndAuxAndBlockData(::ItemStack const& otherItemStack) const;
85
86 MCAPI void serverInitNetId();
87
88 MCAPI void useAsFuel();
89
90 MCAPI ::InteractionResult useOn(
91 ::Actor& entity,
92 int x,
93 int y,
94 int z,
95 uchar face,
96 ::Vec3 const& clickPos,
97 ::ItemUsedOnEventContext itemUsedOnEventContext
98 );
99 // NOLINTEND
100
101public:
102 // static functions
103 // NOLINTBEGIN
104 MCAPI static ::ItemStack
105 fromDescriptor(::NetworkItemStackDescriptor const& descriptor, ::BlockPalette& blockPalette, bool isClientSide);
106
107 MCAPI static ::ItemStack fromTag(::CompoundTag const& tag);
108
109 MCAPI static ::ItemStack fromTag(::CompoundTag const& tag, ::ILevel& level);
110 // NOLINTEND
111
112public:
113 // static variables
114 // NOLINTBEGIN
115 MCAPI static ::ItemStack const& EMPTY_ITEM();
116 // NOLINTEND
117
118public:
119 // constructor thunks
120 // NOLINTBEGIN
121 MCAPI void* $ctor();
122
123 MCAPI void* $ctor(::ItemStack const& rhs);
124
125 MCAPI void* $ctor(::ItemInstance const& rhs);
126
127 MCAPI void* $ctor(::BlockLegacy const& block, int count);
128
129 MCAPI void* $ctor(::Item const& item, int count, int auxValue, ::CompoundTag const* _userData);
130
131 MCAPI void* $ctor(::std::string_view name, int count, int auxValue, ::CompoundTag const* _userData);
132 // NOLINTEND
133
134public:
135 // destructor thunk
136 // NOLINTBEGIN
137 MCFOLD void $dtor();
138 // NOLINTEND
139
140public:
141 // virtual function thunks
142 // NOLINTBEGIN
143 MCAPI void $reinit(::BlockLegacy const& block, int count);
144
145 MCAPI void $reinit(::Item const& item, int count, int auxValue);
146
147 MCAPI void $reinit(::std::string_view const name, int count, int auxValue);
148
149 MCAPI void $setNull(::std::optional<::std::string> reason);
150
151 MCAPI ::std::string $toString() const;
152
153 MCAPI ::std::string $toDebugString() const;
154 // NOLINTEND
155
156public:
157 // vftables
158 // NOLINTBEGIN
159 MCNAPI static void** $vftable();
160 // NOLINTEND
161};
Definition Actor.h:103
Definition BlockLegacy.h:86
Definition BlockPalette.h:18
Definition CompoundTag.h:13
Definition ILevel.h:204
Definition InteractionResult.h:5
Definition ItemInstance.h:16
Definition ItemStackBase.h:35
Definition ItemStack.h:25
static MCAPI void ** $vftable()
Definition Item.h:65
Definition Mob.h:47
Definition NetworkItemStackDescriptor.h:18
Definition Vec3.h:10
Definition ItemUsedOnEventContext.h:8