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