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