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