mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-23 08:46:44 +01:00
Update to Minecraft 1.18-rc3
By: md_5 <git@md-5.net>
This commit is contained in:
parent
96d5854b53
commit
27643e5df2
4 changed files with 23 additions and 23 deletions
|
@ -74,7 +74,7 @@
|
||||||
boolean flag = either != null && either.right().isPresent();
|
boolean flag = either != null && either.right().isPresent();
|
||||||
|
|
||||||
if (!flag) {
|
if (!flag) {
|
||||||
@@ -338,7 +356,7 @@
|
@@ -348,7 +366,7 @@
|
||||||
this.pendingFullStateConfirmation = completablefuture1;
|
this.pendingFullStateConfirmation = completablefuture1;
|
||||||
completablefuture.thenAccept((either) -> {
|
completablefuture.thenAccept((either) -> {
|
||||||
either.ifLeft((chunk) -> {
|
either.ifLeft((chunk) -> {
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -355,6 +373,30 @@
|
@@ -365,6 +383,30 @@
|
||||||
boolean flag1 = this.ticketLevel <= PlayerChunkMap.MAX_CHUNK_DISTANCE;
|
boolean flag1 = this.ticketLevel <= PlayerChunkMap.MAX_CHUNK_DISTANCE;
|
||||||
PlayerChunk.State playerchunk_state = getFullChunkStatus(this.oldTicketLevel);
|
PlayerChunk.State playerchunk_state = getFullChunkStatus(this.oldTicketLevel);
|
||||||
PlayerChunk.State playerchunk_state1 = getFullChunkStatus(this.ticketLevel);
|
PlayerChunk.State playerchunk_state1 = getFullChunkStatus(this.ticketLevel);
|
||||||
|
@ -114,7 +114,7 @@
|
||||||
|
|
||||||
if (flag) {
|
if (flag) {
|
||||||
Either<IChunkAccess, PlayerChunk.Failure> either = Either.right(new PlayerChunk.Failure() {
|
Either<IChunkAccess, PlayerChunk.Failure> either = Either.right(new PlayerChunk.Failure() {
|
||||||
@@ -425,6 +467,26 @@
|
@@ -435,6 +477,26 @@
|
||||||
|
|
||||||
this.onLevelChange.onLevelChange(this.pos, this::getQueueLevel, this.ticketLevel, this::setQueueLevel);
|
this.onLevelChange.onLevelChange(this.pos, this::getQueueLevel, this.ticketLevel, this::setQueueLevel);
|
||||||
this.oldTicketLevel = this.ticketLevel;
|
this.oldTicketLevel = this.ticketLevel;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/net/minecraft/server/level/PlayerChunkMap.java
|
--- a/net/minecraft/server/level/PlayerChunkMap.java
|
||||||
+++ b/net/minecraft/server/level/PlayerChunkMap.java
|
+++ b/net/minecraft/server/level/PlayerChunkMap.java
|
||||||
@@ -95,6 +95,11 @@
|
@@ -96,6 +96,11 @@
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.e {
|
public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.e {
|
||||||
|
|
||||||
private static final byte CHUNK_TYPE_REPLACEABLE = -1;
|
private static final byte CHUNK_TYPE_REPLACEABLE = -1;
|
||||||
@@ -134,6 +139,27 @@
|
@@ -135,6 +140,27 @@
|
||||||
private final Queue<Runnable> unloadQueue;
|
private final Queue<Runnable> unloadQueue;
|
||||||
int viewDistance;
|
int viewDistance;
|
||||||
|
|
||||||
|
@ -40,22 +40,22 @@
|
||||||
public PlayerChunkMap(WorldServer worldserver, Convertable.ConversionSession convertable_conversionsession, DataFixer datafixer, DefinedStructureManager definedstructuremanager, Executor executor, IAsyncTaskHandler<Runnable> iasynctaskhandler, ILightAccess ilightaccess, ChunkGenerator chunkgenerator, WorldLoadListener worldloadlistener, ChunkStatusUpdateListener chunkstatusupdatelistener, Supplier<WorldPersistentData> supplier, int i, boolean flag) {
|
public PlayerChunkMap(WorldServer worldserver, Convertable.ConversionSession convertable_conversionsession, DataFixer datafixer, DefinedStructureManager definedstructuremanager, 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);
|
super(convertable_conversionsession.getDimensionPath(worldserver.dimension()).resolve("region"), datafixer, flag);
|
||||||
this.visibleChunkMap = this.updatingChunkMap.clone();
|
this.visibleChunkMap = this.updatingChunkMap.clone();
|
||||||
@@ -327,9 +353,12 @@
|
@@ -329,9 +355,12 @@
|
||||||
|
CompletableFuture<List<Either<IChunkAccess, PlayerChunk.Failure>>> completablefuture1 = SystemUtils.sequence(list);
|
||||||
return completablefuture1.thenApply((list1) -> {
|
CompletableFuture<Either<List<IChunkAccess>, PlayerChunk.Failure>> completablefuture2 = completablefuture1.thenApply((list2) -> {
|
||||||
List<IChunkAccess> list2 = Lists.newArrayList();
|
List<IChunkAccess> list3 = Lists.newArrayList();
|
||||||
- final int l1 = 0;
|
- final int l1 = 0;
|
||||||
+ // CraftBukkit start - decompile error
|
+ // CraftBukkit start - decompile error
|
||||||
+ int cnt = 0;
|
+ int cnt = 0;
|
||||||
|
|
||||||
- for (Iterator iterator = list1.iterator(); iterator.hasNext(); ++l1) {
|
- for (Iterator iterator = list2.iterator(); iterator.hasNext(); ++l1) {
|
||||||
+ for (Iterator iterator = list1.iterator(); iterator.hasNext(); ++cnt) {
|
+ for (Iterator iterator = list2.iterator(); iterator.hasNext(); ++cnt) {
|
||||||
+ final int l1 = cnt;
|
+ final int l1 = cnt;
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
final Either<IChunkAccess, PlayerChunk.Failure> either = (Either) iterator.next();
|
final Either<IChunkAccess, PlayerChunk.Failure> either = (Either) iterator.next();
|
||||||
Optional<IChunkAccess> optional = either.left();
|
Optional<IChunkAccess> optional = either.left();
|
||||||
|
|
||||||
@@ -490,7 +519,7 @@
|
@@ -501,7 +530,7 @@
|
||||||
|
|
||||||
private void scheduleUnload(long i, PlayerChunk playerchunk) {
|
private void scheduleUnload(long i, PlayerChunk playerchunk) {
|
||||||
CompletableFuture<IChunkAccess> completablefuture = playerchunk.getChunkToSave();
|
CompletableFuture<IChunkAccess> completablefuture = playerchunk.getChunkToSave();
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
CompletableFuture<IChunkAccess> completablefuture1 = playerchunk.getChunkToSave();
|
CompletableFuture<IChunkAccess> completablefuture1 = playerchunk.getChunkToSave();
|
||||||
|
|
||||||
if (completablefuture1 != completablefuture) {
|
if (completablefuture1 != completablefuture) {
|
||||||
@@ -669,7 +698,21 @@
|
@@ -680,7 +709,21 @@
|
||||||
|
|
||||||
private static void postLoadProtoChunk(WorldServer worldserver, List<NBTTagCompound> list) {
|
private static void postLoadProtoChunk(WorldServer worldserver, List<NBTTagCompound> list) {
|
||||||
if (!list.isEmpty()) {
|
if (!list.isEmpty()) {
|
||||||
|
@ -87,16 +87,16 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -767,7 +810,7 @@
|
@@ -778,7 +821,7 @@
|
||||||
if (!playerchunk.wasAccessibleSinceLastSave()) {
|
if (!playerchunk.wasAccessibleSinceLastSave()) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
- IChunkAccess ichunkaccess = (IChunkAccess) playerchunk.getChunkToSave().getNow((Object) null);
|
- IChunkAccess ichunkaccess = (IChunkAccess) playerchunk.getChunkToSave().getNow((Object) null);
|
||||||
+ IChunkAccess ichunkaccess = (IChunkAccess) playerchunk.getChunkToSave().getNow(null); // CraftBukkit - decompile error
|
+ IChunkAccess ichunkaccess = (IChunkAccess) playerchunk.getChunkToSave().getNow(null); // CraftBukkit - decompile error
|
||||||
boolean flag;
|
|
||||||
|
|
||||||
if (ichunkaccess instanceof ProtoChunkExtension) {
|
if (!(ichunkaccess instanceof ProtoChunkExtension) && !(ichunkaccess instanceof Chunk)) {
|
||||||
@@ -922,7 +965,8 @@
|
return false;
|
||||||
|
@@ -927,7 +970,8 @@
|
||||||
return ichunkaccess instanceof Chunk ? Optional.of((Chunk) ichunkaccess) : Optional.empty();
|
return ichunkaccess instanceof Chunk ? Optional.of((Chunk) ichunkaccess) : Optional.empty();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@
|
||||||
return chunk.getBlockEntities().size();
|
return chunk.getBlockEntities().size();
|
||||||
}).orElse(0), tickingtracker.getTicketDebugString(i), tickingtracker.getLevel(i), optional1.map((chunk) -> {
|
}).orElse(0), tickingtracker.getTicketDebugString(i), tickingtracker.getLevel(i), optional1.map((chunk) -> {
|
||||||
return chunk.getBlockTicks().count();
|
return chunk.getBlockTicks().count();
|
||||||
@@ -935,7 +979,7 @@
|
@@ -940,7 +984,7 @@
|
||||||
|
|
||||||
private static String printFuture(CompletableFuture<Either<Chunk, PlayerChunk.Failure>> completablefuture) {
|
private static String printFuture(CompletableFuture<Either<Chunk, PlayerChunk.Failure>> completablefuture) {
|
||||||
try {
|
try {
|
||||||
|
@ -115,7 +115,7 @@
|
||||||
|
|
||||||
return either != null ? (String) either.map((chunk) -> {
|
return either != null ? (String) either.map((chunk) -> {
|
||||||
return "done";
|
return "done";
|
||||||
@@ -953,7 +997,7 @@
|
@@ -958,7 +1002,7 @@
|
||||||
private NBTTagCompound readChunk(ChunkCoordIntPair chunkcoordintpair) throws IOException {
|
private NBTTagCompound readChunk(ChunkCoordIntPair chunkcoordintpair) throws IOException {
|
||||||
NBTTagCompound nbttagcompound = this.read(chunkcoordintpair);
|
NBTTagCompound nbttagcompound = this.read(chunkcoordintpair);
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean anyPlayerCloseEnoughForSpawning(ChunkCoordIntPair chunkcoordintpair) {
|
boolean anyPlayerCloseEnoughForSpawning(ChunkCoordIntPair chunkcoordintpair) {
|
||||||
@@ -1377,7 +1421,7 @@
|
@@ -1382,7 +1426,7 @@
|
||||||
public final Set<ServerPlayerConnection> seenBy = Sets.newIdentityHashSet();
|
public final Set<ServerPlayerConnection> seenBy = Sets.newIdentityHashSet();
|
||||||
|
|
||||||
public EntityTracker(Entity entity, int i, int j, boolean flag) {
|
public EntityTracker(Entity entity, int i, int j, boolean flag) {
|
||||||
|
@ -133,7 +133,7 @@
|
||||||
this.entity = entity;
|
this.entity = entity;
|
||||||
this.range = i;
|
this.range = i;
|
||||||
this.lastSectionPos = SectionPosition.of(entity);
|
this.lastSectionPos = SectionPosition.of(entity);
|
||||||
@@ -1430,12 +1474,20 @@
|
@@ -1435,12 +1479,20 @@
|
||||||
|
|
||||||
public void updatePlayer(EntityPlayer entityplayer) {
|
public void updatePlayer(EntityPlayer entityplayer) {
|
||||||
if (entityplayer != this.entity) {
|
if (entityplayer != this.entity) {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<groupId>org.bukkit</groupId>
|
<groupId>org.bukkit</groupId>
|
||||||
<artifactId>craftbukkit</artifactId>
|
<artifactId>craftbukkit</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<version>1.18-pre8-R0.1-SNAPSHOT</version>
|
<version>1.18-rc3-R0.1-SNAPSHOT</version>
|
||||||
<name>CraftBukkit</name>
|
<name>CraftBukkit</name>
|
||||||
<url>https://www.spigotmc.org/</url>
|
<url>https://www.spigotmc.org/</url>
|
||||||
|
|
||||||
|
|
|
@ -224,7 +224,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public String getMappingsVersion() {
|
public String getMappingsVersion() {
|
||||||
return "cacad4c83144be72fddd1739b88fc3a6";
|
return "9658396dadb575219230b3235b8a9144";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Reference in a new issue