@@ -27,8 +27,7 @@ public CompletableFuture<ByteBuf> buildChunkPayload(
2727 int chunkX ,
2828 int chunkZ ,
2929 boolean generateMissingChunks ,
30- ChunkScheduler scheduler
31- ) {
30+ ChunkScheduler scheduler ) {
3231 if (world == null || scheduler == null ) {
3332 return CompletableFuture .completedFuture (null );
3433 }
@@ -46,8 +45,7 @@ public CompletableFuture<ByteBuf> buildChunkPayload(
4645 level ,
4746 levelChunk ,
4847 chunkX ,
49- chunkZ
50- );
48+ chunkZ );
5149 future .complete (packetData );
5250 } catch (Throwable throwable ) {
5351 future .complete (null );
@@ -76,6 +74,7 @@ public CompletableFuture<ByteBuf> buildChunkPayload(
7674 return future ;
7775 }
7876
77+ @ SuppressWarnings ("deprecation" )
7978 private ByteBuf serializeLevelChunkWithLight (ServerLevel level , LevelChunk chunk , int chunkX , int chunkZ ) {
8079 ByteBuf raw = PooledByteBufAllocator .DEFAULT .buffer ();
8180 FriendlyByteBuf buf = new FriendlyByteBuf (raw );
@@ -92,8 +91,7 @@ private ByteBuf serializeLevelChunkWithLight(ServerLevel level, LevelChunk chunk
9291 new ChunkPos (chunkX , chunkZ ),
9392 level .getLightEngine (),
9493 null ,
95- null
96- );
94+ null );
9795 lightData .write (buf );
9896 return raw ;
9997 } catch (Throwable throwable ) {
@@ -102,4 +100,3 @@ private ByteBuf serializeLevelChunkWithLight(ServerLevel level, LevelChunk chunk
102100 }
103101 }
104102}
105-
0 commit comments