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