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 selected, bool) 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& userData, ::CompoundTag const*) 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 ::InHandUpdateType _getInHandUpdateType(
89 ::Player const& player,
90 ::ItemStack const& oldItem,
91 ::ItemStack const& newItem,
92 bool slotChanged,
93 bool
94 ) const;
95
96 MCAPI void playBlockSound(::Player* player) const;
97
98 MCAPI void playBreakSound(::Player* player) const;
99 // NOLINTEND
100
101public:
102 // static functions
103 // NOLINTBEGIN
104#ifdef LL_PLAT_C
105 MCAPI static int const getBaseColor(::CompoundTag const* data);
106#endif
107 // NOLINTEND
108
109public:
110 // static variables
111 // NOLINTBEGIN
112 MCAPI static int const& EFFECTIVE_BLOCK_DELAY();
113
114 MCAPI static int const& NO_SHIELD_PATTERN();
115
116 MCAPI static ::std::string const& TIMESTAMP_TAG();
117 // NOLINTEND
118
119public:
120 // virtual function thunks
121 // NOLINTBEGIN
122 MCAPI bool $inventoryTick(::ItemStack& item, ::Level& level, ::Actor& owner, int selected, bool) const;
123
124 MCFOLD int $getEnchantSlot() const;
125
126 MCAPI bool $isValidRepairItem(
127 ::ItemStackBase const& source,
128 ::ItemStackBase const& repairItem,
129 ::BaseGameVersion const& baseGameVersion
130 ) const;
131
132 MCFOLD bool $isHandEquipped() const;
133
134 MCFOLD ::SharedTypes::Legacy::LevelSoundEvent $getEquipSound() const;
135
136 MCFOLD void $hurtActor(::ItemStack& item, ::Actor& actor, ::Mob& attacker) const;
137
138 MCAPI ::InHandUpdateType $getInHandUpdateType(
139 ::Player const& player,
140 ::ItemStack const& oldItem,
141 ::ItemStack const& newItem,
142 bool const isMainHand,
143 bool const slotChanged
144 ) const;
145
146 MCFOLD ::ItemStack& $use(::ItemStack& item, ::Player& player) const;
147
148 MCAPI bool $dispense(::BlockSource& region, ::Container& container, int slot, ::Vec3 const& pos, uchar) const;
149
150 MCAPI void
151 $readUserData(::ItemStackBase& stack, ::IDataInput& input, ::ReadOnlyBinaryStream& underlyingStream) const;
152
153 MCAPI void $writeUserData(::ItemStackBase const& stack, ::IDataOutput& output) const;
154
155 MCAPI ::HashedString const& $getCooldownCategory() const;
156
157 MCFOLD int $getCooldownDuration() const;
158
159 MCAPI ::std::string $buildDescriptionId(::ItemDescriptor const& userData, ::CompoundTag const*) const;
160
161 MCAPI void $appendFormattedHovertext(
162 ::ItemStackBase const& stack,
163 ::Level& level,
165 bool const showCategory
166 ) const;
167
168
169 // NOLINTEND
170
171public:
172 // vftables
173 // NOLINTBEGIN
174 MCAPI static void** $vftable();
175 // NOLINTEND
176};
Definition Actor.h:125
Definition BaseGameVersion.h:13
Definition RedactableString.h:10
Definition BlockSource.h:73
Definition CompoundTag.h:23
Definition Container.h:34
Definition HashedString.h:5
Definition IDataInput.h:8
Definition IDataOutput.h:5
Definition ItemDescriptor.h:25
Definition ItemStackBase.h:52
Definition ItemStack.h:35
Definition Level.h:255
Definition Mob.h:57
Definition Player.h:137
Definition ReadOnlyBinaryStream.h:8
Definition ShieldItem.h:31
Definition Vec3.h:10