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
90 MCAPI ::HashedString const& getBlockIdentifier() const;
91 // NOLINTEND
92
93public:
94 // static functions
95 // NOLINTBEGIN
96 MCAPI static void bindType(
98 ::std::vector<::AllExperiments> const& requiredToggles,
99 ::std::optional<::SemVersion> releasedMinFormatVersion
100 );
101
102 MCAPI static ::HashedString const& getIdentifier();
103 // NOLINTEND
104
105public:
106 // constructor thunks
107 // NOLINTBEGIN
108 MCAPI void* $ctor(::SharedTypes::v1_21_40::PlanterItemComponent component);
109 // NOLINTEND
110
111public:
112 // virtual function thunks
113 // NOLINTBEGIN
114 MCAPI void $handleVersionBasedInitialization(::SemVersion const& originalJsonVersion);
115
116 MCAPI void $_initializeComponent(::ComponentItem& owner);
117
118 MCAPI ::std::unique_ptr<::CompoundTag> $buildNetworkTag(::cereal::ReflectionCtx const& ctx) const;
119
120 MCAPI bool $initializeFromNetwork(::CompoundTag const& tag, ::cereal::ReflectionCtx const& ctx);
121 // NOLINTEND
122
123public:
124 // vftables
125 // NOLINTBEGIN
126 MCNAPI static void** $vftable();
127 // NOLINTEND
128};
Definition Actor.h:102
Definition BlockDescriptor.h:20
Definition BlockPos.h:17
Definition Block.h:38
Definition ComponentItem.h:53
Definition CompoundTag.h:13
Definition HashedString.h:5
Definition ItemStackBase.h:36
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