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