LeviLamina
Loading...
Searching...
No Matches
ThrowableItemComponent.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 ComponentItem;
13class HashedString;
14class ItemStack;
15class Player;
17class SemVersion;
18namespace SharedTypes::v1_20_50 { struct ThrowableItemComponent; }
19namespace cereal { struct ReflectionCtx; }
20// clang-format on
21
22class ThrowableItemComponent : public ::NetworkedItemComponent<::ThrowableItemComponent> {
23public:
24 // member variables
25 // NOLINTBEGIN
26 ::ll::TypedStorage<1, 1, bool> mDoSwing;
27 ::ll::TypedStorage<4, 4, float> mMinDrawDuration;
28 ::ll::TypedStorage<4, 4, float> mDrawDuration;
29 ::ll::TypedStorage<4, 4, float> mLaunchPowerScale;
30 ::ll::TypedStorage<4, 4, float> mMaxLaunchPower;
31 ::ll::TypedStorage<1, 1, bool> mScalePowerByDrawDuration;
32 ::ll::TypedStorage<1, 1, bool> mTriggerActorUseItemEvent;
33 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnUseSubscription;
34 // NOLINTEND
35
36public:
37 // prevent constructor by default
38 ThrowableItemComponent();
39
40public:
41 // virtual functions
42 // NOLINTBEGIN
43 virtual void handleVersionBasedInitialization(::SemVersion const& originalJsonVersion) /*override*/;
44
45 virtual void _initializeComponent(::ComponentItem& owner) /*override*/;
46 // NOLINTEND
47
48public:
49 // member functions
50 // NOLINTBEGIN
51 MCAPI explicit ThrowableItemComponent(::SharedTypes::v1_20_50::ThrowableItemComponent component);
52
53 MCAPI explicit ThrowableItemComponent(bool doSwing);
54
55 MCAPI void _doThrow(
56 ::ItemStack& item,
57 ::Player& player,
58 ::ProjectileItemComponent const& projectileComponent,
59 float power
60 ) const;
61
62 MCAPI bool releaseUsing(::ItemStack& item, ::Player* player, int durationLeft) const;
63
64 MCAPI void use(bool& result, ::ItemStack& item, ::Player& player) const;
65 // NOLINTEND
66
67public:
68 // static functions
69 // NOLINTBEGIN
70 MCAPI static void bindType(
72 ::std::vector<::AllExperiments> const& requiredToggles,
73 ::std::optional<::SemVersion> releasedMinFormatVersion
74 );
75
76 MCAPI static ::HashedString const& getIdentifier();
77 // NOLINTEND
78
79public:
80 // constructor thunks
81 // NOLINTBEGIN
82 MCAPI void* $ctor(::SharedTypes::v1_20_50::ThrowableItemComponent component);
83
84 MCAPI void* $ctor(bool doSwing);
85 // NOLINTEND
86
87public:
88 // virtual function thunks
89 // NOLINTBEGIN
90 MCAPI void $handleVersionBasedInitialization(::SemVersion const& originalJsonVersion);
91
92 MCAPI void $_initializeComponent(::ComponentItem& owner);
93
94
95 // NOLINTEND
96
97public:
98 // vftables
99 // NOLINTBEGIN
100 MCNAPI static void** $vftable();
101 // NOLINTEND
102};
Definition ComponentItem.h:55
Definition HashedString.h:5
Definition ItemStack.h:35
Definition NetworkedItemComponent.h:7
Definition Player.h:136
Definition ProjectileItemComponent.h:26
Definition SemVersion.h:15
static MCAPI void ** $vftable()
Definition ThrowableItemComponent.h:12
Definition ReflectionCtx.h:11
Definition ctx.h:5