LeviLamina
Loading...
Searching...
No Matches
SerializedActorBlockActor.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/nbt/CompoundTag.h"
7#include "mc/world/Direction.h"
8#include "mc/world/actor/ActorDefinitionIdentifier.h"
9#include "mc/world/level/block/actor/BlockActorRendererId.h"
10#include "mc/world/level/block/actor/BlockActorType.h"
11#include "mc/world/level/block/actor/VanillaBlockActor.h"
12
13// auto generated forward declare list
14// clang-format off
15class Actor;
16class Block;
18class BlockPos;
19class BlockSource;
20class DataLoadHelper;
21class ILevel;
22class ItemStackBase;
23class SaveContext;
24// clang-format on
25
26class SerializedActorBlockActor : public ::VanillaBlockActor {
27public:
28 // SerializedActorBlockActor inner types declare
29 // clang-format off
30 struct SerializedActor;
31 // clang-format on
32
33 // SerializedActorBlockActor inner types define
35 public:
36 // member variables
37 // NOLINTBEGIN
38 ::ll::TypedStorage<8, 176, ::ActorDefinitionIdentifier> mActorIdentifier;
39 ::ll::TypedStorage<8, 24, ::CompoundTag> mSaveData;
40 // NOLINTEND
41 };
42
43public:
44 // member variables
45 // NOLINTBEGIN
46 ::ll::TypedStorage<8, 200, ::SerializedActorBlockActor::SerializedActor> mSerializedActor;
47 ::ll::TypedStorage<4, 4, int> mPose;
48 // NOLINTEND
49
50public:
51 // prevent constructor by default
52 SerializedActorBlockActor();
53
54public:
55 // virtual functions
56 // NOLINTBEGIN
57 virtual bool save(::CompoundTag& tag, ::SaveContext const& saveContext) const /*override*/;
58
59 virtual void load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
60
61 virtual void onChanged(::BlockSource& region) /*override*/;
62
63 virtual void getDebugText(
64 ::std::vector<::std::string>& outputInfo,
65 ::BlockPos const& debugPos,
66 ::BlockSource const* region
67 ) const /*override*/;
68
69 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(::BlockSource&) /*override*/;
70
71 virtual void _onUpdatePacket(::CompoundTag const& data, ::BlockSource& region) /*override*/;
72 // NOLINTEND
73
74public:
75 // member functions
76 // NOLINTBEGIN
77 MCAPI SerializedActorBlockActor(
78 ::BlockPos const& pos,
79 ::BlockActorType type,
80 ::BlockActorRendererId rendererId,
81 ::ActorDefinitionIdentifier defaultActorIdentifier
82 );
83
84 MCAPI void
85 executeEvent(::BlockSource&, ::BlockPos const& pos, ::Block const&, ::std::string const& eventName, ::Actor& actor);
86
87 MCAPI void saveUserData(::CompoundTag& tag) const;
88
89 MCAPI ::Actor* spawnActor(::BlockSource& region, ::Direction::Type direction);
90 // NOLINTEND
91
92public:
93 // static functions
94 // NOLINTBEGIN
95#ifdef LL_PLAT_C
96 MCAPI static bool isItemSerializedActorBlock(::ItemStackBase const& item);
97#endif
98
99 MCAPI static void savePoseToItemForInventoryRendering(::ItemStackBase& item, int pose);
100 // NOLINTEND
101
102public:
103 // static variables
104 // NOLINTBEGIN
105 MCAPI static ::std::string_view const& ACTOR_IDENTIFIER_TAG_NAME();
106
107 MCAPI static ::std::string_view const& ACTOR_TAG_NAME();
108
109 MCAPI static ::std::string_view const& POSE_TAG_NAME();
110
111 MCAPI static ::std::string_view const& SAVE_DATA_TAG_NAME();
112 // NOLINTEND
113
114public:
115 // constructor thunks
116 // NOLINTBEGIN
117 MCAPI void* $ctor(
118 ::BlockPos const& pos,
119 ::BlockActorType type,
120 ::BlockActorRendererId rendererId,
121 ::ActorDefinitionIdentifier defaultActorIdentifier
122 );
123 // NOLINTEND
124
125public:
126 // virtual function thunks
127 // NOLINTBEGIN
128 MCAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
129
130 MCAPI void $load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
131
132 MCAPI void $onChanged(::BlockSource& region);
133
134 MCAPI void $getDebugText(
135 ::std::vector<::std::string>& outputInfo,
136 ::BlockPos const& debugPos,
137 ::BlockSource const* region
138 ) const;
139
140 MCFOLD ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(::BlockSource&);
141
142 MCFOLD void $_onUpdatePacket(::CompoundTag const& data, ::BlockSource& region);
143
144
145 // NOLINTEND
146
147public:
148 // vftables
149 // NOLINTBEGIN
151
153
154 MCNAPI static void** $vftableForBlockActor();
155
157 // NOLINTEND
158};
Definition Actor.h:114
Definition BlockActorDataPacket.h:19
Definition BlockPos.h:17
Definition BlockSource.h:71
Definition Block.h:42
Definition CompoundTag.h:18
Definition DataLoadHelper.h:20
Definition ILevel.h:220
Definition ItemStackBase.h:44
Definition SaveContext.h:5
static MCAPI void ** $vftableForBlockActor()
static MCAPI void ** $vftableForIVanillaTickBlockActorComponent()
static MCAPI void ** $vftableForIVanillaRenderBlockActorComponent()
static MCAPI void ** $vftableForIVanillaMainBlockActorComponent()
Definition ActorDefinitionIdentifier.h:15
Definition SerializedActorBlockActor.h:34