Update to Minecraft 1.18-pre8

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-11-25 08:00:00 +11:00
parent 0d839e926c
commit 799bfc92e2
30 changed files with 206 additions and 758 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/level/ChunkProviderServer.java
+++ b/net/minecraft/server/level/ChunkProviderServer.java
@@ -83,6 +83,24 @@
@@ -86,6 +86,24 @@
this.clearCache();
}
@@ -25,7 +25,7 @@
@Override
public LightEngineThreaded getLightEngine() {
return this.lightEngine;
@@ -127,7 +145,7 @@
@@ -130,7 +148,7 @@
for (int l = 0; l < 4; ++l) {
if (k == this.lastChunkPos[l] && chunkstatus == this.lastChunkStatus[l]) {
ichunkaccess = this.lastChunk[l];
@@ -34,7 +34,7 @@
return ichunkaccess;
}
}
@@ -175,12 +193,12 @@
@@ -178,12 +196,12 @@
if (playerchunk == null) {
return null;
} else {
@@ -49,7 +49,7 @@
if (ichunkaccess1 != null) {
this.storeInCache(k, ichunkaccess1, ChunkStatus.FULL);
@@ -228,7 +246,15 @@
@@ -231,7 +249,15 @@
int l = 33 + ChunkStatus.getDistance(chunkstatus);
PlayerChunk playerchunk = this.getVisibleChunkIfPresent(k);
@@ -66,7 +66,7 @@
this.distanceManager.addTicket(TicketType.UNKNOWN, chunkcoordintpair, l, chunkcoordintpair);
if (this.chunkAbsent(playerchunk, l)) {
GameProfilerFiller gameprofilerfiller = this.level.getProfiler();
@@ -247,7 +273,7 @@
@@ -250,7 +276,7 @@
}
private boolean chunkAbsent(@Nullable PlayerChunk playerchunk, int i) {
@@ -75,7 +75,7 @@
}
@Override
@@ -314,7 +340,7 @@
@@ -317,7 +343,7 @@
} else if (!this.level.shouldTickBlocksAt(i)) {
return false;
} else {
@@ -84,7 +84,7 @@
return either != null && either.left().isPresent();
}
@@ -327,11 +353,31 @@
@@ -330,11 +356,31 @@
@Override
public void close() throws IOException {
@@ -117,7 +117,7 @@
@Override
public void tick(BooleanSupplier booleansupplier) {
this.level.getProfiler().push("purge");
@@ -360,7 +406,7 @@
@@ -363,7 +409,7 @@
gameprofilerfiller.push("pollingChunks");
int k = this.level.getGameRules().getInt(GameRules.RULE_RANDOMTICKING);
@@ -126,7 +126,7 @@
gameprofilerfiller.push("naturalSpawnCount");
int l = this.distanceManager.getNaturalSpawnChunkCount();
@@ -381,7 +427,7 @@
@@ -384,7 +430,7 @@
}
gameprofilerfiller.popPush("spawnAndTick");
@@ -135,7 +135,7 @@
Collections.shuffle(list);
Iterator iterator1 = list.iterator();
@@ -571,18 +617,26 @@
@@ -579,18 +625,26 @@
}
@Override
@@ -156,20 +156,19 @@
}
}
- private static final class a extends Record {
- private static record a(Chunk a, PlayerChunk b) {
+ // CraftBukkit start - decompile error
+ private static final record a(Chunk chunk, PlayerChunk holder) {
+ private static record a(Chunk chunk, PlayerChunk holder) {
+ /*
final Chunk chunk;
final PlayerChunk holder;
@@ -602,6 +656,8 @@
public final boolean equals(Object object) {
return this.equals<invokedynamic>(this, object);
@@ -606,5 +660,7 @@
public PlayerChunk holder() {
return this.holder;
}
+ */
+ // CraftBukkit end
public Chunk chunk() {
return this.chunk;
}
}