Update to Minecraft 1.18.2

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2022-03-01 02:00:00 +11:00
parent bd40300a4f
commit 9ee989ea81
184 changed files with 1785 additions and 1785 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/level/ChunkProviderServer.java
+++ b/net/minecraft/server/level/ChunkProviderServer.java
@@ -86,6 +86,24 @@
@@ -83,6 +83,24 @@
this.clearCache();
}
@@ -18,14 +18,14 @@
+ if (chunk == null) {
+ return null;
+ }
+ return chunk.getFullChunkUnchecked();
+ return chunk.getFullChunk();
+ }
+ // CraftBukkit end
+
@Override
public LightEngineThreaded getLightEngine() {
return this.lightEngine;
@@ -130,7 +148,7 @@
@@ -127,7 +145,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;
}
}
@@ -178,12 +196,12 @@
@@ -175,12 +193,12 @@
if (playerchunk == null) {
return null;
} else {
@@ -49,7 +49,7 @@
if (ichunkaccess1 != null) {
this.storeInCache(k, ichunkaccess1, ChunkStatus.FULL);
@@ -231,7 +249,15 @@
@@ -228,7 +246,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();
@@ -250,7 +276,7 @@
@@ -247,7 +273,7 @@
}
private boolean chunkAbsent(@Nullable PlayerChunk playerchunk, int i) {
@@ -75,7 +75,7 @@
}
@Override
@@ -317,7 +343,7 @@
@@ -314,7 +340,7 @@
} else if (!this.level.shouldTickBlocksAt(i)) {
return false;
} else {
@@ -84,7 +84,7 @@
return either != null && either.left().isPresent();
}
@@ -330,11 +356,31 @@
@@ -327,11 +353,31 @@
@Override
public void close() throws IOException {
@@ -115,7 +115,7 @@
+ // CraftBukkit end
+
@Override
public void tick(BooleanSupplier booleansupplier) {
public void tick(BooleanSupplier booleansupplier, boolean flag) {
this.level.getProfiler().push("purge");
@@ -363,7 +409,7 @@
@@ -135,7 +135,7 @@
Collections.shuffle(list);
Iterator iterator1 = list.iterator();
@@ -579,18 +625,26 @@
@@ -581,18 +627,26 @@
}
@Override
@@ -164,7 +164,7 @@
final Chunk chunk;
final PlayerChunk holder;
@@ -606,5 +660,7 @@
@@ -608,5 +662,7 @@
public PlayerChunk holder() {
return this.holder;
}