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 public:
40 // member functions
41 // NOLINTBEGIN
42 MCFOLD void setValue(float duration);
43 // NOLINTEND
44 };
45
47 public:
48 // member variables
49 // NOLINTBEGIN
50 ::ll::TypedStorage<8, 16, ::ItemDescriptor> itemDesc;
51 ::ll::TypedStorage<1, 1, bool> useOffhand;
52 ::ll::TypedStorage<1, 1, bool> searchInventory;
53 ::ll::TypedStorage<1, 1, bool> useInCreative;
54 // NOLINTEND
55 };
56
57public:
58 // member variables
59 // NOLINTBEGIN
60 ::ll::TypedStorage<8, 24, ::std::vector<::ShooterItemComponent::ShooterAmmunitionEntry>> mAmmunition;
61 ::ll::TypedStorage<4, 4, ::ShooterItemComponent::DrawDuration> mDrawDuration;
62 ::ll::TypedStorage<1, 1, bool> mScalePowerByDrawDuration;
63 ::ll::TypedStorage<1, 1, bool> mChargeOnDraw;
64 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnUseTimeDepletedSubscription;
65 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnUseSubscription;
66 // NOLINTEND
67
68public:
69 // virtual functions
70 // NOLINTBEGIN
71 virtual ~ShooterItemComponent() /*override*/;
72
73 virtual void _initializeComponent(::ComponentItem& owner) /*override*/;
74
75 virtual bool checkComponentDataForContentErrors() const /*override*/;
76 // NOLINTEND
77
78public:
79 // member functions
80 // NOLINTBEGIN
81 MCAPI ShooterItemComponent();
82
83 MCAPI explicit ShooterItemComponent(::SharedTypes::v1_20_50::ShooterItemComponent const& component);
84
85 MCAPI void _consumeAmmunition(
86 ::Player* player,
87 ::ItemStack const& ammunition,
88 int slotIndex,
89 bool infiniteAmmo,
90 bool fromOffhand
91 ) const;
92
93 MCAPI int _getAmmunition(::Player const* player, bool ammo, ::ItemStack& fromOffhand, bool&) const;
94
95 MCAPI void _shootProjectiles(::ItemStack& shooterStack, ::Player* player, int durationLeft) const;
96
97 MCAPI bool releaseUsing(::ItemStack& item, ::Player* player, int durationLeft) const;
98
99 MCAPI void use(bool& result, ::ItemStack& instance, ::Player& player) const;
100 // NOLINTEND
101
102public:
103 // static functions
104 // NOLINTBEGIN
105 MCAPI static void bindType(
106 ::cereal::ReflectionCtx& ctx,
107 ::std::vector<::AllExperiments> const& requiredToggles,
108 ::std::optional<::SemVersion> releasedMinFormatVersion
109 );
110
111 MCAPI static ::HashedString const& getIdentifier();
112 // NOLINTEND
113
114public:
115 // constructor thunks
116 // NOLINTBEGIN
117 MCAPI void* $ctor();
118
119 MCAPI void* $ctor(::SharedTypes::v1_20_50::ShooterItemComponent const& component);
120 // NOLINTEND
121
122public:
123 // destructor thunk
124 // NOLINTBEGIN
125 MCAPI void $dtor();
126 // NOLINTEND
127
128public:
129 // virtual function thunks
130 // NOLINTBEGIN
131 MCAPI void $_initializeComponent(::ComponentItem& owner);
132
133 MCAPI bool $checkComponentDataForContentErrors() const;
134
135
136 // NOLINTEND
137
138public:
139 // vftables
140 // NOLINTBEGIN
141 MCNAPI static void** $vftable();
142 // NOLINTEND
143};
Definition Subscription.h:10
Definition ComponentItem.h:55
Definition HashedString.h:5
Definition ItemStack.h:35
Definition NetworkedItemComponent.h:7
Definition Player.h:136
Definition SemVersion.h:15
Definition ShooterItemComponent.h:32
static MCAPI void ** $vftable()
STL namespace.
Definition ShooterItemComponent.h:15
Definition ShooterItemComponent.h:46
Definition ReflectionCtx.h:11
Definition ctx.h:5