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