@@ -1,6 +1,17 @@
|
||||
--- a/net/minecraft/server/PlayerChunk.java
|
||||
+++ b/net/minecraft/server/PlayerChunk.java
|
||||
@@ -44,7 +44,7 @@
|
||||
--- a/net/minecraft/server/level/PlayerChunk.java
|
||||
+++ b/net/minecraft/server/level/PlayerChunk.java
|
||||
@@ -33,6 +33,10 @@
|
||||
import net.minecraft.world.level.chunk.ProtoChunkExtension;
|
||||
import net.minecraft.world.level.lighting.LightEngine;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
+// CraftBukkit end
|
||||
+
|
||||
public class PlayerChunk {
|
||||
|
||||
public static final Either<IChunkAccess, PlayerChunk.Failure> UNLOADED_CHUNK_ACCESS = Either.right(PlayerChunk.Failure.b);
|
||||
@@ -65,7 +69,7 @@
|
||||
this.fullChunkFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE;
|
||||
this.tickingFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE;
|
||||
this.entityTickingFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE;
|
||||
@@ -9,7 +20,7 @@
|
||||
this.dirtyBlocks = new ShortSet[16];
|
||||
this.location = chunkcoordintpair;
|
||||
this.lightEngine = lightengine;
|
||||
@@ -56,6 +56,19 @@
|
||||
@@ -77,6 +81,19 @@
|
||||
this.a(i);
|
||||
}
|
||||
|
||||
@@ -29,7 +40,7 @@
|
||||
public CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> getStatusFutureUnchecked(ChunkStatus chunkstatus) {
|
||||
CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> completablefuture = (CompletableFuture) this.statusFutures.get(chunkstatus.c());
|
||||
|
||||
@@ -81,9 +94,9 @@
|
||||
@@ -102,9 +119,9 @@
|
||||
@Nullable
|
||||
public Chunk getChunk() {
|
||||
CompletableFuture<Either<Chunk, PlayerChunk.Failure>> completablefuture = this.a();
|
||||
@@ -41,7 +52,7 @@
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -114,6 +127,7 @@
|
||||
@@ -135,6 +152,7 @@
|
||||
if (chunk != null) {
|
||||
byte b0 = (byte) SectionPosition.a(blockposition.getY());
|
||||
|
||||
@@ -49,7 +60,7 @@
|
||||
if (this.dirtyBlocks[b0] == null) {
|
||||
this.p = true;
|
||||
this.dirtyBlocks[b0] = new ShortArraySet();
|
||||
@@ -216,7 +230,7 @@
|
||||
@@ -237,7 +255,7 @@
|
||||
CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> completablefuture = (CompletableFuture) this.statusFutures.get(i);
|
||||
|
||||
if (completablefuture != null) {
|
||||
@@ -58,7 +69,7 @@
|
||||
|
||||
if (either == null || either.left().isPresent()) {
|
||||
return completablefuture;
|
||||
@@ -271,6 +285,30 @@
|
||||
@@ -292,6 +310,30 @@
|
||||
boolean flag1 = this.ticketLevel <= PlayerChunkMap.GOLDEN_TICKET;
|
||||
PlayerChunk.State playerchunk_state = getChunkState(this.oldTicketLevel);
|
||||
PlayerChunk.State playerchunk_state1 = getChunkState(this.ticketLevel);
|
||||
@@ -89,7 +100,7 @@
|
||||
CompletableFuture completablefuture;
|
||||
|
||||
if (flag) {
|
||||
@@ -302,7 +340,7 @@
|
||||
@@ -323,7 +365,7 @@
|
||||
if (flag2 && !flag3) {
|
||||
completablefuture = this.fullChunkFuture;
|
||||
this.fullChunkFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE;
|
||||
@@ -98,7 +109,7 @@
|
||||
playerchunkmap.getClass();
|
||||
return either1.ifLeft(playerchunkmap::a);
|
||||
}));
|
||||
@@ -340,6 +378,26 @@
|
||||
@@ -361,6 +403,26 @@
|
||||
|
||||
this.u.a(this.location, this::k, this.ticketLevel, this::d);
|
||||
this.oldTicketLevel = this.ticketLevel;
|
||||
|
||||
Reference in New Issue
Block a user