LeviLamina
Loading...
Searching...
No Matches
SubChunkPacket.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/network/MinecraftPacketIds.h"
8#include "mc/network/Packet.h"
9#include "mc/platform/Result.h"
10#include "mc/world/level/SubChunkPos.h"
11
12// auto generated forward declare list
13// clang-format off
14class BinaryStream;
15class Dimension;
17// clang-format on
18
19class SubChunkPacket : public ::Packet {
20public:
21 // SubChunkPacket inner types declare
22 // clang-format off
23 struct HeightmapData;
24 struct SubChunkPacketData;
25 struct SubChunkPosOffset;
26 // clang-format on
27
28 // SubChunkPacket inner types define
29 enum class HeightMapDataType : uchar {
30 NoData = 0,
31 HasData = 1,
32 AllTooHigh = 2,
33 AllTooLow = 3,
34 AllCopied = 4,
35 };
36
37 enum class SubChunkRequestResult : uchar {
38 Undefined = 0,
39 Success = 1,
40 LevelChunkDoesntExist = 2,
41 WrongDimension = 3,
42 PlayerDoesntExist = 4,
43 IndexOutOfBounds = 5,
44 SuccessAllAir = 6,
45 };
46
48 public:
49 // member variables
50 // NOLINTBEGIN
51 ::ll::TypedStorage<1, 1, ::SubChunkPacket::HeightMapDataType> mHeightMapType;
52 ::ll::TypedStorage<1, 256, ::std::array<::std::array<schar, 16>, 16>> mSubchunkHeightMap;
53 ::ll::TypedStorage<1, 1, ::SubChunkPacket::HeightMapDataType> mRenderHeightMapType;
54 ::ll::TypedStorage<1, 256, ::std::array<::std::array<schar, 16>, 16>> mSubchunkRenderHeightMap;
55 // NOLINTEND
56
57 public:
58 // static variables
59 // NOLINTBEGIN
60 MCAPI static schar const& HEIGHT_COLUMN_ABOVE_SUBCHUNK();
61
62 MCAPI static schar const& HEIGHT_COLUMN_BELOW_SUBCHUNK();
63 // NOLINTEND
64 };
65
67 public:
68 // member variables
69 // NOLINTBEGIN
70 ::ll::TypedStorage<1, 1, char> mX;
71 ::ll::TypedStorage<1, 1, char> mY;
72 ::ll::TypedStorage<1, 1, char> mZ;
73 // NOLINTEND
74 };
75
77 public:
78 // member variables
79 // NOLINTBEGIN
80 ::ll::TypedStorage<1, 3, ::SubChunkPacket::SubChunkPosOffset const> mSubChunkPosOffset;
81 ::ll::TypedStorage<8, 32, ::std::string> mSerializedSubChunk;
82 ::ll::TypedStorage<1, 1, ::SubChunkPacket::SubChunkRequestResult> mResult;
83 ::ll::TypedStorage<1, 514, ::SubChunkPacket::HeightmapData> mHeightMapData;
84 ::ll::TypedStorage<8, 8, uint64> mBlobId;
85 // NOLINTEND
86
87 public:
88 // prevent constructor by default
89 SubChunkPacketData& operator=(SubChunkPacketData const&);
91
92 public:
93 // member functions
94 // NOLINTBEGIN
96
99 ::SubChunkPacket::SubChunkRequestResult requestResult
100 );
101
102 MCAPI ~SubChunkPacketData();
103 // NOLINTEND
104
105 public:
106 // constructor thunks
107 // NOLINTBEGIN
108 MCAPI void* $ctor(::SubChunkPacket::SubChunkPacketData const&);
109
110 MCAPI void*
111 $ctor(::SubChunkPacket::SubChunkPosOffset const& pos, ::SubChunkPacket::SubChunkRequestResult requestResult);
112 // NOLINTEND
113
114 public:
115 // destructor thunk
116 // NOLINTBEGIN
117 MCFOLD void $dtor();
118 // NOLINTEND
119 };
120
121public:
122 // member variables
123 // NOLINTBEGIN
124 ::ll::TypedStorage<1, 1, bool> mCacheEnabled;
125 ::ll::TypedStorage<4, 4, ::DimensionType> mDimensionType;
126 ::ll::TypedStorage<8, 24, ::std::vector<::SubChunkPacket::SubChunkPacketData>> mSubChunkData;
127 ::ll::TypedStorage<4, 12, ::SubChunkPos> mCenterPos;
128 // NOLINTEND
129
130public:
131 // prevent constructor by default
132 SubChunkPacket& operator=(SubChunkPacket const&);
134
135public:
136 // virtual functions
137 // NOLINTBEGIN
138 // vIndex: 0
139 virtual ~SubChunkPacket() /*override*/;
140
141 // vIndex: 1
142 virtual ::MinecraftPacketIds getId() const /*override*/;
143
144 // vIndex: 2
145 virtual ::std::string getName() const /*override*/;
146
147 // vIndex: 5
148 virtual void write(::BinaryStream& stream) const /*override*/;
149
150 // vIndex: 14
151 virtual ::Bedrock::Result<void> _read(::ReadOnlyBinaryStream& stream) /*override*/;
152 // NOLINTEND
153
154public:
155 // member functions
156 // NOLINTBEGIN
157 MCAPI SubChunkPacket(::SubChunkPacket const&);
158 // NOLINTEND
159
160public:
161 // constructor thunks
162 // NOLINTBEGIN
163 MCAPI void* $ctor(::SubChunkPacket const&);
164 // NOLINTEND
165
166public:
167 // destructor thunk
168 // NOLINTBEGIN
169 MCAPI void $dtor();
170 // NOLINTEND
171
172public:
173 // virtual function thunks
174 // NOLINTBEGIN
175 MCAPI ::MinecraftPacketIds $getId() const;
176
177 MCAPI ::std::string $getName() const;
178
179 MCAPI void $write(::BinaryStream& stream) const;
180
181 MCAPI ::Bedrock::Result<void> $_read(::ReadOnlyBinaryStream& stream);
182 // NOLINTEND
183
184public:
185 // vftables
186 // NOLINTBEGIN
187 MCNAPI static void** $vftable();
188 // NOLINTEND
189};
Definition BinaryStream.h:10
Definition Dimension.h:83
Definition Packet.h:43
Definition ReadOnlyBinaryStream.h:8
Definition SubChunkPacket.h:19
static MCAPI void ** $vftable()
STL namespace.
Definition SubChunkPacket.h:47
Definition SubChunkPacket.h:76
Definition SubChunkPacket.h:66