LeviLamina
Loading...
Searching...
No Matches
MapItemSavedData.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/AutomaticID.h"
7#include "mc/deps/core/utility/buffer_span.h"
8#include "mc/world/level/saveddata/maps/MapDecoration.h"
9#include "mc/world/level/saveddata/maps/MapItemTrackedActor.h"
10
11// auto generated forward declare list
12// clang-format off
13class Actor;
14class BlockPos;
15class BlockSource;
16class CompoundTag;
17class Dimension;
18class ItemStack;
19class Level;
20class LevelStorage;
21class MapDecoration;
23class Packet;
24class Player;
25class Random;
26class Vec3;
27struct ActorUniqueID;
28namespace mce { class Color; }
29// clang-format on
30
32public:
33 // MapItemSavedData inner types declare
34 // clang-format off
35 struct ChunkBounds;
38 // clang-format on
39
40 // MapItemSavedData inner types define
41 struct ChunkBounds {
42 public:
43 // member variables
44 // NOLINTBEGIN
49 // NOLINTEND
50
51 public:
52 // prevent constructor by default
53 ChunkBounds& operator=(ChunkBounds const&);
56 };
57
59 public:
60 // member variables
61 // NOLINTBEGIN
64 // NOLINTEND
65
66 public:
67 // prevent constructor by default
71 };
72
74 public:
75 // member variables
76 // NOLINTBEGIN
81 // NOLINTEND
82
83 public:
84 // prevent constructor by default
88 };
89
90public:
91 // member variables
92 // NOLINTBEGIN
113 // NOLINTEND
114
115public:
116 // prevent constructor by default
117 MapItemSavedData& operator=(MapItemSavedData const&);
120
121public:
122 // member functions
123 // NOLINTBEGIN
124 MCAPI MapItemSavedData(::ActorUniqueID mapId, bool isDLCworld);
125
126 MCAPI void _addDecoration(
127 ::MapDecoration::Type type,
129 ::Vec3 const& position,
130 ::std::string const& label,
131 ::mce::Color const& color
132 );
133
134 MCAPI ::std::shared_ptr<::MapItemTrackedActor> _addTrackedMapEntity(
136 ::BlockSource& region,
137 ::MapDecoration::Type decorationType
138 );
139
140 MCAPI ::MapItemSavedData::MapDecorationContext _calculateDecorationLocationAndType(
141 ::MapDecoration::Type type,
142 float yRot,
143 int xDeltaFromCenter,
144 int yDeltaFromCenter,
145 ::MapItemTrackedActor::UniqueId const& uniqueId
146 ) const;
147
148 MCAPI schar _calculateRotation(
149 float yRot,
150 ::MapDecoration::Type type,
151 ::MapItemTrackedActor::UniqueId const& uniqueId,
152 ::Random& rng
153 ) const;
154
155 MCAPI void _deserializeData(::CompoundTag const& tag);
156
157 MCAPI bool _isPlayerHoldingMap(::Player& player);
158
159 MCAPI void _removeDecoration(::MapItemTrackedActor::UniqueId const& id);
160
161 MCAPI void _removeTrackedMapEntity(::MapItemTrackedActor::UniqueId const& key);
162
163 MCAPI bool
164 _updateTrackedEntityDecoration(::BlockSource& region, ::std::shared_ptr<::MapItemTrackedActor> trackedActor);
165
166 MCAPI void _updateTrackedEntityDecorations(::BlockSource& region);
167
168 MCAPI void _updateTrackedPlayerDecorations(
169 ::BlockSource& region,
170 ::Player& player,
171 ::Vec3& decorationPos,
172 ::std::string& decorationLabel,
173 ::mce::Color& decorationColor,
174 ::DimensionType dimensionID,
175 ::MapDecoration::Type& type
176 );
177
178 MCAPI ::std::shared_ptr<::MapItemTrackedActor>
179 addTrackedMapEntity(::Actor& entity, ::MapDecoration::Type decorationType);
180
181 MCAPI void checkNeedsResampling();
182
183 MCAPI ::std::unique_ptr<::Packet> getFullDataPacket() const;
184
185 MCAPI ::std::unique_ptr<::Packet> getUpdatePacket(::Level& pos, ::BlockPos const&) const;
186
187 MCAPI ::std::unique_ptr<::Packet> getUpdatePacket(::ItemStack const& entity, ::Level&, ::Actor&) const;
188
189 MCAPI void save(::LevelStorage& storage);
190
191 MCAPI void serialize(::CompoundTag& tag) const;
192
193 MCAPI void setMapSection(::buffer_span<uint> src, ::MapItemSavedData::ChunkBounds bb);
194
195 MCAPI void setOrigin(
196 ::Vec3 origin,
197 int mapScale,
198 ::DimensionType dimension,
199 bool isLegacyLevel,
200 bool isCentered,
201 ::BlockPos const& worldCenter
202 );
203
204 MCAPI void tickByBlock(::BlockPos const& pos, ::BlockSource& region);
205
206 MCAPI void tickCarriedBy(::Actor& player, ::CompoundTag const* item);
207 // NOLINTEND
208
209public:
210 // static functions
211 // NOLINTBEGIN
212 MCAPI static ::std::string getSerializationKey(::ActorUniqueID id);
213 // NOLINTEND
214
215public:
216 // constructor thunks
217 // NOLINTBEGIN
218 MCAPI void* $ctor(::ActorUniqueID mapId, bool isDLCworld);
219 // NOLINTEND
220};
Definition Actor.h:104
Definition AutomaticID.h:6
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition CompoundTag.h:13
Definition Dimension.h:83
Definition ItemStack.h:25
Definition LevelStorage.h:24
Definition Level.h:234
Definition MapDecoration.h:10
Definition MapItemSavedData.h:31
Definition MapItemTrackedActor.h:12
Definition Packet.h:26
Definition Player.h:119
Definition Random.h:16
Definition Vec3.h:10
Definition buffer_span.h:6
Definition Color.h:13
Definition ActorUniqueID.h:5
Definition MapItemSavedData.h:41
Definition MapItemSavedData.h:73
Definition MapItemSavedData.h:58
Definition MapItemTrackedActor.h:26
Definition Alias.h:14
Definition serialize.h:11