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