Updated Upstream (Paper)

Upstream has released updates that appears to apply and compile correctly

Paper Changes:
862b8c18 Updated Upstream (Bukkit/CraftBukkit)
100d51eb Do not obfuscate air (#4149)
This commit is contained in:
William Blake Galbreath
2020-08-20 21:22:36 -05:00
parent 82bb07d418
commit e0c5a02e03
11 changed files with 27 additions and 77 deletions

View File

@@ -2745,7 +2745,7 @@ index 550232cb38..229c3b0f0c 100644
throwable = throwable1;
throw throwable1;
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 5dc8f87dae..6c0d8fdaf2 100644
index 97e61dae79..68340bf46e 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -137,7 +137,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -3880,7 +3880,7 @@ index a0555b132d..9caf6598f8 100644
return fluid.a((Tag) TagsFluid.WATER) ? PathType.WATER : (fluid.a((Tag) TagsFluid.LAVA) ? PathType.LAVA : (a(iblockdata) ? PathType.DAMAGE_FIRE : (BlockDoor.l(iblockdata) && !(Boolean) iblockdata.get(BlockDoor.OPEN) ? PathType.DOOR_WOOD_CLOSED : (block instanceof BlockDoor && material == Material.ORE && !(Boolean) iblockdata.get(BlockDoor.OPEN) ? PathType.DOOR_IRON_CLOSED : (block instanceof BlockDoor && (Boolean) iblockdata.get(BlockDoor.OPEN) ? PathType.DOOR_OPEN : (block instanceof BlockMinecartTrackAbstract ? PathType.RAIL : (block instanceof BlockLeaves ? PathType.LEAVES : (!block.a((Tag) TagsBlock.FENCES) && !block.a((Tag) TagsBlock.WALLS) && (!(block instanceof BlockFenceGate) || (Boolean) iblockdata.get(BlockFenceGate.OPEN)) ? (!iblockdata.a(iblockaccess, blockposition, PathMode.LAND) ? PathType.BLOCKED : PathType.OPEN) : PathType.FENCE))))))));
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
index 835320bde4..a65da4e7d1 100644
index fc6197dd5b..d4fd01cd29 100644
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
@@ -361,7 +361,7 @@ public class PlayerChunk {
@@ -3891,8 +3891,8 @@ index 835320bde4..a65da4e7d1 100644
+ if (chunk != null && (blockposition.getY() >= 0 && blockposition.getY() <= 255)) { // Tuinity - updates cannot happen in sections that don't exist
byte b0 = (byte) SectionPosition.a(blockposition.getY());
if (this.dirtyBlocks[b0] == null) {
@@ -419,7 +419,7 @@ public class PlayerChunk {
if (b0 >= this.dirtyBlocks.length) return; // CraftBukkit - SPIGOT-6086
@@ -420,7 +420,7 @@ public class PlayerChunk {
this.a(world, blockposition, iblockdata);
} else {
ChunkSection chunksection = chunk.getSections()[sectionposition.getY()];
@@ -3901,7 +3901,7 @@ index 835320bde4..a65da4e7d1 100644
PacketPlayOutMultiBlockChange packetplayoutmultiblockchange = new PacketPlayOutMultiBlockChange(sectionposition, shortset, chunksection, this.x);
this.a(packetplayoutmultiblockchange, false);
@@ -502,6 +502,7 @@ public class PlayerChunk {
@@ -503,6 +503,7 @@ public class PlayerChunk {
// Paper end - per player view distance
}
@@ -3909,7 +3909,7 @@ index 835320bde4..a65da4e7d1 100644
public CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> a(ChunkStatus chunkstatus, PlayerChunkMap playerchunkmap) {
int i = chunkstatus.c();
CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> completablefuture = (CompletableFuture) this.statusFutures.get(i);
@@ -557,6 +558,7 @@ public class PlayerChunk {
@@ -558,6 +559,7 @@ public class PlayerChunk {
}
protected void a(PlayerChunkMap playerchunkmap) {
@@ -3917,7 +3917,7 @@ index 835320bde4..a65da4e7d1 100644
ChunkStatus chunkstatus = getChunkStatus(this.oldTicketLevel);
ChunkStatus chunkstatus1 = getChunkStatus(this.ticketLevel);
boolean flag = this.oldTicketLevel <= PlayerChunkMap.GOLDEN_TICKET;
@@ -566,7 +568,8 @@ public class PlayerChunk {
@@ -567,7 +569,8 @@ public class PlayerChunk {
// CraftBukkit start
// ChunkUnloadEvent: Called before the chunk is unloaded: isChunkLoaded is still true and chunk can still be modified by plugins.
if (playerchunk_state.isAtLeast(PlayerChunk.State.BORDER) && !playerchunk_state1.isAtLeast(PlayerChunk.State.BORDER)) {
@@ -3927,7 +3927,7 @@ index 835320bde4..a65da4e7d1 100644
Chunk chunk = (Chunk)either.left().orElse(null);
if (chunk != null) {
playerchunkmap.callbackExecutor.execute(() -> {
@@ -631,7 +634,8 @@ public class PlayerChunk {
@@ -632,7 +635,8 @@ public class PlayerChunk {
if (!flag2 && flag3) {
// Paper start - cache ticking ready status
int expectCreateCount = ++this.fullChunkCreateCount;
@@ -3937,7 +3937,7 @@ index 835320bde4..a65da4e7d1 100644
if (either.left().isPresent() && PlayerChunk.this.fullChunkCreateCount == expectCreateCount) {
// note: Here is a very good place to add callbacks to logic waiting on this.
Chunk fullChunk = either.left().get();
@@ -662,7 +666,8 @@ public class PlayerChunk {
@@ -663,7 +667,8 @@ public class PlayerChunk {
if (!flag4 && flag5) {
// Paper start - cache ticking ready status
@@ -3947,7 +3947,7 @@ index 835320bde4..a65da4e7d1 100644
if (either.left().isPresent()) {
// note: Here is a very good place to add callbacks to logic waiting on this.
Chunk tickingChunk = either.left().get();
@@ -693,12 +698,20 @@ public class PlayerChunk {
@@ -694,12 +699,20 @@ public class PlayerChunk {
}
// Paper start - cache ticking ready status
@@ -3970,7 +3970,7 @@ index 835320bde4..a65da4e7d1 100644
@@ -710,6 +723,17 @@ public class PlayerChunk {
@@ -711,6 +724,17 @@ public class PlayerChunk {
if (flag6 && !flag7) {
this.entityTickingFuture.complete(PlayerChunk.UNLOADED_CHUNK); this.isEntityTickingReady = false; // Paper - cache chunk ticking stage
@@ -3988,7 +3988,7 @@ index 835320bde4..a65da4e7d1 100644
this.entityTickingFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE;
}
@@ -736,7 +760,8 @@ public class PlayerChunk {
@@ -737,7 +761,8 @@ public class PlayerChunk {
// CraftBukkit start
// ChunkLoadEvent: Called after the chunk is loaded: isChunkLoaded returns true and chunk is ready to be modified by plugins.
if (!playerchunk_state.isAtLeast(PlayerChunk.State.BORDER) && playerchunk_state1.isAtLeast(PlayerChunk.State.BORDER)) {
@@ -6926,7 +6926,7 @@ index 7d83cf39ae..2acdb08072 100644
public void restart() {
org.spigotmc.RestartCommand.restart();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index fe7e8d97a2..2ac199f91d 100644
index 4ab3db10e2..fabc062e19 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -336,6 +336,14 @@ public class CraftWorld implements World {
@@ -6944,7 +6944,7 @@ index fe7e8d97a2..2ac199f91d 100644
}
@Override
@@ -402,14 +410,7 @@ public class CraftWorld implements World {
@@ -407,14 +415,7 @@ public class CraftWorld implements World {
@Override
public Chunk getChunkAt(int x, int z) {
@@ -6960,7 +6960,7 @@ index fe7e8d97a2..2ac199f91d 100644
}
// Paper start
@@ -492,6 +493,7 @@ public class CraftWorld implements World {
@@ -497,6 +498,7 @@ public class CraftWorld implements World {
org.spigotmc.AsyncCatcher.catchOp("chunk unload"); // Spigot
if (isChunkLoaded(x, z)) {
world.getChunkProvider().removeTicket(TicketType.PLUGIN, new ChunkCoordIntPair(x, z), 0, Unit.INSTANCE); // Paper
@@ -6968,7 +6968,7 @@ index fe7e8d97a2..2ac199f91d 100644
}
return true;
@@ -2524,7 +2526,7 @@ public class CraftWorld implements World {
@@ -2529,7 +2531,7 @@ public class CraftWorld implements World {
}
return this.world.getChunkProvider().getChunkAtAsynchronously(x, z, gen, urgent).thenComposeAsync((either) -> {
net.minecraft.server.Chunk chunk = (net.minecraft.server.Chunk) either.left().orElse(null);
@@ -6978,7 +6978,7 @@ index fe7e8d97a2..2ac199f91d 100644
}, MinecraftServer.getServer());
}
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 082a35004f..0db5338583 100644
index bac292e6d8..b4e65963ef 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -138,6 +138,13 @@ public class Main {