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
84 virtual ~ShieldItem() /*override*/ = default;
85 // NOLINTEND
86
87public:
88 // static functions
89 // NOLINTBEGIN
90#ifdef LL_PLAT_C
91 MCAPI static int const getBaseColor(::CompoundTag const* data);
92#endif
93 // NOLINTEND
94
95public:
96 // static variables
97 // NOLINTBEGIN
98 MCAPI static ::std::string const& TIMESTAMP_TAG();
99 // NOLINTEND
100
101public:
102 // virtual function thunks
103 // NOLINTBEGIN
104 MCAPI bool $inventoryTick(::ItemStack& item, ::Level& level, ::Actor& owner, int, bool selected) const;
105
106 MCAPI int $getEnchantSlot() const;
107
108 MCAPI bool $isValidRepairItem(
109 ::ItemStackBase const& source,
110 ::ItemStackBase const& repairItem,
111 ::BaseGameVersion const& baseGameVersion
112 ) const;
113
114 MCFOLD bool $isHandEquipped() const;
115
116 MCFOLD ::SharedTypes::Legacy::LevelSoundEvent $getEquipSound() const;
117
118 MCFOLD void $hurtActor(::ItemStack& item, ::Actor& actor, ::Mob& attacker) const;
119
120 MCAPI ::InHandUpdateType $getInHandUpdateType(
121 ::Player const& player,
122 ::ItemStack const& oldItem,
123 ::ItemStack const& newItem,
124 bool const isMainHand,
125 bool const slotChanged
126 ) const;
127
128 MCFOLD ::ItemStack& $use(::ItemStack& item, ::Player& player) const;
129
130 MCAPI bool $dispense(::BlockSource& region, ::Container& container, int slot, ::Vec3 const& pos, uchar) const;
131
132 MCAPI void
133 $readUserData(::ItemStackBase& stack, ::IDataInput& input, ::ReadOnlyBinaryStream& underlyingStream) const;
134
135 MCAPI void $writeUserData(::ItemStackBase const& stack, ::IDataOutput& output) const;
136
137 MCAPI ::HashedString const& $getCooldownCategory() const;
138
139 MCFOLD int $getCooldownDuration() const;
140
141 MCAPI ::std::string $buildDescriptionId(::ItemDescriptor const&, ::CompoundTag const* userData) const;
142
143 MCAPI void $appendFormattedHovertext(
144 ::ItemStackBase const& stack,
145 ::Level& level,
147 bool const showCategory
148 ) const;
149
150
151 // NOLINTEND
152
153public:
154 // vftables
155 // NOLINTBEGIN
156 MCAPI static void** $vftable();
157 // NOLINTEND
158};
Definition Actor.h:106
Definition BaseGameVersion.h:8
Definition RedactableString.h:10
Definition BlockSource.h:71
Definition CompoundTag.h:23
Definition Container.h:33
Definition HashedString.h:5
Definition IDataInput.h:8
Definition IDataOutput.h:5
Definition ItemDescriptor.h:24
Definition ItemStackBase.h:44
Definition ItemStack.h:26
Definition Level.h:250
Definition Mob.h:51
Definition Player.h:129
Definition ReadOnlyBinaryStream.h:8
Definition ShieldItem.h:31
Definition Vec3.h:10