Update to Minecraft 1.19.1

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2022-07-28 04:00:00 +10:00
parent 7c33b52741
commit f8db65033c
41 changed files with 654 additions and 579 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/level/PlayerChunkMap.java
+++ b/net/minecraft/server/level/PlayerChunkMap.java
@@ -102,6 +102,12 @@
@@ -103,6 +103,12 @@
import org.apache.commons.lang3.mutable.MutableObject;
import org.slf4j.Logger;
@@ -13,7 +13,7 @@
public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.e {
private static final byte CHUNK_TYPE_REPLACEABLE = -1;
@@ -144,6 +150,27 @@
@@ -145,6 +151,27 @@
private final Queue<Runnable> unloadQueue;
int viewDistance;
@@ -41,7 +41,7 @@
public PlayerChunkMap(WorldServer worldserver, Convertable.ConversionSession convertable_conversionsession, DataFixer datafixer, StructureTemplateManager structuretemplatemanager, Executor executor, IAsyncTaskHandler<Runnable> iasynctaskhandler, ILightAccess ilightaccess, ChunkGenerator chunkgenerator, WorldLoadListener worldloadlistener, ChunkStatusUpdateListener chunkstatusupdatelistener, Supplier<WorldPersistentData> supplier, int i, boolean flag) {
super(convertable_conversionsession.getDimensionPath(worldserver.dimension()).resolve("region"), datafixer, flag);
this.visibleChunkMap = this.updatingChunkMap.clone();
@@ -162,6 +189,11 @@
@@ -163,6 +190,11 @@
this.storageName = path.getFileName().toString();
this.level = worldserver;
this.generator = chunkgenerator;
@@ -53,7 +53,7 @@
if (chunkgenerator instanceof ChunkGeneratorAbstract) {
ChunkGeneratorAbstract chunkgeneratorabstract = (ChunkGeneratorAbstract) chunkgenerator;
@@ -313,9 +345,12 @@
@@ -314,9 +346,12 @@
CompletableFuture<List<Either<IChunkAccess, PlayerChunk.Failure>>> completablefuture1 = SystemUtils.sequence(list);
CompletableFuture<Either<List<IChunkAccess>, PlayerChunk.Failure>> completablefuture2 = completablefuture1.thenApply((list2) -> {
List<IChunkAccess> list3 = Lists.newArrayList();
@@ -68,7 +68,7 @@
final Either<IChunkAccess, PlayerChunk.Failure> either = (Either) iterator.next();
if (either == null) {
@@ -520,7 +555,7 @@
@@ -521,7 +556,7 @@
private void scheduleUnload(long i, PlayerChunk playerchunk) {
CompletableFuture<IChunkAccess> completablefuture = playerchunk.getChunkToSave();
@@ -77,7 +77,7 @@
CompletableFuture<IChunkAccess> completablefuture1 = playerchunk.getChunkToSave();
if (completablefuture1 != completablefuture) {
@@ -609,9 +644,9 @@
@@ -610,9 +645,9 @@
ProtoChunk protochunk = ChunkRegionLoader.read(this.level, this.poiManager, chunkcoordintpair, (NBTTagCompound) optional.get());
this.markPosition(chunkcoordintpair, protochunk.getStatus().getChunkType());
@@ -89,7 +89,7 @@
}
}, this.mainThreadExecutor).exceptionallyAsync((throwable) -> {
return this.handleChunkLoadFailure(throwable, chunkcoordintpair);
@@ -717,7 +752,21 @@
@@ -718,7 +753,21 @@
private static void postLoadProtoChunk(WorldServer worldserver, List<NBTTagCompound> list) {
if (!list.isEmpty()) {
@@ -112,7 +112,7 @@
}
}
@@ -816,7 +865,7 @@
@@ -817,7 +866,7 @@
if (!playerchunk.wasAccessibleSinceLastSave()) {
return false;
} else {
@@ -121,7 +121,7 @@
if (!(ichunkaccess instanceof ProtoChunkExtension) && !(ichunkaccess instanceof Chunk)) {
return false;
@@ -978,7 +1027,8 @@
@@ -979,7 +1028,8 @@
return ichunkaccess instanceof Chunk ? Optional.of((Chunk) ichunkaccess) : Optional.empty();
});
@@ -131,7 +131,7 @@
return chunk.getBlockEntities().size();
}).orElse(0), tickingtracker.getTicketDebugString(i), tickingtracker.getLevel(i), optional1.map((chunk) -> {
return chunk.getBlockTicks().count();
@@ -991,7 +1041,7 @@
@@ -992,7 +1042,7 @@
private static String printFuture(CompletableFuture<Either<Chunk, PlayerChunk.Failure>> completablefuture) {
try {
@@ -140,7 +140,7 @@
return either != null ? (String) either.map((chunk) -> {
return "done";
@@ -1007,12 +1057,14 @@
@@ -1008,12 +1058,14 @@
private CompletableFuture<Optional<NBTTagCompound>> readChunk(ChunkCoordIntPair chunkcoordintpair) {
return this.read(chunkcoordintpair).thenApplyAsync((optional) -> {
@@ -158,7 +158,7 @@
}
boolean anyPlayerCloseEnoughForSpawning(ChunkCoordIntPair chunkcoordintpair) {
@@ -1433,7 +1485,7 @@
@@ -1434,7 +1486,7 @@
public final Set<ServerPlayerConnection> seenBy = Sets.newIdentityHashSet();
public EntityTracker(Entity entity, int i, int j, boolean flag) {
@@ -167,7 +167,7 @@
this.entity = entity;
this.range = i;
this.lastSectionPos = SectionPosition.of((EntityAccess) entity);
@@ -1492,6 +1544,11 @@
@@ -1493,6 +1545,11 @@
double d2 = d0 * d0;
boolean flag = d1 <= d2 && this.entity.broadcastToPlayer(entityplayer);