Skip to content

Commit b4f461b

Browse files
committed
chore: suppress warning in serialize level chunk
1 parent b58982e commit b4f461b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/main/java/me/mapacheee/extendedhorizons/fakechunks/backend/PaperChunkBackend.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)