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
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 getDebugText(
61 ::std::vector<::std::string>& outputInfo,
62 ::BlockPos const& debugPos,
63 ::BlockSource const* region
64 ) const /*override*/;
65
66 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(::BlockSource&) /*override*/;
67
68 virtual void _onUpdatePacket(::CompoundTag const& data, ::BlockSource& region) /*override*/;
69
70 virtual ~SerializedActorBlockActor() /*override*/ = default;
71 // NOLINTEND
72
73public:
74 // member functions
75 // NOLINTBEGIN
76 MCAPI ::Actor* _loadSerializedActor(
77 ::BlockSource& region,
78 ::ActorFactory& actorFactory,
79 ::Vec3 const& pos,
80 ::Vec2 const& rotation
81 ) const;
82
83 MCAPI void
84 executeEvent(::BlockSource&, ::BlockPos const& pos, ::Block const&, ::std::string const& eventName, ::Actor& actor);
85
86 MCAPI void loadUserData(::CompoundTag const& tag);
87
88 MCAPI void saveUserData(::CompoundTag& tag) const;
89
90 MCAPI ::Actor* spawnActor(::BlockSource& region, ::Direction::Type direction);
91
92 MCAPI bool trySerializeActor(::Actor const& actor);
93 // NOLINTEND
94
95public:
96 // static functions
97 // NOLINTBEGIN
98#ifdef LL_PLAT_C
99 MCAPI static void savePoseToItemForInventoryRendering(::ItemStackBase& item, int pose);
100#endif
101 // NOLINTEND
102
103public:
104 // static variables
105 // NOLINTBEGIN
106 MCAPI static ::std::string_view const& ACTOR_IDENTIFIER_TAG_NAME();
107
108 MCAPI static ::std::string_view const& ACTOR_TAG_NAME();
109
110 MCAPI static ::std::string_view const& POSE_TAG_NAME();
111
112 MCAPI static ::std::string_view const& SAVE_DATA_TAG_NAME();
113 // NOLINTEND
114
115public:
116 // virtual function thunks
117 // NOLINTBEGIN
118 MCAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
119
120 MCAPI void $load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
121
122 MCAPI void $onChanged(::BlockSource& region);
123
124 MCAPI void $getDebugText(
125 ::std::vector<::std::string>& outputInfo,
126 ::BlockPos const& debugPos,
127 ::BlockSource const* region
128 ) const;
129
130 MCAPI ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(::BlockSource&);
131
132 MCAPI void $_onUpdatePacket(::CompoundTag const& data, ::BlockSource& region);
133
134
135 // NOLINTEND
136
137public:
138 // vftables
139 // NOLINTBEGIN
140 MCNAPI static void** $vftable();
141 // NOLINTEND
142};
Definition ActorFactory.h:33
Definition Actor.h:106
Definition BlockActorDataPacket.h:19
Definition BlockPos.h:19
Definition BlockSource.h:71
Definition Block.h:43
Definition CompoundTag.h:23
Definition DataLoadHelper.h:20
Definition ILevel.h:218
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