Skip to content
LeviMC
English
AutoLightDark
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/HandSlot.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;
17class SemVersion;
18namespace cereal { struct ReflectionCtx; }
19// clang-format on
20
21class ThrowableItemComponent : public ::NetworkedItemComponent<::ThrowableItemComponent> {
22public:
23 // member variables
24 // NOLINTBEGIN
25 ::ll::TypedStorage<1, 1, bool> mDoSwing;
26 ::ll::TypedStorage<4, 4, float> mMinDrawDuration;
27 ::ll::TypedStorage<4, 4, float> mDrawDuration;
28 ::ll::TypedStorage<4, 4, float> mLaunchPowerScale;
29 ::ll::TypedStorage<4, 4, float> mMaxLaunchPower;
30 ::ll::TypedStorage<1, 1, bool> mScalePowerByDrawDuration;
31 ::ll::TypedStorage<1, 1, bool> mTriggerActorUseItemEvent;
32 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnUseSubscription;
33 // NOLINTEND
34
35public:
36 // virtual functions
37 // NOLINTBEGIN
38 virtual void handleVersionBasedInitialization(::SemVersion const& originalJsonVersion) /*override*/;
39
40 virtual void _initializeComponent(::ComponentItem& owner) /*override*/;
41 // NOLINTEND
42
43public:
44 // member functions
45 // NOLINTBEGIN
46 MCNAPI void _doThrow(
47 ::ItemStack& item,
48 ::Player& player,
49 ::ProjectileItemComponent const& projectileComponent,
50 float power,
51 ::HandSlot handSlot
52 ) const;
53
54 MCNAPI bool releaseUsing(::ItemStack& item, ::Player* player, int durationLeft, ::HandSlot handSlot) const;
55 // NOLINTEND
56
57public:
58 // static functions
59 // NOLINTBEGIN
60 MCNAPI static void bindType(
62 ::std::vector<::AllExperiments> const& requiredToggles,
63 ::std::optional<::SemVersion> releasedMinFormatVersion
64 );
65 // NOLINTEND
66
67public:
68 // virtual function thunks
69 // NOLINTBEGIN
70 MCNAPI void $handleVersionBasedInitialization(::SemVersion const& originalJsonVersion);
71
73
74
75 // NOLINTEND
76
77public:
78 // vftables
79 // NOLINTBEGIN
80 MCNAPI static void** $vftable();
81 // NOLINTEND
82};
Definition ComponentItem.h:52
Definition ItemStack.h:26
Definition NetworkedItemComponent.h:7
Definition Player.h:131
Definition ProjectileItemComponent.h:24
Definition SemVersion.h:15
Definition ThrowableItemComponent.h:21
MCAPI void $_initializeComponent(::ComponentItem &owner)
MCAPI void _doThrow(::ItemStack &item, ::Player &player, ::ProjectileItemComponent const &projectileComponent, float power, ::HandSlot handSlot) const
static MCAPI void ** $vftable()
static MCAPI void bindType(::cereal::ReflectionCtx &ctx, ::std::vector<::AllExperiments > const &requiredToggles, ::std::optional<::SemVersion > releasedMinFormatVersion)
MCAPI void $handleVersionBasedInitialization(::SemVersion const &originalJsonVersion)
MCAPI bool releaseUsing(::ItemStack &item, ::Player *player, int durationLeft, ::HandSlot handSlot) const
Definition ReflectionCtx.h:11
Definition ctx.h:5