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
59 public:
60 // member variables
61 // NOLINTBEGIN
62 ::ll::TypedStorage<1, 1, schar> mX;
63 ::ll::TypedStorage<1, 1, schar> mY;
64 ::ll::TypedStorage<1, 1, schar> mZ;
65 // NOLINTEND
66 };
67
68 struct SubChunkPacketData {
69 public:
70 // member variables
71 // NOLINTBEGIN
72 ::ll::TypedStorage<1, 3, ::SubChunkPacket::SubChunkPosOffset const> mSubChunkPosOffset;
73 ::ll::TypedStorage<8, 32, ::std::string> mSerializedSubChunk;
74 ::ll::TypedStorage<1, 1, ::SubChunkPacket::SubChunkRequestResult> mResult;
75 ::ll::TypedStorage<1, 514, ::SubChunkPacket::HeightmapData> mHeightMapData;
76 ::ll::TypedStorage<8, 8, uint64> mBlobId;
77 // NOLINTEND
78
79 public:
80 // prevent constructor by default
81 SubChunkPacketData& operator=(SubChunkPacketData const&);
82 SubChunkPacketData();
83
84 public:
85 // member functions
86 // NOLINTBEGIN
87 MCAPI SubChunkPacketData(::SubChunkPacket::SubChunkPacketData const&);
88
89 MCAPI SubChunkPacketData(
91 ::SubChunkPacket::SubChunkRequestResult requestResult
92 );
93
94 MCAPI ~SubChunkPacketData();
95 // NOLINTEND
96
97 public:
98 // constructor thunks
99 // NOLINTBEGIN
100 MCAPI void* $ctor(::SubChunkPacket::SubChunkPacketData const&);
101
102 MCAPI void*
103 $ctor(::SubChunkPacket::SubChunkPosOffset const& pos, ::SubChunkPacket::SubChunkRequestResult requestResult);
104 // NOLINTEND
105
106 public:
107 // destructor thunk
108 // NOLINTBEGIN
109 MCFOLD void $dtor();
110 // NOLINTEND
111 };
112
113public:
114 // member variables
115 // NOLINTBEGIN
116 ::ll::TypedStorage<1, 1, bool> mCacheEnabled;
117 ::ll::TypedStorage<4, 4, ::DimensionType> mDimensionType;
118 ::ll::TypedStorage<8, 24, ::std::vector<::SubChunkPacket::SubChunkPacketData>> mSubChunkData;
119 ::ll::TypedStorage<4, 12, ::SubChunkPos> mCenterPos;
120 // NOLINTEND
121
122public:
123 // virtual functions
124 // NOLINTBEGIN
125 virtual ~SubChunkPacket() /*override*/;
126
127 virtual ::MinecraftPacketIds getId() const /*override*/;
128
129 virtual ::std::string_view getName() const /*override*/;
130
131 virtual void write(::BinaryStream& stream) const /*override*/;
132
133 virtual ::Bedrock::Result<void> _read(::ReadOnlyBinaryStream& stream) /*override*/;
134 // NOLINTEND
135
136public:
137 // destructor thunk
138 // NOLINTBEGIN
139 MCAPI void $dtor();
140 // NOLINTEND
141
142public:
143 // virtual function thunks
144 // NOLINTBEGIN
145 MCAPI ::MinecraftPacketIds $getId() const;
146
147 MCAPI ::std::string_view $getName() const;
148
149 MCAPI void $write(::BinaryStream& stream) const;
150
151 MCAPI ::Bedrock::Result<void> $_read(::ReadOnlyBinaryStream& stream);
152
153
154 // NOLINTEND
155
156public:
157 // vftables
158 // NOLINTBEGIN
159 MCNAPI static void** $vftable();
160 // NOLINTEND
161};
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:68
Definition SubChunkPacket.h:58