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 SubChunkPosOffset;
25 struct SubChunkPacketData;
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, schar> mX;
71 ::ll::TypedStorage<1, 1, schar> mY;
72 ::ll::TypedStorage<1, 1, schar> mZ;
73 // NOLINTEND
74 };
75
76 struct SubChunkPacketData {
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&);
90 SubChunkPacketData();
91
92 public:
93 // member functions
94 // NOLINTBEGIN
95 MCAPI SubChunkPacketData(::SubChunkPacket::SubChunkPacketData const&);
96
97 MCAPI SubChunkPacketData(
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 // virtual functions
132 // NOLINTBEGIN
133 virtual ~SubChunkPacket() /*override*/;
134
135 virtual ::MinecraftPacketIds getId() const /*override*/;
136
137 virtual ::std::string getName() const /*override*/;
138
139 virtual void write(::BinaryStream& stream) const /*override*/;
140
141 virtual ::Bedrock::Result<void> _read(::ReadOnlyBinaryStream& stream) /*override*/;
142 // NOLINTEND
143
144public:
145 // destructor thunk
146 // NOLINTBEGIN
147 MCAPI void $dtor();
148 // NOLINTEND
149
150public:
151 // virtual function thunks
152 // NOLINTBEGIN
153 MCAPI ::MinecraftPacketIds $getId() const;
154
155 MCAPI ::std::string $getName() const;
156
157 MCAPI void $write(::BinaryStream& stream) const;
158
159 MCAPI ::Bedrock::Result<void> $_read(::ReadOnlyBinaryStream& stream);
160
161
162 // NOLINTEND
163
164public:
165 // vftables
166 // NOLINTBEGIN
167 MCNAPI static void** $vftable();
168 // NOLINTEND
169};
Definition BinaryStream.h:11
Definition Dimension.h:85
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