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