fix: ClassCastException on spigot (#2751)

fix: ClassCastException on spigot due to method change
This commit is contained in:
Pierre Maurice Schwang 2024-05-27 21:32:09 +02:00 committed by GitHub
parent e9866fb4d7
commit 7318685613
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -345,10 +345,8 @@ public final class PaperweightPlatformAdapter extends NMSAdapter {
.getChunkSource() .getChunkSource()
.getChunkAtIfLoadedImmediately(chunkX, chunkZ); .getChunkAtIfLoadedImmediately(chunkX, chunkZ);
} else { } else {
levelChunk = ((Optional<LevelChunk>) ((Either) chunkHolder levelChunk = chunkHolder.getTickingChunkFuture()
.getTickingChunkFuture() // method is not present with new paper chunk system .getNow(ChunkHolder.UNLOADED_LEVEL_CHUNK).orElse(null);
.getNow(ChunkHolder.UNLOADED_LEVEL_CHUNK)).left())
.orElse(null);
} }
if (levelChunk == null) { if (levelChunk == null) {
return; return;