LeviLamina
Loading...
Searching...
No Matches
ClientboundMapItemDataPacket.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/buffer_span.h"
7#include "mc/network/MinecraftPacketIds.h"
8#include "mc/network/Packet.h"
9#include "mc/platform/Result.h"
10#include "mc/world/level/BlockPos.h"
11#include "mc/world/level/saveddata/maps/MapItemTrackedActor.h"
12
13// auto generated forward declare list
14// clang-format off
15class BinaryStream;
16class BlockSource;
17class Level;
18class MapDecoration;
21struct ActorUniqueID;
22struct DimensionType;
23// clang-format on
24
25class ClientboundMapItemDataPacket : public ::Packet {
26public:
27 // ClientboundMapItemDataPacket inner types define
28 enum class Type : int {
29 Invalid = 0,
30 TextureUpdate = 2,
31 DecorationUpdate = 4,
32 Creation = 8,
33 };
34
35public:
36 // member variables
37 // NOLINTBEGIN
38 ::ll::TypedStorage<8, 24, ::std::vector<::ActorUniqueID>> mMapIds;
39 ::ll::TypedStorage<1, 1, schar> mScale;
40 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::MapDecoration>>> mDecorations;
41 ::ll::TypedStorage<8, 24, ::std::vector<::MapItemTrackedActor::UniqueId>> mUniqueIds;
42 ::ll::TypedStorage<4, 4, int> mStartX;
43 ::ll::TypedStorage<4, 4, int> mStartY;
44 ::ll::TypedStorage<4, 12, ::BlockPos> mMapOrigin;
45 ::ll::TypedStorage<1, 1, uchar> mDimension;
46 ::ll::TypedStorage<4, 4, int> mWidth;
47 ::ll::TypedStorage<4, 4, int> mHeight;
48 ::ll::TypedStorage<4, 4, ::ClientboundMapItemDataPacket::Type> mType;
49 ::ll::TypedStorage<8, 24, ::std::vector<uint>> mMapPixels;
50 ::ll::TypedStorage<1, 1, bool> mLocked;
51 // NOLINTEND
52
53public:
54 // virtual functions
55 // NOLINTBEGIN
56 virtual void write(::BinaryStream& stream) const /*override*/;
57
58 virtual ::MinecraftPacketIds getId() const /*override*/;
59
60 virtual ::std::string_view getName() const /*override*/;
61
62 virtual ::Bedrock::Result<void> _read(::ReadOnlyBinaryStream& stream) /*override*/;
63 // NOLINTEND
64
65public:
66 // member functions
67 // NOLINTBEGIN
68 MCAPI ClientboundMapItemDataPacket();
69
70 MCAPI ClientboundMapItemDataPacket(::gsl::not_null<::MapItemSavedData*> newMapItem, ::Level& level);
71
72 MCAPI ClientboundMapItemDataPacket(
73 ::ActorUniqueID mapId,
74 schar scale,
75 ::std::vector<::std::pair<::MapItemTrackedActor::UniqueId, ::std::shared_ptr<::MapDecoration>>> const&
76 decorations,
77 ::buffer_span<uint> mapColors,
78 int startX,
79 int startY,
80 int width,
81 int height,
82 ::DimensionType dimension,
83 bool isLocked,
84 ::BlockPos const& mapOrigin
85 );
86
87#ifdef LL_PLAT_C
88 MCAPI void applyToMap(::MapItemSavedData& map, bool resampleMap) const;
89
90 MCAPI ::DimensionType getDimensionId() const;
91
92 MCAPI ::ActorUniqueID getMapId() const;
93
94 MCFOLD ::std::vector<::ActorUniqueID> const& getMapIds() const;
95
96 MCAPI ::BlockPos getMapOrigin() const;
97
98 MCFOLD schar getScale() const;
99
100 MCAPI bool hasEmptyOrBlackPixels() const;
101
102 MCFOLD bool isLocked() const;
103
104 MCAPI bool isOfType(::ClientboundMapItemDataPacket::Type type) const;
105
106 MCAPI bool isTextureUpdate() const;
107
108 MCAPI void resampleClientMap(
110 ::BlockSource& region,
111 ::BlockPos const& updatePosition,
112 int scale
113 ) const;
114#endif
115 // NOLINTEND
116
117public:
118 // constructor thunks
119 // NOLINTBEGIN
120 MCAPI void* $ctor();
121
122 MCAPI void* $ctor(::gsl::not_null<::MapItemSavedData*> newMapItem, ::Level& level);
123
124 MCAPI void* $ctor(
125 ::ActorUniqueID mapId,
126 schar scale,
127 ::std::vector<::std::pair<::MapItemTrackedActor::UniqueId, ::std::shared_ptr<::MapDecoration>>> const&
128 decorations,
129 ::buffer_span<uint> mapColors,
130 int startX,
131 int startY,
132 int width,
133 int height,
134 ::DimensionType dimension,
135 bool isLocked,
136 ::BlockPos const& mapOrigin
137 );
138 // NOLINTEND
139
140public:
141 // virtual function thunks
142 // NOLINTBEGIN
143 MCAPI void $write(::BinaryStream& stream) const;
144
145 MCAPI ::MinecraftPacketIds $getId() const;
146
147 MCAPI ::std::string_view $getName() const;
148
149 MCAPI ::Bedrock::Result<void> $_read(::ReadOnlyBinaryStream& stream);
150
151
152 // NOLINTEND
153
154public:
155 // vftables
156 // NOLINTBEGIN
157 MCNAPI static void** $vftable();
158 // NOLINTEND
159};
Definition BinaryStream.h:11
Definition BlockPos.h:21
Definition BlockSource.h:73
static MCAPI void ** $vftable()
Definition Level.h:255
Definition MapDecoration.h:8
Definition MapItemSavedData.h:32
Definition ReadOnlyBinaryStream.h:8
Definition buffer_span.h:6
Definition ActorUniqueID.h:10
Definition DimensionType.h:5
Definition MapItemTrackedActor.h:34