LeviLamina
Loading...
Searching...
No Matches
PlanterItemComponent.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/BlockLegacyPtr.h"
8#include "mc/world/item/components/NetworkedItemComponent.h"
9
10// auto generated forward declare list
11// clang-format off
12class Actor;
13class Block;
14class BlockDescriptor;
15class BlockPos;
16class CompoundTag;
17class HashedString;
18class ItemStack;
19class ItemStackBase;
20class SemVersion;
21class Vec3;
22namespace SharedTypes::v1_21_40 { struct PlanterItemComponent; }
23namespace cereal { struct ReflectionCtx; }
24// clang-format on
25
26class PlanterItemComponent : public ::NetworkedItemComponent<::PlanterItemComponent> {
27public:
28 // member variables
29 // NOLINTBEGIN
30 ::ll::TypedStorage<8, 8, ::BlockLegacyPtr> mBlock;
31 ::ll::TypedStorage<8, 24, ::std::vector<::BlockDescriptor>> mAllowedUseBlocks;
32 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnUseOnSubscription;
33 ::ll::TypedStorage<1, 1, bool> mCanUseBlockAsIcon;
34 ::ll::TypedStorage<1, 1, bool> mReplaceBlockItem;
35 // NOLINTEND
36
37public:
38 // prevent constructor by default
40
41public:
42 // virtual functions
43 // NOLINTBEGIN
44 // vIndex: 6
45 virtual void handleVersionBasedInitialization(::SemVersion const& originalJsonVersion) /*override*/;
46
47 // vIndex: 7
48 virtual void _initializeComponent() /*override*/;
49
50 // vIndex: 4
51 virtual ::std::unique_ptr<::CompoundTag> buildNetworkTag(::cereal::ReflectionCtx const& ctx) const /*override*/;
52
53 // vIndex: 5
54 virtual bool initializeFromNetwork(::CompoundTag const& tag, ::cereal::ReflectionCtx const& ctx) /*override*/;
55
56 // vIndex: 0
57 virtual ~PlanterItemComponent() /*override*/ = default;
58 // NOLINTEND
59
60public:
61 // member functions
62 // NOLINTBEGIN
64
65 MCAPI bool _placeBlock(
66 ::ItemStack& item,
67 ::Actor& entity,
68 ::Block const& block,
69 ::BlockPos const& placePos,
70 uchar face,
71 ::Vec3 const& clickPos
72 ) const;
73
74 MCAPI void _useOn(
75 bool& result,
76 ::ItemStack const& initialItemStack,
77 ::ItemStack& currentItemStack,
78 ::Actor& entity,
79 ::BlockPos const& blockPos,
80 uchar face,
81 ::Vec3 const& clickPos
82 );
83
84 MCAPI bool calculatePlacePos(::ItemStackBase const& instance, ::Actor& entity, uchar& face, ::BlockPos& pos) const;
85
86 MCAPI bool canUseOn(::ItemStack const& instance, ::Actor& entity, ::BlockPos const& pos, uchar face) const;
87 // NOLINTEND
88
89public:
90 // static functions
91 // NOLINTBEGIN
92 MCAPI static ::HashedString const& getIdentifier();
93 // NOLINTEND
94
95public:
96 // constructor thunks
97 // NOLINTBEGIN
98 MCAPI void* $ctor(::SharedTypes::v1_21_40::PlanterItemComponent component);
99 // NOLINTEND
100
101public:
102 // virtual function thunks
103 // NOLINTBEGIN
104 MCAPI void $handleVersionBasedInitialization(::SemVersion const& originalJsonVersion);
105
106 MCAPI void $_initializeComponent();
107
108 MCAPI ::std::unique_ptr<::CompoundTag> $buildNetworkTag(::cereal::ReflectionCtx const& ctx) const;
109
110 MCAPI bool $initializeFromNetwork(::CompoundTag const& tag, ::cereal::ReflectionCtx const& ctx);
111 // NOLINTEND
112
113public:
114 // vftables
115 // NOLINTBEGIN
116 MCNAPI static void** $vftable();
117 // NOLINTEND
118};
Definition Actor.h:103
Definition BlockDescriptor.h:20
Definition BlockPos.h:18
Definition Block.h:38
Definition CompoundTag.h:13
Definition HashedString.h:5
Definition ItemStackBase.h:35
Definition ItemStack.h:25
Definition NetworkedItemComponent.h:7
Definition PlanterItemComponent.h:26
static MCAPI void ** $vftable()
Definition SemVersion.h:15
Definition Vec3.h:10
Definition PlanterItemComponent.h:13
Definition ReflectionCtx.h:11
Definition ctx.h:5