LeviLamina
Loading...
Searching...
No Matches
WearableItemComponent.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/pub_sub/Subscription.h"
7#include "mc/deps/shared_types/legacy/EquipmentSlot.h"
8#include "mc/deps/shared_types/legacy/actor/ActorLocation.h"
9#include "mc/world/item/components/NetworkedItemComponent.h"
10#include "mc/world/level/storage/AllExperiments.h"
11
12// auto generated forward declare list
13// clang-format off
14class BlockSource;
16class ComponentItem;
17class Container;
18class HashedString;
19class ItemStack;
20class Player;
21class SemVersion;
22class Vec3;
23namespace SharedTypes::v1_21_90 { struct WearableItemComponent; }
24namespace cereal { struct ReflectionCtx; }
25// clang-format on
26
27class WearableItemComponent : public ::NetworkedItemComponent<::WearableItemComponent> {
28public:
29 // member variables
30 // NOLINTBEGIN
31 ::ll::TypedStorage<4, 4, ::SharedTypes::Legacy::EquipmentSlot> mEquipmentSlot;
32 ::ll::TypedStorage<4, 4, int> mProtection;
33 ::ll::TypedStorage<1, 1, bool> mHidesPlayerLocation;
34 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnUseSubscription;
35 // NOLINTEND
36
37public:
38 // prevent constructor by default
39 WearableItemComponent();
40
41public:
42 // virtual functions
43 // NOLINTBEGIN
44 virtual void _initializeComponent(::ComponentItem& owner) /*override*/;
45 // NOLINTEND
46
47public:
48 // member functions
49 // NOLINTBEGIN
50 MCAPI explicit WearableItemComponent(::SharedTypes::v1_21_90::WearableItemComponent component);
51
52 MCAPI WearableItemComponent(::SharedTypes::Legacy::EquipmentSlot slot, int protection, bool hidesPlayerLocation);
53
54 MCAPI bool dispense(::BlockSource& region, ::Container& container, int slot, ::Vec3 const& pos) const;
55
56 MCFOLD int getArmorValue() const;
57
58 MCAPI ::SharedTypes::Legacy::ActorLocation getEquipLocation() const;
59
60 MCFOLD ::SharedTypes::Legacy::EquipmentSlot getSlot() const;
61
62 MCFOLD bool hidesPlayerLocation() const;
63
64 MCAPI bool isHumanoidArmor() const;
65
66 MCAPI bool shouldAllowStacking() const;
67
68 MCAPI bool shouldForceAllowOffHand() const;
69
70 MCAPI void use(bool& result, ::ItemStack& instance, ::Player& player) const;
71 // NOLINTEND
72
73public:
74 // static functions
75 // NOLINTBEGIN
76 MCAPI static void bindType(
78 ::std::vector<::AllExperiments> const& requiredToggles,
79 ::std::optional<::SemVersion> releasedMinFormatVersion
80 );
81
82 MCAPI static ::HashedString const& getIdentifier();
83
84 MCAPI static void registerVersionUpgrades(::CerealSchemaUpgradeSet& schemaUpgrades);
85 // NOLINTEND
86
87public:
88 // constructor thunks
89 // NOLINTBEGIN
90 MCAPI void* $ctor(::SharedTypes::v1_21_90::WearableItemComponent component);
91
92 MCAPI void* $ctor(::SharedTypes::Legacy::EquipmentSlot slot, int protection, bool hidesPlayerLocation);
93 // NOLINTEND
94
95public:
96 // virtual function thunks
97 // NOLINTBEGIN
98 MCAPI void $_initializeComponent(::ComponentItem& owner);
99
100
101 // NOLINTEND
102
103public:
104 // vftables
105 // NOLINTBEGIN
106 MCNAPI static void** $vftable();
107 // NOLINTEND
108};
Definition BlockSource.h:73
Definition CerealSchemaUpgradeSet.h:10
Definition ComponentItem.h:55
Definition Container.h:34
Definition HashedString.h:5
Definition ItemStack.h:35
Definition NetworkedItemComponent.h:7
Definition Player.h:137
Definition SemVersion.h:15
Definition Vec3.h:10
static MCAPI void ** $vftable()
Definition WearableItemComponent.h:15
Definition ReflectionCtx.h:11
Definition ctx.h:5