LeviLamina
Loading...
Searching...
No Matches
ShieldItem.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/shared_types/legacy/LevelSoundEvent.h"
7#include "mc/world/item/HandSlot.h"
8#include "mc/world/item/InHandUpdateType.h"
9#include "mc/world/item/Item.h"
10
11// auto generated forward declare list
12// clang-format off
13class Actor;
14class BaseGameVersion;
15class BlockSource;
16class CompoundTag;
17class Container;
18class HashedString;
19class IDataInput;
20class IDataOutput;
21class ItemDescriptor;
22class ItemStack;
23class ItemStackBase;
24class Level;
25class Mob;
26class Player;
28class Vec3;
29namespace Bedrock::Safety { class RedactableString; }
30// clang-format on
31
32class ShieldItem : public ::Item {
33public:
34 // virtual functions
35 // NOLINTBEGIN
36 virtual bool inventoryTick(::ItemStack& item, ::Level& level, ::Actor& owner, int, bool selected) const
37 /*override*/;
38
39 virtual int getEnchantSlot() const /*override*/;
40
41 virtual bool isValidRepairItem(
42 ::ItemStackBase const& source,
43 ::ItemStackBase const& repairItem,
44 ::BaseGameVersion const& baseGameVersion
45 ) const /*override*/;
46
47 virtual bool isHandEquipped() const /*override*/;
48
49 virtual ::SharedTypes::Legacy::LevelSoundEvent getEquipSound() const /*override*/;
50
51 virtual void hurtActor(::ItemStack& item, ::Actor& actor, ::Mob& attacker) const /*override*/;
52
53 virtual ::InHandUpdateType getInHandUpdateType(
54 ::Player const& player,
55 ::ItemStack const& oldItem,
56 ::ItemStack const& newItem,
57 bool const isMainHand,
58 bool const slotChanged
59 ) const /*override*/;
60
61 virtual ::ItemStack& use(::ItemStack& item, ::Player& player, ::HandSlot handSlot) const /*override*/;
62
63 virtual bool dispense(::BlockSource& region, ::Container& container, int slot, ::Vec3 const& pos, uchar) const
64 /*override*/;
65
66 virtual void
67 readUserData(::ItemStackBase& stack, ::IDataInput& input, ::ReadOnlyBinaryStream& underlyingStream) const
68 /*override*/;
69
70 virtual void writeUserData(::ItemStackBase const& stack, ::IDataOutput& output) const /*override*/;
71
72 virtual ::HashedString const& getCooldownCategory() const /*override*/;
73
74 virtual int getCooldownDuration() const /*override*/;
75
76 virtual ::std::string buildDescriptionId(::ItemDescriptor const&, ::CompoundTag const* userData) const /*override*/;
77
78 virtual void appendFormattedHovertext(
79 ::ItemStackBase const& stack,
80 ::Level& level,
82 bool const showCategory
83 ) const /*override*/;
84 // NOLINTEND
85
86public:
87 // member functions
88 // NOLINTBEGIN
89 MCAPI void playBlockSound(::Player* player) const;
90
91 MCAPI void playBreakSound(::Player* player) const;
92 // NOLINTEND
93
94public:
95 // static functions
96 // NOLINTBEGIN
97#ifdef LL_PLAT_C
98 MCAPI static int const getBaseColor(::CompoundTag const* data);
99#endif
100 // NOLINTEND
101
102public:
103 // static variables
104 // NOLINTBEGIN
105 MCAPI static ::std::string const& TIMESTAMP_TAG();
106 // NOLINTEND
107
108public:
109 // virtual function thunks
110 // NOLINTBEGIN
111 MCAPI bool $inventoryTick(::ItemStack& item, ::Level& level, ::Actor& owner, int, bool selected) const;
112
113#ifdef LL_PLAT_S
114 MCAPI int $getEnchantSlot() const;
115#else // LL_PLAT_C
116 MCFOLD int $getEnchantSlot() const;
117#endif
118
119 MCAPI bool $isValidRepairItem(
120 ::ItemStackBase const& source,
121 ::ItemStackBase const& repairItem,
122 ::BaseGameVersion const& baseGameVersion
123 ) const;
124
125 MCFOLD bool $isHandEquipped() const;
126
127 MCFOLD ::SharedTypes::Legacy::LevelSoundEvent $getEquipSound() const;
128
129 MCFOLD void $hurtActor(::ItemStack& item, ::Actor& actor, ::Mob& attacker) const;
130
131 MCAPI ::InHandUpdateType $getInHandUpdateType(
132 ::Player const& player,
133 ::ItemStack const& oldItem,
134 ::ItemStack const& newItem,
135 bool const isMainHand,
136 bool const slotChanged
137 ) const;
138
139 MCFOLD ::ItemStack& $use(::ItemStack& item, ::Player& player, ::HandSlot handSlot) const;
140
141 MCAPI bool $dispense(::BlockSource& region, ::Container& container, int slot, ::Vec3 const& pos, uchar) const;
142
143 MCAPI void
144 $readUserData(::ItemStackBase& stack, ::IDataInput& input, ::ReadOnlyBinaryStream& underlyingStream) const;
145
146 MCAPI void $writeUserData(::ItemStackBase const& stack, ::IDataOutput& output) const;
147
148 MCAPI ::HashedString const& $getCooldownCategory() const;
149
150 MCFOLD int $getCooldownDuration() const;
151
152 MCAPI ::std::string $buildDescriptionId(::ItemDescriptor const&, ::CompoundTag const* userData) const;
153
154 MCAPI void $appendFormattedHovertext(
155 ::ItemStackBase const& stack,
156 ::Level& level,
158 bool const showCategory
159 ) const;
160
161
162 // NOLINTEND
163
164public:
165 // vftables
166 // NOLINTBEGIN
167 MCAPI static void** $vftable();
168 // NOLINTEND
169};
Definition Actor.h:113
Definition BaseGameVersion.h:8
Definition RedactableString.h:10
Definition BlockSource.h:71
Definition CompoundTag.h:18
Definition Container.h:35
Definition HashedString.h:5
Definition IDataInput.h:8
Definition IDataOutput.h:5
Definition ItemDescriptor.h:25
Definition ItemStackBase.h:44
Definition ItemStack.h:26
Definition Level.h:254
Definition Mob.h:56
Definition Player.h:129
Definition ReadOnlyBinaryStream.h:8
Definition ShieldItem.h:32
Definition Vec3.h:10