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