LeviLamina
Loading...
Searching...
No Matches
EntityPlacerItemComponent.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/actor/ActorDefinitionIdentifier.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 BlockDescriptor;
15class BlockPos;
16class BlockSource;
17class BlockType;
18class ComponentItem;
19class Container;
20class HashedString;
21class ItemStack;
22class SemVersion;
23class Vec3;
25namespace Bedrock::PubSub { class Subscription; }
26namespace SharedTypes::v1_20_50 { struct EntityPlacerItemComponent; }
27namespace cereal { struct ReflectionCtx; }
28// clang-format on
29
30class EntityPlacerItemComponent : public ::NetworkedItemComponent<::EntityPlacerItemComponent> {
31public:
32 // member variables
33 // NOLINTBEGIN
34 ::ll::TypedStorage<8, 176, ::ActorDefinitionIdentifier> mIdentifier;
35 ::ll::TypedStorage<8, 24, ::std::vector<::BlockDescriptor>> mAllowedUseBlocks;
36 ::ll::TypedStorage<8, 24, ::std::vector<::BlockDescriptor>> mAllowedDispenseBlocks;
37 ::ll::TypedStorage<1, 1, bool> mCanUseOnMonsterSpawners;
38 ::ll::TypedStorage<1, 1, bool> mShouldContentErrorWithoutLiquidClipped;
39 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnUseOnSubscription;
40 // NOLINTEND
41
42public:
43 // prevent constructor by default
44 EntityPlacerItemComponent();
45
46public:
47 // virtual functions
48 // NOLINTBEGIN
49 virtual void handleVersionBasedInitialization(::SemVersion const& originalJsonVersion) /*override*/;
50
51 virtual void _initializeComponent(::ComponentItem& owner) /*override*/;
52
53 virtual ~EntityPlacerItemComponent() /*override*/;
54 // NOLINTEND
55
56public:
57 // member functions
58 // NOLINTBEGIN
59 MCAPI explicit EntityPlacerItemComponent(::SharedTypes::v1_20_50::EntityPlacerItemComponent component);
60
61 MCAPI void _positionAndRotateActor(
62 ::Actor& actor,
63 ::Vec3 position,
64 uchar face,
65 ::Vec3 const& playerFeetPos,
66 ::BlockType const* blockType
67 ) const;
68
69 MCAPI void _setActorCustomName(::Actor& actor, ::ItemStack const& item) const;
70
71 MCAPI void _useOn(
72 bool& result,
73 ::ItemStack const& initialItemStack,
74 ::ItemStack& currentItemStack,
75 ::Actor& usingActor,
76 ::BlockPos const& pos,
77 uchar face,
78 ::Vec3 const& clickPos
79 );
80
81 MCAPI bool dispense(::BlockSource& region, ::Container& container, int slot, ::Vec3 const& pos, uchar face) const;
82 // NOLINTEND
83
84public:
85 // static functions
86 // NOLINTBEGIN
87 MCAPI static void bindType(
89 ::std::vector<::AllExperiments> const& requiredToggles,
90 ::std::optional<::SemVersion> releasedMinFormatVersion
91 );
92
93 MCAPI static ::HashedString const& getIdentifier();
94 // NOLINTEND
95
96public:
97 // constructor thunks
98 // NOLINTBEGIN
99 MCAPI void* $ctor(::SharedTypes::v1_20_50::EntityPlacerItemComponent component);
100 // NOLINTEND
101
102public:
103 // destructor thunk
104 // NOLINTBEGIN
105 MCAPI void $dtor();
106 // NOLINTEND
107
108public:
109 // virtual function thunks
110 // NOLINTBEGIN
111 MCAPI void $handleVersionBasedInitialization(::SemVersion const& originalJsonVersion);
112
113 MCAPI void $_initializeComponent(::ComponentItem& owner);
114
115
116 // NOLINTEND
117
118public:
119 // vftables
120 // NOLINTBEGIN
121 MCNAPI static void** $vftable();
122 // NOLINTEND
123};
Definition Actor.h:105
Definition Subscription.h:10
Definition BlockDescriptor.h:20
Definition BlockPos.h:19
Definition BlockSource.h:68
Definition BlockType.h:84
Definition ComponentItem.h:55
Definition Container.h:33
static MCAPI void ** $vftable()
Definition HashedString.h:5
Definition ItemStack.h:26
Definition NetworkedItemComponent.h:7
Definition SemVersion.h:15
Definition Vec3.h:10
Definition ActorDefinitionIdentifier.h:15
Definition EntityPlacerItemComponent.h:16
Definition ReflectionCtx.h:11
Definition ctx.h:5