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/inventory/network/TypedServerNetId.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 CompoundTag;
16class ILevel;
18class Item;
19class ItemInstance;
21class Vec3;
24// clang-format on
25
26class ItemStack : public ::ItemStackBase {
27public:
28 // member variables
29 // NOLINTBEGIN
30 ::ll::TypedStorage<4, 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(::Block const& block, int count, ::CompoundTag const* _userData);
59
60 MCAPI ItemStack(::Item const& item, int count = 1, int auxValue = 0, ::CompoundTag const* _userData = nullptr);
61
62 MCAPI_C void clientInitNetId(::ItemStackNetId const& serverNetId);
63
64 MCAPI int getMaxUseDuration() const;
65
66 MCAPI ::ItemStack getStrippedNetworkItem() const;
67
68 MCAPI bool matchesNetIdVariant(::ItemStack const& other) const;
69
70 MCAPI ::ItemStack& operator=(::ItemStack const& rhs);
71
72 MCAPI bool sameItemAndAuxAndBlockData(::ItemStack const& otherItemStack) const;
73
74 MCAPI void serverInitNetId();
75
76 MCAPI void useAsFuel();
77
78 MCAPI ::InteractionResult useOn(
79 ::Actor& entity,
80 int x,
81 int y,
82 int z,
83 uchar face,
84 ::Vec3 const& clickPos,
85 ::ItemUsedOnEventContext itemUsedOnEventContext
86 );
87 // NOLINTEND
88
89public:
90 // static functions
91 // NOLINTBEGIN
92 MCAPI static ::ItemStack
93 fromDescriptor(::NetworkItemStackDescriptor const& descriptor, ::BlockPalette& blockPalette, bool isClientSide);
94
95 MCAPI static ::ItemStack fromTag(::CompoundTag const& tag);
96
97 MCAPI static ::ItemStack fromTag(::CompoundTag const& tag, ::ILevel& level);
98 // NOLINTEND
99
100public:
101 // static variables
102 // NOLINTBEGIN
103 MCAPI static ::ItemStack const& EMPTY_ITEM();
104 // NOLINTEND
105
106public:
107 // constructor thunks
108 // NOLINTBEGIN
109 MCAPI void* $ctor();
110
111 MCAPI void* $ctor(::ItemStack const& rhs);
112
113 MCAPI_C void* $ctor(::ItemInstance const& rhs);
114
115 MCAPI void* $ctor(::Block const& block, int count, ::CompoundTag const* _userData);
116
117 MCAPI void* $ctor(::Item const& item, int count, int auxValue, ::CompoundTag const* _userData);
118 // NOLINTEND
119
120public:
121 // destructor thunk
122 // NOLINTBEGIN
123 MCFOLD void $dtor();
124 // NOLINTEND
125
126public:
127 // virtual function thunks
128 // NOLINTBEGIN
129 MCAPI void $reinit(::Block const& block, int count);
130
131 MCAPI void $reinit(::Item const& item, int count, int auxValue);
132
133 MCAPI void $reinit(::std::string_view const name, int count, int auxValue);
134
135 MCAPI void $setNull(::std::optional<::std::string> reason);
136
137 MCAPI ::std::string $toString() const;
138
139 MCAPI ::std::string $toDebugString() const;
140
141
142 // NOLINTEND
143
144public:
145 // vftables
146 // NOLINTBEGIN
147 MCNAPI static void** $vftable();
148 // NOLINTEND
149};
Definition Actor.h:105
Definition BlockPalette.h:19
Definition Block.h:43
Definition CompoundTag.h:23
Definition ILevel.h:214
Definition InteractionResult.h:5
Definition ItemInstance.h:15
static MCAPI void ** $vftable()
Definition Item.h:69
Definition NetworkItemStackDescriptor.h:17
Definition Vec3.h:10
Definition ItemStackNetIdTag.h:5
Definition ItemUsedOnEventContext.h:8