mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
fix: update to changes to spigot chunk future result (#2934)
This commit is contained in:
parent
cc2f6459f9
commit
631269cafe
@ -357,14 +357,9 @@ public final class PaperweightPlatformAdapter extends NMSAdapter {
|
|||||||
LevelChunk levelChunk;
|
LevelChunk levelChunk;
|
||||||
if (PaperLib.isPaper()) {
|
if (PaperLib.isPaper()) {
|
||||||
// getChunkAtIfLoadedImmediately is paper only
|
// getChunkAtIfLoadedImmediately is paper only
|
||||||
levelChunk = nmsWorld
|
levelChunk = nmsWorld.getChunkSource().getChunkAtIfLoadedImmediately(chunkX, chunkZ);
|
||||||
.getChunkSource()
|
|
||||||
.getChunkAtIfLoadedImmediately(chunkX, chunkZ);
|
|
||||||
} else {
|
} else {
|
||||||
levelChunk = ((Optional<LevelChunk>) ((Either) chunkHolder
|
levelChunk = chunkHolder.getTickingChunkFuture().getNow(ChunkHolder.UNLOADED_LEVEL_CHUNK).orElse(null);
|
||||||
.getTickingChunkFuture() // method is not present with new paper chunk system
|
|
||||||
.getNow(ChunkHolder.UNLOADED_LEVEL_CHUNK)).left())
|
|
||||||
.orElse(null);
|
|
||||||
}
|
}
|
||||||
if (levelChunk == null) {
|
if (levelChunk == null) {
|
||||||
return;
|
return;
|
||||||
|
@ -341,14 +341,9 @@ public final class PaperweightPlatformAdapter extends NMSAdapter {
|
|||||||
LevelChunk levelChunk;
|
LevelChunk levelChunk;
|
||||||
if (PaperLib.isPaper()) {
|
if (PaperLib.isPaper()) {
|
||||||
// getChunkAtIfLoadedImmediately is paper only
|
// getChunkAtIfLoadedImmediately is paper only
|
||||||
levelChunk = nmsWorld
|
levelChunk = nmsWorld.getChunkSource().getChunkAtIfLoadedImmediately(chunkX, chunkZ);
|
||||||
.getChunkSource()
|
|
||||||
.getChunkAtIfLoadedImmediately(chunkX, chunkZ);
|
|
||||||
} else {
|
} else {
|
||||||
levelChunk = ((Optional<LevelChunk>) ((Either) chunkHolder
|
levelChunk = chunkHolder.getTickingChunkFuture().getNow(ChunkHolder.UNLOADED_LEVEL_CHUNK).orElse(null);
|
||||||
.getTickingChunkFuture() // method is not present with new paper chunk system
|
|
||||||
.getNow(ChunkHolder.UNLOADED_LEVEL_CHUNK)).left())
|
|
||||||
.orElse(null);
|
|
||||||
}
|
}
|
||||||
if (levelChunk == null) {
|
if (levelChunk == null) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user