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/HandSlot.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 BlockPos;
16class CompoundTag;
17class ILevel;
19class Item;
21class Vec3;
22struct Brightness;
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 MCAPI ::ItemStack clone() const;
59
60#ifdef LL_PLAT_S
61 MCAPI float getDestroySpeed(::Block const& block) const;
62#endif
63
64#ifdef LL_PLAT_C
65 MCAPI ::Brightness getLightEmission() const;
66#endif
67
68 MCAPI ::ItemStack getStrippedNetworkItem() const;
69
70 MCAPI bool matchesNetIdVariant(::ItemStack const& other) const;
71
72 MCAPI ::ItemStack& operator=(::ItemStack const& rhs);
73
74 MCAPI bool sameItemAndAuxAndBlockData(::ItemStack const& otherItemStack) const;
75
76 MCAPI void serverInitNetId();
77
78 MCAPI void useAsFuel();
79
80 MCAPI ::InteractionResult useOn(
81 ::Actor& entity,
82 ::BlockPos const& pos,
83 uchar face,
84 ::HandSlot handSlot,
85 ::Vec3 const& clickPos,
86 ::ItemUsedOnEventContext itemUsedOnEventContext
87 );
88 // NOLINTEND
89
90public:
91 // static functions
92 // NOLINTBEGIN
93 MCAPI static ::ItemStack
94 fromDescriptor(::NetworkItemStackDescriptor const& descriptor, ::BlockPalette& blockPalette, bool isClientSide);
95
96 MCAPI static ::ItemStack fromTag(::CompoundTag const& tag);
97
98 MCAPI static ::ItemStack fromTag(::CompoundTag const& tag, ::ILevel& level);
99 // NOLINTEND
100
101public:
102 // static variables
103 // NOLINTBEGIN
104 MCAPI static ::ItemStack const& EMPTY_ITEM();
105 // NOLINTEND
106
107public:
108 // constructor thunks
109 // NOLINTBEGIN
110 MCAPI void* $ctor();
111
112 MCAPI void* $ctor(::ItemStack const& rhs);
113 // NOLINTEND
114
115public:
116 // destructor thunk
117 // NOLINTBEGIN
118 MCFOLD void $dtor();
119 // NOLINTEND
120
121public:
122 // virtual function thunks
123 // NOLINTBEGIN
124 MCAPI void $reinit(::Block const& block, int count);
125
126 MCAPI void $reinit(::Item const& item, int count, int auxValue);
127
128 MCAPI void $reinit(::std::string_view const name, int count, int auxValue);
129
130 MCAPI void $setNull(::std::optional<::std::string> reason);
131
132 MCAPI ::std::string $toString() const;
133
134 MCAPI ::std::string $toDebugString() const;
135
136
137 // NOLINTEND
138
139public:
140 // vftables
141 // NOLINTBEGIN
142 MCAPI static void** $vftable();
143 // NOLINTEND
144};
Definition Actor.h:113
Definition BlockPalette.h:18
Definition BlockPos.h:17
Definition Block.h:41
Definition CompoundTag.h:18
Definition ILevel.h:221
Definition InteractionResult.h:5
Definition Item.h:71
Definition NetworkItemStackDescriptor.h:16
Definition Vec3.h:10
Definition Brightness.h:8
Definition ItemUsedOnEventContext.h:8