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