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