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
42
43public:
44 // virtual functions
45 // NOLINTBEGIN
46 // vIndex: 6
47 virtual void handleVersionBasedInitialization(::SemVersion const& originalJsonVersion) /*override*/;
48
49 // vIndex: 7
50 virtual void _initializeComponent(::ComponentItem& owner) /*override*/;
51
52 // vIndex: 4
53 virtual ::std::unique_ptr<::CompoundTag> buildNetworkTag(::cereal::ReflectionCtx const& ctx) const /*override*/;
54
55 // vIndex: 5
56 virtual bool initializeFromNetwork(::CompoundTag const& tag, ::cereal::ReflectionCtx const& ctx) /*override*/;
57
58 // vIndex: 0
59 virtual ~PlanterItemComponent() /*override*/ = default;
60 // NOLINTEND
61
62public:
63 // member functions
64 // NOLINTBEGIN
66
67 MCAPI bool _placeBlock(
68 ::ItemStack& item,
69 ::Actor& entity,
70 ::Block const& block,
71 ::BlockPos const& placePos,
72 uchar face,
73 ::Vec3 const& clickPos
74 ) const;
75
76 MCAPI void _useOn(
77 bool& result,
78 ::ItemStack const& initialItemStack,
79 ::ItemStack& currentItemStack,
80 ::Actor& entity,
81 ::BlockPos const& blockPos,
82 uchar face,
83 ::Vec3 const& clickPos
84 );
85
86 MCAPI bool calculatePlacePos(::ItemStackBase const& instance, ::Actor& entity, uchar& face, ::BlockPos& pos) const;
87
88 MCAPI bool canUseOn(::ItemStack const& instance, ::Actor& entity, ::BlockPos const& pos, uchar face) const;
89 // NOLINTEND
90
91public:
92 // static functions
93 // NOLINTBEGIN
94 MCAPI static void bindType(
96 ::std::vector<::AllExperiments> const& requiredToggles,
97 ::std::optional<::SemVersion> releasedMinFormatVersion
98 );
99
100 MCAPI static ::HashedString const& getIdentifier();
101 // NOLINTEND
102
103public:
104 // constructor thunks
105 // NOLINTBEGIN
106 MCAPI void* $ctor(::SharedTypes::v1_21_40::PlanterItemComponent component);
107 // NOLINTEND
108
109public:
110 // virtual function thunks
111 // NOLINTBEGIN
112 MCAPI void $handleVersionBasedInitialization(::SemVersion const& originalJsonVersion);
113
114 MCAPI void $_initializeComponent(::ComponentItem& owner);
115
116 MCAPI ::std::unique_ptr<::CompoundTag> $buildNetworkTag(::cereal::ReflectionCtx const& ctx) const;
117
118 MCAPI bool $initializeFromNetwork(::CompoundTag const& tag, ::cereal::ReflectionCtx const& ctx);
119 // NOLINTEND
120
121public:
122 // vftables
123 // NOLINTBEGIN
124 MCNAPI static void** $vftable();
125 // NOLINTEND
126};
Definition Actor.h:102
Definition BlockDescriptor.h:20
Definition BlockPos.h:17
Definition Block.h:37
Definition ComponentItem.h:53
Definition CompoundTag.h:13
Definition HashedString.h:5
Definition ItemStackBase.h:34
Definition ItemStack.h:23
Definition NetworkedItemComponent.h:7
Definition PlanterItemComponent.h:28
static MCAPI void ** $vftable()
Definition SemVersion.h:16
Definition Vec3.h:10
Definition PlanterItemComponent.h:13
Definition ReflectionCtx.h:11
Definition ctx.h:5