diff --git a/gradle.properties b/gradle.properties index 6978959c5..96387c302 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,4 +5,4 @@ org.gradle.vfs.watch=false group=gg.pufferfish.pufferfish version=1.20.1-R0.1-SNAPSHOT mcVersion=1.20.1 -paperRef=b4e3b3d1dd447bac4cbf478595c1ec320bc6dd4b +paperRef=773dd724469bae89d0c2075edc3d1ddc8d5b0b18 diff --git a/patches/server/0001-Pufferfish-branding.patch b/patches/server/0001-Pufferfish-branding.patch index 8e1536585..bc7f73e1d 100644 --- a/patches/server/0001-Pufferfish-branding.patch +++ b/patches/server/0001-Pufferfish-branding.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Pufferfish branding Update branding diff --git a/build.gradle.kts b/build.gradle.kts -index fb98936bb8a5488db75d676c5bcb4060597fbbf8..c6254bc5b9e2b65cd0f9f5ffa2d0b0787649c885 100644 +index 7e0580bbd0a557c7bb269507a99d25db07bf31f1..9af0eb5b7cef9237c03dc6aefaa02923c25bab8c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,8 +13,12 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) { @@ -33,6 +33,15 @@ index fb98936bb8a5488db75d676c5bcb4060597fbbf8..c6254bc5b9e2b65cd0f9f5ffa2d0b078 "Implementation-Vendor" to date, // Paper "Specification-Title" to "Bukkit", "Specification-Version" to project.version, +@@ -205,7 +209,5 @@ val runtimeClasspathForRunDev = sourceSets.main.flatMap { src -> + } + tasks.registerRunTask("runDev") { + description = "Spin up a non-relocated Mojang-mapped test server" +- classpath(tasks.filterProjectDir.flatMap { it.outputJar }) +- classpath(runtimeClasspathForRunDev) +- jvmArgs("-DPaper.isRunDev=true") ++ classpath(sourceSets.main.map { it.runtimeClasspath }) + } diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java index 4b002e8b75d117b726b0de274a76d3596fce015b..692c962193cf9fcc6801fc93f3220bdc673d527b 100644 --- a/src/main/java/com/destroystokyo/paper/Metrics.java @@ -217,7 +226,7 @@ index 67ee3a4ca8a6cdeb275653d492a1fea8037c51fb..0b9dd63d9d8a37223d78dc56b0b482a0 public SystemReport fillSystemReport(SystemReport details) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index ec4b73321205b472f19fa5bd4ad95893020d1340..2d50470761282edfe441021bbb152f9aa1fb2f77 100644 +index 74d06790de674cbd230a0b14ac9a6b614c9f84ef..81ac4dbcf205bbd023d3ea8d0cccc5b6de04bc48 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -265,7 +265,7 @@ import javax.annotation.Nullable; // Paper diff --git a/patches/server/0010-Disable-Paper-timings-by-default.patch b/patches/server/0010-Disable-Paper-timings-by-default.patch index 7a0436220..b461d08a3 100644 --- a/patches/server/0010-Disable-Paper-timings-by-default.patch +++ b/patches/server/0010-Disable-Paper-timings-by-default.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Disable Paper timings by default diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java -index 019d3bbd78fb0b06861979d223915fedb6c99442..2ba11c304ecea73ad3289b471ff304319a837d45 100644 +index 3bc7230ca62ebe3426da293e436a962bb0134f85..61f31094ae81fb11a2d5b866ae45637614661e6c 100644 --- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java +++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java -@@ -7,6 +7,7 @@ import net.kyori.adventure.text.Component; +@@ -8,6 +8,7 @@ import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.NamedTextColor; import net.minecraft.network.protocol.Packet; import net.minecraft.network.protocol.game.ServerboundPlaceRecipePacket; @@ -16,7 +16,7 @@ index 019d3bbd78fb0b06861979d223915fedb6c99442..2ba11c304ecea73ad3289b471ff30431 import org.checkerframework.checker.nullness.qual.Nullable; import org.spongepowered.configurate.objectmapping.ConfigSerializable; import org.spongepowered.configurate.objectmapping.meta.Comment; -@@ -16,6 +17,7 @@ import org.spongepowered.configurate.objectmapping.meta.Setting; +@@ -17,6 +18,7 @@ import org.spongepowered.configurate.objectmapping.meta.Setting; import java.util.List; import java.util.Map; import java.util.Objects; @@ -24,7 +24,7 @@ index 019d3bbd78fb0b06861979d223915fedb6c99442..2ba11c304ecea73ad3289b471ff30431 @SuppressWarnings({"CanBeFinal", "FieldCanBeLocal", "FieldMayBeFinal", "NotNullFieldNotInitialized", "InnerClassMayBeStatic"}) public class GlobalConfiguration extends ConfigurationPart { -@@ -90,6 +92,7 @@ public class GlobalConfiguration extends ConfigurationPart { +@@ -91,6 +93,7 @@ public class GlobalConfiguration extends ConfigurationPart { public class Timings extends ConfigurationPart.Post { public boolean enabled = true; @@ -32,7 +32,7 @@ index 019d3bbd78fb0b06861979d223915fedb6c99442..2ba11c304ecea73ad3289b471ff30431 public boolean verbose = true; public String url = "https://timings.aikar.co/"; public boolean serverNamePrivacy = false; -@@ -103,6 +106,14 @@ public class GlobalConfiguration extends ConfigurationPart { +@@ -104,6 +107,14 @@ public class GlobalConfiguration extends ConfigurationPart { @Override public void postProcess() { diff --git a/patches/server/0012-Simpler-ShapelessRecipes-comparison-for-Vanilla.patch b/patches/server/0011-Simpler-ShapelessRecipes-comparison-for-Vanilla.patch similarity index 100% rename from patches/server/0012-Simpler-ShapelessRecipes-comparison-for-Vanilla.patch rename to patches/server/0011-Simpler-ShapelessRecipes-comparison-for-Vanilla.patch diff --git a/patches/server/0011-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch b/patches/server/0011-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch deleted file mode 100644 index 6ad4ef179..000000000 --- a/patches/server/0011-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch +++ /dev/null @@ -1,161 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Paul Sauve -Date: Sat, 31 Oct 2020 18:43:02 -0500 -Subject: [PATCH] Strip raytracing for EntityLiving#hasLineOfSight - -The IBlockAccess#rayTrace method is very wasteful in both allocations, -and in logic. While EntityLiving#hasLineOfSight provides static -parameters for collisions with blocks and fluids, the method still does -a lot of dynamic checks for both of these, which result in extra work. -As well, since the fluid collision option is set to NONE, the entire -fluid collision system is completely unneeded, yet used anyways. - -Airplane -Copyright (C) 2020 Technove LLC - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . - -diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 6fa0ec9e2f3384dac5ed4585368f6bf1fc590673..0529b93b0ee886b4448c7a6f782b74d8d6b67579 100644 ---- a/src/main/java/net/minecraft/world/entity/LivingEntity.java -+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3664,7 +3664,10 @@ public abstract class LivingEntity extends Entity implements Attackable { - Vec3 vec3d1 = new Vec3(entity.getX(), entity.getEyeY(), entity.getZ()); - - // Paper - diff on change - used in CraftLivingEntity#hasLineOfSight(Location) and CraftWorld#lineOfSightExists -- return vec3d1.distanceToSqr(vec3d) > 128D * 128D ? false : this.level().clip(new ClipContext(vec3d, vec3d1, ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE, this)).getType() == HitResult.Type.MISS; -+ // Pufferfish start -+ //return vec3d1.distanceToSqr(vec3d) > 128D * 128D ? false : this.level().clip(new ClipContext(vec3d, vec3d1, ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE, this)).getType() == HitResult.Type.MISS; -+ return vec3d1.distanceToSqr(vec3d) > 128D * 128D ? false : this.level().rayTraceDirect(vec3d, vec3d1, net.minecraft.world.phys.shapes.CollisionContext.of(this)) == net.minecraft.world.phys.BlockHitResult.Type.MISS; -+ // Pufferfish end - } - } - -diff --git a/src/main/java/net/minecraft/world/level/BlockGetter.java b/src/main/java/net/minecraft/world/level/BlockGetter.java -index 0e8746759752b692668886370181aa5db1fd0bb0..58e5ce2afabf480f5dfd9adf43f8fc12666861c6 100644 ---- a/src/main/java/net/minecraft/world/level/BlockGetter.java -+++ b/src/main/java/net/minecraft/world/level/BlockGetter.java -@@ -68,6 +68,16 @@ public interface BlockGetter extends LevelHeightAccessor { - }); - } - -+ // Pufferfish start - broken down variant of below rayTraceBlock, used by World#rayTraceDirect -+ default net.minecraft.world.phys.BlockHitResult.Type rayTraceBlockDirect(Vec3 vec3d, Vec3 vec3d1, BlockPos blockposition, BlockState iblockdata, net.minecraft.world.phys.shapes.CollisionContext voxelshapecoll) { -+ if (iblockdata.isAir()) return null; // Tuinity - optimise air cases -+ VoxelShape voxelshape = ClipContext.Block.COLLIDER.get(iblockdata, this, blockposition, voxelshapecoll); -+ net.minecraft.world.phys.BlockHitResult movingobjectpositionblock = this.clipWithInteractionOverride(vec3d, vec3d1, blockposition, voxelshape, iblockdata); -+ -+ return movingobjectpositionblock == null ? null : movingobjectpositionblock.getType(); -+ } -+ // Pufferfish end -+ - // CraftBukkit start - moved block handling into separate method for use by Block#rayTrace - default BlockHitResult clip(ClipContext raytrace1, BlockPos blockposition) { - // Paper start - Prevent raytrace from loading chunks -diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index f39ab10c5b0b8d86b579a5b683491204c51db70b..334f7d5fccff284d7aae982e7a730456773a9935 100644 ---- a/src/main/java/net/minecraft/world/level/Level.java -+++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -412,6 +412,91 @@ public abstract class Level implements LevelAccessor, AutoCloseable { - return null; - } - -+ // Pufferfish start - broken down method of raytracing for EntityLiving#hasLineOfSight, replaces IBlockAccess#rayTrace(RayTrace) -+ public net.minecraft.world.phys.BlockHitResult.Type rayTraceDirect(net.minecraft.world.phys.Vec3 vec3d, net.minecraft.world.phys.Vec3 vec3d1, net.minecraft.world.phys.shapes.CollisionContext voxelshapecoll) { -+ // most of this code comes from IBlockAccess#a(RayTrace, BiFunction, Function), but removes the needless functions -+ if (vec3d.equals(vec3d1)) { -+ return net.minecraft.world.phys.BlockHitResult.Type.MISS; -+ } -+ -+ double endX = Mth.lerp(-1.0E-7D, vec3d1.x, vec3d.x); -+ double endY = Mth.lerp(-1.0E-7D, vec3d1.y, vec3d.y); -+ double endZ = Mth.lerp(-1.0E-7D, vec3d1.z, vec3d.z); -+ -+ double startX = Mth.lerp(-1.0E-7D, vec3d.x, vec3d1.x); -+ double startY = Mth.lerp(-1.0E-7D, vec3d.y, vec3d1.y); -+ double startZ = Mth.lerp(-1.0E-7D, vec3d.z, vec3d1.z); -+ -+ int currentX = Mth.floor(startX); -+ int currentY = Mth.floor(startY); -+ int currentZ = Mth.floor(startZ); -+ -+ BlockPos.MutableBlockPos currentBlock = new BlockPos.MutableBlockPos(currentX, currentY, currentZ); -+ -+ LevelChunk chunk = this.getChunkIfLoaded(currentBlock); -+ if (chunk == null) { -+ return net.minecraft.world.phys.BlockHitResult.Type.MISS; -+ } -+ -+ net.minecraft.world.phys.BlockHitResult.Type initialCheck = this.rayTraceBlockDirect(vec3d, vec3d1, currentBlock, chunk.getBlockState(currentBlock), voxelshapecoll); -+ -+ if (initialCheck != null) { -+ return initialCheck; -+ } -+ -+ double diffX = endX - startX; -+ double diffY = endY - startY; -+ double diffZ = endZ - startZ; -+ -+ int xDirection = Mth.sign(diffX); -+ int yDirection = Mth.sign(diffY); -+ int zDirection = Mth.sign(diffZ); -+ -+ double normalizedX = xDirection == 0 ? Double.MAX_VALUE : (double) xDirection / diffX; -+ double normalizedY = yDirection == 0 ? Double.MAX_VALUE : (double) yDirection / diffY; -+ double normalizedZ = zDirection == 0 ? Double.MAX_VALUE : (double) zDirection / diffZ; -+ -+ double normalizedXDirection = normalizedX * (xDirection > 0 ? 1.0D - Mth.frac(startX) : Mth.frac(startX)); -+ double normalizedYDirection = normalizedY * (yDirection > 0 ? 1.0D - Mth.frac(startY) : Mth.frac(startY)); -+ double normalizedZDirection = normalizedZ * (zDirection > 0 ? 1.0D - Mth.frac(startZ) : Mth.frac(startZ)); -+ -+ net.minecraft.world.phys.BlockHitResult.Type result; -+ -+ do { -+ if (normalizedXDirection > 1.0D && normalizedYDirection > 1.0D && normalizedZDirection > 1.0D) { -+ return net.minecraft.world.phys.BlockHitResult.Type.MISS; -+ } -+ -+ if (normalizedXDirection < normalizedYDirection) { -+ if (normalizedXDirection < normalizedZDirection) { -+ currentX += xDirection; -+ normalizedXDirection += normalizedX; -+ } else { -+ currentZ += zDirection; -+ normalizedZDirection += normalizedZ; -+ } -+ } else if (normalizedYDirection < normalizedZDirection) { -+ currentY += yDirection; -+ normalizedYDirection += normalizedY; -+ } else { -+ currentZ += zDirection; -+ normalizedZDirection += normalizedZ; -+ } -+ -+ currentBlock.set(currentX, currentY, currentZ); -+ if (chunk.getPos().x != currentBlock.getX() >> 4 || chunk.getPos().z != currentBlock.getZ() >> 4) { -+ chunk = this.getChunkIfLoaded(currentBlock); -+ if (chunk == null) { -+ return net.minecraft.world.phys.BlockHitResult.Type.MISS; -+ } -+ } -+ result = this.rayTraceBlockDirect(vec3d, vec3d1, currentBlock, chunk.getBlockState(currentBlock), voxelshapecoll); -+ } while (result == null); -+ -+ return result; -+ } -+ // Pufferfish end -+ - public boolean isInWorldBounds(BlockPos pos) { - return pos.isInsideBuildHeightAndWorldBoundsHorizontal(this); // Paper - use better/optimized check - } diff --git a/patches/server/0013-Reduce-projectile-chunk-loading.patch b/patches/server/0012-Reduce-projectile-chunk-loading.patch similarity index 97% rename from patches/server/0013-Reduce-projectile-chunk-loading.patch rename to patches/server/0012-Reduce-projectile-chunk-loading.patch index 924e16146..b0ccbf474 100644 --- a/patches/server/0013-Reduce-projectile-chunk-loading.patch +++ b/patches/server/0012-Reduce-projectile-chunk-loading.patch @@ -40,7 +40,7 @@ index b3dba80e30268f85befd2495cbf5bc5f59a57cde..0b7a43b6f2ec9a69281ff38f9bef6e33 } + diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -index 1b7cf6d06bdf36f146656727511a461f2520762e..459aee61b519a40d9136546c0d9356562f5757c8 100644 +index a90317100d32974e481e14476843f66997a2cf3a..cd0629581bae5f805842157af36c2d838e01bee3 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java @@ -44,6 +44,36 @@ public abstract class Projectile extends Entity implements TraceableEntity { diff --git a/patches/server/0014-Only-check-for-spooky-season-once-an-hour.patch b/patches/server/0013-Only-check-for-spooky-season-once-an-hour.patch similarity index 100% rename from patches/server/0014-Only-check-for-spooky-season-once-an-hour.patch rename to patches/server/0013-Only-check-for-spooky-season-once-an-hour.patch diff --git a/patches/server/0015-Move-ThreadUnsafeRandom-Initialization.patch b/patches/server/0014-Move-ThreadUnsafeRandom-Initialization.patch similarity index 96% rename from patches/server/0015-Move-ThreadUnsafeRandom-Initialization.patch rename to patches/server/0014-Move-ThreadUnsafeRandom-Initialization.patch index 24a7a33e8..dfa49e23f 100644 --- a/patches/server/0015-Move-ThreadUnsafeRandom-Initialization.patch +++ b/patches/server/0014-Move-ThreadUnsafeRandom-Initialization.patch @@ -21,7 +21,7 @@ index 18aac3da3c88f33b1a71a5920a8daa27e9723913..f5ee5341fa51855048f3a0b7f2acc491 public void tickChunk(LevelChunk chunk, int randomTickSpeed) { diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 418cfbc84115031651970dee7d9f1c988b64c3a7..822f0ea428f8aeed4e85029fa01178a8e0997ea4 100644 +index 7d54c79f46f99f5500e9cb1f486037cafb27ee3a..a095b16d35588b815475bcd03ecfa3db09db9d20 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -273,6 +273,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0016-Optimize-random-calls-in-chunk-ticking.patch b/patches/server/0015-Optimize-random-calls-in-chunk-ticking.patch similarity index 98% rename from patches/server/0016-Optimize-random-calls-in-chunk-ticking.patch rename to patches/server/0015-Optimize-random-calls-in-chunk-ticking.patch index 85c6e07ea..fe9666c9f 100644 --- a/patches/server/0016-Optimize-random-calls-in-chunk-ticking.patch +++ b/patches/server/0015-Optimize-random-calls-in-chunk-ticking.patch @@ -34,7 +34,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index 75b0278fa8f7522ee6b8905d61e6fc0eca1a4d5c..6e3b2863f04419ee6914ac3fd4f12a4fe78d16b7 100644 +index 3ee97ad8af60978a73eb78efb3597620ef3ed314..fe1a9c646b09d11e7fa2186afbeb70b680ad2b57 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java @@ -556,6 +556,7 @@ public class ServerChunkCache extends ChunkSource { diff --git a/patches/server/0017-Dynamic-Activation-of-Brain.patch b/patches/server/0016-Dynamic-Activation-of-Brain.patch similarity index 99% rename from patches/server/0017-Dynamic-Activation-of-Brain.patch rename to patches/server/0016-Dynamic-Activation-of-Brain.patch index 27cf7c680..b65cf4866 100644 --- a/patches/server/0017-Dynamic-Activation-of-Brain.patch +++ b/patches/server/0016-Dynamic-Activation-of-Brain.patch @@ -124,7 +124,7 @@ index 9afc81ccb237c3655d64cdbe8a0db9a4d7791043..1679f0a3d095a7b758b468c77b6d3a4c private String descriptionId; @Nullable diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index e2a25c29ec74147b3e66aa0b3deb85a8f6ee53a5..f9e8a694c7d20a6f27b71a694d82483dd0698a4c 100644 +index a99d737f71277ea3082816c7a7fc47ab3a201d30..888dc5437ae56367903e98eaa976a99b6c83b772 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java @@ -222,10 +222,10 @@ public abstract class Mob extends LivingEntity implements Targeting { diff --git a/patches/server/0018-Reduce-chunk-loading-lookups.patch b/patches/server/0017-Reduce-chunk-loading-lookups.patch similarity index 100% rename from patches/server/0018-Reduce-chunk-loading-lookups.patch rename to patches/server/0017-Reduce-chunk-loading-lookups.patch diff --git a/patches/server/0020-Flare-Profiler.patch b/patches/server/0018-Flare-Profiler.patch similarity index 99% rename from patches/server/0020-Flare-Profiler.patch rename to patches/server/0018-Flare-Profiler.patch index 4451c6f41..8067cd237 100644 --- a/patches/server/0020-Flare-Profiler.patch +++ b/patches/server/0018-Flare-Profiler.patch @@ -20,7 +20,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/build.gradle.kts b/build.gradle.kts -index 9be6d8075f2a70afd7c80636ea3eca55f90d3d5f..18bd50340f9e511781dae123cdb82bc16da97d55 100644 +index 5b469c94a40ddb50b3b09ba9f107c1ee2dd29f86..0759c54fadad7abacc71b8199239551a94bb667c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -62,6 +62,7 @@ dependencies { @@ -819,7 +819,7 @@ index d96399e9bf1a58db5a4a22e58abb99e7660e0694..eb19f679ee498e51d02fe9a961cf0269 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java -index e948ec5a573b22645664eb53bc3e9932246544e4..e3845dc3357bbb74885ae3a1a08525adde581235 100644 +index e8e93538dfd71de86515d9405f728db1631e949a..3dff02fd97f001508e2f81192817bf1b0ef92446 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java +++ b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java @@ -11,6 +11,7 @@ public class ServerShutdownThread extends Thread { diff --git a/patches/server/0021-Remove-iterators-from-inventory-contains.patch b/patches/server/0019-Remove-iterators-from-inventory-contains.patch similarity index 100% rename from patches/server/0021-Remove-iterators-from-inventory-contains.patch rename to patches/server/0019-Remove-iterators-from-inventory-contains.patch diff --git a/patches/server/0019-Skip-POI-finding-if-stuck-in-vehicle.patch b/patches/server/0019-Skip-POI-finding-if-stuck-in-vehicle.patch deleted file mode 100644 index 06ac0f184..000000000 --- a/patches/server/0019-Skip-POI-finding-if-stuck-in-vehicle.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Paul Sauve -Date: Thu, 18 Feb 2021 13:13:27 -0600 -Subject: [PATCH] Skip POI finding if stuck in vehicle - -Airplane -Copyright (C) 2020 Technove LLC - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . - -diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java b/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java -index d4c91e0a0c64fcb7f1145de3f30134cb1f1f8ee6..fe502445a77afe7e3807afae48d7bf03f370e290 100644 ---- a/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java -+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java -@@ -47,6 +47,7 @@ public class AcquirePoi { - return false; - } else { - mutableLong.setValue(time + 20L + (long)world.getRandom().nextInt(20)); -+ if (entity.getNavigation().isStuck()) mutableLong.add(200); // Pufferfish - wait an additional 10s to check again if they're stuck - PoiManager poiManager = world.getPoiManager(); - long2ObjectMap.long2ObjectEntrySet().removeIf((entry) -> { - return !entry.getValue().isStillValid(time); diff --git a/patches/server/0022-Early-return-optimization-for-target-finding.patch b/patches/server/0020-Early-return-optimization-for-target-finding.patch similarity index 95% rename from patches/server/0022-Early-return-optimization-for-target-finding.patch rename to patches/server/0020-Early-return-optimization-for-target-finding.patch index bb59bc98f..561f190ab 100644 --- a/patches/server/0022-Early-return-optimization-for-target-finding.patch +++ b/patches/server/0020-Early-return-optimization-for-target-finding.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Early return optimization for target finding diff --git a/src/main/java/net/minecraft/world/entity/ai/targeting/TargetingConditions.java b/src/main/java/net/minecraft/world/entity/ai/targeting/TargetingConditions.java -index a7575b5ef56af6f53448d391abb4956e130148ca..e752c83df50fb9b670ecea2abc95426c2a009b6f 100644 +index 58422f00c7d64dbd1cf6d7211c9838875cbe7778..d25307ae8bbdf10ae067ec70fc2cb957b852a0eb 100644 --- a/src/main/java/net/minecraft/world/entity/ai/targeting/TargetingConditions.java +++ b/src/main/java/net/minecraft/world/entity/ai/targeting/TargetingConditions.java @@ -75,9 +75,18 @@ public class TargetingConditions { diff --git a/patches/server/0023-More-debug-for-plugins-not-shutting-down-tasks.patch b/patches/server/0021-More-debug-for-plugins-not-shutting-down-tasks.patch similarity index 87% rename from patches/server/0023-More-debug-for-plugins-not-shutting-down-tasks.patch rename to patches/server/0021-More-debug-for-plugins-not-shutting-down-tasks.patch index 54ecb5cf6..be2074b83 100644 --- a/patches/server/0023-More-debug-for-plugins-not-shutting-down-tasks.patch +++ b/patches/server/0021-More-debug-for-plugins-not-shutting-down-tasks.patch @@ -5,10 +5,10 @@ Subject: [PATCH] More debug for plugins not shutting down tasks diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 692ed5bccffa86dc7e934f4db3e7e7b3bbd779f8..a774e6af15993a97a231d45b676e26fb1128f05f 100644 +index 81ac4dbcf205bbd023d3ea8d0cccc5b6de04bc48..0f89716d1131178bd7ac927ef68337357139e2b7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1140,6 +1140,11 @@ public final class CraftServer implements Server { +@@ -1120,6 +1120,11 @@ public final class CraftServer implements Server { plugin.getPluginMeta().getDisplayName(), "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." )); diff --git a/patches/server/0024-Improve-fluid-direction-caching.patch b/patches/server/0022-Improve-fluid-direction-caching.patch similarity index 100% rename from patches/server/0024-Improve-fluid-direction-caching.patch rename to patches/server/0022-Improve-fluid-direction-caching.patch diff --git a/patches/server/0025-Cache-climbing-check-for-activation.patch b/patches/server/0023-Cache-climbing-check-for-activation.patch similarity index 95% rename from patches/server/0025-Cache-climbing-check-for-activation.patch rename to patches/server/0023-Cache-climbing-check-for-activation.patch index f46b8be3a..e8163b1dd 100644 --- a/patches/server/0025-Cache-climbing-check-for-activation.patch +++ b/patches/server/0023-Cache-climbing-check-for-activation.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Cache climbing check for activation diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 0529b93b0ee886b4448c7a6f782b74d8d6b67579..e645969dc09c441d5309aa811f954d507884ab66 100644 +index 0d6f4f3a619cb40c56082b53b6ef136ad9e9c55c..d265a32bd273beed0e65e224e1c5f9c0bca7b3fb 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -142,7 +142,6 @@ import org.bukkit.event.entity.EntityTeleportEvent; diff --git a/patches/server/0026-Config-to-disable-method-profiler.patch b/patches/server/0024-Config-to-disable-method-profiler.patch similarity index 93% rename from patches/server/0026-Config-to-disable-method-profiler.patch rename to patches/server/0024-Config-to-disable-method-profiler.patch index 65926c333..ffe5db262 100644 --- a/patches/server/0026-Config-to-disable-method-profiler.patch +++ b/patches/server/0024-Config-to-disable-method-profiler.patch @@ -34,10 +34,10 @@ index 184ac0f7f9f3db2ba47965bb5f8e377942bc491c..67cba5cf510e4a602121e10c015a4916 } diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index e3c099bdd613799dfe75c53f01f80233aa8726ec..38b581b2623a2a6d4db6fdb9c578be0fe9dc5da2 100644 +index a095b16d35588b815475bcd03ecfa3db09db9d20..f8888951dc64197c0cc38445d633031194222620 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -1467,6 +1467,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1466,6 +1466,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { } public ProfilerFiller getProfiler() { diff --git a/patches/server/0027-Make-EntityCollisionContext-a-live-representation.patch b/patches/server/0025-Make-EntityCollisionContext-a-live-representation.patch similarity index 100% rename from patches/server/0027-Make-EntityCollisionContext-a-live-representation.patch rename to patches/server/0025-Make-EntityCollisionContext-a-live-representation.patch diff --git a/patches/server/0028-Improve-container-checking-with-a-bitset.patch b/patches/server/0026-Improve-container-checking-with-a-bitset.patch similarity index 99% rename from patches/server/0028-Improve-container-checking-with-a-bitset.patch rename to patches/server/0026-Improve-container-checking-with-a-bitset.patch index 5f250467a..a52620482 100644 --- a/patches/server/0028-Improve-container-checking-with-a-bitset.patch +++ b/patches/server/0026-Improve-container-checking-with-a-bitset.patch @@ -160,7 +160,7 @@ index 241fec02e6869c638d3a160819b32173a081467b..6a8f9e8f5bf108674c47018def28906e public int getContainerSize() { return this.container1.getContainerSize() + this.container2.getContainerSize(); diff --git a/src/main/java/net/minecraft/world/Container.java b/src/main/java/net/minecraft/world/Container.java -index 04b1531572e8fff1e46fe1c94e7fc863841e0f66..47ddc42f2b63d9d3fae5ae6ea93d418352d76c94 100644 +index aee02acd4b2f2fdcb574c37c077fb57013ccb596..5a1c2d62c0e55c5bf16ca3e208dc486bf3b064b2 100644 --- a/src/main/java/net/minecraft/world/Container.java +++ b/src/main/java/net/minecraft/world/Container.java @@ -3,6 +3,8 @@ package net.minecraft.world; diff --git a/patches/server/0029-Better-checking-for-useless-move-packets.patch b/patches/server/0027-Better-checking-for-useless-move-packets.patch similarity index 95% rename from patches/server/0029-Better-checking-for-useless-move-packets.patch rename to patches/server/0027-Better-checking-for-useless-move-packets.patch index d262e3cde..5ddded343 100644 --- a/patches/server/0029-Better-checking-for-useless-move-packets.patch +++ b/patches/server/0027-Better-checking-for-useless-move-packets.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Better checking for useless move packets diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java -index 6670e657e08e130f7e0368f418379fd1ece00cdf..e921b6db8905a8676a45e36564d877075afb081f 100644 +index 196280f54e397c69d32bd4d1f6ae666efdd93773..8ab959dd588b5154b63e133b2e937fa2d0ab8e52 100644 --- a/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java @@ -180,7 +180,8 @@ public class ServerEntity { diff --git a/patches/server/0031-Use-aging-cache-for-biome-temperatures.patch b/patches/server/0028-Use-aging-cache-for-biome-temperatures.patch similarity index 100% rename from patches/server/0031-Use-aging-cache-for-biome-temperatures.patch rename to patches/server/0028-Use-aging-cache-for-biome-temperatures.patch diff --git a/patches/server/0032-Ensure-level-height-is-inlined.patch b/patches/server/0029-Ensure-level-height-is-inlined.patch similarity index 96% rename from patches/server/0032-Ensure-level-height-is-inlined.patch rename to patches/server/0029-Ensure-level-height-is-inlined.patch index b65de0474..2df089ce3 100644 --- a/patches/server/0032-Ensure-level-height-is-inlined.patch +++ b/patches/server/0029-Ensure-level-height-is-inlined.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Ensure level height is inlined diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 5b9ea5095118b402070fe1af772e0386ad9c29be..a38c0d4fd1ecb552911bf73f4ab89d891774ddcb 100644 +index f8888951dc64197c0cc38445d633031194222620..39134f7b2639fcaa1743dfc9f0f5c6324d472a44 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -275,6 +275,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0030-Patch-Paper-to-use-fast-item-merge-raytracing.patch b/patches/server/0030-Patch-Paper-to-use-fast-item-merge-raytracing.patch deleted file mode 100644 index 67dec99a7..000000000 --- a/patches/server/0030-Patch-Paper-to-use-fast-item-merge-raytracing.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Paul Sauve -Date: Tue, 1 Jun 2021 18:06:29 -0500 -Subject: [PATCH] Patch Paper to use fast item merge raytracing - - -diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -index 52196431a6538872755344859a0454a0e50c3b6e..80fc7918cb294b0d88a293bd6a920441cb55c3ad 100644 ---- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -@@ -270,10 +270,16 @@ public class ItemEntity extends Entity implements TraceableEntity { - if (entityitem.isMergable()) { - // Paper Start - Fix items merging through walls - if (this.level().paperConfig().fixes.fixItemsMergingThroughWalls) { -+ // Pufferfish start - skip the allocations -+ /* - net.minecraft.world.level.ClipContext rayTrace = new net.minecraft.world.level.ClipContext(this.position(), entityitem.position(), - net.minecraft.world.level.ClipContext.Block.COLLIDER, net.minecraft.world.level.ClipContext.Fluid.NONE, this); - net.minecraft.world.phys.BlockHitResult rayTraceResult = this.level().clip(rayTrace); - if (rayTraceResult.getType() == net.minecraft.world.phys.HitResult.Type.BLOCK) continue; -+ */ -+ if (level().rayTraceDirect(this.position(), entityitem.position(), net.minecraft.world.phys.shapes.CollisionContext.of(this)) == -+ net.minecraft.world.phys.HitResult.Type.BLOCK) continue; -+ // Pufferfish end - } - // Paper End - this.tryToMerge(entityitem); diff --git a/patches/server/0033-Use-thread-unsafe-random-for-mob-spawning.patch b/patches/server/0030-Use-thread-unsafe-random-for-mob-spawning.patch similarity index 96% rename from patches/server/0033-Use-thread-unsafe-random-for-mob-spawning.patch rename to patches/server/0030-Use-thread-unsafe-random-for-mob-spawning.patch index 0341a113f..011301bc2 100644 --- a/patches/server/0033-Use-thread-unsafe-random-for-mob-spawning.patch +++ b/patches/server/0030-Use-thread-unsafe-random-for-mob-spawning.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Use thread unsafe random for mob spawning diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index c6a52c9f425f9629cf8214416faeb4c1894f9bb8..1ba625b44d95d0c03dff29046260b8e683190150 100644 +index 39134f7b2639fcaa1743dfc9f0f5c6324d472a44..1fb5ae3b83aa2b55af080f38277fa59cf3786d7b 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -273,7 +273,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0034-Remove-streams-and-iterators-from-range-check.patch b/patches/server/0031-Remove-streams-and-iterators-from-range-check.patch similarity index 89% rename from patches/server/0034-Remove-streams-and-iterators-from-range-check.patch rename to patches/server/0031-Remove-streams-and-iterators-from-range-check.patch index 3bf3f11b6..62c590f50 100644 --- a/patches/server/0034-Remove-streams-and-iterators-from-range-check.patch +++ b/patches/server/0031-Remove-streams-and-iterators-from-range-check.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Remove streams and iterators from range check diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 75e85d7c13c40fc7ce7881fc3b47bfd81055af62..3770ced0b227f7eea1f04d6afd5c14331f6a1480 100644 +index dc72a61758c209ccf2217157c0b8c6e5fdf516f7..d60ae9f8d3afe3e996a66331ee510cfa5841388c 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -1593,8 +1593,28 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1596,8 +1596,28 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider return ChunkMap.this.level.getServer().getScaledTrackingDistance(initialDistance); } @@ -37,7 +37,7 @@ index 75e85d7c13c40fc7ce7881fc3b47bfd81055af62..3770ced0b227f7eea1f04d6afd5c1433 Iterator iterator = this.entity.getIndirectPassengers().iterator(); while (iterator.hasNext()) { -@@ -1606,6 +1626,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1609,6 +1629,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider i = j; } } diff --git a/patches/server/0035-Remove-streams-from-getting-nearby-players.patch b/patches/server/0032-Remove-streams-from-getting-nearby-players.patch similarity index 100% rename from patches/server/0035-Remove-streams-from-getting-nearby-players.patch rename to patches/server/0032-Remove-streams-from-getting-nearby-players.patch diff --git a/patches/server/0036-Skip-cloning-loot-parameters.patch b/patches/server/0033-Skip-cloning-loot-parameters.patch similarity index 100% rename from patches/server/0036-Skip-cloning-loot-parameters.patch rename to patches/server/0033-Skip-cloning-loot-parameters.patch diff --git a/patches/server/0037-Fix-Paper-6045-block-goal-shouldn-t-load-chunks.patch b/patches/server/0034-Fix-Paper-6045-block-goal-shouldn-t-load-chunks.patch similarity index 100% rename from patches/server/0037-Fix-Paper-6045-block-goal-shouldn-t-load-chunks.patch rename to patches/server/0034-Fix-Paper-6045-block-goal-shouldn-t-load-chunks.patch diff --git a/patches/server/0038-Reduce-entity-allocations.patch b/patches/server/0035-Reduce-entity-allocations.patch similarity index 100% rename from patches/server/0038-Reduce-entity-allocations.patch rename to patches/server/0035-Reduce-entity-allocations.patch diff --git a/patches/server/0039-Remove-lambda-from-ticking-guard.patch b/patches/server/0036-Remove-lambda-from-ticking-guard.patch similarity index 95% rename from patches/server/0039-Remove-lambda-from-ticking-guard.patch rename to patches/server/0036-Remove-lambda-from-ticking-guard.patch index 23b0c9723..f5ace6d68 100644 --- a/patches/server/0039-Remove-lambda-from-ticking-guard.patch +++ b/patches/server/0036-Remove-lambda-from-ticking-guard.patch @@ -31,10 +31,10 @@ index 2931b2de14f98e974d6622ab8ed8cdd01c719641..eac31c3fcc9161711328588ac852fcae } } diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 1ba625b44d95d0c03dff29046260b8e683190150..d8d4a1ca2eb062af8b2de4ab44503983587cdd77 100644 +index 1fb5ae3b83aa2b55af080f38277fa59cf3786d7b..21c11ff8d5ae9bf97dfcf3118cabe678deb4c064 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -1022,13 +1022,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1021,13 +1021,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { try { tickConsumer.accept(entity); MinecraftServer.getServer().executeMidTickTasks(); // Paper - execute chunk tasks mid tick diff --git a/patches/server/0040-Reduce-entity-fluid-lookups-if-no-fluids.patch b/patches/server/0037-Reduce-entity-fluid-lookups-if-no-fluids.patch similarity index 100% rename from patches/server/0040-Reduce-entity-fluid-lookups-if-no-fluids.patch rename to patches/server/0037-Reduce-entity-fluid-lookups-if-no-fluids.patch diff --git a/patches/server/0041-Throttle-goal-selector-during-inactive-ticking.patch b/patches/server/0038-Throttle-goal-selector-during-inactive-ticking.patch similarity index 96% rename from patches/server/0041-Throttle-goal-selector-during-inactive-ticking.patch rename to patches/server/0038-Throttle-goal-selector-during-inactive-ticking.patch index 9995008ba..8de8b7b33 100644 --- a/patches/server/0041-Throttle-goal-selector-during-inactive-ticking.patch +++ b/patches/server/0038-Throttle-goal-selector-during-inactive-ticking.patch @@ -23,7 +23,7 @@ index 03ef5e6b578aa1e9391e891d3e005b30925eb5a8..ca7e0cd9e03d7d8fece1f81f684cec20 public static URI profileWebUrl; private static void profilerOptions() { diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index f9e8a694c7d20a6f27b71a694d82483dd0698a4c..f6eb032897c6d5d16ab5c8c287e49e189c24571c 100644 +index 888dc5437ae56367903e98eaa976a99b6c83b772..7e453b4c49975bb06cb080f3626545286b947ddc 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java @@ -218,11 +218,13 @@ public abstract class Mob extends LivingEntity implements Targeting { diff --git a/patches/server/0042-Entity-TTL.patch b/patches/server/0039-Entity-TTL.patch similarity index 100% rename from patches/server/0042-Entity-TTL.patch rename to patches/server/0039-Entity-TTL.patch diff --git a/patches/server/0043-Add-option-to-disable-out-of-order-chat.patch b/patches/server/0040-Add-option-to-disable-out-of-order-chat.patch similarity index 94% rename from patches/server/0043-Add-option-to-disable-out-of-order-chat.patch rename to patches/server/0040-Add-option-to-disable-out-of-order-chat.patch index ba3d1d0f9..a900a049f 100644 --- a/patches/server/0043-Add-option-to-disable-out-of-order-chat.patch +++ b/patches/server/0040-Add-option-to-disable-out-of-order-chat.patch @@ -21,7 +21,7 @@ index 2925529336c6d080c4fe5283463f7dc3b2a40738..d6ed2faae59d035cf96a3842d99b9b80 } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 2520e74a71a9344a68623f6403d8ff8614c78735..776c7df81d2b71a5610fe90475f4e8044850beab 100644 +index 04b509283bada12f1f0409dbd2df344de2095267..6cafc20ce006872bedd28a34db11204c3c1fef58 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2421,6 +2421,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic diff --git a/patches/server/0044-Option-to-disable-end-crystal-dragon-respawning.patch b/patches/server/0041-Option-to-disable-end-crystal-dragon-respawning.patch similarity index 100% rename from patches/server/0044-Option-to-disable-end-crystal-dragon-respawning.patch rename to patches/server/0041-Option-to-disable-end-crystal-dragon-respawning.patch diff --git a/patches/server/0045-Add-option-to-suppress-null-ID-disconnections.patch b/patches/server/0042-Add-option-to-suppress-null-ID-disconnections.patch similarity index 100% rename from patches/server/0045-Add-option-to-suppress-null-ID-disconnections.patch rename to patches/server/0042-Add-option-to-suppress-null-ID-disconnections.patch diff --git a/patches/server/0046-Add-slot-sanity-checks-in-container-clicks.patch b/patches/server/0046-Add-slot-sanity-checks-in-container-clicks.patch deleted file mode 100644 index 9cd203890..000000000 --- a/patches/server/0046-Add-slot-sanity-checks-in-container-clicks.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Nassim Jahnke -Date: Mon, 11 Sep 2023 12:01:57 +1000 -Subject: [PATCH] Add slot sanity checks in container clicks - - -diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java -index 706b354ac9a1a6a4a1e61b2a109180d1dd22bbbd..71b7a091e56dd68da280d13318a393170967b042 100644 ---- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java -+++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java -@@ -423,6 +423,7 @@ public abstract class AbstractContainerMenu { - this.resetQuickCraft(); - } - } else if (this.quickcraftStatus == 1) { -+ if (slotIndex < 0) return; // Paper - slot = (Slot) this.slots.get(slotIndex); - itemstack = this.getCarried(); - if (AbstractContainerMenu.canItemQuickReplace(slot, itemstack, true) && slot.mayPlace(itemstack) && (this.quickcraftType == 2 || itemstack.getCount() > this.quickcraftSlots.size()) && this.canDragTo(slot)) { -@@ -598,6 +599,7 @@ public abstract class AbstractContainerMenu { - int j2; - - if (actionType == ClickType.SWAP) { -+ if (slotIndex < 0) return; // Paper - slot2 = (Slot) this.slots.get(slotIndex); - itemstack1 = playerinventory.getItem(button); - itemstack = slot2.getItem();