Skip to content
LeviMC
English
AutoLightDark
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,
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 MCNAPI void playBlockSound(::Player* player) const;
90
91 MCNAPI void playBreakSound(::Player* player) const;
92 // NOLINTEND
93
94public:
95 // static functions
96 // NOLINTBEGIN
97#ifdef LL_PLAT_C
98 MCNAPI static int getBaseColor(::CompoundTag const* data);
99#endif
100 // NOLINTEND
101
102public:
103 // static variables
104 // NOLINTBEGIN
105 MCNAPI static ::std::string const& TIMESTAMP_TAG();
106 // NOLINTEND
107
108public:
109 // virtual function thunks
110 // NOLINTBEGIN
111 MCNAPI bool $inventoryTick(::ItemStack& item, ::Level& level, ::Actor& owner, int, bool selected) const;
112
113 MCNAPI int $getEnchantSlot() const;
114
115 MCAPI bool $isValidRepairItem(
116 ::ItemStackBase const& source,
117 ::ItemStackBase const& repairItem,
118 ::BaseGameVersion const& baseGameVersion
119 ) const;
120
121 MCNAPI bool $isHandEquipped() const;
122
123 MCNAPI ::SharedTypes::Legacy::LevelSoundEvent $getEquipSound() const;
124
125 MCNAPI void $hurtActor(::ItemStack& item, ::Actor& actor, ::Mob& attacker) const;
126
127 MCNAPI ::InHandUpdateType $getInHandUpdateType(
128 ::Player const& player,
129 ::ItemStack const& oldItem,
130 ::ItemStack const& newItem,
131 bool const,
132 bool const slotChanged
133 ) const;
134
135 MCNAPI ::ItemStack& $use(::ItemStack& item, ::Player& player, ::HandSlot handSlot) const;
136
137 MCNAPI bool $dispense(::BlockSource& region, ::Container& container, int slot, ::Vec3 const& pos, uchar) const;
138
139 MCNAPI void
140 $readUserData(::ItemStackBase& stack, ::IDataInput& input, ::ReadOnlyBinaryStream& underlyingStream) const;
141
142 MCNAPI void $writeUserData(::ItemStackBase const& stack, ::IDataOutput& output) const;
143
144 MCNAPI ::HashedString const& $getCooldownCategory() const;
145
146 MCNAPI int $getCooldownDuration() const;
147
148 MCNAPI ::std::string $buildDescriptionId(::ItemDescriptor const&, ::CompoundTag const* userData) const;
149
151 ::ItemStackBase const& stack,
152 ::Level& level,
154 bool const showCategory
155 ) const;
156
157
158 // NOLINTEND
159
160public:
161 // vftables
162 // NOLINTBEGIN
163 MCNAPI static void** $vftable();
164 // NOLINTEND
165};
Definition Actor.h:116
Definition BaseGameVersion.h:8
Definition RedactableString.h:10
Definition BlockSource.h:72
Definition CompoundTag.h:18
Definition Container.h:36
Definition HashedString.h:5
Definition IDataInput.h:8
Definition IDataOutput.h:5
Definition ItemDescriptor.h:24
Definition ItemStackBase.h:45
Definition ItemStack.h:26
Definition Level.h:255
Definition Mob.h:58
Definition Player.h:131
Definition ReadOnlyBinaryStream.h:8
Definition ShieldItem.h:32
MCAPI::SharedTypes::Legacy::LevelSoundEvent $getEquipSound() const
MCAPI void $writeUserData(::ItemStackBase const &stack, ::IDataOutput &output) const
static MCAPI void ** $vftable()
MCAPI::InHandUpdateType $getInHandUpdateType(::Player const &player, ::ItemStack const &oldItem, ::ItemStack const &newItem, bool const, bool const slotChanged) const
MCAPI bool $inventoryTick(::ItemStack &item, ::Level &level, ::Actor &owner, int, bool selected) const
MCAPI int $getCooldownDuration() const
MCAPI int $getEnchantSlot() const
MCAPI::HashedString const & $getCooldownCategory() const
MCAPI bool $dispense(::BlockSource &region, ::Container &container, int slot, ::Vec3 const &pos, uchar) const
MCAPI void $appendFormattedHovertext(::ItemStackBase const &stack, ::Level &level, ::Bedrock::Safety::RedactableString &hovertext, bool const showCategory) const
MCAPI bool $isHandEquipped() const
MCAPI void $hurtActor(::ItemStack &item, ::Actor &actor, ::Mob &attacker) const
static MCAPI ::std::string const & TIMESTAMP_TAG()
MCAPI::std::string $buildDescriptionId(::ItemDescriptor const &, ::CompoundTag const *userData) const
MCAPI void playBlockSound(::Player *player) const
MCAPI::ItemStack & $use(::ItemStack &item, ::Player &player, ::HandSlot handSlot) const
MCAPI void playBreakSound(::Player *player) const
MCAPI void $readUserData(::ItemStackBase &stack, ::IDataInput &input, ::ReadOnlyBinaryStream &underlyingStream) const
Definition Vec3.h:10