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