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