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