Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@9cab01e [ci skip] Update Gradle wrapper to 7.4
PaperMC/Paper@cdb893b Add mid-tick task execution to block ticking
PaperMC/Paper@854f3d3 Put world into worldlist before initing the world
PaperMC/Paper@db81163 Execute mid tick tasks during tile entity ticking
PaperMC/Paper@501834e Fix custom inventory holders (#6199)
PaperMC/Paper@04a337a Add some missing deprecations to the adventure patch (#7500)
PaperMC/Paper@b6dad9c Fix desync on teleporting entity on first tick (#7183)
PaperMC/Paper@2a55e35 Option to have default CustomSpawners in custom worlds (#7493)
PaperMC/Paper@bfa50ad Custom Potion Mixes (#6744)
This commit is contained in:
BillyGalbreath
2022-02-23 09:40:25 -06:00
parent 52228a11c1
commit 4afe68b005
28 changed files with 105 additions and 105 deletions

View File

@@ -20,7 +20,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/build.gradle.kts b/build.gradle.kts
index 028f6a1795ceb99d1760c73b0980238677b4b8bc..86548210e50879504f646ef3aa46927998f2d775 100644
index 4662952bd0a389fe77e00ede9ab4a57f33522794..a37ca23682272d5ddaf1a2246917e6c46b69da86 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -18,8 +18,12 @@ repositories {
@@ -111,7 +111,7 @@ index 218f5bafeed8551b55b91c7fccaf6935c8b631ca..f2fe6ea3719ff8b2913b7a3a939d7a5b
metrics.addCustomChart(new Metrics.DrilldownPie("java_version", () -> {
Map<String, Map<String, Integer>> map = new HashMap<>();
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 153f07bac06093b43a1f5b0f8e1a46ffbe6407e5..638cffa552d804d5901e1d099691fdfa4c65a7a7 100644
index a7ebf6d9f79ce50a90c3c903563e00a10607f9f2..0b51ae930df9009fc02f11d831cdceb984194876 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -232,6 +232,15 @@ public class PaperConfig {
@@ -2173,7 +2173,7 @@ index 7bddc7517356cc74104dcc5c7c55522a53f2596f..d6a57cdad2c92521a800cb18d060d9d6
public static long getCoordinateKey(final ChunkPos pair) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 1674deebbeab0995ed7acacf8052e1daf4d2a7bc..a31f8bf3f4183a7a02f58f2321dbeaf427017b1c 100644
index c847a2b935130a293d9ac4c196c9cff27470649b..505e37b45c2712bb42cd834b527e8ddb0eae1236 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -310,6 +310,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2185,7 +2185,7 @@ index 1674deebbeab0995ed7acacf8052e1daf4d2a7bc..a31f8bf3f4183a7a02f58f2321dbeaf4
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
AtomicReference<S> atomicreference = new AtomicReference();
@@ -1710,7 +1712,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1719,7 +1721,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@DontObfuscate
public String getServerModName() {
@@ -2194,7 +2194,7 @@ index 1674deebbeab0995ed7acacf8052e1daf4d2a7bc..a31f8bf3f4183a7a02f58f2321dbeaf4
}
public SystemReport fillSystemReport(SystemReport details) {
@@ -2244,6 +2246,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2254,6 +2256,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public ProfilerFiller getProfiler() {
@@ -2372,18 +2372,18 @@ index e20fc528b85a8278bffab32845daac2208836748..7780c6cd92a716e62625df95841680b0
private void getFullChunk(long pos, Consumer<LevelChunk> chunkConsumer) {
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
index 9a6c67b614944f841813ec2892381c3342bc365c..e80176708db486190dd527e3ade5fc690ceb39f7 100644
index b0a79e335ac9dc24fc6f18010bf40716ecc724bf..c37afd850654905343dd2eb33881dab7d57d9137 100644
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
@@ -173,6 +173,7 @@ public class ServerEntity {
boolean flag4 = k < -32768L || k > 32767L || l < -32768L || l > 32767L || i1 < -32768L || i1 > 32767L;
@@ -174,6 +174,7 @@ public class ServerEntity {
if (this.entity instanceof net.minecraft.world.entity.decoration.Painting) {flag4 = true;} // Paper - Always send exact position for paintings
if (!flag4 && this.teleportDelay <= 400 && !this.wasRiding && this.wasOnGround == this.entity.isOnGround() && !(com.destroystokyo.paper.PaperConfig.sendFullPosForHardCollidingEntities && this.entity.hardCollides())) { // Paper - send full pos for hard colliding entities to prevent collision problems due to desync
+ if (flag2 || flag3 || this.entity instanceof AbstractArrow) { // Pufferfish
if ((!flag2 || !flag3) && !(this.entity instanceof AbstractArrow)) {
if (flag2) {
packet1 = new ClientboundMoveEntityPacket.Pos(this.entity.getId(), (short) ((int) k), (short) ((int) l), (short) ((int) i1), this.entity.isOnGround());
@@ -182,6 +183,7 @@ public class ServerEntity {
@@ -183,6 +184,7 @@ public class ServerEntity {
} else {
packet1 = new ClientboundMoveEntityPacket.PosRot(this.entity.getId(), (short) ((int) k), (short) ((int) l), (short) ((int) i1), (byte) i, (byte) j, this.entity.isOnGround());
}
@@ -2392,7 +2392,7 @@ index 9a6c67b614944f841813ec2892381c3342bc365c..e80176708db486190dd527e3ade5fc69
this.wasOnGround = this.entity.isOnGround();
this.teleportDelay = 0;
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 4ebdeca14b4b4378bb433d68d5f60da99ca95b82..740e1d7b299e78668bff5b176bbe54f478c73fd3 100644
index 835a17cd4ec487271ba28232280dd0fbf2687c4b..58604c77d9273c866e53f8ee62c7056acc76e004 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -667,7 +667,20 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -3413,7 +3413,7 @@ index e7ca5d6fb8922e7e8065864f736b06056be080a0..6c9e574851b518242dbbee9bce954b44
final String id;
private final GameRules.Category category;
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 87c8c59b9d47b6c292a92e97471c558c03453cfb..4f8b2617adc0013035cc0ca72bf1b83eb5c18c6c 100644
index 11e146241a01ab9ec206b9d3f39aebf5c201a16e..9f2a16d32a93a0bcbdfb2f3734cd9ee5c8d57c52 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -305,6 +305,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -3538,7 +3538,7 @@ index 87c8c59b9d47b6c292a92e97471c558c03453cfb..4f8b2617adc0013035cc0ca72bf1b83e
public boolean isInWorldBounds(BlockPos pos) {
return pos.isInsideBuildHeightAndWorldBoundsHorizontal(this); // Paper - use better/optimized check
}
@@ -973,13 +1074,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -978,13 +1079,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
try {
tickConsumer.accept(entity);
MinecraftServer.getServer().executeMidTickTasks(); // Paper - execute chunk tasks mid tick
@@ -3554,7 +3554,7 @@ index 87c8c59b9d47b6c292a92e97471c558c03453cfb..4f8b2617adc0013035cc0ca72bf1b83e
// Paper end
}
}
@@ -1441,6 +1542,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -1446,6 +1547,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
}
public ProfilerFiller getProfiler() {
@@ -4136,7 +4136,7 @@ index e387de8adc480eac27b58b6f3f0d331ffc4382f1..6dba9d6bb7b81fe176cc0fabbb60b554
@Nullable
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index dbbae437123163c60c3f60a48043967a8adbd124..e62a643990929dccf1c022a3c9eca12d08d5ca7d 100644
index 51f67a2944034552d57b939ef29e0249e74383b9..206754441b98e9386bb366d5ec57cffc0142fc94 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -251,7 +251,7 @@ import javax.annotation.Nullable; // Paper
@@ -4148,7 +4148,7 @@ index dbbae437123163c60c3f60a48043967a8adbd124..e62a643990929dccf1c022a3c9eca12d
private final String serverVersion;
private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft");
@@ -1044,6 +1044,11 @@ public final class CraftServer implements Server {
@@ -1045,6 +1045,11 @@ public final class CraftServer implements Server {
plugin.getDescription().getName(),
"This plugin is not properly shutting down its async tasks when it is being shut down. This task may throw errors during the final shutdown logs and might not complete before process dies."
));