Skip to content
LeviMC
English
AutoLightDark
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
74
75 MCNAPI bool
76 calculatePlacePos(::ItemStackBase const& instance, ::Actor const& entity, uchar& face, ::BlockPos& pos) const;
77
78#ifdef LL_PLAT_C
79 MCAPI bool canUseOn(::ItemStack const& instance, ::Actor& entity, ::BlockPos const& pos, uchar face) const;
80#endif
81 // NOLINTEND
82
83public:
84 // static functions
85 // NOLINTBEGIN
86 MCNAPI static void bindType(
88 ::std::vector<::AllExperiments> const& requiredToggles,
89 ::std::optional<::SemVersion> releasedMinFormatVersion
90 );
91
92 MCAPI static ::PlanterItemComponent::BlockPlacementContext getBlockPlacementContext(::ItemStackBase const& item);
93 // NOLINTEND
94
95public:
96 // constructor thunks
97 // NOLINTBEGIN
99 // NOLINTEND
100
101public:
102 // virtual function thunks
103 // NOLINTBEGIN
104 MCNAPI void $handleVersionBasedInitialization(::SemVersion const& originalJsonVersion);
105
107
108 MCNAPI ::std::unique_ptr<::CompoundTag> $buildNetworkTag(::cereal::ReflectionCtx const& ctx) const;
109
111
112
113 // NOLINTEND
114
115public:
116 // vftables
117 // NOLINTBEGIN
118 MCNAPI static void** $vftable();
119 // NOLINTEND
120};
Definition Actor.h:116
Definition BlockPos.h:14
Definition BlockType.h:79
Definition ComponentItem.h:52
Definition CompoundTag.h:18
Definition ItemStackBase.h:45
Definition ItemStack.h:26
Definition NetworkedItemComponent.h:7
MCAPI ::std::unique_ptr<::CompoundTag > $buildNetworkTag(::cereal::ReflectionCtx const &ctx) const
static MCAPI void bindType(::cereal::ReflectionCtx &ctx, ::std::vector<::AllExperiments > const &requiredToggles, ::std::optional<::SemVersion > releasedMinFormatVersion)
MCAPI void $handleVersionBasedInitialization(::SemVersion const &originalJsonVersion)
MCAPI bool $initializeFromNetwork(::CompoundTag const &tag, ::cereal::ReflectionCtx const &ctx)
MCAPI void $_initializeComponent(::ComponentItem &owner)
MCAPI bool calculatePlacePos(::ItemStackBase const &instance, ::Actor const &entity, uchar &face, ::BlockPos &pos) const
MCAPI void * $ctor(::SharedTypes::v1_26_0::PlanterItemComponent component)
static MCAPI void ** $vftable()
MCAPI PlanterItemComponent(::SharedTypes::v1_26_0::PlanterItemComponent component)
Definition SemVersion.h:15
Definition PlanterItemComponent.h:34
Definition PlanterItemComponent.h:17
Definition ReflectionCtx.h:11
Definition ctx.h:5