LeviLamina
Loading...
Searching...
No Matches
ShooterItemComponent.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/world/item/ItemDescriptor.h"
8#include "mc/world/item/components/NetworkedItemComponent.h"
9#include "mc/world/level/storage/AllExperiments.h"
10
11// auto generated forward declare list
12// clang-format off
13class ComponentItem;
14class HashedString;
15class ItemStack;
16class Player;
17class SemVersion;
18namespace Bedrock::PubSub { class Subscription; }
19namespace SharedTypes::v1_20_50 { struct ShooterItemComponent; }
20namespace cereal { struct ReflectionCtx; }
21// clang-format on
22
23class ShooterItemComponent : public ::NetworkedItemComponent<::ShooterItemComponent> {
24public:
25 // ShooterItemComponent inner types declare
26 // clang-format off
27 class DrawDuration;
29 // clang-format on
30
31 // ShooterItemComponent inner types define
33 public:
34 // member variables
35 // NOLINTBEGIN
36 ::ll::TypedStorage<4, 4, float> mDuration;
37 // NOLINTEND
38 };
39
40 struct ShooterAmmunitionEntry {
41 public:
42 // member variables
43 // NOLINTBEGIN
44 ::ll::TypedStorage<8, 16, ::ItemDescriptor> itemDesc;
45 ::ll::TypedStorage<1, 1, bool> useOffhand;
46 ::ll::TypedStorage<1, 1, bool> searchInventory;
47 ::ll::TypedStorage<1, 1, bool> useInCreative;
48 // NOLINTEND
49
50 public:
51 // prevent constructor by default
52 ShooterAmmunitionEntry();
53
54 public:
55 // member functions
56 // NOLINTBEGIN
57 MCAPI ShooterAmmunitionEntry(::ShooterItemComponent::ShooterAmmunitionEntry const&);
58
59 MCFOLD ::ShooterItemComponent::ShooterAmmunitionEntry&
61
62 MCAPI ~ShooterAmmunitionEntry();
63 // NOLINTEND
64
65 public:
66 // constructor thunks
67 // NOLINTBEGIN
68 MCFOLD void* $ctor(::ShooterItemComponent::ShooterAmmunitionEntry const&);
69 // NOLINTEND
70
71 public:
72 // destructor thunk
73 // NOLINTBEGIN
74 MCFOLD void $dtor();
75 // NOLINTEND
76 };
77
78public:
79 // member variables
80 // NOLINTBEGIN
81 ::ll::TypedStorage<8, 24, ::std::vector<::ShooterItemComponent::ShooterAmmunitionEntry>> mAmmunition;
82 ::ll::TypedStorage<4, 4, ::ShooterItemComponent::DrawDuration> mDrawDuration;
83 ::ll::TypedStorage<1, 1, bool> mScalePowerByDrawDuration;
84 ::ll::TypedStorage<1, 1, bool> mChargeOnDraw;
85 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnUseTimeDepletedSubscription;
86 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnUseSubscription;
87 // NOLINTEND
88
89public:
90 // prevent constructor by default
91 ShooterItemComponent();
92
93public:
94 // virtual functions
95 // NOLINTBEGIN
96 virtual ~ShooterItemComponent() /*override*/ = default;
97
98 virtual void _initializeComponent(::ComponentItem& owner) /*override*/;
99
100 virtual bool checkComponentDataForContentErrors() const /*override*/;
101 // NOLINTEND
102
103public:
104 // member functions
105 // NOLINTBEGIN
106 MCAPI explicit ShooterItemComponent(::SharedTypes::v1_20_50::ShooterItemComponent const& component);
107
108 MCAPI void _consumeAmmunition(
109 ::Player* player,
110 ::ItemStack const& ammunition,
111 int slotIndex,
112 bool infiniteAmmo,
113 bool fromOffhand
114 ) const;
115
116 MCAPI int _getAmmunition(::Player const* player, bool, ::ItemStack& ammo, bool& fromOffhand) const;
117
118 MCAPI void _shootProjectiles(::ItemStack& shooterStack, ::Player* player, int durationLeft) const;
119
120 MCAPI bool releaseUsing(::ItemStack& item, ::Player* player, int durationLeft) const;
121
122 MCAPI void use(bool& result, ::ItemStack& instance, ::Player& player) const;
123 // NOLINTEND
124
125public:
126 // static functions
127 // NOLINTBEGIN
128 MCAPI static void bindType(
129 ::cereal::ReflectionCtx& ctx,
130 ::std::vector<::AllExperiments> const& requiredToggles,
131 ::std::optional<::SemVersion> releasedMinFormatVersion
132 );
133
134 MCAPI static ::HashedString const& getIdentifier();
135 // NOLINTEND
136
137public:
138 // constructor thunks
139 // NOLINTBEGIN
140 MCAPI void* $ctor(::SharedTypes::v1_20_50::ShooterItemComponent const& component);
141 // NOLINTEND
142
143public:
144 // virtual function thunks
145 // NOLINTBEGIN
146 MCAPI void $_initializeComponent(::ComponentItem& owner);
147
148 MCAPI bool $checkComponentDataForContentErrors() const;
149
150
151 // NOLINTEND
152
153public:
154 // vftables
155 // NOLINTBEGIN
156 MCNAPI static void** $vftable();
157 // NOLINTEND
158};
Definition Subscription.h:10
Definition ComponentItem.h:55
Definition HashedString.h:5
Definition ItemStack.h:26
Definition NetworkedItemComponent.h:7
Definition Player.h:125
Definition SemVersion.h:15
Definition ShooterItemComponent.h:32
static MCAPI void ** $vftable()
STL namespace.
Definition ShooterItemComponent.h:15
Definition ShooterItemComponent.h:40
Definition ReflectionCtx.h:11
Definition ctx.h:5