Updated Upstream (Paper & Tuinity)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
d4dcc1a2e Updated Upstream (CraftBukkit)
e886d8118 Updated Upstream ()
8bc0c6c31 Updated Upstream (CraftBukkit/Spigot) (#5169)
002f65b8b living entity allow attribute registration (#4723)
69a5c67b1 fix calling setSize on dead slimes causing invincibility (fixes #5137) (#5168)

Tuinity Changes:
87e0cd99e Print exceptions for light scheduling
This commit is contained in:
BillyGalbreath
2021-02-06 11:27:54 -06:00
parent 5cff60d5c6
commit 7fc2d31be7
24 changed files with 80 additions and 76 deletions

View File

@@ -9038,7 +9038,7 @@ index 097cb9896c525a605c50e83548f828e0c71ab3d5..17cf00dfe8b24adf2fb66eca4710ab78
i = event.getRadius();
flag = event.shouldFindUnexplored();
diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java
index 3c7b225edbe23dc1959002293a6f8b816287b5a8..f1c686810fb4e9c05df45d664c93af73d17f0624 100644
index 76f9bb728def91744910d0b680b73e753f1a2b26..7f3887b0894aca0f972922f434382646a6ad6174 100644
--- a/src/main/java/net/minecraft/server/ChunkMapDistance.java
+++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java
@@ -31,7 +31,7 @@ public abstract class ChunkMapDistance {
@@ -9211,8 +9211,8 @@ index 3c7b225edbe23dc1959002293a6f8b816287b5a8..f1c686810fb4e9c05df45d664c93af73
+ com.tuinity.tuinity.util.TickThread.softEnsureTickThread("Async player remove"); // Tuinity
long i = sectionposition.r().pair();
ObjectSet<EntityPlayer> objectset = (ObjectSet) this.c.get(i);
@@ -446,6 +499,7 @@ public abstract class ChunkMapDistance {
if (objectset == null) return; // CraftBukkit - SPIGOT-6208
@@ -447,6 +500,7 @@ public abstract class ChunkMapDistance {
// CraftBukkit start
public <T> void removeAllTicketsFor(TicketType<T> ticketType, int ticketLevel, T ticketIdentifier) {
@@ -10994,7 +10994,7 @@ index b98e60772bad7e06845b50fdc11e98c0ea775d3d..e0bbfe1422cbad811ecb43d7436380d8
while (objectiterator.hasNext()) {
entry = (Entry) objectiterator.next();
diff --git a/src/main/java/net/minecraft/server/LightEngineThreaded.java b/src/main/java/net/minecraft/server/LightEngineThreaded.java
index 2f9c97dd4e1d705a87772d18c7ab4883a876af08..3c4c3e43b5b947f7332f2dd6d1f1dae4be7708ab 100644
index 2f9c97dd4e1d705a87772d18c7ab4883a876af08..001ac05cf26237eec8a77c476e678ff6d0840311 100644
--- a/src/main/java/net/minecraft/server/LightEngineThreaded.java
+++ b/src/main/java/net/minecraft/server/LightEngineThreaded.java
@@ -2,6 +2,11 @@ package net.minecraft.server;
@@ -11110,8 +11110,8 @@ index 2f9c97dd4e1d705a87772d18c7ab4883a876af08..3c4c3e43b5b947f7332f2dd6d1f1dae4
+ } else {
+ this.holdingChunks.put(coordinate, current + 1);
+ }
}
+ }
+
+ protected final void releaseLightWorkChunk(int chunkX, int chunkZ) {
+ final long coordinate = MCUtil.getCoordinateKey(chunkX, chunkZ);
+ final int current = this.holdingChunks.get(coordinate);
@@ -11207,8 +11207,8 @@ index 2f9c97dd4e1d705a87772d18c7ab4883a876af08..3c4c3e43b5b947f7332f2dd6d1f1dae4
+ });
+ }
+ }, this.playerChunkMap.mainInvokingExecutor);
+ }
+
}
+ // override things from superclass
+
+ @Override
@@ -11329,7 +11329,7 @@ index 2f9c97dd4e1d705a87772d18c7ab4883a876af08..3c4c3e43b5b947f7332f2dd6d1f1dae4
this.a(chunkcoordintpair.x, chunkcoordintpair.z, () -> {
return 0;
}, LightEngineThreaded.Update.PRE_UPDATE, SystemUtils.a(() -> {
@@ -264,6 +513,31 @@ public class LightEngineThreaded extends LightEngine implements AutoCloseable {
@@ -264,6 +513,35 @@ public class LightEngineThreaded extends LightEngine implements AutoCloseable {
public CompletableFuture<IChunkAccess> a(IChunkAccess ichunkaccess, boolean flag) {
ChunkCoordIntPair chunkcoordintpair = ichunkaccess.getPos();
@@ -11354,6 +11354,10 @@ index 2f9c97dd4e1d705a87772d18c7ab4883a876af08..3c4c3e43b5b947f7332f2dd6d1f1dae4
+ }, (runnable) -> {
+ LightEngineThreaded.this.scheduleTask(chunkcoordintpair.x, chunkcoordintpair.z, LightEngineThreaded.Update.PRE_UPDATE, runnable);
+ LightEngineThreaded.this.queueUpdate();
+ }).whenComplete((IChunkAccess chunk, Throwable throwable) -> {
+ if (throwable != null && !(throwable instanceof ThreadDeath)) {
+ MinecraftServer.LOGGER.fatal("Failed to light chunk " + chunk.getPos().toString() + " in world '" + this.theLightEngine.getWorld().getWorld().getName() + "'");
+ }
+ });
+ }
+ // Tuinity end - replace light engine
@@ -11361,7 +11365,7 @@ index 2f9c97dd4e1d705a87772d18c7ab4883a876af08..3c4c3e43b5b947f7332f2dd6d1f1dae4
// Paper start
//ichunkaccess.b(false); // Don't need to disable this
long pair = chunkcoordintpair.pair();
@@ -311,7 +585,7 @@ public class LightEngineThreaded extends LightEngine implements AutoCloseable {
@@ -311,7 +589,7 @@ public class LightEngineThreaded extends LightEngine implements AutoCloseable {
}
public void queueUpdate() {
@@ -11370,7 +11374,7 @@ index 2f9c97dd4e1d705a87772d18c7ab4883a876af08..3c4c3e43b5b947f7332f2dd6d1f1dae4
this.b.a((() -> { // Paper - decompile error
this.b();
this.g.set(false);
@@ -325,17 +599,36 @@ public class LightEngineThreaded extends LightEngine implements AutoCloseable {
@@ -325,17 +603,36 @@ public class LightEngineThreaded extends LightEngine implements AutoCloseable {
private final java.util.List<Runnable> pre = new java.util.ArrayList<>();
private final java.util.List<Runnable> post = new java.util.ArrayList<>();
private void b() {
@@ -13398,7 +13402,7 @@ index 87b1ff21957d5d708209257e569785aeaf191181..4058c1f7ada7d0c9e4ba73a0073b4f94
Stream<VoxelShape> stream = iworldreader.d(this.player, this.player.getBoundingBox().shrink(9.999999747378752E-6D), (entity) -> {
return true;
diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
index 7ea293f38dedd6066601d94adbe175a31c502e1f..e698dd22607b2b2c4068c5bfb03ac53eb5bac080 100644
index 8c7080777b370f97e1291dfedde5b419290f39cc..7fff1b3e4eda519851b714502d33122c1e408009 100644
--- a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
+++ b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
@@ -13,10 +13,30 @@ public class PlayerConnectionUtils {
@@ -15702,7 +15706,7 @@ index 5d9d58411f2fad9d5da703f964d269b4a7c2b205..f0fdfd6891e59891e7370a2d682b65c6
private double c;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 02303f00e243748b9d1c4a37719fcf5c8d271ed9..28ee325fcc8b50397768363403823f2e3391d8c8 100644
index f5ab99156ce5429e63976183cbf115d5340a83a1..93c0c3376c3cb2fe416c8ae3e740ffda5f985b78 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -94,6 +94,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -15786,7 +15790,7 @@ index 02303f00e243748b9d1c4a37719fcf5c8d271ed9..28ee325fcc8b50397768363403823f2e
IBlockData iblockdata = newBlock;
IBlockData iblockdata1 = oldBlock;
IBlockData iblockdata2 = actualBlock;
@@ -896,6 +938,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -895,6 +937,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
return;
// Paper end
}
@@ -15794,7 +15798,7 @@ index 02303f00e243748b9d1c4a37719fcf5c8d271ed9..28ee325fcc8b50397768363403823f2e
}
// Paper start - Prevent armor stands from doing entity lookups
@Override
@@ -1079,10 +1122,44 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -1078,10 +1121,44 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
return this.getChunkAt(i, j, ChunkStatus.FULL, false);
}
@@ -15840,7 +15844,7 @@ index 02303f00e243748b9d1c4a37719fcf5c8d271ed9..28ee325fcc8b50397768363403823f2e
int i = MathHelper.floor((axisalignedbb.minX - 2.0D) / 16.0D);
int j = MathHelper.floor((axisalignedbb.maxX + 2.0D) / 16.0D);
int k = MathHelper.floor((axisalignedbb.minZ - 2.0D) / 16.0D);
@@ -1138,7 +1215,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -1137,7 +1214,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
Chunk chunk = (Chunk)this.getChunkIfLoadedImmediately(i1, j1); // Paper
if (chunk != null) {
@@ -15849,7 +15853,7 @@ index 02303f00e243748b9d1c4a37719fcf5c8d271ed9..28ee325fcc8b50397768363403823f2e
}
}
}
@@ -1161,7 +1238,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -1160,7 +1237,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
Chunk chunk = (Chunk)this.getChunkIfLoadedImmediately(i1, j1); // Paper
if (chunk != null) {
@@ -15858,7 +15862,7 @@ index 02303f00e243748b9d1c4a37719fcf5c8d271ed9..28ee325fcc8b50397768363403823f2e
}
}
}
@@ -1169,6 +1246,106 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -1168,6 +1245,106 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
return list;
}
@@ -16888,10 +16892,10 @@ index 7511e38130f38703164395a670f12d1af648ff04..e602efcb3fad390bb6bff1055e782bba
}
value.append("},");
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 9ad6ea5ef331c3c057f39115d00f855ca57e219b..bd7bccbea1a0a052ef7bd6ab299ae72336874911 100644
index 85023c68a9c85802383cfcf52ec21392abdf3d85..44524e08bed8897e43e408b6f179bf798fed9b62 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -232,7 +232,7 @@ import javax.annotation.Nullable; // Paper
@@ -231,7 +231,7 @@ import javax.annotation.Nullable; // Paper
import javax.annotation.Nonnull; // Paper
public final class CraftServer implements Server {
@@ -16900,7 +16904,7 @@ index 9ad6ea5ef331c3c057f39115d00f855ca57e219b..bd7bccbea1a0a052ef7bd6ab299ae723
private final String serverVersion;
private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft");
@@ -861,6 +861,7 @@ public final class CraftServer implements Server {
@@ -860,6 +860,7 @@ public final class CraftServer implements Server {
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
com.destroystokyo.paper.PaperConfig.init((File) console.options.valueOf("paper-settings")); // Paper
@@ -16908,7 +16912,7 @@ index 9ad6ea5ef331c3c057f39115d00f855ca57e219b..bd7bccbea1a0a052ef7bd6ab299ae723
for (WorldServer world : console.getWorlds()) {
world.worldDataServer.setDifficulty(config.difficulty);
world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals);
@@ -895,6 +896,7 @@ public final class CraftServer implements Server {
@@ -894,6 +895,7 @@ public final class CraftServer implements Server {
}
world.spigotConfig.init(); // Spigot
world.paperConfig.init(); // Paper
@@ -16916,7 +16920,7 @@ index 9ad6ea5ef331c3c057f39115d00f855ca57e219b..bd7bccbea1a0a052ef7bd6ab299ae723
}
Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
@@ -1858,7 +1860,10 @@ public final class CraftServer implements Server {
@@ -1857,7 +1859,10 @@ public final class CraftServer implements Server {
@Override
public boolean isPrimaryThread() {