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