diff --git a/Spigot-Server-Patches/0002-Paper-config-files.patch b/Spigot-Server-Patches/0002-Paper-config-files.patch index ed15fc3e73..221868c1de 100644 --- a/Spigot-Server-Patches/0002-Paper-config-files.patch +++ b/Spigot-Server-Patches/0002-Paper-config-files.patch @@ -636,7 +636,7 @@ index d5e1da2eeea7c06289f52509af844df59e8a29b2..63d3d43f74bed94cd03aa3b7254e6630 this.world = new CraftWorld((WorldServer) this, gen, env); this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index f306530642c56020c390afbcdddf5cbf343a7b2b..f20a68bafc5abb76c60fba85c228bf15f05d309a 100644 +index 87fe70ed5f333d84018020b42fe375ce247451b4..a85b7a93a974263e2c3d7546ddfe4707781ef165 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -801,6 +801,7 @@ public final class CraftServer implements Server { @@ -663,7 +663,7 @@ index f306530642c56020c390afbcdddf5cbf343a7b2b..f20a68bafc5abb76c60fba85c228bf15 overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*"); ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions"); -@@ -2074,4 +2077,35 @@ public final class CraftServer implements Server { +@@ -2075,4 +2078,35 @@ public final class CraftServer implements Server { { return spigot; } diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index b13cff8af6..5c2cf20ab2 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -1489,7 +1489,7 @@ index 2c671629a43f42da8335e7216f9fd399bb878729..eb3269e0ea3ce33d08e9eee3bca7cf43 PlayerConnectionUtils.LOGGER.debug("Ignoring packet due to disconnection: " + packet); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index f51bae1a01b6ac158f808d85bc77cb03a8f19aa3..7464ef739bf673baab8661e561abbe9266b888c4 100644 +index 500977885d4cfbfd9d86824074d3f1903e1fc6cb..c7ba11e75eeda6593ddcd9546ca45b4bd2a4c1cd 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -1,5 +1,6 @@ @@ -1499,7 +1499,7 @@ index f51bae1a01b6ac158f808d85bc77cb03a8f19aa3..7464ef739bf673baab8661e561abbe92 import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; -@@ -940,10 +941,11 @@ public abstract class PlayerList { +@@ -941,10 +942,11 @@ public abstract class PlayerList { } public void savePlayers() { @@ -1758,10 +1758,10 @@ index f45b5ddc66024e993ac94436ee25a03e085742b4..dd02f7b8c0c0055a506bceab68cec98f // CraftBukkit start - moved from MinecraftServer.saveChunks diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index f20a68bafc5abb76c60fba85c228bf15f05d309a..36e44309d5c8467c79da981ea957c17ebabe9595 100644 +index a85b7a93a974263e2c3d7546ddfe4707781ef165..0094d9251251845fbacff6d458443385627ca0c8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2047,12 +2047,31 @@ public final class CraftServer implements Server { +@@ -2048,12 +2048,31 @@ public final class CraftServer implements Server { private final Spigot spigot = new Spigot() { @@ -1963,10 +1963,10 @@ index 7f435847ac1d13756ce233e7d5ae13f9dc17c443..00000000000000000000000000000000 - } -} diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index af2462a8bbf617a0c949d9e3536581d7500e90ee..51782a02c0882acca208b71bbd75946f6396dcce 100644 +index c5216d62660631f54d50575c30717f4052c10f8f..661c8b3c81be46ef2c9488bb52d1963c7f0e89e2 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1761,6 +1761,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1757,6 +1757,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { packet.components = components; getHandle().playerConnection.sendPacket(packet); } diff --git a/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch b/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch index 1bd79f8a89..75ad04ddf8 100644 --- a/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch +++ b/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch @@ -140,10 +140,10 @@ index 1fcdbbbc7b60edd1e87bab5f1c5d19a6755de17c..0f2011a776619301dd6a133b9a4044b4 GameProfilerTick gameprofilertick = GameProfilerTick.a("Server"); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 0f49da25bb6a1aaad18cbd57d0d312769fe50c3e..9cf0d095db124976c7777ff78a6a1f1f46f4a363 100644 +index 3e2328079f5f98f3f10cc1badd1059a3703eb2d7..0f5af8365abe99971a815285703a3b598f130a0d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2044,6 +2044,17 @@ public final class CraftServer implements Server { +@@ -2045,6 +2045,17 @@ public final class CraftServer implements Server { return CraftMagicNumbers.INSTANCE; } diff --git a/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch b/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch index 78170682aa..2c0b62349f 100644 --- a/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch +++ b/Spigot-Server-Patches/0042-Add-PlayerInitialSpawnEvent.patch @@ -9,10 +9,10 @@ This is a duplicate API from spigot, so use our duplicate subclass and improve setPosition to use raw diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 7464ef739bf673baab8661e561abbe9266b888c4..80fec11079b71569dbfcfd399df325a1e942e8ef 100644 +index c7ba11e75eeda6593ddcd9546ca45b4bd2a4c1cd..29a7866190fea78c025c2e59a48ed92239f6a446 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -143,14 +143,14 @@ public abstract class PlayerList { +@@ -143,7 +143,7 @@ public abstract class PlayerList { // Spigot start - spawn location event Player bukkitPlayer = entityplayer.getBukkitEntity(); @@ -21,9 +21,10 @@ index 7464ef739bf673baab8661e561abbe9266b888c4..80fec11079b71569dbfcfd399df325a1 Bukkit.getPluginManager().callEvent(ev); Location loc = ev.getSpawnLocation(); - worldserver = ((CraftWorld) loc.getWorld()).getHandle(); +@@ -151,7 +151,7 @@ public abstract class PlayerList { - entityplayer.spawnIn(worldserver); + entityplayer.spawnIn(worldserver1); + entityplayer.playerInteractManager.a((WorldServer) entityplayer.world); - entityplayer.setPosition(loc.getX(), loc.getY(), loc.getZ()); + entityplayer.setPositionRaw(loc.getX(), loc.getY(), loc.getZ()); // Paper - set raw so we aren't fully joined to the world (not added to chunk or world) entityplayer.setYawPitch(loc.getYaw(), loc.getPitch()); diff --git a/Spigot-Server-Patches/0046-Expose-server-CommandMap.patch b/Spigot-Server-Patches/0046-Expose-server-CommandMap.patch index 349e370b9e..2ef1a03e15 100644 --- a/Spigot-Server-Patches/0046-Expose-server-CommandMap.patch +++ b/Spigot-Server-Patches/0046-Expose-server-CommandMap.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose server CommandMap diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 35f0527f6dbd06660a1ca4ce528ac1e8c056bb16..3768215d57f4025bdb83913e45b12119d53e1002 100644 +index 5ff0456b781b6a6fbc674e2c532b73f3245f5fd5..3a0e0139db61405e8307abb3d17d1836f45bd8a3 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1698,6 +1698,7 @@ public final class CraftServer implements Server { +@@ -1699,6 +1699,7 @@ public final class CraftServer implements Server { return helpMap; } diff --git a/Spigot-Server-Patches/0061-Allow-Reloading-of-Custom-Permissions.patch b/Spigot-Server-Patches/0061-Allow-Reloading-of-Custom-Permissions.patch index d6793e5e70..13f18882d7 100644 --- a/Spigot-Server-Patches/0061-Allow-Reloading-of-Custom-Permissions.patch +++ b/Spigot-Server-Patches/0061-Allow-Reloading-of-Custom-Permissions.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Custom Permissions https://github.com/PaperMC/Paper/issues/49 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 228106442d8f6d425a0d15c816532223749e03be..73f140771bac6bfda57bbd402a1603cedf8c38b5 100644 +index 30701934a3b7cc7d2a502fe7c3c251a9f268a9bc..72fb341e77b73ace8555cfc1bfdb3bbab726f1e6 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2163,5 +2163,23 @@ public final class CraftServer implements Server { +@@ -2164,5 +2164,23 @@ public final class CraftServer implements Server { return null; } } diff --git a/Spigot-Server-Patches/0063-Undead-horse-leashing.patch b/Spigot-Server-Patches/0063-Undead-horse-leashing.patch index 6ee9eccf47..b9bb06206b 100644 --- a/Spigot-Server-Patches/0063-Undead-horse-leashing.patch +++ b/Spigot-Server-Patches/0063-Undead-horse-leashing.patch @@ -20,7 +20,7 @@ index 04430aae52205ee167662004e45c145b9d2e8bed..dd21221534542d0265fa7d2178ab69c2 + } } diff --git a/src/main/java/net/minecraft/server/EntityHorseAbstract.java b/src/main/java/net/minecraft/server/EntityHorseAbstract.java -index 364697e0155012c300219ad94a3995809e6c2f8f..8afefd8ab17188e542e067ac255634d396405fac 100644 +index 364697e0155012c300219ad94a3995809e6c2f8f..d45d025fa74a5ff53f0828f51639e19613e30186 100644 --- a/src/main/java/net/minecraft/server/EntityHorseAbstract.java +++ b/src/main/java/net/minecraft/server/EntityHorseAbstract.java @@ -106,6 +106,13 @@ public abstract class EntityHorseAbstract extends EntityAnimal implements IInven @@ -29,7 +29,7 @@ index 364697e0155012c300219ad94a3995809e6c2f8f..8afefd8ab17188e542e067ac255634d3 + // Paper start + @Override -+ public boolean canLeash(EntityHuman entityhuman) { ++ public boolean a(EntityHuman entityhuman) { + return world.paperConfig.allowLeashingUndeadHorse ? super.a(entityhuman) : super.a(entityhuman) && this.getMonsterType() != EnumMonsterType.UNDEAD; // Paper + } + // Paper end @@ -38,18 +38,15 @@ index 364697e0155012c300219ad94a3995809e6c2f8f..8afefd8ab17188e542e067ac255634d3 protected void t(float f) { if (f > 6.0F && this.fa()) { diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 9715f10c790c0210435622ab9997ac40f98da185..f2cd6824790d7e76f8f10e2630bcd5ebbf2a4238 100644 +index 9715f10c790c0210435622ab9997ac40f98da185..2f85d9799d67d3fb1d340179d8dbd03771467329 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -1283,6 +1283,11 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1282,7 +1282,7 @@ public abstract class EntityInsentient extends EntityLiving { + } - public boolean a(EntityHuman entityhuman) { -+ // Paper start - allow overriding -+ return this.canLeash(entityhuman); -+ } -+ public boolean canLeash(EntityHuman entityhuman) { -+ // Paper end - allow overriding +- public boolean a(EntityHuman entityhuman) { ++ public boolean a(EntityHuman entityhuman) { // Paper - overriden in EntityHorseAbstract return !this.isLeashed() && !(this instanceof IMonster); } diff --git a/Spigot-Server-Patches/0080-Fix-reducedDebugInfo-not-initialized-on-client.patch b/Spigot-Server-Patches/0080-Fix-reducedDebugInfo-not-initialized-on-client.patch index ed2c6e14c1..8325abf6c0 100644 --- a/Spigot-Server-Patches/0080-Fix-reducedDebugInfo-not-initialized-on-client.patch +++ b/Spigot-Server-Patches/0080-Fix-reducedDebugInfo-not-initialized-on-client.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix reducedDebugInfo not initialized on client diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 80fec11079b71569dbfcfd399df325a1e942e8ef..42e7394326237fcb466ac9727b5ac732518cf1b9 100644 +index 29a7866190fea78c025c2e59a48ed92239f6a446..5945786f5093ac8f6cd7cde74f6cb746efffbb1e 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -173,6 +173,7 @@ public abstract class PlayerList { +@@ -174,6 +174,7 @@ public abstract class PlayerList { playerconnection.sendPacket(new PacketPlayOutHeldItemSlot(entityplayer.inventory.itemInHandIndex)); playerconnection.sendPacket(new PacketPlayOutRecipeUpdate(this.server.getCraftingManager().b())); playerconnection.sendPacket(new PacketPlayOutTags(this.server.getTagRegistry())); diff --git a/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch b/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch index 619287ad8b..ef5783bcfb 100644 --- a/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch +++ b/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch @@ -57,7 +57,7 @@ index d1581c9d9838797eb425020d21bd0fba432e5652..99dc43159f240135957aee35f6129f19 packetdataserializer.a(this.c); packetdataserializer.a(this.d); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 42e7394326237fcb466ac9727b5ac732518cf1b9..5ed9122da69b8253c71744700ee9892a6326c8d9 100644 +index 5945786f5093ac8f6cd7cde74f6cb746efffbb1e..9d3b8be7a854828d6e3009e0ad4726c7f134b5e3 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -75,6 +75,7 @@ public abstract class PlayerList { @@ -68,7 +68,7 @@ index 42e7394326237fcb466ac9727b5ac732518cf1b9..5ed9122da69b8253c71744700ee9892a public PlayerList(MinecraftServer minecraftserver, IRegistryCustom.Dimension iregistrycustom_dimension, WorldNBTStorage worldnbtstorage, int i) { this.cserver = minecraftserver.server = new CraftServer((DedicatedServer) minecraftserver, this); -@@ -304,6 +305,13 @@ public abstract class PlayerList { +@@ -305,6 +306,13 @@ public abstract class PlayerList { } entityplayer.syncInventory(); @@ -82,7 +82,7 @@ index 42e7394326237fcb466ac9727b5ac732518cf1b9..5ed9122da69b8253c71744700ee9892a // CraftBukkit - Moved from above, added world PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", entityplayer.getDisplayName().getString(), s1, entityplayer.getId(), worldserver1.worldDataServer.getName(), entityplayer.locX(), entityplayer.locY(), entityplayer.locZ()); } -@@ -421,6 +429,16 @@ public abstract class PlayerList { +@@ -422,6 +430,16 @@ public abstract class PlayerList { entityplayer.playerTick(); // SPIGOT-924 // CraftBukkit end @@ -99,7 +99,7 @@ index 42e7394326237fcb466ac9727b5ac732518cf1b9..5ed9122da69b8253c71744700ee9892a this.savePlayerFile(entityplayer); if (entityplayer.isPassenger()) { Entity entity = entityplayer.getRootVehicle(); -@@ -1058,6 +1076,13 @@ public abstract class PlayerList { +@@ -1059,6 +1077,13 @@ public abstract class PlayerList { } // CraftBukkit end diff --git a/Spigot-Server-Patches/0091-Prevent-Fire-from-loading-chunks.patch b/Spigot-Server-Patches/0091-Prevent-Fire-from-loading-chunks.patch index 94a30fc38d..f1ba6191ea 100644 --- a/Spigot-Server-Patches/0091-Prevent-Fire-from-loading-chunks.patch +++ b/Spigot-Server-Patches/0091-Prevent-Fire-from-loading-chunks.patch @@ -7,10 +7,10 @@ This causes the nether to spam unload/reload chunks, plus overall bad behavior. diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java -index 65a17acf90486f11b8efc32a33fc4d7b71c8a432..0cbf4d7d460a3e9e632fd0c9cfd318f3065f18d6 100644 +index 9f139dd2dbf9706cb018ee26c1315dc29067d68e..9c3b79c1314dedae06278328b6ca722d5ff1e60d 100644 --- a/src/main/java/net/minecraft/server/BlockFire.java +++ b/src/main/java/net/minecraft/server/BlockFire.java -@@ -95,7 +95,7 @@ public class BlockFire extends BlockFireAbstract { +@@ -99,7 +99,7 @@ public class BlockFire extends BlockFireAbstract { BlockStateBoolean blockstateboolean = (BlockStateBoolean) BlockFire.p.get(enumdirection); if (blockstateboolean != null) { @@ -19,7 +19,7 @@ index 65a17acf90486f11b8efc32a33fc4d7b71c8a432..0cbf4d7d460a3e9e632fd0c9cfd318f3 } } -@@ -175,6 +175,7 @@ public class BlockFire extends BlockFireAbstract { +@@ -179,6 +179,7 @@ public class BlockFire extends BlockFireAbstract { } blockposition_mutableblockposition.a((BaseBlockPosition) blockposition, l, j1, i1); @@ -27,7 +27,7 @@ index 65a17acf90486f11b8efc32a33fc4d7b71c8a432..0cbf4d7d460a3e9e632fd0c9cfd318f3 int l1 = this.a((IWorldReader) worldserver, (BlockPosition) blockposition_mutableblockposition); if (l1 > 0) { -@@ -220,10 +221,16 @@ public class BlockFire extends BlockFireAbstract { +@@ -224,10 +225,16 @@ public class BlockFire extends BlockFireAbstract { } private void trySpread(World world, BlockPosition blockposition, int i, Random random, int j, BlockPosition sourceposition) { // CraftBukkit add sourceposition @@ -46,7 +46,7 @@ index 65a17acf90486f11b8efc32a33fc4d7b71c8a432..0cbf4d7d460a3e9e632fd0c9cfd318f3 // CraftBukkit start org.bukkit.block.Block theBlock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()); -@@ -269,7 +276,7 @@ public class BlockFire extends BlockFireAbstract { +@@ -273,7 +280,7 @@ public class BlockFire extends BlockFireAbstract { for (int j = 0; j < i; ++j) { EnumDirection enumdirection = aenumdirection[j]; @@ -55,7 +55,7 @@ index 65a17acf90486f11b8efc32a33fc4d7b71c8a432..0cbf4d7d460a3e9e632fd0c9cfd318f3 return true; } } -@@ -287,7 +294,12 @@ public class BlockFire extends BlockFireAbstract { +@@ -291,7 +298,12 @@ public class BlockFire extends BlockFireAbstract { for (int k = 0; k < j; ++k) { EnumDirection enumdirection = aenumdirection[k]; @@ -69,7 +69,7 @@ index 65a17acf90486f11b8efc32a33fc4d7b71c8a432..0cbf4d7d460a3e9e632fd0c9cfd318f3 i = Math.max(this.getFlameChance(iblockdata), i); } -@@ -298,7 +310,7 @@ public class BlockFire extends BlockFireAbstract { +@@ -302,7 +314,7 @@ public class BlockFire extends BlockFireAbstract { @Override protected boolean e(IBlockData iblockdata) { diff --git a/Spigot-Server-Patches/0109-Add-setting-for-proxy-online-mode-status.patch b/Spigot-Server-Patches/0109-Add-setting-for-proxy-online-mode-status.patch index 3bf20dc4fb..dc525623d1 100644 --- a/Spigot-Server-Patches/0109-Add-setting-for-proxy-online-mode-status.patch +++ b/Spigot-Server-Patches/0109-Add-setting-for-proxy-online-mode-status.patch @@ -45,10 +45,10 @@ index 060887d765604e4be82913607bb6266a278f5db6..c5957c2d6c54b076ebe7f9a432e30551 } else { String[] astring1 = astring; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 2bb31a684906044b159e959dd8acd85efc660b02..fc309214f335ed455c89523ea6a388ba87c7e088 100644 +index 9fdceeeeece358b2456cd66bc585821b7252691e..a201460235816698ee03d5ba5e78cbe505436216 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1476,7 +1476,8 @@ public final class CraftServer implements Server { +@@ -1477,7 +1477,8 @@ public final class CraftServer implements Server { // Spigot Start GameProfile profile = null; // Only fetch an online UUID in online mode diff --git a/Spigot-Server-Patches/0121-Allow-Reloading-of-Command-Aliases.patch b/Spigot-Server-Patches/0121-Allow-Reloading-of-Command-Aliases.patch index c9239582a1..1c15c39733 100644 --- a/Spigot-Server-Patches/0121-Allow-Reloading-of-Command-Aliases.patch +++ b/Spigot-Server-Patches/0121-Allow-Reloading-of-Command-Aliases.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases Reload the aliases stored in commands.yml diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index fc309214f335ed455c89523ea6a388ba87c7e088..acfa657c62005b04eb9fb438f63240a923c2530f 100644 +index a201460235816698ee03d5ba5e78cbe505436216..56855cbb8daff88c643d97f1e12b0386d1f8ff8c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2192,5 +2192,24 @@ public final class CraftServer implements Server { +@@ -2193,5 +2193,24 @@ public final class CraftServer implements Server { DefaultPermissions.registerCorePermissions(); CraftDefaultPermissions.registerCorePermissions(); } diff --git a/Spigot-Server-Patches/0136-Enforce-Sync-Player-Saves.patch b/Spigot-Server-Patches/0136-Enforce-Sync-Player-Saves.patch index aaeb34f775..8c18b6c7fe 100644 --- a/Spigot-Server-Patches/0136-Enforce-Sync-Player-Saves.patch +++ b/Spigot-Server-Patches/0136-Enforce-Sync-Player-Saves.patch @@ -7,10 +7,10 @@ Saving players async is extremely dangerous. This will force it to main the same way we handle async chunk loads. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 32be0e35918398f2fd5f62c2cb87c4597985b7b3..414e23fc24e90829b71def39b186f1913ce8300d 100644 +index 9d3b8be7a854828d6e3009e0ad4726c7f134b5e3..0da963896038d7b04fe0d410ab5d09a07edae9ab 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -960,11 +960,13 @@ public abstract class PlayerList { +@@ -961,11 +961,13 @@ public abstract class PlayerList { } public void savePlayers() { diff --git a/Spigot-Server-Patches/0143-Properly-handle-async-calls-to-restart-the-server.patch b/Spigot-Server-Patches/0143-Properly-handle-async-calls-to-restart-the-server.patch index 7eaa9bf50e..04ddd8432c 100644 --- a/Spigot-Server-Patches/0143-Properly-handle-async-calls-to-restart-the-server.patch +++ b/Spigot-Server-Patches/0143-Properly-handle-async-calls-to-restart-the-server.patch @@ -73,10 +73,10 @@ index 28ade7187d6fd61adbfe65a1944426168b131c4c..878a9de29c728a0b49fb8ee15be85516 // Spigot Start private static double calcTps(double avg, double exp, double tps) diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index f5831148b5f8e2921306074f710d4b90398e896e..4945adff2f014cb679a61b8fb44d7d48971f20bf 100644 +index 0da963896038d7b04fe0d410ab5d09a07edae9ab..ec57eed04d43287249a6fe105556118c39ea0c48 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -1071,10 +1071,15 @@ public abstract class PlayerList { +@@ -1072,10 +1072,15 @@ public abstract class PlayerList { entityplayer.playerInteractManager.b(worldserver.getMinecraftServer().getSaveData().getGameType()); } @@ -93,7 +93,7 @@ index f5831148b5f8e2921306074f710d4b90398e896e..4945adff2f014cb679a61b8fb44d7d48 } // CraftBukkit end -@@ -1086,6 +1091,7 @@ public abstract class PlayerList { +@@ -1087,6 +1092,7 @@ public abstract class PlayerList { } // Paper end } diff --git a/Spigot-Server-Patches/0146-Add-configuration-option-to-prevent-player-names-fro.patch b/Spigot-Server-Patches/0146-Add-configuration-option-to-prevent-player-names-fro.patch index 99a48df1de..bf74e8c60f 100644 --- a/Spigot-Server-Patches/0146-Add-configuration-option-to-prevent-player-names-fro.patch +++ b/Spigot-Server-Patches/0146-Add-configuration-option-to-prevent-player-names-fro.patch @@ -20,10 +20,10 @@ index c4086de778cc2ccc958b1a94dd6e9cdb5065076c..5fa63d7ca20b88a44d8800b3ebf74e4c + } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index acfa657c62005b04eb9fb438f63240a923c2530f..07906b1f25f9547896bc790c22b52a343ff9c940 100644 +index 56855cbb8daff88c643d97f1e12b0386d1f8ff8c..fe331321c126150ae7288dd29f12d87c31483d49 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2211,5 +2211,10 @@ public final class CraftServer implements Server { +@@ -2212,5 +2212,10 @@ public final class CraftServer implements Server { commandMap.registerServerAliases(); return true; } diff --git a/Spigot-Server-Patches/0147-Use-TerminalConsoleAppender-for-console-improvements.patch b/Spigot-Server-Patches/0147-Use-TerminalConsoleAppender-for-console-improvements.patch index f118ea2637..cafc134884 100644 --- a/Spigot-Server-Patches/0147-Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/Spigot-Server-Patches/0147-Use-TerminalConsoleAppender-for-console-improvements.patch @@ -245,7 +245,7 @@ index 878a9de29c728a0b49fb8ee15be85516176795bd..b06bb3dccda23ebed1532e17f9699b9b public KeyPair getKeyPair() { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 4945adff2f014cb679a61b8fb44d7d48971f20bf..da86c825de669a6b9cea773b23d277f56a2daee5 100644 +index ec57eed04d43287249a6fe105556118c39ea0c48..49d57f83dc22603b24ab2369ca4ba3a5c9e8b092 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -79,8 +79,7 @@ public abstract class PlayerList { @@ -259,7 +259,7 @@ index 4945adff2f014cb679a61b8fb44d7d48971f20bf..da86c825de669a6b9cea773b23d277f5 this.k = new GameProfileBanList(PlayerList.b); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 07906b1f25f9547896bc790c22b52a343ff9c940..1c9b5c376c0750974f52d526414d094fcf3a3e11 100644 +index fe331321c126150ae7288dd29f12d87c31483d49..db41896b45f1608fbeb962d3ffe25d9608b36cc4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -46,7 +46,7 @@ import java.util.function.Consumer; @@ -271,7 +271,7 @@ index 07906b1f25f9547896bc790c22b52a343ff9c940..1c9b5c376c0750974f52d526414d094f import net.minecraft.server.Advancement; import net.minecraft.server.ArgumentEntity; import net.minecraft.server.BiomeManager; -@@ -1195,9 +1195,13 @@ public final class CraftServer implements Server { +@@ -1196,9 +1196,13 @@ public final class CraftServer implements Server { return logger; } diff --git a/Spigot-Server-Patches/0153-Basic-PlayerProfile-API.patch b/Spigot-Server-Patches/0153-Basic-PlayerProfile-API.patch index b04c53b0a8..480d6b0367 100644 --- a/Spigot-Server-Patches/0153-Basic-PlayerProfile-API.patch +++ b/Spigot-Server-Patches/0153-Basic-PlayerProfile-API.patch @@ -560,7 +560,7 @@ index 4f769211cf98c3da720a904da3dcdcd4c7611f0b..a038397028848edb4f43cd4f72625466 private UserCacheEntry(GameProfile gameprofile, Date date) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 71f2a8cfc2e077ce7c576957fd1d36f6612a4ebf..4786a8eaca956435f2f76ee9d5fb9e66658c24a1 100644 +index 60a44992a962e15686f89247823389d3757d8b8c..feea84de7d2184caf24d79faee8874f7698e826e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -225,6 +225,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; @@ -573,7 +573,7 @@ index 71f2a8cfc2e077ce7c576957fd1d36f6612a4ebf..4786a8eaca956435f2f76ee9d5fb9e66 public final class CraftServer implements Server { private final String serverName = "Paper"; // Paper private final String serverVersion; -@@ -2228,5 +2231,24 @@ public final class CraftServer implements Server { +@@ -2229,5 +2232,24 @@ public final class CraftServer implements Server { public boolean suggestPlayerNamesWhenNullTabCompletions() { return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions; } diff --git a/Spigot-Server-Patches/0161-ProfileWhitelistVerifyEvent.patch b/Spigot-Server-Patches/0161-ProfileWhitelistVerifyEvent.patch index a27e3a6867..c4174c8d9a 100644 --- a/Spigot-Server-Patches/0161-ProfileWhitelistVerifyEvent.patch +++ b/Spigot-Server-Patches/0161-ProfileWhitelistVerifyEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] ProfileWhitelistVerifyEvent diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 21f583302e9d8da8c9a9651ce40c64dc8abfa512..70339603aa3e256470be241bf033f3471e2090ea 100644 +index 49d57f83dc22603b24ab2369ca4ba3a5c9e8b092..0f20704c889f28d8e7560b33d366eb8948565071 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -541,7 +541,7 @@ public abstract class PlayerList { +@@ -542,7 +542,7 @@ public abstract class PlayerList { if (!gameprofilebanentry.hasExpired()) event.disallow(PlayerLoginEvent.Result.KICK_BANNED, CraftChatMessage.fromComponent(chatmessage)); // Spigot } else if (!this.isWhitelisted(gameprofile)) { chatmessage = new ChatMessage("multiplayer.disconnect.not_whitelisted"); @@ -17,7 +17,7 @@ index 21f583302e9d8da8c9a9651ce40c64dc8abfa512..70339603aa3e256470be241bf033f347 } else if (getIPBans().isBanned(socketaddress) && !getIPBans().get(socketaddress).hasExpired()) { IpBanEntry ipbanentry = this.l.get(socketaddress); -@@ -922,9 +922,25 @@ public abstract class PlayerList { +@@ -923,9 +923,25 @@ public abstract class PlayerList { this.server.getCommandDispatcher().a(entityplayer); } diff --git a/Spigot-Server-Patches/0182-AsyncTabCompleteEvent.patch b/Spigot-Server-Patches/0182-AsyncTabCompleteEvent.patch index 5890668a62..8d68a6c3ab 100644 --- a/Spigot-Server-Patches/0182-AsyncTabCompleteEvent.patch +++ b/Spigot-Server-Patches/0182-AsyncTabCompleteEvent.patch @@ -72,10 +72,10 @@ index b2eac041c3ff7d8a7c4524dac381ab95045f28af..fa5c640239451579fba35ad7b0979739 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 4786a8eaca956435f2f76ee9d5fb9e66658c24a1..3c22cf8fb454acaff282d8cd6c636f918de76e9e 100644 +index feea84de7d2184caf24d79faee8874f7698e826e..17c92071fabd385e1955fec793eba0b0c5cdd2b6 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1784,7 +1784,7 @@ public final class CraftServer implements Server { +@@ -1785,7 +1785,7 @@ public final class CraftServer implements Server { offers = tabCompleteChat(player, message); } diff --git a/Spigot-Server-Patches/0205-getPlayerUniqueId-API.patch b/Spigot-Server-Patches/0205-getPlayerUniqueId-API.patch index 17486f5157..76e67cdb62 100644 --- a/Spigot-Server-Patches/0205-getPlayerUniqueId-API.patch +++ b/Spigot-Server-Patches/0205-getPlayerUniqueId-API.patch @@ -9,10 +9,10 @@ In Offline Mode, will return an Offline UUID This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 3c22cf8fb454acaff282d8cd6c636f918de76e9e..ce3d5e9fd1853ab9519da93ce297ca0bceb9acf8 100644 +index 17c92071fabd385e1955fec793eba0b0c5cdd2b6..499e7d6fecc6223df057fa644f8c449fda910f0b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1480,6 +1480,26 @@ public final class CraftServer implements Server { +@@ -1481,6 +1481,26 @@ public final class CraftServer implements Server { return recipients.size(); } diff --git a/Spigot-Server-Patches/0232-Implement-EntityKnockbackByEntityEvent.patch b/Spigot-Server-Patches/0232-Implement-EntityKnockbackByEntityEvent.patch index 057f304cd2..f95ced4cfa 100644 --- a/Spigot-Server-Patches/0232-Implement-EntityKnockbackByEntityEvent.patch +++ b/Spigot-Server-Patches/0232-Implement-EntityKnockbackByEntityEvent.patch @@ -6,68 +6,75 @@ Subject: [PATCH] Implement EntityKnockbackByEntityEvent This event is called when an entity receives knockback by another entity. diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index a1cfa610eb3cc368b9641feeab709a4f5985ffbe..d94874b02ddcb640c9d94c99d83e77b2e55dce73 100644 +index a1cfa610eb3cc368b9641feeab709a4f5985ffbe..08141147f9795546e9397abed95834ed5e69a126 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -1085,7 +1085,9 @@ public abstract class EntityHuman extends EntityLiving { +@@ -1085,7 +1085,7 @@ public abstract class EntityHuman extends EntityLiving { if (flag5) { if (i > 0) { if (entity instanceof EntityLiving) { -+ ((EntityLiving) entity).knockingBackEntity = this; // Paper - ((EntityLiving) entity).a((float) i * 0.5F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F))); -+ ((EntityLiving) entity).knockingBackEntity = null; // Paper +- ((EntityLiving) entity).a((float) i * 0.5F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F))); ++ ((EntityLiving) entity).doKnockback((float) i * 0.5F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F)), this); // Paper } else { entity.h((double) (-MathHelper.sin(this.yaw * 0.017453292F) * (float) i * 0.5F), 0.1D, (double) (MathHelper.cos(this.yaw * 0.017453292F) * (float) i * 0.5F)); } -@@ -1109,7 +1111,9 @@ public abstract class EntityHuman extends EntityLiving { +@@ -1109,7 +1109,7 @@ public abstract class EntityHuman extends EntityLiving { if (entityliving != this && entityliving != entity && !this.r(entityliving) && (!(entityliving instanceof EntityArmorStand) || !((EntityArmorStand) entityliving).isMarker()) && this.h((Entity) entityliving) < 9.0D) { // CraftBukkit start - Only apply knockback if the damage hits if (entityliving.damageEntity(DamageSource.playerAttack(this).sweep(), f4)) { -+ ((EntityLiving) entity).knockingBackEntity = this; // Paper - entityliving.a(0.4F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F))); -+ ((EntityLiving) entity).knockingBackEntity = null; // Paper +- entityliving.a(0.4F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F))); ++ entityliving.doKnockback(0.4F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F)), this); } // CraftBukkit end } diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 3997dc6d979bf5a027861397b948aa4e8486fc58..57521337ea5ad4b944cf7303d2b3f9b34431116a 100644 +index e434e23bf5b22a623ed7b915711bdb31b7e90b61..424157dcf536527e80faf5428f18f7e66d4216b6 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -1479,7 +1479,9 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1474,7 +1474,7 @@ public abstract class EntityInsentient extends EntityLiving { if (flag) { if (f1 > 0.0F && entity instanceof EntityLiving) { -+ ((EntityLiving) entity).knockingBackEntity = this; // Paper - ((EntityLiving) entity).a(f1 * 0.5F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F))); -+ ((EntityLiving) entity).knockingBackEntity = null; // Paper +- ((EntityLiving) entity).a(f1 * 0.5F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F))); ++ ((EntityLiving) entity).doKnockback(f1 * 0.5F, (double) MathHelper.sin(this.yaw * 0.017453292F), (double) (-MathHelper.cos(this.yaw * 0.017453292F)), this); this.setMot(this.getMot().d(0.6D, 1.0D, 0.6D)); } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 2ffc8eb4615abfaa6a9e99c45ea436cdf6a461c8..d0a389e6dc73202a3fa7c82eace1c92dece2982e 100644 +index 2ffc8eb4615abfaa6a9e99c45ea436cdf6a461c8..a62f769ab509edd30717cfca785449acecdf295e 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -1239,7 +1239,9 @@ public abstract class EntityLiving extends Entity { +@@ -1239,7 +1239,7 @@ public abstract class EntityLiving extends Entity { } this.aw = (float) (MathHelper.d(d1, d0) * 57.2957763671875D - (double) this.yaw); -+ this.knockingBackEntity = entity1 instanceof EntityLiving ? ((EntityLiving) entity1) : null; // Paper - this.a(0.4F, d0, d1); -+ this.knockingBackEntity = null; // Paper +- this.a(0.4F, d0, d1); ++ this.doKnockback(0.4F, d0, d1, entity1); // Paper } else { this.aw = (float) ((int) (Math.random() * 2.0D) * 180); } -@@ -1287,7 +1289,9 @@ public abstract class EntityLiving extends Entity { +@@ -1287,7 +1287,7 @@ public abstract class EntityLiving extends Entity { } protected void f(EntityLiving entityliving) { -+ ((EntityLiving) entityliving).knockingBackEntity = this; // Paper - entityliving.a(0.5F, entityliving.locX() - this.locX(), entityliving.locZ() - this.locZ()); -+ ((EntityLiving) entityliving).knockingBackEntity = null; // Paper +- entityliving.a(0.5F, entityliving.locX() - this.locX(), entityliving.locZ() - this.locZ()); ++ entityliving.doKnockback(0.5F, entityliving.locX() - this.locX(), entityliving.locZ() - this.locZ(), this); } private boolean f(DamageSource damagesource) { -@@ -1531,8 +1535,19 @@ public abstract class EntityLiving extends Entity { +@@ -1524,6 +1524,11 @@ public abstract class EntityLiving extends Entity { + } + + public void a(float f, double d0, double d1) { ++ // Paper start - add knockbacking entity parameter ++ this.doKnockback(f, d0, d1, null); ++ } ++ public void doKnockback(float f, double d0, double d1, Entity knockingBackEntity) { ++ // Paper end - add knockbacking entity parameter + f = (float) ((double) f * (1.0D - this.b(GenericAttributes.KNOCKBACK_RESISTANCE))); + if (f > 0.0F) { + this.impulse = true; +@@ -1531,6 +1536,16 @@ public abstract class EntityLiving extends Entity { Vec3D vec3d1 = (new Vec3D(d0, 0.0D, d1)).d().a((double) f); this.setMot(vec3d.x / 2.0D - vec3d1.x, this.onGround ? Math.min(0.4D, vec3d.y / 2.0D + (double) f) : vec3d.y, vec3d.z / 2.0D - vec3d1.z); @@ -83,7 +90,4 @@ index 2ffc8eb4615abfaa6a9e99c45ea436cdf6a461c8..d0a389e6dc73202a3fa7c82eace1c92d + // Paper end } } -+ EntityLiving knockingBackEntity; // Paper - @Nullable - protected SoundEffect getSoundHurt(DamageSource damagesource) { diff --git a/Spigot-Server-Patches/0236-Add-config-to-disable-ender-dragon-legacy-check.patch b/Spigot-Server-Patches/0236-Add-config-to-disable-ender-dragon-legacy-check.patch index 474051f838..621e22b74d 100644 --- a/Spigot-Server-Patches/0236-Add-config-to-disable-ender-dragon-legacy-check.patch +++ b/Spigot-Server-Patches/0236-Add-config-to-disable-ender-dragon-legacy-check.patch @@ -19,7 +19,7 @@ index 33ce9a500430a01650e69a3568c8b03db325a936..cea15d50ed89430ee8d8cff9de21e1fc + } } diff --git a/src/main/java/net/minecraft/server/EnderDragonBattle.java b/src/main/java/net/minecraft/server/EnderDragonBattle.java -index 87ddabbbca4ac8444ad6ff69889d7fd0542045d4..1f012667464779939cd43453dcf066a14f4fa278 100644 +index 356defd19ebba5b051b7dbdcc21f0139bbdc4a84..69faefbdbf338b38311cd2a5d3183a104ec36f86 100644 --- a/src/main/java/net/minecraft/server/EnderDragonBattle.java +++ b/src/main/java/net/minecraft/server/EnderDragonBattle.java @@ -28,10 +28,10 @@ public class EnderDragonBattle { @@ -46,21 +46,3 @@ index 87ddabbbca4ac8444ad6ff69889d7fd0542045d4..1f012667464779939cd43453dcf066a1 this.world = worldserver; if (nbttagcompound.hasKeyOfType("DragonKilled", 99)) { if (nbttagcompound.b("Dragon")) { -@@ -376,7 +380,7 @@ public class EnderDragonBattle { - - private void a(BlockPosition blockposition) { - this.world.triggerEffect(3000, blockposition, 0); -- WorldGenerator.END_GATEWAY.b((WorldGenFeatureConfiguration) WorldGenEndGatewayConfiguration.a()).a(this.world, this.world.getStructureManager(), this.world.getChunkProvider().getChunkGenerator(), new Random(), blockposition); -+ WorldGenerator.END_GATEWAY.b(WorldGenEndGatewayConfiguration.a()).a(this.world, this.world.getStructureManager(), this.world.getChunkProvider().getChunkGenerator(), new Random(), blockposition); // Paper - decompile error - } - - private void a(boolean flag) { -@@ -388,7 +392,7 @@ public class EnderDragonBattle { - } - } - -- worldgenendtrophy.b((WorldGenFeatureConfiguration) WorldGenFeatureConfiguration.k).a(this.world, this.world.getStructureManager(), this.world.getChunkProvider().getChunkGenerator(), new Random(), this.exitPortalLocation); -+ worldgenendtrophy.b(WorldGenFeatureConfiguration.k).a(this.world, this.world.getStructureManager(), this.world.getChunkProvider().getChunkGenerator(), new Random(), this.exitPortalLocation); // Paper - decompile error - } - - private EntityEnderDragon o() { diff --git a/Spigot-Server-Patches/0238-InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/0238-InventoryCloseEvent-Reason-API.patch index f22644abc7..ce46018fb3 100644 --- a/Spigot-Server-Patches/0238-InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/0238-InventoryCloseEvent-Reason-API.patch @@ -7,7 +7,7 @@ Allows you to determine why an inventory was closed, enabling plugin developers to "confirm" things based on if it was player triggered close or not. diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index d94874b02ddcb640c9d94c99d83e77b2e55dce73..1249a7ae8fa8d6ea33cbc276717f1e4553f73b85 100644 +index 08141147f9795546e9397abed95834ed5e69a126..d9e5d71a87140c90b79902887bd2f481f02956dc 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -155,7 +155,7 @@ public abstract class EntityHuman extends EntityLiving { @@ -101,10 +101,10 @@ index e78306cb187b5f08e32888ebd55c4c486fc8dad2..2cbb0e0e1046efeff7f417d0c976754b this.player.o(); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 70339603aa3e256470be241bf033f3471e2090ea..ef1ea58c252d063ce282d244236a510655538a11 100644 +index 0f20704c889f28d8e7560b33d366eb8948565071..e3611d01c0e20938f8b4ef01ade03a2e3434ed9f 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -419,7 +419,7 @@ public abstract class PlayerList { +@@ -420,7 +420,7 @@ public abstract class PlayerList { entityplayer.a(StatisticList.LEAVE_GAME); // CraftBukkit start - Quitting must be before we do final save of data, in case plugins need to modify it @@ -155,7 +155,7 @@ index 27b2ee740a705238995dd3bcea62b4bf74ec82dc..f6209e9c0b9e0ab99693025d23847bc6 @Override public boolean isBlocking() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index ac621e2a6e7a2eaba5acc1dabca5d0bef4c8b2b3..0ba5b2a444660f280b673dbd0db9ded38fa6a839 100644 +index b5d2ce40431247112baaded01e860c1832bf8fd8..bb6635be243a270752e1c47a9646a13ea6707baf 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -789,7 +789,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0263-Add-TNTPrimeEvent.patch b/Spigot-Server-Patches/0263-Add-TNTPrimeEvent.patch index 2d395c9953..86b01ed819 100644 --- a/Spigot-Server-Patches/0263-Add-TNTPrimeEvent.patch +++ b/Spigot-Server-Patches/0263-Add-TNTPrimeEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add TNTPrimeEvent diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java -index 0cbf4d7d460a3e9e632fd0c9cfd318f3065f18d6..1e6159f211fb445e45bab3ca1a3bf21750928302 100644 +index 9c3b79c1314dedae06278328b6ca722d5ff1e60d..a11a775a929c5f868f1b84c56d7e1715a91db236 100644 --- a/src/main/java/net/minecraft/server/BlockFire.java +++ b/src/main/java/net/minecraft/server/BlockFire.java @@ -2,6 +2,7 @@ package net.minecraft.server; @@ -16,7 +16,7 @@ index 0cbf4d7d460a3e9e632fd0c9cfd318f3065f18d6..1e6159f211fb445e45bab3ca1a3bf217 import java.util.Map; import java.util.Random; -@@ -249,7 +250,7 @@ public class BlockFire extends BlockFireAbstract { +@@ -253,7 +254,7 @@ public class BlockFire extends BlockFireAbstract { world.setTypeAndData(blockposition, this.a(world, blockposition, l), 3); } else { @@ -25,7 +25,7 @@ index 0cbf4d7d460a3e9e632fd0c9cfd318f3065f18d6..1e6159f211fb445e45bab3ca1a3bf217 } Block block = iblockdata.getBlock(); -@@ -257,6 +258,13 @@ public class BlockFire extends BlockFireAbstract { +@@ -261,6 +262,13 @@ public class BlockFire extends BlockFireAbstract { if (block instanceof BlockTNT) { BlockTNT blocktnt = (BlockTNT) block; diff --git a/Spigot-Server-Patches/0270-Use-ConcurrentHashMap-in-JsonList.patch b/Spigot-Server-Patches/0270-Use-ConcurrentHashMap-in-JsonList.patch index 01382c17f6..089f727bb8 100644 --- a/Spigot-Server-Patches/0270-Use-ConcurrentHashMap-in-JsonList.patch +++ b/Spigot-Server-Patches/0270-Use-ConcurrentHashMap-in-JsonList.patch @@ -122,10 +122,10 @@ index 5b01e4edb3c0f8bc785b70128cbe31b14356e4fb..9213bfb78e92b838189161045e394558 this.d.values().stream().map((jsonlistentry) -> { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index ef1ea58c252d063ce282d244236a510655538a11..8c1d836538c678feca56076753e8781eadcd6d1d 100644 +index e3611d01c0e20938f8b4ef01ade03a2e3434ed9f..2acea235633fb6b48c68711bc1cec5b61e7bf140 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -542,7 +542,7 @@ public abstract class PlayerList { +@@ -543,7 +543,7 @@ public abstract class PlayerList { } else if (!this.isWhitelisted(gameprofile)) { chatmessage = new ChatMessage("multiplayer.disconnect.not_whitelisted"); //event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, org.spigotmc.SpigotConfig.whitelistMessage); // Spigot // Paper - moved to isWhitelisted diff --git a/Spigot-Server-Patches/0286-Expose-attack-cooldown-methods-for-Player.patch b/Spigot-Server-Patches/0286-Expose-attack-cooldown-methods-for-Player.patch index d64f12e381..936f79eab8 100644 --- a/Spigot-Server-Patches/0286-Expose-attack-cooldown-methods-for-Player.patch +++ b/Spigot-Server-Patches/0286-Expose-attack-cooldown-methods-for-Player.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose attack cooldown methods for Player diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 1249a7ae8fa8d6ea33cbc276717f1e4553f73b85..af554396fdb25719c158a81ccab76e91f5df2ff5 100644 +index d9e5d71a87140c90b79902887bd2f481f02956dc..afc665bfe9d527ca8d19f3ab9df0900d87f2d3f2 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -2010,14 +2010,17 @@ public abstract class EntityHuman extends EntityLiving { +@@ -2006,14 +2006,17 @@ public abstract class EntityHuman extends EntityLiving { this.datawatcher.set(EntityHuman.bs, nbttagcompound); } diff --git a/Spigot-Server-Patches/0287-Improve-death-events.patch b/Spigot-Server-Patches/0287-Improve-death-events.patch index 5814fe2bea..db3b1c1ba2 100644 --- a/Spigot-Server-Patches/0287-Improve-death-events.patch +++ b/Spigot-Server-Patches/0287-Improve-death-events.patch @@ -119,7 +119,7 @@ index c2a3bd8f25e91f79723074d93f6a646a8ce76d8c..4934e71225fe1242615660a379e797e2 public void saveData(NBTTagCompound nbttagcompound) { super.saveData(nbttagcompound); diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index c3f3a392f2b15a806c706b1e518282225b45bbc3..f5f043f0a5bafb7e432a541f9ef6db0956a52f31 100644 +index 4b249a644c680a7cc64b0d31cf453f94ff2b6a0c..d6a98bb7fc107649c179cded2d37c06a41146a89 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -95,7 +95,7 @@ public abstract class EntityLiving extends Entity { @@ -139,7 +139,7 @@ index c3f3a392f2b15a806c706b1e518282225b45bbc3..f5f043f0a5bafb7e432a541f9ef6db09 @Override public float getBukkitYaw() { -@@ -1250,13 +1251,17 @@ public abstract class EntityLiving extends Entity { +@@ -1248,13 +1249,17 @@ public abstract class EntityLiving extends Entity { if (knockbackCancelled) this.world.broadcastEntityEffect(this, (byte) 2); // Paper - Disable explosion knockback if (this.dk()) { if (!this.f(damagesource)) { @@ -161,7 +161,7 @@ index c3f3a392f2b15a806c706b1e518282225b45bbc3..f5f043f0a5bafb7e432a541f9ef6db09 } } else if (flag1) { this.c(damagesource); -@@ -1396,6 +1401,7 @@ public abstract class EntityLiving extends Entity { +@@ -1392,6 +1397,7 @@ public abstract class EntityLiving extends Entity { Entity entity = damagesource.getEntity(); EntityLiving entityliving = this.getKillingEntity(); @@ -169,7 +169,7 @@ index c3f3a392f2b15a806c706b1e518282225b45bbc3..f5f043f0a5bafb7e432a541f9ef6db09 if (this.aV >= 0 && entityliving != null) { entityliving.a(this, this.aV, damagesource); } -@@ -1407,16 +1413,36 @@ public abstract class EntityLiving extends Entity { +@@ -1403,16 +1409,36 @@ public abstract class EntityLiving extends Entity { if (this.isSleeping()) { this.entityWakeup(); } @@ -208,7 +208,7 @@ index c3f3a392f2b15a806c706b1e518282225b45bbc3..f5f043f0a5bafb7e432a541f9ef6db09 } } -@@ -1424,7 +1450,7 @@ public abstract class EntityLiving extends Entity { +@@ -1420,7 +1446,7 @@ public abstract class EntityLiving extends Entity { if (!this.world.isClientSide) { boolean flag = false; @@ -217,7 +217,7 @@ index c3f3a392f2b15a806c706b1e518282225b45bbc3..f5f043f0a5bafb7e432a541f9ef6db09 if (this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) { BlockPosition blockposition = this.getChunkCoordinates(); IBlockData iblockdata = Blocks.WITHER_ROSE.getBlockData(); -@@ -1445,7 +1471,8 @@ public abstract class EntityLiving extends Entity { +@@ -1441,7 +1467,8 @@ public abstract class EntityLiving extends Entity { } } @@ -227,7 +227,7 @@ index c3f3a392f2b15a806c706b1e518282225b45bbc3..f5f043f0a5bafb7e432a541f9ef6db09 Entity entity = damagesource.getEntity(); int i; -@@ -1458,22 +1485,26 @@ public abstract class EntityLiving extends Entity { +@@ -1454,22 +1481,26 @@ public abstract class EntityLiving extends Entity { boolean flag = this.lastDamageByPlayerTime > 0; this.dropInventory(); // CraftBukkit - from below diff --git a/Spigot-Server-Patches/0302-Add-sun-related-API.patch b/Spigot-Server-Patches/0302-Add-sun-related-API.patch index 6e95ba1203..f2a4068ec2 100644 --- a/Spigot-Server-Patches/0302-Add-sun-related-API.patch +++ b/Spigot-Server-Patches/0302-Add-sun-related-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add sun related API diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 1b824bd3757b7e6723254c9cb2badaafbd2de2de..7c9b437d950623a978ca3d45c8ca57b39a897179 100644 +index c23e634dca6aab051b432a5fee2756afa80fb776..5a61167999f7d2fc271659762de9f4e861564542 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -1511,6 +1511,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1504,6 +1504,7 @@ public abstract class EntityInsentient extends EntityLiving { } diff --git a/Spigot-Server-Patches/0320-Make-the-default-permission-message-configurable.patch b/Spigot-Server-Patches/0320-Make-the-default-permission-message-configurable.patch index fe4dadfe8d..70a4d2e765 100644 --- a/Spigot-Server-Patches/0320-Make-the-default-permission-message-configurable.patch +++ b/Spigot-Server-Patches/0320-Make-the-default-permission-message-configurable.patch @@ -29,10 +29,10 @@ index 01d48da8b2f89ad3a615ad10c044c5f0a08ee4ed..f9b1b198299166759fe0bd0a36d8d88c private static void savePlayerData() { savePlayerData = getBoolean("settings.save-player-data", savePlayerData); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 02395d71bc8b457240720cc76a481f9ea1613d79..ce60435cc83dbe0ce0e791de256b67f82052e97b 100644 +index 02dc825a40bc8f289cd4b93ba2e88ee534784730..b97e8c2a42c608b1798c4a1964111c312a125097 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2254,6 +2254,11 @@ public final class CraftServer implements Server { +@@ -2255,6 +2255,11 @@ public final class CraftServer implements Server { return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions; } diff --git a/Spigot-Server-Patches/0324-Add-more-Zombie-API.patch b/Spigot-Server-Patches/0324-Add-more-Zombie-API.patch index 56e5ab6168..27cb3458af 100644 --- a/Spigot-Server-Patches/0324-Add-more-Zombie-API.patch +++ b/Spigot-Server-Patches/0324-Add-more-Zombie-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add more Zombie API diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 7c9b437d950623a978ca3d45c8ca57b39a897179..dbd7850df45fb9ee550ce33f97bdfe9cf5bfcd34 100644 +index 5a61167999f7d2fc271659762de9f4e861564542..513c987a56e8d2bda0bda8771285c7c8d5ca88e1 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -1423,6 +1423,8 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1418,6 +1418,8 @@ public abstract class EntityInsentient extends EntityLiving { this.datawatcher.set(EntityInsentient.b, flag ? (byte) (b0 | 2) : (byte) (b0 & -3)); } diff --git a/Spigot-Server-Patches/0337-Optimize-Network-Manager-and-add-advanced-packet-sup.patch b/Spigot-Server-Patches/0337-Optimize-Network-Manager-and-add-advanced-packet-sup.patch index 8e265a904a..d48e28ee16 100644 --- a/Spigot-Server-Patches/0337-Optimize-Network-Manager-and-add-advanced-packet-sup.patch +++ b/Spigot-Server-Patches/0337-Optimize-Network-Manager-and-add-advanced-packet-sup.patch @@ -338,10 +338,10 @@ index 2d8e6a2f4a0c3c5d74a647d7164b0028781d3bf5..545dbe6ddcce1d172f465b4a7ab85654 return false; } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index a6f0b39717164d6b3ab15843b13ef52a24dde5d6..3a5641f9187fc21f367f7a3cd12cec8e4c80dd97 100644 +index f436f30c1e07ac42e35a007cde5a92cc0568e7ff..1950ca8af7335317ec40cf2dfd026115cc29054e 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -166,6 +166,7 @@ public abstract class PlayerList { +@@ -167,6 +167,7 @@ public abstract class PlayerList { boolean flag1 = gamerules.getBoolean(GameRules.REDUCED_DEBUG_INFO); // Spigot - view distance @@ -349,7 +349,7 @@ index a6f0b39717164d6b3ab15843b13ef52a24dde5d6..3a5641f9187fc21f367f7a3cd12cec8e playerconnection.sendPacket(new PacketPlayOutLogin(entityplayer.getId(), entityplayer.playerInteractManager.getGameMode(), entityplayer.playerInteractManager.c(), BiomeManager.a(worldserver1.getSeed()), worlddata.isHardcore(), this.server.E(), this.s, worldserver1.getTypeKey(), worldserver1.getDimensionKey(), this.getMaxPlayers(), worldserver.spigotConfig.viewDistance, flag1, !flag, worldserver1.isDebugWorld(), worldserver1.isFlatWorld())); entityplayer.getBukkitEntity().sendSupportedChannels(); // CraftBukkit playerconnection.sendPacket(new PacketPlayOutCustomPayload(PacketPlayOutCustomPayload.a, (new PacketDataSerializer(Unpooled.buffer())).a(this.getServer().getServerModName()))); -@@ -175,6 +176,7 @@ public abstract class PlayerList { +@@ -176,6 +177,7 @@ public abstract class PlayerList { playerconnection.sendPacket(new PacketPlayOutRecipeUpdate(this.server.getCraftingManager().b())); playerconnection.sendPacket(new PacketPlayOutTags(this.server.getTagRegistry())); playerconnection.sendPacket(new PacketPlayOutEntityStatus(entityplayer, (byte) (worldserver.getGameRules().getBoolean(GameRules.REDUCED_DEBUG_INFO) ? 22 : 23))); // Paper - fix this rule not being initialized on the client diff --git a/Spigot-Server-Patches/0339-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch b/Spigot-Server-Patches/0339-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch index 9926dbd007..29b6652eb2 100644 --- a/Spigot-Server-Patches/0339-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch +++ b/Spigot-Server-Patches/0339-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch @@ -11,10 +11,10 @@ everything to the Whitelist object. https://github.com/PaperMC/Paper/issues/1880 diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 3a5641f9187fc21f367f7a3cd12cec8e4c80dd97..5c6ea9df899a0649abde8c54e6f844eaf53d27dd 100644 +index 1950ca8af7335317ec40cf2dfd026115cc29054e..0815a8e580465c0fe2700efad67370d1ff514fbf 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -931,9 +931,9 @@ public abstract class PlayerList { +@@ -932,9 +932,9 @@ public abstract class PlayerList { } public boolean isWhitelisted(GameProfile gameprofile, org.bukkit.event.player.PlayerLoginEvent loginEvent) { boolean isOp = this.operators.d(gameprofile); diff --git a/Spigot-Server-Patches/0342-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch b/Spigot-Server-Patches/0342-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch index 44c6785dac..97f1c59747 100644 --- a/Spigot-Server-Patches/0342-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch +++ b/Spigot-Server-Patches/0342-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Call WhitelistToggleEvent when whitelist is toggled diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 5c6ea9df899a0649abde8c54e6f844eaf53d27dd..d4048812723bed08e5bb2aadc651a92570d4bb2a 100644 +index 0815a8e580465c0fe2700efad67370d1ff514fbf..4d9c84348770dea9307488317cf5c36913367ca1 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -1049,6 +1049,7 @@ public abstract class PlayerList { +@@ -1050,6 +1050,7 @@ public abstract class PlayerList { } public void setHasWhitelist(boolean flag) { diff --git a/Spigot-Server-Patches/0345-Entity-getEntitySpawnReason.patch b/Spigot-Server-Patches/0345-Entity-getEntitySpawnReason.patch index d14abfca1f..ede122005a 100644 --- a/Spigot-Server-Patches/0345-Entity-getEntitySpawnReason.patch +++ b/Spigot-Server-Patches/0345-Entity-getEntitySpawnReason.patch @@ -59,10 +59,10 @@ index e87fa15250a57c9b7ed4f4b530289b7b28bb7c9c..83dda2bb95d38ff248d635420c0bf12e } catch (Throwable throwable) { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index d4048812723bed08e5bb2aadc651a92570d4bb2a..5f520d8a7ad4753bc106ebf9567fbbb8a36ac1d1 100644 +index 4d9c84348770dea9307488317cf5c36913367ca1..4ae901a3516840574a1c31e1002e8c6b248a7d54 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -263,7 +263,7 @@ public abstract class PlayerList { +@@ -264,7 +264,7 @@ public abstract class PlayerList { // CraftBukkit start WorldServer finalWorldServer = worldserver1; Entity entity = EntityTypes.a(nbttagcompound1.getCompound("Entity"), finalWorldServer, (entity1) -> { diff --git a/Spigot-Server-Patches/0347-Implement-PlayerPostRespawnEvent.patch b/Spigot-Server-Patches/0347-Implement-PlayerPostRespawnEvent.patch index ef396b3065..2c859b2e55 100644 --- a/Spigot-Server-Patches/0347-Implement-PlayerPostRespawnEvent.patch +++ b/Spigot-Server-Patches/0347-Implement-PlayerPostRespawnEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Implement PlayerPostRespawnEvent diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 5f520d8a7ad4753bc106ebf9567fbbb8a36ac1d1..5b3d2bd35ca3f98b8c04ea841023d68b24b91718 100644 +index 4ae901a3516840574a1c31e1002e8c6b248a7d54..ce1768e1c47179dfc119d7fa315c30510715f1d6 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -665,9 +665,14 @@ public abstract class PlayerList { +@@ -666,9 +666,14 @@ public abstract class PlayerList { // this.a(entityplayer1, entityplayer, worldserver1); // CraftBukkit - removed boolean flag2 = false; @@ -24,7 +24,7 @@ index 5f520d8a7ad4753bc106ebf9567fbbb8a36ac1d1..5b3d2bd35ca3f98b8c04ea841023d68b WorldServer worldserver1 = this.server.getWorldServer(entityplayer.getSpawnDimension()); if (worldserver1 != null) { Optional optional; -@@ -708,6 +713,7 @@ public abstract class PlayerList { +@@ -709,6 +714,7 @@ public abstract class PlayerList { location = respawnEvent.getRespawnLocation(); if (!flag) entityplayer.reset(); // SPIGOT-4785 @@ -32,7 +32,7 @@ index 5f520d8a7ad4753bc106ebf9567fbbb8a36ac1d1..5b3d2bd35ca3f98b8c04ea841023d68b } else { location.setWorld(worldserver.getWorld()); } -@@ -765,6 +771,13 @@ public abstract class PlayerList { +@@ -766,6 +772,13 @@ public abstract class PlayerList { if (entityplayer.playerConnection.isDisconnected()) { this.savePlayerFile(entityplayer); } diff --git a/Spigot-Server-Patches/0358-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch b/Spigot-Server-Patches/0358-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch index 7a81706b8b..d00a141ff7 100644 --- a/Spigot-Server-Patches/0358-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch +++ b/Spigot-Server-Patches/0358-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch @@ -29,10 +29,10 @@ index cc493d5d8b621bb69aedc5d2c5121d9199074575..19680baafcc8a5a18ec3f58da6943721 public boolean isDebugging() { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index ce60435cc83dbe0ce0e791de256b67f82052e97b..d3a3b47fe86579abc1c5d17284717c79a43cf058 100644 +index b97e8c2a42c608b1798c4a1964111c312a125097..1b591e6450125a0f5f8c79829fb8dea5c3eb8a8e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1780,7 +1780,7 @@ public final class CraftServer implements Server { +@@ -1781,7 +1781,7 @@ public final class CraftServer implements Server { @Override public boolean isPrimaryThread() { diff --git a/Spigot-Server-Patches/0372-Anti-Xray.patch b/Spigot-Server-Patches/0372-Anti-Xray.patch index 35e3bced8e..0e6bb715a4 100644 --- a/Spigot-Server-Patches/0372-Anti-Xray.patch +++ b/Spigot-Server-Patches/0372-Anti-Xray.patch @@ -847,10 +847,10 @@ index 0000000000000000000000000000000000000000..e61421d87a19bf2f6ce8836b48c445ff +} diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java new file mode 100644 -index 0000000000000000000000000000000000000000..c5a7b186e96901d55680283500f423025ededbe8 +index 0000000000000000000000000000000000000000..298ea423084dbcc1b61f991bcd82b8ae51bf0977 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java -@@ -0,0 +1,56 @@ +@@ -0,0 +1,51 @@ +package com.destroystokyo.paper.antixray; + +public final class DataBitsReader { @@ -891,28 +891,23 @@ index 0000000000000000000000000000000000000000..c5a7b186e96901d55680283500f42302 + } + + public int read() { -+ int value = (int) (current >>> bitInLongIndex) & mask; -+ bitInLongIndex += bitsPerObject; -+ -+ if (bitInLongIndex > 63) { -+ bitInLongIndex -= 64; ++ if (bitInLongIndex + bitsPerObject > 64) { ++ bitInLongIndex = 0; + longInDataBitsIndex += 8; + init(); -+ -+ if (bitInLongIndex > 0) { -+ value |= current << bitsPerObject - bitInLongIndex & mask; -+ } + } + ++ int value = (int) (current >>> bitInLongIndex) & mask; ++ bitInLongIndex += bitsPerObject; + return value; + } +} diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java new file mode 100644 -index 0000000000000000000000000000000000000000..2eff19f6aaa31245f80910c6fbb541e32c672a31 +index 0000000000000000000000000000000000000000..333763936897befda5bb6c077944d2667f922799 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java -@@ -0,0 +1,84 @@ +@@ -0,0 +1,79 @@ +package com.destroystokyo.paper.antixray; + +public final class DataBitsWriter { @@ -969,29 +964,24 @@ index 0000000000000000000000000000000000000000..2eff19f6aaa31245f80910c6fbb541e3 + } + + public void write(int value) { ++ if (bitInLongIndex + bitsPerObject > 64) { ++ finish(); ++ bitInLongIndex = 0; ++ longInDataBitsIndex += 8; ++ init(); ++ } ++ + current = current & ~(mask << bitInLongIndex) | (value & mask) << bitInLongIndex; + dirty = true; + bitInLongIndex += bitsPerObject; -+ -+ if (bitInLongIndex > 63) { -+ finish(); -+ bitInLongIndex -= 64; -+ longInDataBitsIndex += 8; -+ init(); -+ -+ if (bitInLongIndex > 0) { -+ current = current & ~(mask >>> bitsPerObject - bitInLongIndex) | (value & mask) >>> bitsPerObject - bitInLongIndex; -+ dirty = true; -+ } -+ } + } + + public void skip() { + bitInLongIndex += bitsPerObject; + -+ if (bitInLongIndex > 63) { ++ if (bitInLongIndex > 64) { + finish(); -+ bitInLongIndex -= 64; ++ bitInLongIndex = bitsPerObject; + longInDataBitsIndex += 8; + init(); + } diff --git a/Spigot-Server-Patches/0378-Asynchronous-chunk-IO-and-loading.patch b/Spigot-Server-Patches/0378-Asynchronous-chunk-IO-and-loading.patch index 24c69d24a1..77ee8c6d09 100644 --- a/Spigot-Server-Patches/0378-Asynchronous-chunk-IO-and-loading.patch +++ b/Spigot-Server-Patches/0378-Asynchronous-chunk-IO-and-loading.patch @@ -3046,7 +3046,7 @@ index 3e1c1253ad5e2fa68fd8a0bac100c2e7536ea080..b6868b6b23a09e8e0dfe7a5e378dca22 completablefuture = (CompletableFuture) this.statusFutures.get(i); if (completablefuture != null) { diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f54989422e5281c 100644 +index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..a10006efc52f093196e7d67a3281a87d4c5df19b 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -64,7 +64,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -3224,7 +3224,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894 this.lightEngine.a(ichunkaccess.getPos()); this.lightEngine.queueUpdate(); this.worldLoadListener.a(ichunkaccess.getPos(), (ChunkStatus) null); -@@ -573,19 +641,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -573,19 +641,21 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } private CompletableFuture> f(ChunkCoordIntPair chunkcoordintpair) { @@ -3241,6 +3241,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894 + if (ioThrowable != null) { + com.destroystokyo.paper.util.SneakyThrow.sneaky(ioThrowable); + } ++ chunkHolder.tasks.forEach(Runnable::run); + // Paper end - if (nbttagcompound != null) {try (Timing ignored2 = this.world.timings.chunkLoadLevelTimer.startTimingIfSync()) { // Paper start - timings @@ -3254,7 +3255,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894 protochunk.setLastSaved(this.world.getTime()); this.a(chunkcoordintpair, protochunk.getChunkStatus().getType()); -@@ -609,7 +678,32 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -609,7 +679,32 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.g(chunkcoordintpair); return Either.left(new ProtoChunk(chunkcoordintpair, ChunkConverter.a, this.world)); // Paper - Anti-Xray - Add parameter @@ -3288,7 +3289,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894 } private void g(ChunkCoordIntPair chunkcoordintpair) { -@@ -836,6 +930,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -836,6 +931,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } public boolean saveChunk(IChunkAccess ichunkaccess) { @@ -3296,7 +3297,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894 this.m.a(ichunkaccess.getPos()); if (!ichunkaccess.isNeedsSaving()) { return false; -@@ -848,6 +943,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -848,6 +944,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { ChunkStatus chunkstatus = ichunkaccess.getChunkStatus(); if (chunkstatus.getType() != ChunkStatus.Type.LEVELCHUNK) { @@ -3304,7 +3305,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894 if (this.h(chunkcoordintpair)) { return false; } -@@ -855,12 +951,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -855,12 +952,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { if (chunkstatus == ChunkStatus.EMPTY && ichunkaccess.h().values().stream().noneMatch(StructureStart::e)) { return false; } @@ -3327,7 +3328,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894 this.a(chunkcoordintpair, chunkstatus.getType()); return true; } catch (Exception exception) { -@@ -869,6 +973,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -869,6 +974,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return false; } } @@ -3335,7 +3336,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894 } private boolean h(ChunkCoordIntPair chunkcoordintpair) { -@@ -998,6 +1103,35 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -998,6 +1104,35 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } } @@ -3371,7 +3372,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894 @Nullable public NBTTagCompound readChunkData(ChunkCoordIntPair chunkcoordintpair) throws IOException { // Paper - private -> public NBTTagCompound nbttagcompound = this.read(chunkcoordintpair); -@@ -1019,33 +1153,55 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1019,33 +1154,55 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // Paper start - chunk status cache "api" public ChunkStatus getChunkStatusOnDiskIfCached(ChunkCoordIntPair chunkPos) { @@ -3438,7 +3439,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894 } public IChunkAccess getUnloadingChunk(int chunkX, int chunkZ) { -@@ -1054,6 +1210,39 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1054,6 +1211,39 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } // Paper end @@ -3478,7 +3479,7 @@ index 24f3e8a6866bb416f04aca342514fa5dd3d314c8..cdb72b225226083ca45ade798f549894 boolean isOutsideOfRange(ChunkCoordIntPair chunkcoordintpair) { // Spigot start return isOutsideOfRange(chunkcoordintpair, false); -@@ -1399,6 +1588,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1399,6 +1589,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } diff --git a/Spigot-Server-Patches/0383-Fix-MC-158900.patch b/Spigot-Server-Patches/0383-Fix-MC-158900.patch index fce6bbf7c2..3b2a5f288f 100644 --- a/Spigot-Server-Patches/0383-Fix-MC-158900.patch +++ b/Spigot-Server-Patches/0383-Fix-MC-158900.patch @@ -7,10 +7,10 @@ The problem was we were checking isExpired() on the entry, but if it was expired at that point, then it would be null. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 5b3d2bd35ca3f98b8c04ea841023d68b24b91718..18e6b4dad0e78c53e3e39544c343863f79c75274 100644 +index ce1768e1c47179dfc119d7fa315c30510715f1d6..47ec41f114aa09a50f8876d11da7db981e2be2f2 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -532,8 +532,10 @@ public abstract class PlayerList { +@@ -533,8 +533,10 @@ public abstract class PlayerList { Player player = entity.getBukkitEntity(); PlayerLoginEvent event = new PlayerLoginEvent(player, hostname, ((java.net.InetSocketAddress) socketaddress).getAddress(), ((java.net.InetSocketAddress) loginlistener.networkManager.getRawAddress()).getAddress()); diff --git a/removed/1.16/0384-implement-optional-per-player-mob-spawns.patch b/Spigot-Server-Patches/0384-implement-optional-per-player-mob-spawns.patch similarity index 97% rename from removed/1.16/0384-implement-optional-per-player-mob-spawns.patch rename to Spigot-Server-Patches/0384-implement-optional-per-player-mob-spawns.patch index 8fa2daabda..ff9fe569e2 100644 --- a/removed/1.16/0384-implement-optional-per-player-mob-spawns.patch +++ b/Spigot-Server-Patches/0384-implement-optional-per-player-mob-spawns.patch @@ -617,7 +617,7 @@ index b9fe08301409bc1f0d61a7566c26e720ff720d80..18a806ebbf092b904983691529ce5edf return this.bf; } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index cdb72b225226083ca45ade798f54989422e5281c..f7e57fd1ce5881c056c104d5a6a9a74e34e3ffc3 100644 +index a10006efc52f093196e7d67a3281a87d4c5df19b..ab5413a39147180af2eb33512fc992a5dcbb69bf 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -80,7 +80,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -656,7 +656,7 @@ index cdb72b225226083ca45ade798f54989422e5281c..f7e57fd1ce5881c056c104d5a6a9a74e private static double a(ChunkCoordIntPair chunkcoordintpair, Entity entity) { diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 86e906361ed998ba94ff6e1cbe21860a88626c3b..011e017a8121799cd00d3371bb6bb8f237b5b2bf 100644 +index 8130e14b5d6c3e8b0a1234668d5c855e82f3a5dc..c5845013a79036704d084cfb903589cb9e8767cd 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -29,6 +29,11 @@ public final class SpawnerCreature { @@ -683,7 +683,7 @@ index 86e906361ed998ba94ff6e1cbe21860a88626c3b..011e017a8121799cd00d3371bb6bb8f2 }); } } -@@ -120,13 +130,33 @@ public final class SpawnerCreature { +@@ -125,13 +135,33 @@ public final class SpawnerCreature { continue; } @@ -718,7 +718,7 @@ index 86e906361ed998ba94ff6e1cbe21860a88626c3b..011e017a8121799cd00d3371bb6bb8f2 } } -@@ -135,22 +165,34 @@ public final class SpawnerCreature { +@@ -140,22 +170,34 @@ public final class SpawnerCreature { } public static void a(EnumCreatureType enumcreaturetype, WorldServer worldserver, Chunk chunk, SpawnerCreature.c spawnercreature_c, SpawnerCreature.a spawnercreature_a) { @@ -755,7 +755,7 @@ index 86e906361ed998ba94ff6e1cbe21860a88626c3b..011e017a8121799cd00d3371bb6bb8f2 int k = 0; while (k < 3) { -@@ -190,13 +232,13 @@ public final class SpawnerCreature { +@@ -195,13 +237,13 @@ public final class SpawnerCreature { // Paper start Boolean doSpawning = a(worldserver, enumcreaturetype, structuremanager, chunkgenerator, biomebase_biomemeta, blockposition_mutableblockposition, d2); if (doSpawning == null) { @@ -771,7 +771,7 @@ index 86e906361ed998ba94ff6e1cbe21860a88626c3b..011e017a8121799cd00d3371bb6bb8f2 } entityinsentient.setPositionRotation(d0, (double) i, d1, worldserver.random.nextFloat() * 360.0F, 0.0F); -@@ -204,13 +246,18 @@ public final class SpawnerCreature { +@@ -209,13 +251,18 @@ public final class SpawnerCreature { groupdataentity = entityinsentient.prepare(worldserver, worldserver.getDamageScaler(entityinsentient.getChunkCoordinates()), EnumMobSpawn.NATURAL, groupdataentity, (NBTTagCompound) null); // CraftBukkit start if (worldserver.addEntity(entityinsentient, SpawnReason.NATURAL)) { @@ -793,7 +793,7 @@ index 86e906361ed998ba94ff6e1cbe21860a88626c3b..011e017a8121799cd00d3371bb6bb8f2 } if (entityinsentient.c(k1)) { -@@ -232,6 +279,7 @@ public final class SpawnerCreature { +@@ -237,6 +284,7 @@ public final class SpawnerCreature { } } @@ -801,20 +801,18 @@ index 86e906361ed998ba94ff6e1cbe21860a88626c3b..011e017a8121799cd00d3371bb6bb8f2 } private static boolean a(WorldServer worldserver, IChunkAccess ichunkaccess, BlockPosition.MutableBlockPosition blockposition_mutableblockposition, double d0) { -@@ -471,10 +519,10 @@ public final class SpawnerCreature { +@@ -476,8 +524,8 @@ public final class SpawnerCreature { public static class d { - private final int a; +- private final Object2IntOpenHashMap b; + private final int a; final int getSpawnerChunks() { return this.a; } // Paper - OBFHELPER - private final Object2IntOpenHashMap b; ++ private final Object2IntOpenHashMap b; final Object2IntMap getEntityCountsByType() { return this.b; } // Paper - OBFHELPER private final SpawnerCreatureProbabilities c; -- private final Object2IntMap d; -+ private final Object2IntMap d; final Object2IntMap getEntityCountsByType() { return this.d; } // Paper - OBFHELPER + private final Object2IntMap d; @Nullable - private BlockPosition e; - @Nullable -@@ -535,7 +583,7 @@ public final class SpawnerCreature { +@@ -540,7 +588,7 @@ public final class SpawnerCreature { // CraftBukkit start private boolean a(EnumCreatureType enumcreaturetype, int limit) { diff --git a/Spigot-Server-Patches/0384-Prevent-consuming-the-wrong-itemstack.patch b/Spigot-Server-Patches/0385-Prevent-consuming-the-wrong-itemstack.patch similarity index 96% rename from Spigot-Server-Patches/0384-Prevent-consuming-the-wrong-itemstack.patch rename to Spigot-Server-Patches/0385-Prevent-consuming-the-wrong-itemstack.patch index c4b7098eea..d439b641ef 100644 --- a/Spigot-Server-Patches/0384-Prevent-consuming-the-wrong-itemstack.patch +++ b/Spigot-Server-Patches/0385-Prevent-consuming-the-wrong-itemstack.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent consuming the wrong itemstack diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index f74e9ffda092ef4a2e30c316e682af154921b5df..961a383174cd40da079869a2a1f0252c27fff6b4 100644 +index eeca12bd7c6e59b872303fda1378a69d03dcf783..d354e9b504b6872f20a9e433522827589bd4778a 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -3068,10 +3068,13 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0385-only-add-passanger-entities-once-from-spawners.patch b/Spigot-Server-Patches/0386-only-add-passanger-entities-once-from-spawners.patch similarity index 100% rename from Spigot-Server-Patches/0385-only-add-passanger-entities-once-from-spawners.patch rename to Spigot-Server-Patches/0386-only-add-passanger-entities-once-from-spawners.patch diff --git a/Spigot-Server-Patches/0386-Fix-nether-portal-creation.patch b/Spigot-Server-Patches/0387-Fix-nether-portal-creation.patch similarity index 100% rename from Spigot-Server-Patches/0386-Fix-nether-portal-creation.patch rename to Spigot-Server-Patches/0387-Fix-nether-portal-creation.patch diff --git a/Spigot-Server-Patches/0387-Generator-Settings.patch b/Spigot-Server-Patches/0388-Generator-Settings.patch similarity index 94% rename from Spigot-Server-Patches/0387-Generator-Settings.patch rename to Spigot-Server-Patches/0388-Generator-Settings.patch index 31fe76617b..04d445d5d6 100644 --- a/Spigot-Server-Patches/0387-Generator-Settings.patch +++ b/Spigot-Server-Patches/0388-Generator-Settings.patch @@ -5,12 +5,12 @@ Subject: [PATCH] Generator Settings diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index cf9d980e61be199a34cff98f805e511f9410dd51..547ec8d90425feb6089091a930a49a43bed01e1a 100644 +index 3d9a48e56194225cf39e31d13d26ec17afedadaf..a9d7e81ef123a7da7785a4b8dc868a0e256a61d0 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -567,4 +567,9 @@ public class PaperWorldConfig { - } - } +@@ -572,4 +572,9 @@ public class PaperWorldConfig { + private void perPlayerMobSpawns() { + perPlayerMobSpawns = getBoolean("per-player-mob-spawns", false); } + + public boolean generateFlatBedrock; diff --git a/Spigot-Server-Patches/0388-Fix-MC-161754.patch b/Spigot-Server-Patches/0389-Fix-MC-161754.patch similarity index 100% rename from Spigot-Server-Patches/0388-Fix-MC-161754.patch rename to Spigot-Server-Patches/0389-Fix-MC-161754.patch diff --git a/Spigot-Server-Patches/0389-Performance-improvement-for-Chunk.getEntities.patch b/Spigot-Server-Patches/0390-Performance-improvement-for-Chunk.getEntities.patch similarity index 100% rename from Spigot-Server-Patches/0389-Performance-improvement-for-Chunk.getEntities.patch rename to Spigot-Server-Patches/0390-Performance-improvement-for-Chunk.getEntities.patch diff --git a/Spigot-Server-Patches/0390-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch b/Spigot-Server-Patches/0391-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch similarity index 100% rename from Spigot-Server-Patches/0390-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch rename to Spigot-Server-Patches/0391-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch diff --git a/Spigot-Server-Patches/0391-Expose-the-internal-current-tick.patch b/Spigot-Server-Patches/0392-Expose-the-internal-current-tick.patch similarity index 81% rename from Spigot-Server-Patches/0391-Expose-the-internal-current-tick.patch rename to Spigot-Server-Patches/0392-Expose-the-internal-current-tick.patch index 97ad55d39f..a3c6c7bbb8 100644 --- a/Spigot-Server-Patches/0391-Expose-the-internal-current-tick.patch +++ b/Spigot-Server-Patches/0392-Expose-the-internal-current-tick.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose the internal current tick diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d3a3b47fe86579abc1c5d17284717c79a43cf058..c8e79fc2593ba8a7465b06e7e91d1b645da0f84c 100644 +index 1b591e6450125a0f5f8c79829fb8dea5c3eb8a8e..ba3a3c487f0cefa1c0d7394998800a4c4d6486cb 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2277,5 +2277,10 @@ public final class CraftServer implements Server { +@@ -2278,5 +2278,10 @@ public final class CraftServer implements Server { } return new com.destroystokyo.paper.profile.CraftPlayerProfile(uuid, name); } diff --git a/Spigot-Server-Patches/0392-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch b/Spigot-Server-Patches/0393-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch similarity index 82% rename from Spigot-Server-Patches/0392-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch rename to Spigot-Server-Patches/0393-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch index b9d30be328..464bc79b1f 100644 --- a/Spigot-Server-Patches/0392-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch +++ b/Spigot-Server-Patches/0393-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix stuck in sneak when changing worlds (MC-10657) diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 3a3ffe5a544d9f73b0ac512f67629b1169110395..55675fafaaadd3739e51bccce1c66ffab2d2d5c2 100644 +index 35aca074e4a0e1202441536f6b21f3731c490cc6..b33041765051f519807081607d2a8f1c75bb1fe7 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -1012,6 +1012,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1018,6 +1018,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.lastHealthSent = -1.0F; this.lastFoodSent = -1; @@ -18,10 +18,10 @@ index 3a3ffe5a544d9f73b0ac512f67629b1169110395..55675fafaaadd3739e51bccce1c66ffa PlayerChangedWorldEvent changeEvent = new PlayerChangedWorldEvent(this.getBukkitEntity(), worldserver.getWorld()); this.world.getServer().getPluginManager().callEvent(changeEvent); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 18e6b4dad0e78c53e3e39544c343863f79c75274..2f96bf6af8ad4e13bfd9b8b6e00867eb89123a78 100644 +index 47ec41f114aa09a50f8876d11da7db981e2be2f2..9e635fa562264ee9454adb6dd7fc47f45d8b3242 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -760,6 +760,8 @@ public abstract class PlayerList { +@@ -761,6 +761,8 @@ public abstract class PlayerList { entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityEffect(entityplayer.getId(), mobEffect)); } diff --git a/Spigot-Server-Patches/0393-Add-option-to-disable-pillager-patrols.patch b/Spigot-Server-Patches/0394-Add-option-to-disable-pillager-patrols.patch similarity index 91% rename from Spigot-Server-Patches/0393-Add-option-to-disable-pillager-patrols.patch rename to Spigot-Server-Patches/0394-Add-option-to-disable-pillager-patrols.patch index e5b7568f01..d11e1de6e9 100644 --- a/Spigot-Server-Patches/0393-Add-option-to-disable-pillager-patrols.patch +++ b/Spigot-Server-Patches/0394-Add-option-to-disable-pillager-patrols.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add option to disable pillager patrols diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 547ec8d90425feb6089091a930a49a43bed01e1a..886c56fbe90559464439cec6198776cd5b037c74 100644 +index a9d7e81ef123a7da7785a4b8dc868a0e256a61d0..f8a617a62e62d088077712bfb66656c28b82a3c5 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -572,4 +572,9 @@ public class PaperWorldConfig { +@@ -577,4 +577,9 @@ public class PaperWorldConfig { private void generatorSettings() { generateFlatBedrock = getBoolean("generator-settings.flat-bedrock", false); } diff --git a/Spigot-Server-Patches/0394-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch b/Spigot-Server-Patches/0395-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch similarity index 95% rename from Spigot-Server-Patches/0394-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch rename to Spigot-Server-Patches/0395-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch index 58309948d3..4cefa8b120 100644 --- a/Spigot-Server-Patches/0394-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch +++ b/Spigot-Server-Patches/0395-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch @@ -7,7 +7,7 @@ Fixes an AssertionError when setting the player's item in hand to null or a new Fixes GH-2718 diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 961a383174cd40da079869a2a1f0252c27fff6b4..dd7df1795eb0186e256c26684b7d9116de9bc9bf 100644 +index d354e9b504b6872f20a9e433522827589bd4778a..12b27c44d77b72fa4a4d42cfe3db8394a47d9c9b 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -2040,6 +2040,7 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0395-PlayerLaunchProjectileEvent.patch b/Spigot-Server-Patches/0396-PlayerLaunchProjectileEvent.patch similarity index 100% rename from Spigot-Server-Patches/0395-PlayerLaunchProjectileEvent.patch rename to Spigot-Server-Patches/0396-PlayerLaunchProjectileEvent.patch diff --git a/Spigot-Server-Patches/0396-Add-CraftMagicNumbers.isSupportedApiVersion.patch b/Spigot-Server-Patches/0397-Add-CraftMagicNumbers.isSupportedApiVersion.patch similarity index 100% rename from Spigot-Server-Patches/0396-Add-CraftMagicNumbers.isSupportedApiVersion.patch rename to Spigot-Server-Patches/0397-Add-CraftMagicNumbers.isSupportedApiVersion.patch diff --git a/Spigot-Server-Patches/0397-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch b/Spigot-Server-Patches/0398-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch similarity index 100% rename from Spigot-Server-Patches/0397-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch rename to Spigot-Server-Patches/0398-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch diff --git a/Spigot-Server-Patches/0398-MC-145656-Fix-Follow-Range-Initial-Target.patch b/Spigot-Server-Patches/0399-MC-145656-Fix-Follow-Range-Initial-Target.patch similarity index 95% rename from Spigot-Server-Patches/0398-MC-145656-Fix-Follow-Range-Initial-Target.patch rename to Spigot-Server-Patches/0399-MC-145656-Fix-Follow-Range-Initial-Target.patch index 63337f940f..88873b8767 100644 --- a/Spigot-Server-Patches/0398-MC-145656-Fix-Follow-Range-Initial-Target.patch +++ b/Spigot-Server-Patches/0399-MC-145656-Fix-Follow-Range-Initial-Target.patch @@ -5,10 +5,10 @@ Subject: [PATCH] MC-145656 Fix Follow Range Initial Target diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 886c56fbe90559464439cec6198776cd5b037c74..1a05e5169da4f21a88405cd8a36dec9fc868e059 100644 +index f8a617a62e62d088077712bfb66656c28b82a3c5..5c5a79d0ea00c9c4c2e93d524291f48f92e77857 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -577,4 +577,9 @@ public class PaperWorldConfig { +@@ -582,4 +582,9 @@ public class PaperWorldConfig { private void pillagerSettings() { disablePillagerPatrols = getBoolean("game-mechanics.disable-pillager-patrols", disablePillagerPatrols); } diff --git a/Spigot-Server-Patches/0399-Optimize-Hoppers.patch b/Spigot-Server-Patches/0400-Optimize-Hoppers.patch similarity index 99% rename from Spigot-Server-Patches/0399-Optimize-Hoppers.patch rename to Spigot-Server-Patches/0400-Optimize-Hoppers.patch index 21e516ee5e..e7445e555b 100644 --- a/Spigot-Server-Patches/0399-Optimize-Hoppers.patch +++ b/Spigot-Server-Patches/0400-Optimize-Hoppers.patch @@ -13,10 +13,10 @@ Subject: [PATCH] Optimize Hoppers * Remove Streams from Item Suck In and restore restore 1.12 AABB checks which is simpler and no voxel allocations (was doing TWO Item Suck ins) diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 1a05e5169da4f21a88405cd8a36dec9fc868e059..3a63ed18c38030b7c0f1e681b9066283879592a1 100644 +index 5c5a79d0ea00c9c4c2e93d524291f48f92e77857..4bfe2fb948ee204f8c5a8c316141904a8a6a8b16 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -582,4 +582,13 @@ public class PaperWorldConfig { +@@ -587,4 +587,13 @@ public class PaperWorldConfig { private void entitiesTargetWithFollowRange() { entitiesTargetWithFollowRange = getBoolean("entities-target-with-follow-range", entitiesTargetWithFollowRange); } diff --git a/Spigot-Server-Patches/0400-PlayerDeathEvent-shouldDropExperience.patch b/Spigot-Server-Patches/0401-PlayerDeathEvent-shouldDropExperience.patch similarity index 84% rename from Spigot-Server-Patches/0400-PlayerDeathEvent-shouldDropExperience.patch rename to Spigot-Server-Patches/0401-PlayerDeathEvent-shouldDropExperience.patch index f5522024ae..8659debca7 100644 --- a/Spigot-Server-Patches/0400-PlayerDeathEvent-shouldDropExperience.patch +++ b/Spigot-Server-Patches/0401-PlayerDeathEvent-shouldDropExperience.patch @@ -5,10 +5,10 @@ Subject: [PATCH] PlayerDeathEvent#shouldDropExperience diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 55675fafaaadd3739e51bccce1c66ffab2d2d5c2..ce3ed590f96312e18d631afee40f3821dad986ae 100644 +index b33041765051f519807081607d2a8f1c75bb1fe7..dd78cfd8e9031558a6986c1929da330458d28597 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -685,7 +685,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -691,7 +691,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.eW(); } // SPIGOT-5478 must be called manually now diff --git a/Spigot-Server-Patches/0401-Prevent-bees-loading-chunks-checking-hive-position.patch b/Spigot-Server-Patches/0402-Prevent-bees-loading-chunks-checking-hive-position.patch similarity index 100% rename from Spigot-Server-Patches/0401-Prevent-bees-loading-chunks-checking-hive-position.patch rename to Spigot-Server-Patches/0402-Prevent-bees-loading-chunks-checking-hive-position.patch diff --git a/Spigot-Server-Patches/0402-Don-t-load-Chunks-from-Hoppers-and-other-things.patch b/Spigot-Server-Patches/0403-Don-t-load-Chunks-from-Hoppers-and-other-things.patch similarity index 100% rename from Spigot-Server-Patches/0402-Don-t-load-Chunks-from-Hoppers-and-other-things.patch rename to Spigot-Server-Patches/0403-Don-t-load-Chunks-from-Hoppers-and-other-things.patch diff --git a/Spigot-Server-Patches/0403-Guard-against-serializing-mismatching-chunk-coordina.patch b/Spigot-Server-Patches/0404-Guard-against-serializing-mismatching-chunk-coordina.patch similarity index 100% rename from Spigot-Server-Patches/0403-Guard-against-serializing-mismatching-chunk-coordina.patch rename to Spigot-Server-Patches/0404-Guard-against-serializing-mismatching-chunk-coordina.patch diff --git a/Spigot-Server-Patches/0404-Optimise-IEntityAccess-getPlayerByUUID.patch b/Spigot-Server-Patches/0405-Optimise-IEntityAccess-getPlayerByUUID.patch similarity index 100% rename from Spigot-Server-Patches/0404-Optimise-IEntityAccess-getPlayerByUUID.patch rename to Spigot-Server-Patches/0405-Optimise-IEntityAccess-getPlayerByUUID.patch diff --git a/Spigot-Server-Patches/0405-Fix-items-not-falling-correctly.patch b/Spigot-Server-Patches/0406-Fix-items-not-falling-correctly.patch similarity index 100% rename from Spigot-Server-Patches/0405-Fix-items-not-falling-correctly.patch rename to Spigot-Server-Patches/0406-Fix-items-not-falling-correctly.patch diff --git a/Spigot-Server-Patches/0406-Lag-compensate-eating.patch b/Spigot-Server-Patches/0407-Lag-compensate-eating.patch similarity index 97% rename from Spigot-Server-Patches/0406-Lag-compensate-eating.patch rename to Spigot-Server-Patches/0407-Lag-compensate-eating.patch index 9b7e40cf00..0efa064d22 100644 --- a/Spigot-Server-Patches/0406-Lag-compensate-eating.patch +++ b/Spigot-Server-Patches/0407-Lag-compensate-eating.patch @@ -7,7 +7,7 @@ When the server is lagging, players will wait longer when eating. Change to also use a time check instead if it passes. diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index dd7df1795eb0186e256c26684b7d9116de9bc9bf..415cec5f0435967dccd8df258d116b490a84276f 100644 +index 12b27c44d77b72fa4a4d42cfe3db8394a47d9c9b..b213a13c18ad483472808f4fe9743f74821a25cd 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -119,7 +119,7 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0407-Optimize-call-to-getFluid-for-explosions.patch b/Spigot-Server-Patches/0408-Optimize-call-to-getFluid-for-explosions.patch similarity index 100% rename from Spigot-Server-Patches/0407-Optimize-call-to-getFluid-for-explosions.patch rename to Spigot-Server-Patches/0408-Optimize-call-to-getFluid-for-explosions.patch diff --git a/Spigot-Server-Patches/0408-Fix-last-firework-in-stack-not-having-effects-when-d.patch b/Spigot-Server-Patches/0409-Fix-last-firework-in-stack-not-having-effects-when-d.patch similarity index 100% rename from Spigot-Server-Patches/0408-Fix-last-firework-in-stack-not-having-effects-when-d.patch rename to Spigot-Server-Patches/0409-Fix-last-firework-in-stack-not-having-effects-when-d.patch diff --git a/Spigot-Server-Patches/0409-Entity-Activation-Range-2.0.patch b/Spigot-Server-Patches/0410-Entity-Activation-Range-2.0.patch similarity index 99% rename from Spigot-Server-Patches/0409-Entity-Activation-Range-2.0.patch rename to Spigot-Server-Patches/0410-Entity-Activation-Range-2.0.patch index a7cbbff0bc..a84a7566fa 100644 --- a/Spigot-Server-Patches/0409-Entity-Activation-Range-2.0.patch +++ b/Spigot-Server-Patches/0410-Entity-Activation-Range-2.0.patch @@ -68,7 +68,7 @@ index c94197a50269622e8995685119bac984c45e6833..11d384729326af693a9a679195acbd59 protected EntityCreature(EntityTypes entitytypes, World world) { super(entitytypes, world); diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index dbd7850df45fb9ee550ce33f97bdfe9cf5bfcd34..61323f9b15350b1d227b2f3de67c40846ba7c2f9 100644 +index 513c987a56e8d2bda0bda8771285c7c8d5ca88e1..f638b21a3b457323600baeecab4a04ca76d0e813 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -47,7 +47,7 @@ public abstract class EntityInsentient extends EntityLiving { @@ -99,7 +99,7 @@ index dbd7850df45fb9ee550ce33f97bdfe9cf5bfcd34..61323f9b15350b1d227b2f3de67c4084 if (this.isPassenger() && this.getVehicle() instanceof EntityInsentient) { EntityInsentient entityinsentient = (EntityInsentient) this.getVehicle(); diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 415cec5f0435967dccd8df258d116b490a84276f..b1cfd633eb5a3911fbfcfb937b5f7ecc346c6122 100644 +index b213a13c18ad483472808f4fe9743f74821a25cd..66bca610fbb8afc6f5b4430318c66d29af55fc19 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -97,7 +97,7 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0410-Add-effect-to-block-break-naturally.patch b/Spigot-Server-Patches/0411-Add-effect-to-block-break-naturally.patch similarity index 100% rename from Spigot-Server-Patches/0410-Add-effect-to-block-break-naturally.patch rename to Spigot-Server-Patches/0411-Add-effect-to-block-break-naturally.patch diff --git a/Spigot-Server-Patches/0411-Tracking-Range-Improvements.patch b/Spigot-Server-Patches/0412-Tracking-Range-Improvements.patch similarity index 95% rename from Spigot-Server-Patches/0411-Tracking-Range-Improvements.patch rename to Spigot-Server-Patches/0412-Tracking-Range-Improvements.patch index 04e1d99662..d6a3c237e6 100644 --- a/Spigot-Server-Patches/0411-Tracking-Range-Improvements.patch +++ b/Spigot-Server-Patches/0412-Tracking-Range-Improvements.patch @@ -8,10 +8,10 @@ Sets tracking range of watermobs to animals instead of misc and simplifies code Also ignores Enderdragon, defaulting it to Mojang's setting diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index cdb72b225226083ca45ade798f54989422e5281c..0e9de6f12b56db5eb8759798a686ba6c68172323 100644 +index ab5413a39147180af2eb33512fc992a5dcbb69bf..b530316b582390c4c464bb1f3df48597c8bf7569 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -1716,6 +1716,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1736,6 +1736,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); int j = entity.getEntityType().getChunkRange() * 16; diff --git a/Spigot-Server-Patches/0412-Fix-items-vanishing-through-end-portal.patch b/Spigot-Server-Patches/0413-Fix-items-vanishing-through-end-portal.patch similarity index 100% rename from Spigot-Server-Patches/0412-Fix-items-vanishing-through-end-portal.patch rename to Spigot-Server-Patches/0413-Fix-items-vanishing-through-end-portal.patch diff --git a/Spigot-Server-Patches/0413-Bees-get-gravity-in-void.-Fixes-MC-167279.patch b/Spigot-Server-Patches/0414-Bees-get-gravity-in-void.-Fixes-MC-167279.patch similarity index 100% rename from Spigot-Server-Patches/0413-Bees-get-gravity-in-void.-Fixes-MC-167279.patch rename to Spigot-Server-Patches/0414-Bees-get-gravity-in-void.-Fixes-MC-167279.patch diff --git a/Spigot-Server-Patches/0414-Optimise-getChunkAt-calls-for-loaded-chunks.patch b/Spigot-Server-Patches/0415-Optimise-getChunkAt-calls-for-loaded-chunks.patch similarity index 97% rename from Spigot-Server-Patches/0414-Optimise-getChunkAt-calls-for-loaded-chunks.patch rename to Spigot-Server-Patches/0415-Optimise-getChunkAt-calls-for-loaded-chunks.patch index 0e9f068a2e..0fe3d50adb 100644 --- a/Spigot-Server-Patches/0414-Optimise-getChunkAt-calls-for-loaded-chunks.patch +++ b/Spigot-Server-Patches/0415-Optimise-getChunkAt-calls-for-loaded-chunks.patch @@ -7,7 +7,7 @@ bypass the need to get a player chunk, then get the either, then unwrap it... diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 707db4febac59a4d09d6420ea2add469cf54c2ec..a5325aef96117d569e95ff4a15650d6a1ab8ac49 100644 +index 1597b7a882769109f467d81ecbadc45ff6779b7e..67d6facd37462beef49dac311019b1977150d73f 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -447,6 +447,12 @@ public class ChunkProviderServer extends IChunkProvider { diff --git a/Spigot-Server-Patches/0415-Allow-overriding-the-java-version-check.patch b/Spigot-Server-Patches/0416-Allow-overriding-the-java-version-check.patch similarity index 100% rename from Spigot-Server-Patches/0415-Allow-overriding-the-java-version-check.patch rename to Spigot-Server-Patches/0416-Allow-overriding-the-java-version-check.patch diff --git a/Spigot-Server-Patches/0416-Add-ThrownEggHatchEvent.patch b/Spigot-Server-Patches/0417-Add-ThrownEggHatchEvent.patch similarity index 100% rename from Spigot-Server-Patches/0416-Add-ThrownEggHatchEvent.patch rename to Spigot-Server-Patches/0417-Add-ThrownEggHatchEvent.patch diff --git a/Spigot-Server-Patches/0417-Optimise-random-block-ticking.patch b/Spigot-Server-Patches/0418-Optimise-random-block-ticking.patch similarity index 100% rename from Spigot-Server-Patches/0417-Optimise-random-block-ticking.patch rename to Spigot-Server-Patches/0418-Optimise-random-block-ticking.patch diff --git a/Spigot-Server-Patches/0418-Entity-Jump-API.patch b/Spigot-Server-Patches/0419-Entity-Jump-API.patch similarity index 96% rename from Spigot-Server-Patches/0418-Entity-Jump-API.patch rename to Spigot-Server-Patches/0419-Entity-Jump-API.patch index 4384d36a0a..3e5df22702 100644 --- a/Spigot-Server-Patches/0418-Entity-Jump-API.patch +++ b/Spigot-Server-Patches/0419-Entity-Jump-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Entity Jump API diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index b1cfd633eb5a3911fbfcfb937b5f7ecc346c6122..58e14a10f5424fefd7c2e1ce644e1712e49eea62 100644 +index 66bca610fbb8afc6f5b4430318c66d29af55fc19..e0a4866048276c44079e0b9034c1acea1f0498fa 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -2754,8 +2754,10 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0419-Add-option-to-nerf-pigmen-from-nether-portals.patch b/Spigot-Server-Patches/0420-Add-option-to-nerf-pigmen-from-nether-portals.patch similarity index 95% rename from Spigot-Server-Patches/0419-Add-option-to-nerf-pigmen-from-nether-portals.patch rename to Spigot-Server-Patches/0420-Add-option-to-nerf-pigmen-from-nether-portals.patch index d4f46389d9..b554afd515 100644 --- a/Spigot-Server-Patches/0419-Add-option-to-nerf-pigmen-from-nether-portals.patch +++ b/Spigot-Server-Patches/0420-Add-option-to-nerf-pigmen-from-nether-portals.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add option to nerf pigmen from nether portals diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 3a63ed18c38030b7c0f1e681b9066283879592a1..c1f7d7f0db97e1667917a00febabb043cd66dfc8 100644 +index 4bfe2fb948ee204f8c5a8c316141904a8a6a8b16..3496f615aa9857aa704767f460b1b166295ccf39 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -591,4 +591,9 @@ public class PaperWorldConfig { +@@ -596,4 +596,9 @@ public class PaperWorldConfig { disableHopperMoveEvents = getBoolean("hopper.disable-move-event", disableHopperMoveEvents); log("Hopper Move Item Events: " + (disableHopperMoveEvents ? "disabled" : "enabled")); } diff --git a/Spigot-Server-Patches/0420-Make-the-GUI-graph-fancier.patch b/Spigot-Server-Patches/0421-Make-the-GUI-graph-fancier.patch similarity index 99% rename from Spigot-Server-Patches/0420-Make-the-GUI-graph-fancier.patch rename to Spigot-Server-Patches/0421-Make-the-GUI-graph-fancier.patch index 2fc4240668..0975f95bb0 100644 --- a/Spigot-Server-Patches/0420-Make-the-GUI-graph-fancier.patch +++ b/Spigot-Server-Patches/0421-Make-the-GUI-graph-fancier.patch @@ -398,7 +398,7 @@ index d4d5bc19e167a5271f8eb8d010f8a52b23b942df..859e31c63f94bdc7729c6d475990750b }); private final int[] b = new int[256]; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 620ee43ada7543e21f6c10afec424cff6017f2cd..3681bc9657b2ecbd27bb45153b4e608d077f36dc 100644 +index 4207b2c2a1bed03e00d792015c15f32b2eca7085..aecc0fee6924922f1599a99a643c1d2437e22fc6 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -106,7 +106,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant c(@Nullable Entity entity, AxisAlignedBB axisalignedbb, Predicate predicate); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 2f96bf6af8ad4e13bfd9b8b6e00867eb89123a78..870b5352528384b0bb612cd5379683ee142fb99f 100644 +index 9e635fa562264ee9454adb6dd7fc47f45d8b3242..4189c315176415b121c6e8f8d3c9682caded2189 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -723,6 +723,7 @@ public abstract class PlayerList { +@@ -724,6 +724,7 @@ public abstract class PlayerList { entityplayer1.forceSetPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch()); // CraftBukkit end diff --git a/Spigot-Server-Patches/0435-Don-t-tick-dead-players.patch b/Spigot-Server-Patches/0436-Don-t-tick-dead-players.patch similarity index 85% rename from Spigot-Server-Patches/0435-Don-t-tick-dead-players.patch rename to Spigot-Server-Patches/0436-Don-t-tick-dead-players.patch index 1592f85347..5e3107254e 100644 --- a/Spigot-Server-Patches/0435-Don-t-tick-dead-players.patch +++ b/Spigot-Server-Patches/0436-Don-t-tick-dead-players.patch @@ -7,10 +7,10 @@ Causes sync chunk loads and who knows what all else. This is safe because Spectators are skipped in unloaded chunks too in vanilla. diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index f39a10a1fee5baf92d661b63c4487140eff244d2..418f8351f603acf1ceffa38d6010fc692b8f66e7 100644 +index 59f5ef6e14b738a408dc8462ba99605ec1ae82e9..52b5c47452a46cd6e61e1dd7c135620e36472c73 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -466,7 +466,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -472,7 +472,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public void playerTick() { try { diff --git a/Spigot-Server-Patches/0436-Dead-Player-s-shouldn-t-be-able-to-move.patch b/Spigot-Server-Patches/0437-Dead-Player-s-shouldn-t-be-able-to-move.patch similarity index 90% rename from Spigot-Server-Patches/0436-Dead-Player-s-shouldn-t-be-able-to-move.patch rename to Spigot-Server-Patches/0437-Dead-Player-s-shouldn-t-be-able-to-move.patch index c449e4aa8a..eb02670fdd 100644 --- a/Spigot-Server-Patches/0436-Dead-Player-s-shouldn-t-be-able-to-move.patch +++ b/Spigot-Server-Patches/0437-Dead-Player-s-shouldn-t-be-able-to-move.patch @@ -7,7 +7,7 @@ This fixes a lot of game state issues where packets were delayed for processing due to 1.15's new queue but processed while dead. diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 5ef91da9733fd9276e7bd819a11a0548e01b17f0..2db0cfd6c32c58beadc71d4be487776500c1b8a6 100644 +index 7916421fe1dd8eadfd1c9bd15c4bbbb7331faca6..22acfe1350eb122b7eaa7209f519e4f4f1469b6c 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -952,7 +952,7 @@ public abstract class EntityHuman extends EntityLiving { diff --git a/Spigot-Server-Patches/0437-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch b/Spigot-Server-Patches/0438-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch similarity index 96% rename from Spigot-Server-Patches/0437-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch rename to Spigot-Server-Patches/0438-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch index 8d21720384..bc607cccc9 100644 --- a/Spigot-Server-Patches/0437-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch +++ b/Spigot-Server-Patches/0438-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch @@ -57,10 +57,10 @@ index 0000000000000000000000000000000000000000..f6ff4d8132a95895680f5bc81f8f873e + } +} diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index db4ac5658844bcdb5a6a68ed74f862d055a5567d..76084e6dd282da8332bdafbf9a96bcc64827e705 100644 +index ba9f75bd8f6fe1990d485548f4481bd1762d93af..e14e8bcf235339c1537a1e0a7702a364ee784c93 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -741,7 +741,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -756,7 +756,7 @@ public class ChunkProviderServer extends IChunkProvider { entityPlayer.playerNaturallySpawnedEvent.callEvent(); }; // Paper end @@ -83,7 +83,7 @@ index 9615c4d324e42f7f91a7e60b6151c16d20e9c739..a68e4fc411ae84f12b1ca7443fa66f63 List allChunks = new ArrayList<>(visibleChunks.values()); List players = world.players; diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 00de0d10842006f4fe9f64e136d03fd06fef6d1b..ad4a07283a67ed4db770c59bb5884b9fa3f92b21 100644 +index 6ac39fc6cafdcbf7883e868ecb58a2ebfad41601..bb4d54ebee573964cf3026888da108584b12972f 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -56,8 +56,33 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -122,7 +122,7 @@ index 00de0d10842006f4fe9f64e136d03fd06fef6d1b..ad4a07283a67ed4db770c59bb5884b9f private final Long2ObjectLinkedOpenHashMap pendingUnload; final LongSet loadedChunks; // Paper - private -> package public final WorldServer world; -@@ -129,7 +154,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -130,7 +155,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { public PlayerChunkMap(WorldServer worldserver, Convertable.ConversionSession convertable_conversionsession, DataFixer datafixer, DefinedStructureManager definedstructuremanager, Executor executor, IAsyncTaskHandler iasynctaskhandler, ILightAccess ilightaccess, ChunkGenerator chunkgenerator, WorldLoadListener worldloadlistener, Supplier supplier, int i, boolean flag) { super(new File(convertable_conversionsession.a(worldserver.getDimensionKey()), "region"), datafixer, flag); @@ -131,7 +131,7 @@ index 00de0d10842006f4fe9f64e136d03fd06fef6d1b..ad4a07283a67ed4db770c59bb5884b9f this.pendingUnload = new Long2ObjectLinkedOpenHashMap(); this.loadedChunks = new LongOpenHashSet(); this.unloadQueue = new LongOpenHashSet(); -@@ -203,9 +228,52 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -222,9 +247,52 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return (PlayerChunk) this.updatingChunks.get(i); } @@ -185,7 +185,7 @@ index 00de0d10842006f4fe9f64e136d03fd06fef6d1b..ad4a07283a67ed4db770c59bb5884b9f } protected IntSupplier c(long i) { -@@ -393,8 +461,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -412,8 +480,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // Paper end protected void save(boolean flag) { @@ -196,7 +196,7 @@ index 00de0d10842006f4fe9f64e136d03fd06fef6d1b..ad4a07283a67ed4db770c59bb5884b9f MutableBoolean mutableboolean = new MutableBoolean(); do { -@@ -422,7 +491,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -441,7 +510,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // this.i(); // Paper - nuke IOWorker PlayerChunkMap.LOGGER.info("ThreadedAnvilChunkStorage ({}): All chunks are saved", this.w.getName()); } else { @@ -205,7 +205,7 @@ index 00de0d10842006f4fe9f64e136d03fd06fef6d1b..ad4a07283a67ed4db770c59bb5884b9f IChunkAccess ichunkaccess = (IChunkAccess) playerchunk.getChunkSave().getNow(null); // CraftBukkit - decompile error if (ichunkaccess instanceof ProtoChunkExtension || ichunkaccess instanceof Chunk) { -@@ -593,7 +662,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -612,7 +681,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { if (!this.updatingChunksModified) { return false; } else { @@ -227,7 +227,7 @@ index 00de0d10842006f4fe9f64e136d03fd06fef6d1b..ad4a07283a67ed4db770c59bb5884b9f this.updatingChunksModified = false; return true; } -@@ -1061,12 +1143,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1081,12 +1163,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } protected Iterable f() { diff --git a/Spigot-Server-Patches/0438-Increase-Light-Queue-Size.patch b/Spigot-Server-Patches/0439-Increase-Light-Queue-Size.patch similarity index 92% rename from Spigot-Server-Patches/0438-Increase-Light-Queue-Size.patch rename to Spigot-Server-Patches/0439-Increase-Light-Queue-Size.patch index 2066ee0df1..7d2f0a1ac1 100644 --- a/Spigot-Server-Patches/0438-Increase-Light-Queue-Size.patch +++ b/Spigot-Server-Patches/0439-Increase-Light-Queue-Size.patch @@ -14,10 +14,10 @@ light engine on shutdown... The queue size only puts a cap on max loss, doesn't solve that problem. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 69b3faf28d019fca90734c4d0944ead8fd97ab87..21940f2034744ea417a43fcebc92b21298753d2d 100644 +index 2688b3018eaab4e7ba95754164f83065a98e53fc..e4821d4c23689aaf51b60c66fc1e6bc7a0b02fd5 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -617,4 +617,9 @@ public class PaperWorldConfig { +@@ -622,4 +622,9 @@ public class PaperWorldConfig { private void zombieVillagerInfectionChance() { zombieVillagerInfectionChance = getDouble("zombie-villager-infection-chance", zombieVillagerInfectionChance); } diff --git a/Spigot-Server-Patches/0439-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch b/Spigot-Server-Patches/0440-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch similarity index 97% rename from Spigot-Server-Patches/0439-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch rename to Spigot-Server-Patches/0440-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch index fd4fb62d24..b2d753d00a 100644 --- a/Spigot-Server-Patches/0439-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch +++ b/Spigot-Server-Patches/0440-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch @@ -56,7 +56,7 @@ index 8508b3e10e60a4ce36d471b1d3f7ffc836a6ddf7..aad1420dc63c16b558ad1ca34accf8a7 + } } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 76084e6dd282da8332bdafbf9a96bcc64827e705..638a874a275677ede28953badb387b770c0600d6 100644 +index e14e8bcf235339c1537a1e0a7702a364ee784c93..d1f832db33f21f8ba910d2c0c163af78718d298f 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -694,6 +694,7 @@ public class ChunkProviderServer extends IChunkProvider { @@ -75,7 +75,7 @@ index 76084e6dd282da8332bdafbf9a96bcc64827e705..638a874a275677ede28953badb387b77 this.world.timings.doChunkUnload.stopTiming(); // Spigot this.world.getMethodProfiler().exit(); this.clearCache(); -@@ -741,7 +743,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -756,7 +758,7 @@ public class ChunkProviderServer extends IChunkProvider { entityPlayer.playerNaturallySpawnedEvent.callEvent(); }; // Paper end @@ -84,7 +84,7 @@ index 76084e6dd282da8332bdafbf9a96bcc64827e705..638a874a275677ede28953badb387b77 Optional optional = ((Either) playerchunk.a().getNow(PlayerChunk.UNLOADED_CHUNK)).left(); if (optional.isPresent()) { -@@ -765,6 +767,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -780,6 +782,7 @@ public class ChunkProviderServer extends IChunkProvider { this.world.timings.chunkTicks.startTiming(); // Spigot // Paper this.world.a(chunk, k); this.world.timings.chunkTicks.stopTiming(); // Spigot // Paper @@ -92,7 +92,7 @@ index 76084e6dd282da8332bdafbf9a96bcc64827e705..638a874a275677ede28953badb387b77 } } } -@@ -921,6 +924,41 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -936,6 +939,41 @@ public class ChunkProviderServer extends IChunkProvider { super.executeTask(runnable); } diff --git a/Spigot-Server-Patches/0440-Don-t-move-existing-players-to-world-spawn.patch b/Spigot-Server-Patches/0441-Don-t-move-existing-players-to-world-spawn.patch similarity index 90% rename from Spigot-Server-Patches/0440-Don-t-move-existing-players-to-world-spawn.patch rename to Spigot-Server-Patches/0441-Don-t-move-existing-players-to-world-spawn.patch index 950ea7f1e5..613c53abca 100644 --- a/Spigot-Server-Patches/0440-Don-t-move-existing-players-to-world-spawn.patch +++ b/Spigot-Server-Patches/0441-Don-t-move-existing-players-to-world-spawn.patch @@ -10,10 +10,10 @@ larger than the keep loaded range. By skipping this, we avoid potential for a large spike on server start. diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 418f8351f603acf1ceffa38d6010fc692b8f66e7..b2a933ff60163527bd19449f8650a86fa144863d 100644 +index 52b5c47452a46cd6e61e1dd7c135620e36472c73..62f6e507586560355269b54a6c3921296106a3bc 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -113,7 +113,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -118,7 +118,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.serverStatisticManager = minecraftserver.getPlayerList().getStatisticManager(this); this.advancementDataPlayer = minecraftserver.getPlayerList().f(this); this.G = 1.0F; @@ -22,7 +22,7 @@ index 418f8351f603acf1ceffa38d6010fc692b8f66e7..b2a933ff60163527bd19449f8650a86f this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper -@@ -165,6 +165,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -171,6 +171,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } // CraftBukkit end @@ -30,7 +30,7 @@ index 418f8351f603acf1ceffa38d6010fc692b8f66e7..b2a933ff60163527bd19449f8650a86f private void b(WorldServer worldserver) { BlockPosition blockposition = worldserver.getSpawn(); -@@ -340,7 +341,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -346,7 +347,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { position = Vec3D.a(((WorldServer) world).getSpawn()); } this.world = world; diff --git a/Spigot-Server-Patches/0441-Add-tick-times-API-and-mspt-command.patch b/Spigot-Server-Patches/0442-Add-tick-times-API-and-mspt-command.patch similarity index 97% rename from Spigot-Server-Patches/0441-Add-tick-times-API-and-mspt-command.patch rename to Spigot-Server-Patches/0442-Add-tick-times-API-and-mspt-command.patch index e69eb93329..8f26ee76b0 100644 --- a/Spigot-Server-Patches/0441-Add-tick-times-API-and-mspt-command.patch +++ b/Spigot-Server-Patches/0442-Add-tick-times-API-and-mspt-command.patch @@ -147,10 +147,10 @@ index 98e3acdc618ceda35e8086746aed698d304321c0..5bef465bfe90b08524862b13f9e22dcf + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c8e79fc2593ba8a7465b06e7e91d1b645da0f84c..05730e5812536e7e2b8dce4bc794b46e9e412d29 100644 +index ba3a3c487f0cefa1c0d7394998800a4c4d6486cb..e7414b9e2307171edc7b2b7583f7d2972b3a5503 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2127,6 +2127,16 @@ public final class CraftServer implements Server { +@@ -2128,6 +2128,16 @@ public final class CraftServer implements Server { net.minecraft.server.MinecraftServer.getServer().tps15.getAverage() }; } diff --git a/Spigot-Server-Patches/0442-Expose-MinecraftServer-isRunning.patch b/Spigot-Server-Patches/0443-Expose-MinecraftServer-isRunning.patch similarity index 83% rename from Spigot-Server-Patches/0442-Expose-MinecraftServer-isRunning.patch rename to Spigot-Server-Patches/0443-Expose-MinecraftServer-isRunning.patch index 0266d48ad0..55a6d0ae37 100644 --- a/Spigot-Server-Patches/0442-Expose-MinecraftServer-isRunning.patch +++ b/Spigot-Server-Patches/0443-Expose-MinecraftServer-isRunning.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Expose MinecraftServer#isRunning This allows for plugins to detect if the server is actually turning off in onDisable rather than just plugins reloading. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 05730e5812536e7e2b8dce4bc794b46e9e412d29..71b5c80b462d2d4de737ab608650b0ec9965ace3 100644 +index e7414b9e2307171edc7b2b7583f7d2972b3a5503..43f8a547ab40d427bdeac0edac4040f5ff5576b5 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2292,5 +2292,10 @@ public final class CraftServer implements Server { +@@ -2293,5 +2293,10 @@ public final class CraftServer implements Server { public int getCurrentTick() { return net.minecraft.server.MinecraftServer.currentTick; } diff --git a/Spigot-Server-Patches/0443-Add-Raw-Byte-ItemStack-Serialization.patch b/Spigot-Server-Patches/0444-Add-Raw-Byte-ItemStack-Serialization.patch similarity index 100% rename from Spigot-Server-Patches/0443-Add-Raw-Byte-ItemStack-Serialization.patch rename to Spigot-Server-Patches/0444-Add-Raw-Byte-ItemStack-Serialization.patch diff --git a/Spigot-Server-Patches/0444-Remove-streams-from-Mob-AI-System.patch b/Spigot-Server-Patches/0445-Remove-streams-from-Mob-AI-System.patch similarity index 100% rename from Spigot-Server-Patches/0444-Remove-streams-from-Mob-AI-System.patch rename to Spigot-Server-Patches/0445-Remove-streams-from-Mob-AI-System.patch diff --git a/Spigot-Server-Patches/0445-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch b/Spigot-Server-Patches/0446-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch similarity index 100% rename from Spigot-Server-Patches/0445-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch rename to Spigot-Server-Patches/0446-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch diff --git a/Spigot-Server-Patches/0446-Async-command-map-building.patch b/Spigot-Server-Patches/0447-Async-command-map-building.patch similarity index 100% rename from Spigot-Server-Patches/0446-Async-command-map-building.patch rename to Spigot-Server-Patches/0447-Async-command-map-building.patch diff --git a/Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch b/Spigot-Server-Patches/0448-Improved-Watchdog-Support.patch similarity index 98% rename from Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch rename to Spigot-Server-Patches/0448-Improved-Watchdog-Support.patch index 574cfc3aaf..2053fa68ac 100644 --- a/Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch +++ b/Spigot-Server-Patches/0448-Improved-Watchdog-Support.patch @@ -261,10 +261,10 @@ index 5bef465bfe90b08524862b13f9e22dcf9e3438cd..57f7dfc6a5316cfec5cce9c60e7b91d9 } // Spigot End diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index ad4a07283a67ed4db770c59bb5884b9fa3f92b21..295c8e7eeb4fc634aaa2ca788e6540a647755f88 100644 +index bb4d54ebee573964cf3026888da108584b12972f..09f94bd242318155dbb46e12224ad3e47eed40cf 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -467,6 +467,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -486,6 +486,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { MutableBoolean mutableboolean = new MutableBoolean(); do { @@ -273,10 +273,10 @@ index ad4a07283a67ed4db770c59bb5884b9fa3f92b21..295c8e7eeb4fc634aaa2ca788e6540a6 list.stream().map((playerchunk) -> { CompletableFuture completablefuture; diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 0524370c393dff4794abc0dfb28630c533a39ce1..57f408b7b7a50f057f53c9cbea93adbeba97123c 100644 +index 29b802b9b1435479ca2a4b57267967f848162424..8da0d7f543dccc30955cdbc20a34a070d269b8ac 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -430,7 +430,7 @@ public abstract class PlayerList { +@@ -431,7 +431,7 @@ public abstract class PlayerList { cserver.getPluginManager().callEvent(playerQuitEvent); entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage()); @@ -318,10 +318,10 @@ index 93df6a29035bb3cc96409b145a2e1433d38bbe99..418ba04a837ee2b17cc679edd35ba098 String msg = "Entity threw exception at " + entity.world.getWorld().getName() + ":" + entity.locX() + "," + entity.locY() + "," + entity.locZ(); System.err.println(msg); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 71b5c80b462d2d4de737ab608650b0ec9965ace3..604723d6f93b694f59f9844486d2b0c8f24a39af 100644 +index 43f8a547ab40d427bdeac0edac4040f5ff5576b5..bae1c62cb5c440ec9f915f602d58635bfbfa361c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1780,7 +1780,7 @@ public final class CraftServer implements Server { +@@ -1781,7 +1781,7 @@ public final class CraftServer implements Server { @Override public boolean isPrimaryThread() { diff --git a/Spigot-Server-Patches/0448-Optimize-Pathfinding.patch b/Spigot-Server-Patches/0449-Optimize-Pathfinding.patch similarity index 100% rename from Spigot-Server-Patches/0448-Optimize-Pathfinding.patch rename to Spigot-Server-Patches/0449-Optimize-Pathfinding.patch diff --git a/Spigot-Server-Patches/0449-Reduce-Either-Optional-allocation.patch b/Spigot-Server-Patches/0450-Reduce-Either-Optional-allocation.patch similarity index 100% rename from Spigot-Server-Patches/0449-Reduce-Either-Optional-allocation.patch rename to Spigot-Server-Patches/0450-Reduce-Either-Optional-allocation.patch diff --git a/Spigot-Server-Patches/0450-Remove-streams-from-PairedQueue.patch b/Spigot-Server-Patches/0451-Remove-streams-from-PairedQueue.patch similarity index 100% rename from Spigot-Server-Patches/0450-Remove-streams-from-PairedQueue.patch rename to Spigot-Server-Patches/0451-Remove-streams-from-PairedQueue.patch diff --git a/Spigot-Server-Patches/0451-Reduce-memory-footprint-of-NBTTagCompound.patch b/Spigot-Server-Patches/0452-Reduce-memory-footprint-of-NBTTagCompound.patch similarity index 100% rename from Spigot-Server-Patches/0451-Reduce-memory-footprint-of-NBTTagCompound.patch rename to Spigot-Server-Patches/0452-Reduce-memory-footprint-of-NBTTagCompound.patch diff --git a/Spigot-Server-Patches/0452-Prevent-opening-inventories-when-frozen.patch b/Spigot-Server-Patches/0453-Prevent-opening-inventories-when-frozen.patch similarity index 92% rename from Spigot-Server-Patches/0452-Prevent-opening-inventories-when-frozen.patch rename to Spigot-Server-Patches/0453-Prevent-opening-inventories-when-frozen.patch index 8dfd1e0e0f..eb861c8fa2 100644 --- a/Spigot-Server-Patches/0452-Prevent-opening-inventories-when-frozen.patch +++ b/Spigot-Server-Patches/0453-Prevent-opening-inventories-when-frozen.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent opening inventories when frozen diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index b2a933ff60163527bd19449f8650a86fa144863d..0ecc967e149ef988f0451b2202cd01b85debf74c 100644 +index 62f6e507586560355269b54a6c3921296106a3bc..bfce9d46816cb80272b1825d322231a941b11b58 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -417,7 +417,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -423,7 +423,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { containerUpdateDelay = world.paperConfig.containerUpdateTickRate; } // Paper end @@ -17,7 +17,7 @@ index b2a933ff60163527bd19449f8650a86fa144863d..0ecc967e149ef988f0451b2202cd01b8 this.closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper this.activeContainer = this.defaultContainer; } -@@ -1272,7 +1272,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1278,7 +1278,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } else { // CraftBukkit start this.activeContainer = container; @@ -26,7 +26,7 @@ index b2a933ff60163527bd19449f8650a86fa144863d..0ecc967e149ef988f0451b2202cd01b8 // CraftBukkit end container.addSlotListener(this); return OptionalInt.of(this.containerCounter); -@@ -2066,7 +2066,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -2073,7 +2073,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } @Override diff --git a/Spigot-Server-Patches/0453-Optimise-ArraySetSorted-removeIf.patch b/Spigot-Server-Patches/0454-Optimise-ArraySetSorted-removeIf.patch similarity index 100% rename from Spigot-Server-Patches/0453-Optimise-ArraySetSorted-removeIf.patch rename to Spigot-Server-Patches/0454-Optimise-ArraySetSorted-removeIf.patch diff --git a/Spigot-Server-Patches/0454-Don-t-run-entity-collision-code-if-not-needed.patch b/Spigot-Server-Patches/0455-Don-t-run-entity-collision-code-if-not-needed.patch similarity index 93% rename from Spigot-Server-Patches/0454-Don-t-run-entity-collision-code-if-not-needed.patch rename to Spigot-Server-Patches/0455-Don-t-run-entity-collision-code-if-not-needed.patch index b40bc1eb33..ba59d2269d 100644 --- a/Spigot-Server-Patches/0454-Don-t-run-entity-collision-code-if-not-needed.patch +++ b/Spigot-Server-Patches/0455-Don-t-run-entity-collision-code-if-not-needed.patch @@ -7,7 +7,7 @@ Will not run if max entity craming is disabled and the max collisions per entity is less than or equal to 0 diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 58e14a10f5424fefd7c2e1ce644e1712e49eea62..22b033b85f34673928f47a65962d2bb6d34e6976 100644 +index e0a4866048276c44079e0b9034c1acea1f0498fa..40ac2b8153dbbb10b732123f95b9c0a3a807e54e 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -2820,10 +2820,16 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0455-Optimise-entity-hard-collision-checking.patch b/Spigot-Server-Patches/0456-Optimise-entity-hard-collision-checking.patch similarity index 98% rename from Spigot-Server-Patches/0455-Optimise-entity-hard-collision-checking.patch rename to Spigot-Server-Patches/0456-Optimise-entity-hard-collision-checking.patch index ce1921df3a..9e7fa6941c 100644 --- a/Spigot-Server-Patches/0455-Optimise-entity-hard-collision-checking.patch +++ b/Spigot-Server-Patches/0456-Optimise-entity-hard-collision-checking.patch @@ -145,7 +145,7 @@ index 96f898acdeae1917a4aaf99ec4a48bccf3904488..73e9859e675902d9fc5942547966b524 return this.children; } diff --git a/src/main/java/net/minecraft/server/IEntityAccess.java b/src/main/java/net/minecraft/server/IEntityAccess.java -index 74d4c28246e7db850e6d993e07a84b2a6ca24ce2..24705eef5514bfb078bea6f87e5457e73cee2d5e 100644 +index 74d4c28246e7db850e6d993e07a84b2a6ca24ce2..267a6baae89c181eed545e6758fac7115eb3882f 100644 --- a/src/main/java/net/minecraft/server/IEntityAccess.java +++ b/src/main/java/net/minecraft/server/IEntityAccess.java @@ -53,24 +53,36 @@ public interface IEntityAccess { @@ -157,7 +157,7 @@ index 74d4c28246e7db850e6d993e07a84b2a6ca24ce2..24705eef5514bfb078bea6f87e5457e7 + * Not guaranteed to only return hard colliding entites + */ + default List getHardCollidingEntities(@Nullable Entity entity, AxisAlignedBB axisalignedbb, Predicate predicate) { -+ return this.getEntities(entity, axisalignedbb); ++ return this.getEntities(entity, axisalignedbb, predicate); + } + // Paper end - optimise hard collision + diff --git a/Spigot-Server-Patches/0456-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch b/Spigot-Server-Patches/0457-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch similarity index 96% rename from Spigot-Server-Patches/0456-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch rename to Spigot-Server-Patches/0457-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch index 394cbaf797..368e1ea8c2 100644 --- a/Spigot-Server-Patches/0456-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch +++ b/Spigot-Server-Patches/0457-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch @@ -9,7 +9,7 @@ so inline where possible, and avoid the abstraction of the Either class. diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 638a874a275677ede28953badb387b770c0600d6..e24f3711017aa5194ef7bf4e8d90f150cfb083ff 100644 +index d1f832db33f21f8ba910d2c0c163af78718d298f..91755cd7313d87bae85584dff140acbc6467428f 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -618,21 +618,29 @@ public class ChunkProviderServer extends IChunkProvider { diff --git a/Spigot-Server-Patches/0457-Restrict-vanilla-teleport-command-to-valid-locations.patch b/Spigot-Server-Patches/0458-Restrict-vanilla-teleport-command-to-valid-locations.patch similarity index 100% rename from Spigot-Server-Patches/0457-Restrict-vanilla-teleport-command-to-valid-locations.patch rename to Spigot-Server-Patches/0458-Restrict-vanilla-teleport-command-to-valid-locations.patch diff --git a/Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch b/Spigot-Server-Patches/0459-Implement-Player-Client-Options-API.patch similarity index 97% rename from Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch rename to Spigot-Server-Patches/0459-Implement-Player-Client-Options-API.patch index 75857a269e..c55903d29f 100644 --- a/Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch +++ b/Spigot-Server-Patches/0459-Implement-Player-Client-Options-API.patch @@ -85,7 +85,7 @@ index 0000000000000000000000000000000000000000..b6f4400df3d8ec7e06a996de54f8cabb + } +} diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 2db0cfd6c32c58beadc71d4be487776500c1b8a6..3fa9e7b52b24629c96436fdd46d4e8c28c35f00e 100644 +index 22acfe1350eb122b7eaa7209f519e4f4f1469b6c..2cada09ced1660526e9c112c2c8d92bbf9d6ea98 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -36,7 +36,7 @@ public abstract class EntityHuman extends EntityLiving { @@ -98,7 +98,7 @@ index 2db0cfd6c32c58beadc71d4be487776500c1b8a6..3fa9e7b52b24629c96436fdd46d4e8c2 protected static final DataWatcherObject br = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.p); protected static final DataWatcherObject bs = DataWatcher.a(EntityHuman.class, DataWatcherRegistry.p); diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 0ecc967e149ef988f0451b2202cd01b85debf74c..41ec990baa4a2ca149cd6edd16943a9ac27cde91 100644 +index bfce9d46816cb80272b1825d322231a941b11b58..ef35e07fd8b27a66710140c1422f88ad512e774f 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -2,6 +2,7 @@ package net.minecraft.server; @@ -118,7 +118,7 @@ index 0ecc967e149ef988f0451b2202cd01b85debf74c..41ec990baa4a2ca149cd6edd16943a9a private long ch = SystemUtils.getMonotonicMillis(); private Entity spectatedEntity; public boolean worldChangeInvuln; -@@ -1676,6 +1677,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1682,6 +1683,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public String locale = null; // CraftBukkit - lowercase // Paper - default to null public void a(PacketPlayInSettings packetplayinsettings) { diff --git a/Spigot-Server-Patches/0459-Fix-Chunk-Post-Processing-deadlock-risk.patch b/Spigot-Server-Patches/0460-Fix-Chunk-Post-Processing-deadlock-risk.patch similarity index 88% rename from Spigot-Server-Patches/0459-Fix-Chunk-Post-Processing-deadlock-risk.patch rename to Spigot-Server-Patches/0460-Fix-Chunk-Post-Processing-deadlock-risk.patch index 24ea52cc26..5174e53798 100644 --- a/Spigot-Server-Patches/0459-Fix-Chunk-Post-Processing-deadlock-risk.patch +++ b/Spigot-Server-Patches/0460-Fix-Chunk-Post-Processing-deadlock-risk.patch @@ -25,10 +25,10 @@ This successfully fixed a reoccurring and highly reproduceable crash for heightmaps. diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index e24f3711017aa5194ef7bf4e8d90f150cfb083ff..7af4c3e2aaf0775640d51f88b3cf821ba38a950b 100644 +index 91755cd7313d87bae85584dff140acbc6467428f..0080a0cbe58d1a81c434ef97659428c8bf1ec290 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -979,6 +979,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -994,6 +994,7 @@ public class ChunkProviderServer extends IChunkProvider { return super.executeNext() || execChunkTask; // Paper } } finally { @@ -37,10 +37,10 @@ index e24f3711017aa5194ef7bf4e8d90f150cfb083ff..7af4c3e2aaf0775640d51f88b3cf821b } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 295c8e7eeb4fc634aaa2ca788e6540a647755f88..26230476a107e3f9c12b9ede628173e900d28f18 100644 +index 09f94bd242318155dbb46e12224ad3e47eed40cf..4ab719930f5b35c0ae221e9345f1e2eda7d9d719 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -132,6 +132,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -133,6 +133,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { }; // CraftBukkit end @@ -49,7 +49,7 @@ index 295c8e7eeb4fc634aaa2ca788e6540a647755f88..26230476a107e3f9c12b9ede628173e9 // Paper start - distance maps private final com.destroystokyo.paper.util.misc.PooledLinkedHashSets pooledLinkedPlayerHashSets = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets<>(); -@@ -976,7 +978,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -996,7 +998,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return Either.left(chunk); }); }, (runnable) -> { diff --git a/Spigot-Server-Patches/0460-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch b/Spigot-Server-Patches/0461-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch similarity index 100% rename from Spigot-Server-Patches/0460-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch rename to Spigot-Server-Patches/0461-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch diff --git a/Spigot-Server-Patches/0461-Broadcast-join-message-to-console.patch b/Spigot-Server-Patches/0462-Broadcast-join-message-to-console.patch similarity index 87% rename from Spigot-Server-Patches/0461-Broadcast-join-message-to-console.patch rename to Spigot-Server-Patches/0462-Broadcast-join-message-to-console.patch index ee9cb483aa..f95b2371b0 100644 --- a/Spigot-Server-Patches/0461-Broadcast-join-message-to-console.patch +++ b/Spigot-Server-Patches/0462-Broadcast-join-message-to-console.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Broadcast join message to console diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 57f408b7b7a50f057f53c9cbea93adbeba97123c..607408c48b0afc9944dc384cd2a441d4d8286d8c 100644 +index 8da0d7f543dccc30955cdbc20a34a070d269b8ac..06c675ce3b61766dbb7b456fd6aa46f55357e1b8 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -212,9 +212,9 @@ public abstract class PlayerList { +@@ -213,9 +213,9 @@ public abstract class PlayerList { joinMessage = playerJoinEvent.getJoinMessage(); if (joinMessage != null && joinMessage.length() > 0) { diff --git a/Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch b/Spigot-Server-Patches/0463-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch similarity index 88% rename from Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch rename to Spigot-Server-Patches/0463-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch index 1de373fe31..10609b6df6 100644 --- a/Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch +++ b/Spigot-Server-Patches/0463-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch @@ -28,10 +28,10 @@ receives a deterministic result, and should no longer require 1 tick delays anymore. diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 41ec990baa4a2ca149cd6edd16943a9ac27cde91..6f26d468bcb68328a3e0ee7f627dc8f21c04cfa8 100644 +index ef35e07fd8b27a66710140c1422f88ad512e774f..56cf64709ae520287f6687fe7c2f55040cc769a1 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -99,6 +99,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -104,6 +104,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public double maxHealthCache; public boolean joining = true; public boolean sentListPacket = false; @@ -40,10 +40,10 @@ index 41ec990baa4a2ca149cd6edd16943a9ac27cde91..6f26d468bcb68328a3e0ee7f627dc8f2 // CraftBukkit end public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 26230476a107e3f9c12b9ede628173e900d28f18..d0a5335b6315f3c8f8b431f53ad69a53caf9fd63 100644 +index 4ab719930f5b35c0ae221e9345f1e2eda7d9d719..8de86684dda275585826617b41d6792f233b814c 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -1515,6 +1515,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1535,6 +1535,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { .printStackTrace(); return; } @@ -52,10 +52,10 @@ index 26230476a107e3f9c12b9ede628173e900d28f18..d0a5335b6315f3c8f8b431f53ad69a53 if (!(entity instanceof EntityComplexPart)) { EntityTypes entitytypes = entity.getEntityType(); diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 607408c48b0afc9944dc384cd2a441d4d8286d8c..8e46faf22b1df8166520bee1c1cf4233ad093822 100644 +index 06c675ce3b61766dbb7b456fd6aa46f55357e1b8..a2c9cb6b5c06a76b5fafb75ef51293832f0f4620 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -201,6 +201,12 @@ public abstract class PlayerList { +@@ -202,6 +202,12 @@ public abstract class PlayerList { this.j.put(entityplayer.getUniqueID(), entityplayer); // this.sendAll(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, new EntityPlayer[]{entityplayer})); // CraftBukkit - replaced with loop below @@ -68,7 +68,7 @@ index 607408c48b0afc9944dc384cd2a441d4d8286d8c..8e46faf22b1df8166520bee1c1cf4233 // CraftBukkit start PlayerJoinEvent playerJoinEvent = new PlayerJoinEvent(cserver.getPlayer(entityplayer), joinMessage); cserver.getPluginManager().callEvent(playerJoinEvent); -@@ -235,6 +241,8 @@ public abstract class PlayerList { +@@ -236,6 +242,8 @@ public abstract class PlayerList { entityplayer.playerConnection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, new EntityPlayer[] { entityplayer1})); } entityplayer.sentListPacket = true; @@ -77,7 +77,7 @@ index 607408c48b0afc9944dc384cd2a441d4d8286d8c..8e46faf22b1df8166520bee1c1cf4233 // CraftBukkit end entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityMetadata(entityplayer.getId(), entityplayer.datawatcher, true)); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn -@@ -260,6 +268,11 @@ public abstract class PlayerList { +@@ -261,6 +269,11 @@ public abstract class PlayerList { playerconnection.sendPacket(new PacketPlayOutEntityEffect(entityplayer.getId(), mobeffect)); } @@ -89,7 +89,7 @@ index 607408c48b0afc9944dc384cd2a441d4d8286d8c..8e46faf22b1df8166520bee1c1cf4233 if (nbttagcompound != null && nbttagcompound.hasKeyOfType("RootVehicle", 10)) { NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("RootVehicle"); // CraftBukkit start -@@ -308,6 +321,10 @@ public abstract class PlayerList { +@@ -309,6 +322,10 @@ public abstract class PlayerList { } } diff --git a/Spigot-Server-Patches/0463-Load-Chunks-for-Login-Asynchronously.patch b/Spigot-Server-Patches/0464-Load-Chunks-for-Login-Asynchronously.patch similarity index 95% rename from Spigot-Server-Patches/0463-Load-Chunks-for-Login-Asynchronously.patch rename to Spigot-Server-Patches/0464-Load-Chunks-for-Login-Asynchronously.patch index 07e65166dd..504dbf107b 100644 --- a/Spigot-Server-Patches/0463-Load-Chunks-for-Login-Asynchronously.patch +++ b/Spigot-Server-Patches/0464-Load-Chunks-for-Login-Asynchronously.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Load Chunks for Login Asynchronously diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 7af4c3e2aaf0775640d51f88b3cf821ba38a950b..4c6b056cb1a2040251acc09ef2eb6bfd893a0300 100644 +index 0080a0cbe58d1a81c434ef97659428c8bf1ec290..eebd4c50a7324250d3ebe7060739a71af4243f72 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -604,7 +604,7 @@ public class ChunkProviderServer extends IChunkProvider { @@ -31,7 +31,7 @@ index c879e5d9acd400db5b7fdb770e5f8cc419e3bb23..228666eccfb924d2844c911e734eef4b public void c(Vec3D vec3d) { diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 6f26d468bcb68328a3e0ee7f627dc8f21c04cfa8..f816af5c421c21e183435b3d3907883a0480f6fb 100644 +index 56cf64709ae520287f6687fe7c2f55040cc769a1..0a5f784e851414f84e5a94b53f5616531f533109 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -43,6 +43,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -42,7 +42,7 @@ index 6f26d468bcb68328a3e0ee7f627dc8f21c04cfa8..f816af5c421c21e183435b3d3907883a public final MinecraftServer server; public final PlayerInteractManager playerInteractManager; public final Deque removeQueue = new ArrayDeque<>(); // Paper -@@ -100,6 +101,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -105,6 +106,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public boolean joining = true; public boolean sentListPacket = false; public boolean supressTrackerForLogin = false; // Paper @@ -110,7 +110,7 @@ index 651ecb50c2b06ca81cb9a2286d77fd41a17b5140..1099a46aa05f12572100994ea251f0d5 this.minecraftServer.getMethodProfiler().enter("keepAlive"); // Paper Start - give clients a longer time to respond to pings as per pre 1.12.2 timings diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 8e46faf22b1df8166520bee1c1cf4233ad093822..c263ad3f9f127d798a6c0cdcb3d004171100027e 100644 +index a2c9cb6b5c06a76b5fafb75ef51293832f0f4620..78a4dfb1f62183df0e80787442036e69d40e4461 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -18,6 +18,7 @@ import java.util.Map; @@ -156,7 +156,7 @@ index 8e46faf22b1df8166520bee1c1cf4233ad093822..c263ad3f9f127d798a6c0cdcb3d00417 // CraftBukkit end if (nbttagcompound != null) { -@@ -184,6 +191,53 @@ public abstract class PlayerList { +@@ -185,6 +192,53 @@ public abstract class PlayerList { entityplayer.B().a(entityplayer); this.sendScoreboard(worldserver1.getScoreboard(), entityplayer); this.server.invalidatePingSample(); @@ -210,7 +210,7 @@ index 8e46faf22b1df8166520bee1c1cf4233ad093822..c263ad3f9f127d798a6c0cdcb3d00417 ChatMessage chatmessage; if (entityplayer.getProfile().getName().equalsIgnoreCase(s)) { -@@ -205,7 +259,7 @@ public abstract class PlayerList { +@@ -206,7 +260,7 @@ public abstract class PlayerList { entityplayer.supressTrackerForLogin = true; worldserver.addPlayerJoin(entityplayer); this.server.getBossBattleCustomData().a(entityplayer); // see commented out section below worldserver.addPlayerJoin(entityplayer); @@ -219,7 +219,7 @@ index 8e46faf22b1df8166520bee1c1cf4233ad093822..c263ad3f9f127d798a6c0cdcb3d00417 // Paper end // CraftBukkit start PlayerJoinEvent playerJoinEvent = new PlayerJoinEvent(cserver.getPlayer(entityplayer), joinMessage); -@@ -242,7 +296,6 @@ public abstract class PlayerList { +@@ -243,7 +297,6 @@ public abstract class PlayerList { } entityplayer.sentListPacket = true; entityplayer.supressTrackerForLogin = false; // Paper @@ -227,7 +227,7 @@ index 8e46faf22b1df8166520bee1c1cf4233ad093822..c263ad3f9f127d798a6c0cdcb3d00417 // CraftBukkit end entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityMetadata(entityplayer.getId(), entityplayer.datawatcher, true)); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn -@@ -269,9 +322,10 @@ public abstract class PlayerList { +@@ -270,9 +323,10 @@ public abstract class PlayerList { } // Paper start - move vehicle into method so it can be called above - short circuit around that code @@ -239,7 +239,7 @@ index 8e46faf22b1df8166520bee1c1cf4233ad093822..c263ad3f9f127d798a6c0cdcb3d00417 // Paper end if (nbttagcompound != null && nbttagcompound.hasKeyOfType("RootVehicle", 10)) { NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("RootVehicle"); -@@ -420,6 +474,7 @@ public abstract class PlayerList { +@@ -421,6 +475,7 @@ public abstract class PlayerList { protected void savePlayerFile(EntityPlayer entityplayer) { if (!entityplayer.getBukkitEntity().isPersistent()) return; // CraftBukkit @@ -247,7 +247,7 @@ index 8e46faf22b1df8166520bee1c1cf4233ad093822..c263ad3f9f127d798a6c0cdcb3d00417 this.playerFileData.save(entityplayer); ServerStatisticManager serverstatisticmanager = (ServerStatisticManager) entityplayer.getStatisticManager(); // CraftBukkit -@@ -444,7 +499,7 @@ public abstract class PlayerList { +@@ -445,7 +500,7 @@ public abstract class PlayerList { entityplayer.closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game"); @@ -256,7 +256,7 @@ index 8e46faf22b1df8166520bee1c1cf4233ad093822..c263ad3f9f127d798a6c0cdcb3d00417 entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage()); if (server.isMainThread()) entityplayer.playerTick(); // SPIGOT-924 // Paper - don't tick during emergency shutdowns (Watchdog) -@@ -497,6 +552,13 @@ public abstract class PlayerList { +@@ -498,6 +553,13 @@ public abstract class PlayerList { // this.p.remove(uuid); // CraftBukkit end } @@ -270,7 +270,7 @@ index 8e46faf22b1df8166520bee1c1cf4233ad093822..c263ad3f9f127d798a6c0cdcb3d00417 // CraftBukkit start // this.sendAll(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.REMOVE_PLAYER, new EntityPlayer[]{entityplayer})); -@@ -514,7 +576,7 @@ public abstract class PlayerList { +@@ -515,7 +577,7 @@ public abstract class PlayerList { cserver.getScoreboardManager().removePlayer(entityplayer.getBukkitEntity()); // CraftBukkit end @@ -279,7 +279,7 @@ index 8e46faf22b1df8166520bee1c1cf4233ad093822..c263ad3f9f127d798a6c0cdcb3d00417 } // CraftBukkit start - Whole method, SocketAddress to LoginListener, added hostname to signature, return EntityPlayer -@@ -533,6 +595,13 @@ public abstract class PlayerList { +@@ -534,6 +596,13 @@ public abstract class PlayerList { list.add(entityplayer); } } diff --git a/Spigot-Server-Patches/0464-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch b/Spigot-Server-Patches/0465-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch similarity index 100% rename from Spigot-Server-Patches/0464-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch rename to Spigot-Server-Patches/0465-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch diff --git a/Spigot-Server-Patches/0465-Add-PlayerAttackEntityCooldownResetEvent.patch b/Spigot-Server-Patches/0466-Add-PlayerAttackEntityCooldownResetEvent.patch similarity index 94% rename from Spigot-Server-Patches/0465-Add-PlayerAttackEntityCooldownResetEvent.patch rename to Spigot-Server-Patches/0466-Add-PlayerAttackEntityCooldownResetEvent.patch index 884e0323b1..6559567b47 100644 --- a/Spigot-Server-Patches/0465-Add-PlayerAttackEntityCooldownResetEvent.patch +++ b/Spigot-Server-Patches/0466-Add-PlayerAttackEntityCooldownResetEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerAttackEntityCooldownResetEvent diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 22b033b85f34673928f47a65962d2bb6d34e6976..14606a12c472e0e58f76023a53a4129536ac5cc4 100644 +index 40ac2b8153dbbb10b732123f95b9c0a3a807e54e..7a2140e4b901027997b2884275b35b43fe2175bc 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -1825,7 +1825,16 @@ public abstract class EntityLiving extends Entity { diff --git a/Spigot-Server-Patches/0466-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch b/Spigot-Server-Patches/0467-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch similarity index 93% rename from Spigot-Server-Patches/0466-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch rename to Spigot-Server-Patches/0467-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch index bd14db1cc9..fa113669a2 100644 --- a/Spigot-Server-Patches/0466-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch +++ b/Spigot-Server-Patches/0467-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch @@ -14,10 +14,10 @@ Use an ArrayDeque to store this Queue We make sure to also implement a pattern that is recursion safe too. diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index d0a5335b6315f3c8f8b431f53ad69a53caf9fd63..3355e2110d98c7ca514a1abf9461f1bb13ab7a30 100644 +index 8de86684dda275585826617b41d6792f233b814c..850602a32d371bd030665732b762b4bcbd49e25e 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -111,24 +111,32 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -112,24 +112,32 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { public final CallbackExecutor callbackExecutor = new CallbackExecutor(); public static final class CallbackExecutor implements java.util.concurrent.Executor, Runnable { diff --git a/Spigot-Server-Patches/0467-Don-t-fire-BlockFade-on-worldgen-threads.patch b/Spigot-Server-Patches/0468-Don-t-fire-BlockFade-on-worldgen-threads.patch similarity index 82% rename from Spigot-Server-Patches/0467-Don-t-fire-BlockFade-on-worldgen-threads.patch rename to Spigot-Server-Patches/0468-Don-t-fire-BlockFade-on-worldgen-threads.patch index bceae8f952..31efcfdd5a 100644 --- a/Spigot-Server-Patches/0467-Don-t-fire-BlockFade-on-worldgen-threads.patch +++ b/Spigot-Server-Patches/0468-Don-t-fire-BlockFade-on-worldgen-threads.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Don't fire BlockFade on worldgen threads Caused a deadlock diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java -index 1e6159f211fb445e45bab3ca1a3bf21750928302..70bcf165b187ba5b3d832f6ad2df87cc51e59bea 100644 +index a11a775a929c5f868f1b84c56d7e1715a91db236..a8875a9a5fa6b285b41f3de1bc81c44f35ea5cce 100644 --- a/src/main/java/net/minecraft/server/BlockFire.java +++ b/src/main/java/net/minecraft/server/BlockFire.java @@ -35,6 +35,7 @@ public class BlockFire extends BlockFireAbstract { @@ -15,9 +15,9 @@ index 1e6159f211fb445e45bab3ca1a3bf21750928302..70bcf165b187ba5b3d832f6ad2df87cc // CraftBukkit start + if (!(generatoraccess instanceof WorldServer)) return this.canPlace(iblockdata, generatoraccess, blockposition) ? (IBlockData) this.a(generatoraccess, blockposition, (Integer) iblockdata.get(BlockFire.AGE)) : Blocks.AIR.getBlockData(); // Paper - don't fire events in world generation if (!this.canPlace(iblockdata, generatoraccess, blockposition)) { - CraftBlockState blockState = CraftBlockState.getBlockState(generatoraccess, blockposition); - blockState.setData(Blocks.AIR.getBlockData()); -@@ -46,7 +47,7 @@ public class BlockFire extends BlockFireAbstract { + // Suppress during worldgen + if (!(generatoraccess instanceof World)) { +@@ -50,7 +51,7 @@ public class BlockFire extends BlockFireAbstract { return blockState.getHandle(); } } diff --git a/Spigot-Server-Patches/0468-Add-phantom-creative-and-insomniac-controls.patch b/Spigot-Server-Patches/0469-Add-phantom-creative-and-insomniac-controls.patch similarity index 96% rename from Spigot-Server-Patches/0468-Add-phantom-creative-and-insomniac-controls.patch rename to Spigot-Server-Patches/0469-Add-phantom-creative-and-insomniac-controls.patch index d8a2b711ee..76796703ef 100644 --- a/Spigot-Server-Patches/0468-Add-phantom-creative-and-insomniac-controls.patch +++ b/Spigot-Server-Patches/0469-Add-phantom-creative-and-insomniac-controls.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add phantom creative and insomniac controls diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 21940f2034744ea417a43fcebc92b21298753d2d..dfe4baf1973c38e4a443a2b1d6b1eb19140137e1 100644 +index e4821d4c23689aaf51b60c66fc1e6bc7a0b02fd5..5785f24b0646f8dbf3fba0bbc3b3e5b93e02f162 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -622,4 +622,11 @@ public class PaperWorldConfig { +@@ -627,4 +627,11 @@ public class PaperWorldConfig { private void lightQueueSize() { lightQueueSize = getInt("light-queue-size", lightQueueSize); } diff --git a/Spigot-Server-Patches/0469-Fix-numerous-item-duplication-issues-and-teleport-is.patch b/Spigot-Server-Patches/0470-Fix-numerous-item-duplication-issues-and-teleport-is.patch similarity index 100% rename from Spigot-Server-Patches/0469-Fix-numerous-item-duplication-issues-and-teleport-is.patch rename to Spigot-Server-Patches/0470-Fix-numerous-item-duplication-issues-and-teleport-is.patch diff --git a/Spigot-Server-Patches/0470-Implement-Brigadier-Mojang-API.patch b/Spigot-Server-Patches/0471-Implement-Brigadier-Mojang-API.patch similarity index 100% rename from Spigot-Server-Patches/0470-Implement-Brigadier-Mojang-API.patch rename to Spigot-Server-Patches/0471-Implement-Brigadier-Mojang-API.patch diff --git a/Spigot-Server-Patches/0471-Villager-Restocks-API.patch b/Spigot-Server-Patches/0472-Villager-Restocks-API.patch similarity index 100% rename from Spigot-Server-Patches/0471-Villager-Restocks-API.patch rename to Spigot-Server-Patches/0472-Villager-Restocks-API.patch diff --git a/Spigot-Server-Patches/0472-Validate-PickItem-Packet-and-kick-for-invalid.patch b/Spigot-Server-Patches/0473-Validate-PickItem-Packet-and-kick-for-invalid.patch similarity index 100% rename from Spigot-Server-Patches/0472-Validate-PickItem-Packet-and-kick-for-invalid.patch rename to Spigot-Server-Patches/0473-Validate-PickItem-Packet-and-kick-for-invalid.patch diff --git a/Spigot-Server-Patches/0473-Expose-game-version.patch b/Spigot-Server-Patches/0474-Expose-game-version.patch similarity index 100% rename from Spigot-Server-Patches/0473-Expose-game-version.patch rename to Spigot-Server-Patches/0474-Expose-game-version.patch diff --git a/Spigot-Server-Patches/0474-Sync-position-on-teleportation.patch b/Spigot-Server-Patches/0475-Sync-position-on-teleportation.patch similarity index 100% rename from Spigot-Server-Patches/0474-Sync-position-on-teleportation.patch rename to Spigot-Server-Patches/0475-Sync-position-on-teleportation.patch diff --git a/Spigot-Server-Patches/0475-Optimize-Voxel-Shape-Merging.patch b/Spigot-Server-Patches/0476-Optimize-Voxel-Shape-Merging.patch similarity index 100% rename from Spigot-Server-Patches/0475-Optimize-Voxel-Shape-Merging.patch rename to Spigot-Server-Patches/0476-Optimize-Voxel-Shape-Merging.patch diff --git a/Spigot-Server-Patches/0476-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch b/Spigot-Server-Patches/0477-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch similarity index 100% rename from Spigot-Server-Patches/0476-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch rename to Spigot-Server-Patches/0477-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch diff --git a/Spigot-Server-Patches/0477-Implement-Mob-Goal-API.patch b/Spigot-Server-Patches/0478-Implement-Mob-Goal-API.patch similarity index 99% rename from Spigot-Server-Patches/0477-Implement-Mob-Goal-API.patch rename to Spigot-Server-Patches/0478-Implement-Mob-Goal-API.patch index 25841e366e..f192011904 100644 --- a/Spigot-Server-Patches/0477-Implement-Mob-Goal-API.patch +++ b/Spigot-Server-Patches/0478-Implement-Mob-Goal-API.patch @@ -838,10 +838,10 @@ index 96f4401044cacf88e8e00b5b18821c105e634fba..112d8bab65bf41263a477c5faa717687 public PathfinderGoalWrapped(int i, PathfinderGoal pathfindergoal) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 893088011b8e15449c3c9003e52a884b61221acc..1cae2af41e866c22a4f7524250cccdd9f99f6cb9 100644 +index 666ed0e87379a5bb9ea95cd95c23eca2df02610f..2b17f2143ee9259c988f65c4db6e82b14dd70876 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2304,5 +2304,11 @@ public final class CraftServer implements Server { +@@ -2305,5 +2305,11 @@ public final class CraftServer implements Server { public boolean isStopping() { return net.minecraft.server.MinecraftServer.getServer().hasStopped(); } diff --git a/Spigot-Server-Patches/0478-Use-distance-map-to-optimise-entity-tracker.patch b/Spigot-Server-Patches/0479-Use-distance-map-to-optimise-entity-tracker.patch similarity index 95% rename from Spigot-Server-Patches/0478-Use-distance-map-to-optimise-entity-tracker.patch rename to Spigot-Server-Patches/0479-Use-distance-map-to-optimise-entity-tracker.patch index 8c97ee6ece..4f5ccf8d37 100644 --- a/Spigot-Server-Patches/0478-Use-distance-map-to-optimise-entity-tracker.patch +++ b/Spigot-Server-Patches/0479-Use-distance-map-to-optimise-entity-tracker.patch @@ -56,10 +56,10 @@ index 57f7dfc6a5316cfec5cce9c60e7b91d94c505f50..735beaf6fa6e6ccf2137b64a0b5179ad return i; } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 3355e2110d98c7ca514a1abf9461f1bb13ab7a30..d0459c862f16cdd942148ffd888aeccd2367073c 100644 +index 850602a32d371bd030665732b762b4bcbd49e25e..a7be3f6d2a11c1e1b310f0fcdbe2e485a2113c59 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -144,21 +144,55 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -145,21 +145,55 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // Paper start - distance maps private final com.destroystokyo.paper.util.misc.PooledLinkedHashSets pooledLinkedPlayerHashSets = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets<>(); @@ -116,10 +116,10 @@ index 3355e2110d98c7ca514a1abf9461f1bb13ab7a30..d0459c862f16cdd942148ffd888aeccd } // Paper end -@@ -194,6 +228,45 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - this.l = supplier; +@@ -196,6 +230,45 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.m = new VillagePlace(new File(this.w, "poi"), datafixer, flag, this.world); // Paper this.setViewDistance(i); + this.playerMobDistanceMap = this.world.paperConfig.perPlayerMobSpawns ? new com.destroystokyo.paper.util.PlayerMobDistanceMap() : null; // Paper + // Paper start - use distance map to optimise entity tracker + this.playerEntityTrackerTrackMaps = new com.destroystokyo.paper.util.misc.PlayerAreaMap[TRACKING_RANGE_TYPES.length]; + this.entityTrackerTrackRanges = new int[TRACKING_RANGE_TYPES.length]; @@ -161,8 +161,8 @@ index 3355e2110d98c7ca514a1abf9461f1bb13ab7a30..d0459c862f16cdd942148ffd888aeccd + // Paper end - use distance map to optimise entity tracker } - private static double a(ChunkCoordIntPair chunkcoordintpair, Entity entity) { -@@ -1412,17 +1485,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + public void updatePlayerMobTypeMap(Entity entity) { +@@ -1432,17 +1505,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } public void movePlayer(EntityPlayer entityplayer) { @@ -181,7 +181,7 @@ index 3355e2110d98c7ca514a1abf9461f1bb13ab7a30..d0459c862f16cdd942148ffd888aeccd int i = MathHelper.floor(entityplayer.locX()) >> 4; int j = MathHelper.floor(entityplayer.locZ()) >> 4; -@@ -1538,7 +1601,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1558,7 +1621,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { entity.tracker = playerchunkmap_entitytracker; // Paper - Fast access to tracker this.trackedEntities.put(entity.getId(), playerchunkmap_entitytracker); @@ -190,7 +190,7 @@ index 3355e2110d98c7ca514a1abf9461f1bb13ab7a30..d0459c862f16cdd942148ffd888aeccd if (entity instanceof EntityPlayer) { EntityPlayer entityplayer = (EntityPlayer) entity; -@@ -1581,7 +1644,37 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1601,7 +1664,37 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { entity.tracker = null; // Paper - We're no longer tracked } @@ -228,7 +228,7 @@ index 3355e2110d98c7ca514a1abf9461f1bb13ab7a30..d0459c862f16cdd942148ffd888aeccd List list = Lists.newArrayList(); List list1 = this.world.getPlayers(); -@@ -1649,23 +1742,31 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1669,23 +1762,31 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { PacketDebug.a(this.world, chunk.getPos()); List list = Lists.newArrayList(); List list1 = Lists.newArrayList(); @@ -272,7 +272,7 @@ index 3355e2110d98c7ca514a1abf9461f1bb13ab7a30..d0459c862f16cdd942148ffd888aeccd Iterator iterator; Entity entity1; -@@ -1703,7 +1804,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1723,7 +1824,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { public class EntityTracker { @@ -281,7 +281,7 @@ index 3355e2110d98c7ca514a1abf9461f1bb13ab7a30..d0459c862f16cdd942148ffd888aeccd private final Entity tracker; private final int trackingDistance; private SectionPosition e; -@@ -1720,6 +1821,42 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1740,6 +1841,42 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.e = SectionPosition.a(entity); } @@ -324,7 +324,7 @@ index 3355e2110d98c7ca514a1abf9461f1bb13ab7a30..d0459c862f16cdd942148ffd888aeccd public boolean equals(Object object) { return object instanceof PlayerChunkMap.EntityTracker ? ((PlayerChunkMap.EntityTracker) object).tracker.getId() == this.tracker.getId() : false; } -@@ -1820,7 +1957,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1840,7 +1977,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { int j = entity.getEntityType().getChunkRange() * 16; j = org.spigotmc.TrackingRange.getEntityTrackingRange(entity, j); // Paper diff --git a/Spigot-Server-Patches/0479-Optimize-isOutsideRange-to-use-distance-maps.patch b/Spigot-Server-Patches/0480-Optimize-isOutsideRange-to-use-distance-maps.patch similarity index 94% rename from Spigot-Server-Patches/0479-Optimize-isOutsideRange-to-use-distance-maps.patch rename to Spigot-Server-Patches/0480-Optimize-isOutsideRange-to-use-distance-maps.patch index ebbeb73be7..01bde81e3a 100644 --- a/Spigot-Server-Patches/0479-Optimize-isOutsideRange-to-use-distance-maps.patch +++ b/Spigot-Server-Patches/0480-Optimize-isOutsideRange-to-use-distance-maps.patch @@ -77,7 +77,7 @@ index 32d3887e2542c4ebba4a7498167fbe4b497a71ce..7e57a53ec614a2f7d2672edff9d7c0e0 public String c() { diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 4c6b056cb1a2040251acc09ef2eb6bfd893a0300..c265631a2a581a913ab460f816fc70394eb7323f 100644 +index eebd4c50a7324250d3ebe7060739a71af4243f72..a6363b73522f9d27534b6e80f4b3789e84316c49 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -728,6 +728,36 @@ public class ChunkProviderServer extends IChunkProvider { @@ -117,7 +117,7 @@ index 4c6b056cb1a2040251acc09ef2eb6bfd893a0300..c265631a2a581a913ab460f816fc7039 this.world.getMethodProfiler().enter("pollingChunks"); int k = this.world.getGameRules().getInt(GameRules.RANDOM_TICK_SPEED); boolean flag2 = world.ticksPerAnimalSpawns != 0L && worlddata.getTime() % world.ticksPerAnimalSpawns == 0L; // CraftBukkit -@@ -742,15 +772,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -757,15 +787,7 @@ public class ChunkProviderServer extends IChunkProvider { this.world.getMethodProfiler().exit(); //List list = Lists.newArrayList(this.playerChunkMap.f()); // Paper //Collections.shuffle(list); // Paper @@ -134,7 +134,7 @@ index 4c6b056cb1a2040251acc09ef2eb6bfd893a0300..c265631a2a581a913ab460f816fc7039 final int[] chunksTicked = {0}; this.playerChunkMap.forEachVisibleChunk((playerchunk) -> { // Paper - safe iterator incase chunk loads, also no wrapping Optional optional = ((Either) playerchunk.a().getNow(PlayerChunk.UNLOADED_CHUNK)).left(); -@@ -766,9 +788,9 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -781,9 +803,9 @@ public class ChunkProviderServer extends IChunkProvider { Chunk chunk = (Chunk) optional1.get(); ChunkCoordIntPair chunkcoordintpair = playerchunk.i(); @@ -147,10 +147,10 @@ index 4c6b056cb1a2040251acc09ef2eb6bfd893a0300..c265631a2a581a913ab460f816fc7039 } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index f816af5c421c21e183435b3d3907883a0480f6fb..8177781a9cbba57097c5873fd917ff5d9954ccf8 100644 +index 0a5f784e851414f84e5a94b53f5616531f533109..fb2b64628b974758cace770ce6debe5e88318ae8 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -108,6 +108,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -113,6 +113,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet cachedSingleHashSet; // Paper @@ -191,10 +191,10 @@ index 9cb2ff09da0b8832e58eed4d70741853a25c9011..7f660d3c528f5fb4150e4ee8b2991343 // Paper start diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index d0459c862f16cdd942148ffd888aeccd2367073c..74f3ce59cd1e00b5aa330a8f0240626f382d0bc9 100644 +index a7be3f6d2a11c1e1b310f0fcdbe2e485a2113c59..026562c72d7e95345d9369c6d6331cf6cedb8f17 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -158,6 +158,17 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -159,6 +159,17 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return MinecraftServer.getServer().applyTrackingRangeScale(vanilla); } // Paper end - use distance map to optimise tracker @@ -212,7 +212,7 @@ index d0459c862f16cdd942148ffd888aeccd2367073c..74f3ce59cd1e00b5aa330a8f0240626f void addPlayerToDistanceMaps(EntityPlayer player) { int chunkX = MCUtil.getChunkCoordinate(player.locX()); -@@ -171,6 +182,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -172,6 +183,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { trackMap.add(player, chunkX, chunkZ, Math.min(trackRange, this.getEffectiveViewDistance())); } // Paper end - use distance map to optimise entity tracker @@ -222,7 +222,7 @@ index d0459c862f16cdd942148ffd888aeccd2367073c..74f3ce59cd1e00b5aa330a8f0240626f } void removePlayerFromDistanceMaps(EntityPlayer player) { -@@ -179,6 +193,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -180,6 +194,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.playerEntityTrackerTrackMaps[i].remove(player); } // Paper end - use distance map to optimise tracker @@ -233,7 +233,7 @@ index d0459c862f16cdd942148ffd888aeccd2367073c..74f3ce59cd1e00b5aa330a8f0240626f } void updateMaps(EntityPlayer player) { -@@ -193,6 +211,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -194,6 +212,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { trackMap.update(player, chunkX, chunkZ, Math.min(trackRange, this.getEffectiveViewDistance())); } // Paper end - use distance map to optimise entity tracker @@ -243,7 +243,7 @@ index d0459c862f16cdd942148ffd888aeccd2367073c..74f3ce59cd1e00b5aa330a8f0240626f } // Paper end -@@ -224,7 +245,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -225,7 +246,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.mailboxWorldGen = this.p.a(threadedmailbox, false); this.mailboxMain = this.p.a(mailbox, false); this.lightEngine = new LightEngineThreaded(ilightaccess, this, this.world.getDimensionManager().hasSkyLight(), threadedmailbox1, this.p.a(threadedmailbox1, false)); @@ -252,7 +252,7 @@ index d0459c862f16cdd942148ffd888aeccd2367073c..74f3ce59cd1e00b5aa330a8f0240626f this.l = supplier; this.m = new VillagePlace(new File(this.w, "poi"), datafixer, flag, this.world); // Paper this.setViewDistance(i); -@@ -267,8 +288,41 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -269,6 +290,38 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.playerEntityTrackerTrackMaps[ordinal] = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets); } // Paper end - use distance map to optimise entity tracker @@ -290,11 +290,16 @@ index d0459c862f16cdd942148ffd888aeccd2367073c..74f3ce59cd1e00b5aa330a8f0240626f + // Paper end - optimise PlayerChunkMap#isOutsideRange } + public void updatePlayerMobTypeMap(Entity entity) { +@@ -288,6 +341,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + return entityPlayer.mobCounts[enumCreatureType.ordinal()]; + } + + private static double getDistanceSquaredFromChunk(ChunkCoordIntPair chunkPos, Entity entity) { return a(chunkPos, entity); } // Paper - OBFHELPER private static double a(ChunkCoordIntPair chunkcoordintpair, Entity entity) { double d0 = (double) (chunkcoordintpair.x * 16 + 8); double d1 = (double) (chunkcoordintpair.z * 16 + 8); -@@ -447,6 +501,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -466,6 +520,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } else { if (playerchunk != null) { playerchunk.a(j); @@ -302,7 +307,7 @@ index d0459c862f16cdd942148ffd888aeccd2367073c..74f3ce59cd1e00b5aa330a8f0240626f } if (playerchunk != null) { -@@ -1414,30 +1469,53 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1434,30 +1489,53 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return isOutsideOfRange(chunkcoordintpair, false); } diff --git a/Spigot-Server-Patches/0480-Stop-copy-on-write-operations-for-updating-light-dat.patch b/Spigot-Server-Patches/0481-Stop-copy-on-write-operations-for-updating-light-dat.patch similarity index 100% rename from Spigot-Server-Patches/0480-Stop-copy-on-write-operations-for-updating-light-dat.patch rename to Spigot-Server-Patches/0481-Stop-copy-on-write-operations-for-updating-light-dat.patch diff --git a/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch b/Spigot-Server-Patches/0482-No-Tick-view-distance-implementation.patch similarity index 95% rename from Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch rename to Spigot-Server-Patches/0482-No-Tick-view-distance-implementation.patch index 10e726035d..9f26f4aeab 100644 --- a/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch +++ b/Spigot-Server-Patches/0482-No-Tick-view-distance-implementation.patch @@ -23,10 +23,10 @@ index c9164dfdb27ddf3709129c8aec54903a1df121ff..e33e889c291d37a821a4fbd40d9aac7b })); diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index dfe4baf1973c38e4a443a2b1d6b1eb19140137e1..6b1b4780a8553dfd7da32c3e9e76b142122f6a74 100644 +index 5785f24b0646f8dbf3fba0bbc3b3e5b93e02f162..0746932a3191669052f15270f5c94efbce0bd0c2 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -629,4 +629,9 @@ public class PaperWorldConfig { +@@ -634,4 +634,9 @@ public class PaperWorldConfig { phantomIgnoreCreative = getBoolean("phantoms-do-not-spawn-on-creative-players", phantomIgnoreCreative); phantomOnlyAttackInsomniacs = getBoolean("phantoms-only-attack-insomniacs", phantomOnlyAttackInsomniacs); } @@ -115,10 +115,10 @@ index 7e57a53ec614a2f7d2672edff9d7c0e0dca42377..c072f61e8c88eac8335acd660d8ff0e2 if (flag1) { ChunkMapDistance.this.j.a(ChunkTaskQueueSorter.a(() -> { diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 8177781a9cbba57097c5873fd917ff5d9954ccf8..9f2eb5ea511f7b854ff06e321015a464771c86bc 100644 +index fb2b64628b974758cace770ce6debe5e88318ae8..0e3ceb60e503c74fc65b1d08371645ffbb26ef5c 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -110,6 +110,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -115,6 +115,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { double lastEntitySpawnRadiusSquared; // Paper - optimise isOutsideRange, this field is in blocks @@ -221,7 +221,7 @@ index 7f660d3c528f5fb4150e4ee8b29913436f125b06..40347212ad1bcf857d5b8ddb0ee6a698 public CompletableFuture> a(ChunkStatus chunkstatus, PlayerChunkMap playerchunkmap) { diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d275cc71da3 100644 +index 026562c72d7e95345d9369c6d6331cf6cedb8f17..fe343f70ce8024c86363637fda8e5c09cc6e60a9 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -95,7 +95,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -233,7 +233,7 @@ index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d27 public final WorldLoadListener worldLoadListener; public final PlayerChunkMap.a chunkDistanceManager; public final PlayerChunkMap.a getChunkMapDistanceManager() { return this.chunkDistanceManager; } // Paper - OBFHELPER private final AtomicInteger u; -@@ -169,6 +169,22 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -170,6 +170,22 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerMobSpawnMap; // this map is absent from updateMaps since it's controlled at the start of the chunkproviderserver tick public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerChunkTickRangeMap; // Paper end - optimise PlayerChunkMap#isOutsideRange @@ -256,7 +256,7 @@ index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d27 void addPlayerToDistanceMaps(EntityPlayer player) { int chunkX = MCUtil.getChunkCoordinate(player.locX()); -@@ -185,6 +201,19 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -186,6 +202,19 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // Paper start - optimise PlayerChunkMap#isOutsideRange this.playerChunkTickRangeMap.add(player, chunkX, chunkZ, ChunkMapDistance.MOB_SPAWN_RANGE); // Paper end - optimise PlayerChunkMap#isOutsideRange @@ -276,7 +276,7 @@ index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d27 } void removePlayerFromDistanceMaps(EntityPlayer player) { -@@ -197,6 +226,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -198,6 +227,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.playerMobSpawnMap.remove(player); this.playerChunkTickRangeMap.remove(player); // Paper end - optimise PlayerChunkMap#isOutsideRange @@ -288,7 +288,7 @@ index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d27 } void updateMaps(EntityPlayer player) { -@@ -214,6 +248,19 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -215,6 +249,19 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // Paper start - optimise PlayerChunkMap#isOutsideRange this.playerChunkTickRangeMap.update(player, chunkX, chunkZ, ChunkMapDistance.MOB_SPAWN_RANGE); // Paper end - optimise PlayerChunkMap#isOutsideRange @@ -308,7 +308,7 @@ index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d27 } // Paper end -@@ -320,6 +367,45 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -322,6 +369,45 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } }); // Paper end - optimise PlayerChunkMap#isOutsideRange @@ -353,8 +353,8 @@ index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d27 + // Paper end - no-tick view distance } - private static double getDistanceSquaredFromChunk(ChunkCoordIntPair chunkPos, Entity entity) { return a(chunkPos, entity); } // Paper - OBFHELPER -@@ -1120,15 +1206,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + public void updatePlayerMobTypeMap(Entity entity) { +@@ -1140,15 +1226,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { completablefuture1.thenAcceptAsync((either) -> { either.mapLeft((chunk) -> { this.u.getAndIncrement(); @@ -372,7 +372,7 @@ index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d27 }); return completablefuture1; } -@@ -1223,32 +1305,38 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1243,32 +1325,38 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } } @@ -426,7 +426,7 @@ index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d27 protected void sendChunk(EntityPlayer entityplayer, ChunkCoordIntPair chunkcoordintpair, Packet[] apacket, boolean flag, boolean flag1) { if (entityplayer.world == this.world) { -@@ -1256,7 +1344,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1276,7 +1364,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { PlayerChunk playerchunk = this.getVisibleChunk(chunkcoordintpair.pair()); if (playerchunk != null) { @@ -435,7 +435,7 @@ index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d27 if (chunk != null) { this.a(entityplayer, apacket, chunk); -@@ -1517,6 +1605,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1537,6 +1625,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } // Paper end - optimise isOutsideOfRange @@ -443,7 +443,7 @@ index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d27 private boolean b(EntityPlayer entityplayer) { return entityplayer.isSpectator() && !this.world.getGameRules().getBoolean(GameRules.SPECTATORS_GENERATE_CHUNKS); } -@@ -1544,13 +1633,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1564,13 +1653,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.removePlayerFromDistanceMaps(entityplayer); // Paper - distance maps } @@ -458,7 +458,7 @@ index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d27 } -@@ -1558,7 +1641,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1578,7 +1661,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { SectionPosition sectionposition = SectionPosition.a((Entity) entityplayer); entityplayer.a(sectionposition); @@ -467,7 +467,7 @@ index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d27 return sectionposition; } -@@ -1603,6 +1686,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1623,6 +1706,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { int k1; int l1; @@ -475,7 +475,7 @@ index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d27 if (Math.abs(i1 - i) <= this.viewDistance * 2 && Math.abs(j1 - j) <= this.viewDistance * 2) { k1 = Math.min(i, i1) - this.viewDistance; l1 = Math.min(j, j1) - this.viewDistance; -@@ -1640,7 +1724,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1660,7 +1744,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.sendChunk(entityplayer, chunkcoordintpair1, new Packet[2], false, true); } } @@ -484,7 +484,7 @@ index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d27 this.updateMaps(entityplayer); // Paper - distance maps -@@ -1648,11 +1732,46 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1668,11 +1752,46 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @Override public Stream a(ChunkCoordIntPair chunkcoordintpair, boolean flag) { @@ -535,7 +535,7 @@ index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d27 } protected void addEntity(Entity entity) { -@@ -1810,6 +1929,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1830,6 +1949,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } @@ -543,7 +543,7 @@ index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d27 private void a(EntityPlayer entityplayer, Packet[] apacket, Chunk chunk) { if (apacket[0] == null) { apacket[0] = new PacketPlayOutMapChunk(chunk, 65535, true); -@@ -1995,7 +2115,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -2015,7 +2135,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(this.tracker.chunkX, this.tracker.chunkZ); PlayerChunk playerchunk = PlayerChunkMap.this.getVisibleChunk(chunkcoordintpair.pair()); @@ -553,10 +553,10 @@ index 74f3ce59cd1e00b5aa330a8f0240626f382d0bc9..82ea333f1889d683cf8d5228f18d1d27 } } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index c263ad3f9f127d798a6c0cdcb3d004171100027e..1514d24ae0da9fd9622333ff8702a0da140bd691 100644 +index 78a4dfb1f62183df0e80787442036e69d40e4461..33d7f60ab0d8bbe90bc561093ed0e764420b0595 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -176,7 +176,7 @@ public abstract class PlayerList { +@@ -177,7 +177,7 @@ public abstract class PlayerList { // Spigot - view distance networkmanager.queueImmunity = true; // Paper @@ -565,7 +565,7 @@ index c263ad3f9f127d798a6c0cdcb3d004171100027e..1514d24ae0da9fd9622333ff8702a0da entityplayer.getBukkitEntity().sendSupportedChannels(); // CraftBukkit playerconnection.sendPacket(new PacketPlayOutCustomPayload(PacketPlayOutCustomPayload.a, (new PacketDataSerializer(Unpooled.buffer())).a(this.getServer().getServerModName()))); playerconnection.sendPacket(new PacketPlayOutServerDifficulty(worlddata.getDifficulty(), worlddata.isDifficultyLocked())); -@@ -818,7 +818,7 @@ public abstract class PlayerList { +@@ -819,7 +819,7 @@ public abstract class PlayerList { // CraftBukkit start WorldData worlddata = worldserver1.getWorldData(); entityplayer1.playerConnection.sendPacket(new PacketPlayOutRespawn(worldserver1.getTypeKey(), worldserver1.getDimensionKey(), BiomeManager.a(worldserver1.getSeed()), entityplayer1.playerInteractManager.getGameMode(), entityplayer1.playerInteractManager.c(), worldserver1.isDebugWorld(), worldserver1.isFlatWorld(), flag)); @@ -574,7 +574,7 @@ index c263ad3f9f127d798a6c0cdcb3d004171100027e..1514d24ae0da9fd9622333ff8702a0da entityplayer1.spawnIn(worldserver1); entityplayer1.dead = false; entityplayer1.playerConnection.teleport(new Location(worldserver1.getWorld(), entityplayer1.locX(), entityplayer1.locY(), entityplayer1.locZ(), entityplayer1.yaw, entityplayer1.pitch)); -@@ -1285,7 +1285,7 @@ public abstract class PlayerList { +@@ -1286,7 +1286,7 @@ public abstract class PlayerList { public void a(int i) { this.viewDistance = i; diff --git a/Spigot-Server-Patches/0482-Add-villager-reputation-API.patch b/Spigot-Server-Patches/0483-Add-villager-reputation-API.patch similarity index 100% rename from Spigot-Server-Patches/0482-Add-villager-reputation-API.patch rename to Spigot-Server-Patches/0483-Add-villager-reputation-API.patch diff --git a/Spigot-Server-Patches/0483-Fix-Light-Command.patch b/Spigot-Server-Patches/0484-Fix-Light-Command.patch similarity index 98% rename from Spigot-Server-Patches/0483-Fix-Light-Command.patch rename to Spigot-Server-Patches/0484-Fix-Light-Command.patch index aa628605d8..e4180ffedb 100644 --- a/Spigot-Server-Patches/0483-Fix-Light-Command.patch +++ b/Spigot-Server-Patches/0484-Fix-Light-Command.patch @@ -136,7 +136,7 @@ index 40347212ad1bcf857d5b8ddb0ee6a698e2568201..e5751adde516544722b95016f64b2a46 // Paper start - per player view distance // there can be potential desync with player's last mapped section and the view distance map, so use the diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index ecc5992beebbc7088b3c398ec7c2e85e9fdf2ed9..044f7a101a8154759f7469b8a864ea09a7919853 100644 +index fe343f70ce8024c86363637fda8e5c09cc6e60a9..750749f8533e95b33a6f555900c23bb11b3fda40 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -96,6 +96,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -152,7 +152,7 @@ index ecc5992beebbc7088b3c398ec7c2e85e9fdf2ed9..044f7a101a8154759f7469b8a864ea09 public final WorldLoadListener worldLoadListener; public final PlayerChunkMap.a chunkDistanceManager; public final PlayerChunkMap.a getChunkMapDistanceManager() { return this.chunkDistanceManager; } // Paper - OBFHELPER private final AtomicInteger u; -@@ -286,11 +292,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -287,11 +293,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { Mailbox mailbox = Mailbox.a("main", iasynctaskhandler::a); this.worldLoadListener = worldloadlistener; diff --git a/Spigot-Server-Patches/0484-Fix-PotionEffect-ignores-icon-flag.patch b/Spigot-Server-Patches/0485-Fix-PotionEffect-ignores-icon-flag.patch similarity index 100% rename from Spigot-Server-Patches/0484-Fix-PotionEffect-ignores-icon-flag.patch rename to Spigot-Server-Patches/0485-Fix-PotionEffect-ignores-icon-flag.patch diff --git a/Spigot-Server-Patches/0485-Optimize-brigadier-child-sorting-performance.patch b/Spigot-Server-Patches/0486-Optimize-brigadier-child-sorting-performance.patch similarity index 100% rename from Spigot-Server-Patches/0485-Optimize-brigadier-child-sorting-performance.patch rename to Spigot-Server-Patches/0486-Optimize-brigadier-child-sorting-performance.patch diff --git a/Spigot-Server-Patches/0486-Don-t-toString-block-unless-actually-showing-the-mes.patch b/Spigot-Server-Patches/0487-Don-t-toString-block-unless-actually-showing-the-mes.patch similarity index 100% rename from Spigot-Server-Patches/0486-Don-t-toString-block-unless-actually-showing-the-mes.patch rename to Spigot-Server-Patches/0487-Don-t-toString-block-unless-actually-showing-the-mes.patch diff --git a/Spigot-Server-Patches/0487-Potential-bed-API.patch b/Spigot-Server-Patches/0488-Potential-bed-API.patch similarity index 100% rename from Spigot-Server-Patches/0487-Potential-bed-API.patch rename to Spigot-Server-Patches/0488-Potential-bed-API.patch diff --git a/Spigot-Server-Patches/0488-Wait-for-Async-Tasks-during-shutdown.patch b/Spigot-Server-Patches/0489-Wait-for-Async-Tasks-during-shutdown.patch similarity index 100% rename from Spigot-Server-Patches/0488-Wait-for-Async-Tasks-during-shutdown.patch rename to Spigot-Server-Patches/0489-Wait-for-Async-Tasks-during-shutdown.patch diff --git a/Spigot-Server-Patches/0489-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch b/Spigot-Server-Patches/0490-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch similarity index 100% rename from Spigot-Server-Patches/0489-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch rename to Spigot-Server-Patches/0490-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch diff --git a/Spigot-Server-Patches/0490-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch b/Spigot-Server-Patches/0491-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch similarity index 100% rename from Spigot-Server-Patches/0490-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch rename to Spigot-Server-Patches/0491-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch diff --git a/Spigot-Server-Patches/0491-Optimize-NibbleArray-to-use-pooled-buffers.patch b/Spigot-Server-Patches/0492-Optimize-NibbleArray-to-use-pooled-buffers.patch similarity index 100% rename from Spigot-Server-Patches/0491-Optimize-NibbleArray-to-use-pooled-buffers.patch rename to Spigot-Server-Patches/0492-Optimize-NibbleArray-to-use-pooled-buffers.patch diff --git a/Spigot-Server-Patches/0492-Reduce-MutableInt-allocations-from-light-engine.patch b/Spigot-Server-Patches/0493-Reduce-MutableInt-allocations-from-light-engine.patch similarity index 100% rename from Spigot-Server-Patches/0492-Reduce-MutableInt-allocations-from-light-engine.patch rename to Spigot-Server-Patches/0493-Reduce-MutableInt-allocations-from-light-engine.patch diff --git a/Spigot-Server-Patches/0493-Reduce-allocation-of-Vec3D-by-entity-tracker.patch b/Spigot-Server-Patches/0494-Reduce-allocation-of-Vec3D-by-entity-tracker.patch similarity index 96% rename from Spigot-Server-Patches/0493-Reduce-allocation-of-Vec3D-by-entity-tracker.patch rename to Spigot-Server-Patches/0494-Reduce-allocation-of-Vec3D-by-entity-tracker.patch index a66e9b0b8f..25023a5205 100644 --- a/Spigot-Server-Patches/0493-Reduce-allocation-of-Vec3D-by-entity-tracker.patch +++ b/Spigot-Server-Patches/0494-Reduce-allocation-of-Vec3D-by-entity-tracker.patch @@ -39,10 +39,10 @@ index 0c46297e6ff229538d77b2f481e4ab13ea14c48e..f75c09d44a19f84588f21a55ea8f0dd8 if (!flag4 && this.o <= 400 && !this.q && this.r == this.tracker.isOnGround()) { diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index fa0d4b0eda8d722503dd1732bf14e4a5c1e6f948..ece6ae302519ceddab0594d12ec40ec7a9b84209 100644 +index 750749f8533e95b33a6f555900c23bb11b3fda40..2938a7d46a471aca89b3dc3d8cad0659aea7c69f 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -2111,9 +2111,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -2131,9 +2131,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { public void updatePlayer(EntityPlayer entityplayer) { org.spigotmc.AsyncCatcher.catchOp("player tracker update"); // Spigot if (entityplayer != this.tracker) { diff --git a/Spigot-Server-Patches/0494-Ensure-safe-gateway-teleport.patch b/Spigot-Server-Patches/0495-Ensure-safe-gateway-teleport.patch similarity index 100% rename from Spigot-Server-Patches/0494-Ensure-safe-gateway-teleport.patch rename to Spigot-Server-Patches/0495-Ensure-safe-gateway-teleport.patch diff --git a/Spigot-Server-Patches/0495-Add-option-for-console-having-all-permissions.patch b/Spigot-Server-Patches/0496-Add-option-for-console-having-all-permissions.patch similarity index 100% rename from Spigot-Server-Patches/0495-Add-option-for-console-having-all-permissions.patch rename to Spigot-Server-Patches/0496-Add-option-for-console-having-all-permissions.patch diff --git a/Spigot-Server-Patches/0496-Workaround-for-Client-Lag-Spikes-MC-162253.patch b/Spigot-Server-Patches/0497-Workaround-for-Client-Lag-Spikes-MC-162253.patch similarity index 97% rename from Spigot-Server-Patches/0496-Workaround-for-Client-Lag-Spikes-MC-162253.patch rename to Spigot-Server-Patches/0497-Workaround-for-Client-Lag-Spikes-MC-162253.patch index 7583d69a1f..6e53596b7f 100644 --- a/Spigot-Server-Patches/0496-Workaround-for-Client-Lag-Spikes-MC-162253.patch +++ b/Spigot-Server-Patches/0497-Workaround-for-Client-Lag-Spikes-MC-162253.patch @@ -37,10 +37,10 @@ index 860dc98ab4f84c470b27726314943936d23fcb79..8d45588ecfa33b8c7335df3db58ed686 return chunksection == Chunk.a || chunksection.c(); } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index ece6ae302519ceddab0594d12ec40ec7a9b84209..7cba79ce0b3718b73fd7fd839732d1a7ef85941e 100644 +index 2938a7d46a471aca89b3dc3d8cad0659aea7c69f..6dd64ce8794b8c2b5704556532159135e85a4b6c 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -1936,12 +1936,112 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1956,12 +1956,112 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } diff --git a/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/Spigot-Server-Patches/0498-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch similarity index 97% rename from Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch rename to Spigot-Server-Patches/0498-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch index 893a3db060..e0365afd97 100644 --- a/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch +++ b/Spigot-Server-Patches/0498-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch @@ -484,7 +484,7 @@ index c072f61e8c88eac8335acd660d8ff0e2f9db819e..4c4108705e9d25912e57a7b3c28b4f1a protected int c(long i) { return this.a.get(i); diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index c265631a2a581a913ab460f816fc70394eb7323f..a165b863003fddef179f95b2d987ac7873ede1e8 100644 +index a6363b73522f9d27534b6e80f4b3789e84316c49..604e7004b659daed2844ba1a76bf09288ec549e5 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -443,6 +443,26 @@ public class ChunkProviderServer extends IChunkProvider { @@ -570,7 +570,7 @@ index c265631a2a581a913ab460f816fc70394eb7323f..a165b863003fddef179f95b2d987ac78 boolean flag1 = this.playerChunkMap.b(); diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 9f2eb5ea511f7b854ff06e321015a464771c86bc..c4295e4f2753111764ef0ca8f079aec145d4e87c 100644 +index 0e3ceb60e503c74fc65b1d08371645ffbb26ef5c..d5740a25bb487fc186333e908968c6a23a9b5005 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -55,6 +55,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -586,9 +586,9 @@ index 9f2eb5ea511f7b854ff06e321015a464771c86bc..c4295e4f2753111764ef0ca8f079aec1 private float lastHealthSent = -1.0E8F; private int lastFoodSent = -99999999; private boolean lastSentSaturationZero = true; -@@ -130,6 +136,21 @@ public class EntityPlayer extends EntityHuman implements ICrafting { - this.canPickUpLoot = true; +@@ -136,6 +142,21 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.maxHealthCache = this.getMaxHealth(); + this.cachedSingleMobDistanceMap = new com.destroystokyo.paper.util.PooledHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper } + // Paper start + public BlockPosition getPointInFront(double inFront) { @@ -608,7 +608,7 @@ index 9f2eb5ea511f7b854ff06e321015a464771c86bc..c4295e4f2753111764ef0ca8f079aec1 // Yes, this doesn't match Vanilla, but it's the best we can do for now. // If this is an issue, PRs are welcome -@@ -478,6 +499,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -484,6 +505,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { if (valid && !this.isSpectator() || this.world.isLoaded(this.getChunkCoordinates())) { // Paper - don't tick dead players that are not in the world currently (pending respawn) super.tick(); } @@ -882,7 +882,7 @@ index e5751adde516544722b95016f64b2a46c16e77ce..04dea2c9fd9337631a6289c7242338e1 } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 7cba79ce0b3718b73fd7fd839732d1a7ef85941e..9419cb575fde265718eafe20bbe8a592e862f6d5 100644 +index 6dd64ce8794b8c2b5704556532159135e85a4b6c..ae42793b5a2f5bb06f068d0365378776901a4351 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -51,6 +51,7 @@ import org.apache.commons.lang3.mutable.MutableBoolean; @@ -901,7 +901,7 @@ index 7cba79ce0b3718b73fd7fd839732d1a7ef85941e..9419cb575fde265718eafe20bbe8a592 public final ChunkGenerator chunkGenerator; private final Supplier l; public final Supplier getWorldPersistentDataSupplier() { return this.l; } // Paper - OBFHELPER private final VillagePlace m; -@@ -124,6 +126,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -125,6 +127,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @Override public void execute(Runnable runnable) { @@ -909,7 +909,7 @@ index 7cba79ce0b3718b73fd7fd839732d1a7ef85941e..9419cb575fde265718eafe20bbe8a592 if (queued == null) { queued = new java.util.ArrayDeque<>(); } -@@ -132,6 +135,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -133,6 +136,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @Override public void run() { @@ -917,7 +917,7 @@ index 7cba79ce0b3718b73fd7fd839732d1a7ef85941e..9419cb575fde265718eafe20bbe8a592 if (queued == null) { return; } -@@ -286,6 +290,15 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -287,6 +291,15 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.world = worldserver; this.chunkGenerator = chunkgenerator; this.executor = iasynctaskhandler; @@ -933,7 +933,7 @@ index 7cba79ce0b3718b73fd7fd839732d1a7ef85941e..9419cb575fde265718eafe20bbe8a592 ThreadedMailbox threadedmailbox = ThreadedMailbox.a(executor, "worldgen"); iasynctaskhandler.getClass(); -@@ -379,6 +392,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -381,6 +394,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.playerViewDistanceTickMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets, (EntityPlayer player, int rangeX, int rangeZ, int currPosX, int currPosZ, int prevPosX, int prevPosZ, com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet newState) -> { @@ -941,7 +941,7 @@ index 7cba79ce0b3718b73fd7fd839732d1a7ef85941e..9419cb575fde265718eafe20bbe8a592 if (newState.size() != 1) { return; } -@@ -397,7 +411,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -399,7 +413,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } ChunkCoordIntPair chunkPos = new ChunkCoordIntPair(rangeX, rangeZ); PlayerChunkMap.this.world.getChunkProvider().removeTicketAtLevel(TicketType.PLAYER, chunkPos, 31, chunkPos); // entity ticking level, TODO check on update @@ -954,7 +954,7 @@ index 7cba79ce0b3718b73fd7fd839732d1a7ef85941e..9419cb575fde265718eafe20bbe8a592 this.playerViewDistanceNoTickMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets); this.playerViewDistanceBroadcastMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets, (EntityPlayer player, int rangeX, int rangeZ, int currPosX, int currPosZ, int prevPosX, int prevPosZ, -@@ -414,6 +432,116 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -416,6 +434,116 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { }); // Paper end - no-tick view distance } @@ -1069,9 +1069,9 @@ index 7cba79ce0b3718b73fd7fd839732d1a7ef85941e..9419cb575fde265718eafe20bbe8a592 + } + // Paper end - private static double getDistanceSquaredFromChunk(ChunkCoordIntPair chunkPos, Entity entity) { return a(chunkPos, entity); } // Paper - OBFHELPER - private static double a(ChunkCoordIntPair chunkcoordintpair, Entity entity) { -@@ -526,6 +654,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + public void updatePlayerMobTypeMap(Entity entity) { + if (!this.world.paperConfig.perPlayerMobSpawns) { +@@ -545,6 +673,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { List>> list = Lists.newArrayList(); int j = chunkcoordintpair.x; int k = chunkcoordintpair.z; @@ -1079,7 +1079,7 @@ index 7cba79ce0b3718b73fd7fd839732d1a7ef85941e..9419cb575fde265718eafe20bbe8a592 for (int l = -i; l <= i; ++l) { for (int i1 = -i; i1 <= i; ++i1) { -@@ -544,6 +673,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -563,6 +692,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { ChunkStatus chunkstatus = (ChunkStatus) intfunction.apply(j1); CompletableFuture> completablefuture = playerchunk.a(chunkstatus, this); @@ -1094,7 +1094,7 @@ index 7cba79ce0b3718b73fd7fd839732d1a7ef85941e..9419cb575fde265718eafe20bbe8a592 list.add(completablefuture); } -@@ -1008,14 +1145,22 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1028,14 +1165,22 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { }; CompletableFuture chunkSaveFuture = this.world.asyncChunkTaskManager.getChunkSaveFuture(chunkcoordintpair.x, chunkcoordintpair.z); @@ -1122,7 +1122,7 @@ index 7cba79ce0b3718b73fd7fd839732d1a7ef85941e..9419cb575fde265718eafe20bbe8a592 return ret; // Paper end } -@@ -1152,7 +1297,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1172,7 +1317,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { long i = playerchunk.i().pair(); playerchunk.getClass(); @@ -1144,10 +1144,10 @@ index 553c7313e2b699be88ea01460fd299421c42b176..66dd1b3bfeebab8dd0f4e823dd0daea9 } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 1514d24ae0da9fd9622333ff8702a0da140bd691..84707b373bcd9c4eb302b149f242435edfc91f2e 100644 +index 33d7f60ab0d8bbe90bc561093ed0e764420b0595..8490376b014ac26bda473ea1e0c7a1063c9c70d2 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -199,8 +199,8 @@ public abstract class PlayerList { +@@ -200,8 +200,8 @@ public abstract class PlayerList { final ChunkCoordIntPair pos = new ChunkCoordIntPair(chunkX, chunkZ); PlayerChunkMap playerChunkMap = finalWorldserver.getChunkProvider().playerChunkMap; playerChunkMap.chunkDistanceManager.addTicketAtLevel(TicketType.LOGIN, pos, 31, pos.pair()); @@ -1158,7 +1158,7 @@ index 1514d24ae0da9fd9622333ff8702a0da140bd691..84707b373bcd9c4eb302b149f242435e PlayerChunk updatingChunk = playerChunkMap.getUpdatingChunk(pos.pair()); if (updatingChunk != null) { return updatingChunk.getEntityTickingFuture(); -@@ -213,7 +213,6 @@ public abstract class PlayerList { +@@ -214,7 +214,6 @@ public abstract class PlayerList { entityplayer, finalWorldserver, finalWorldserver1, networkmanager, playerconnection, nbttagcompound, networkmanager.getSocketAddress().toString(), lastKnownName ); @@ -1166,7 +1166,7 @@ index 1514d24ae0da9fd9622333ff8702a0da140bd691..84707b373bcd9c4eb302b149f242435e }; }); } -@@ -617,6 +616,7 @@ public abstract class PlayerList { +@@ -618,6 +617,7 @@ public abstract class PlayerList { SocketAddress socketaddress = loginlistener.networkManager.getSocketAddress(); EntityPlayer entity = new EntityPlayer(this.server, this.server.getWorldServer(World.OVERWORLD), gameprofile, new PlayerInteractManager(this.server.getWorldServer(World.OVERWORLD))); @@ -1174,7 +1174,7 @@ index 1514d24ae0da9fd9622333ff8702a0da140bd691..84707b373bcd9c4eb302b149f242435e Player player = entity.getBukkitEntity(); PlayerLoginEvent event = new PlayerLoginEvent(player, hostname, ((java.net.InetSocketAddress) socketaddress).getAddress(), ((java.net.InetSocketAddress) loginlistener.networkManager.getRawAddress()).getAddress()); -@@ -812,6 +812,7 @@ public abstract class PlayerList { +@@ -813,6 +813,7 @@ public abstract class PlayerList { // CraftBukkit end worldserver.getChunkProvider().addTicket(TicketType.POST_TELEPORT, new ChunkCoordIntPair(location.getBlockX() >> 4, location.getBlockZ() >> 4), 1, entityplayer.getId()); // Paper @@ -1231,7 +1231,7 @@ index 8a37871bea36bd34b514428acea1acad2ba5897e..b973bd8f60412232df53ac52d97135de net.minecraft.server.Chunk chunk = (net.minecraft.server.Chunk) either.left().orElse(null); return CompletableFuture.completedFuture(chunk == null ? null : chunk.getBukkitChunk()); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index f553647b4351b2684f522b40b1e533511efc8ae9..784be20585913ee11fca2c83f169268bf1eb1f20 100644 +index 9e26a15746fcdf80b581b81f836d9df51759f601..2e2b28b145b50549345be5a9c754302d5e645274 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -742,6 +742,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0498-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch b/Spigot-Server-Patches/0499-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch similarity index 100% rename from Spigot-Server-Patches/0498-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch rename to Spigot-Server-Patches/0499-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch diff --git a/Spigot-Server-Patches/0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch b/Spigot-Server-Patches/0500-Optimize-sending-packets-to-nearby-locations-sounds-.patch similarity index 95% rename from Spigot-Server-Patches/0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch rename to Spigot-Server-Patches/0500-Optimize-sending-packets-to-nearby-locations-sounds-.patch index 496951e4ac..b52cac350b 100644 --- a/Spigot-Server-Patches/0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch +++ b/Spigot-Server-Patches/0500-Optimize-sending-packets-to-nearby-locations-sounds-.patch @@ -11,10 +11,10 @@ This will drastically cut down on packet sending cost for worlds with lots of players in them. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 84707b373bcd9c4eb302b149f242435edfc91f2e..bbc5e21c0dd6e790493fc2d4d3b0df4c114712e5 100644 +index 8490376b014ac26bda473ea1e0c7a1063c9c70d2..35d7ac60f61ffb493fe4f32b63511b2b86805243 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java -@@ -1062,16 +1062,40 @@ public abstract class PlayerList { +@@ -1063,16 +1063,40 @@ public abstract class PlayerList { } public void sendPacketNearby(@Nullable EntityHuman entityhuman, double d0, double d1, double d2, double d3, ResourceKey resourcekey, Packet packet) { diff --git a/Spigot-Server-Patches/0500-Improve-Chunk-Status-Transition-Speed.patch b/Spigot-Server-Patches/0501-Improve-Chunk-Status-Transition-Speed.patch similarity index 93% rename from Spigot-Server-Patches/0500-Improve-Chunk-Status-Transition-Speed.patch rename to Spigot-Server-Patches/0501-Improve-Chunk-Status-Transition-Speed.patch index 58a948c24c..0de038ba5a 100644 --- a/Spigot-Server-Patches/0500-Improve-Chunk-Status-Transition-Speed.patch +++ b/Spigot-Server-Patches/0501-Improve-Chunk-Status-Transition-Speed.patch @@ -54,10 +54,10 @@ index 04dea2c9fd9337631a6289c7242338e166d6bc1e..446c401b3139f8c6c0e70d883340f014 // Paper start - no-tick view distance public final Chunk getSendingChunk() { diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 9419cb575fde265718eafe20bbe8a592e862f6d5..bf60b43bf3cb75b7545193958e5508415fa55986 100644 +index ae42793b5a2f5bb06f068d0365378776901a4351..0e684a040b1a6cee056e8716c2a69620fc440af3 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -721,7 +721,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -740,7 +740,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return either.mapLeft((list) -> { return (Chunk) list.get(list.size() / 2); }); @@ -66,7 +66,7 @@ index 9419cb575fde265718eafe20bbe8a592e862f6d5..bf60b43bf3cb75b7545193958e550841 } @Nullable -@@ -1071,7 +1071,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1090,7 +1090,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { IChunkAccess ichunkaccess = (IChunkAccess) optional.get(); if (ichunkaccess.getChunkStatus().b(chunkstatus)) { @@ -75,7 +75,7 @@ index 9419cb575fde265718eafe20bbe8a592e862f6d5..bf60b43bf3cb75b7545193958e550841 if (chunkstatus == ChunkStatus.LIGHT) { completablefuture1 = this.b(playerchunk, chunkstatus); -@@ -1087,7 +1087,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1106,7 +1106,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return this.b(playerchunk, chunkstatus); } } @@ -84,7 +84,7 @@ index 9419cb575fde265718eafe20bbe8a592e862f6d5..bf60b43bf3cb75b7545193958e550841 } } -@@ -1205,6 +1205,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1225,6 +1225,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return CompletableFuture.completedFuture(Either.right(playerchunk_failure)); }); }, (runnable) -> { diff --git a/Spigot-Server-Patches/0501-Fix-villager-trading-demand-MC-163962.patch b/Spigot-Server-Patches/0502-Fix-villager-trading-demand-MC-163962.patch similarity index 100% rename from Spigot-Server-Patches/0501-Fix-villager-trading-demand-MC-163962.patch rename to Spigot-Server-Patches/0502-Fix-villager-trading-demand-MC-163962.patch diff --git a/Spigot-Server-Patches/0502-Maps-shouldn-t-load-chunks.patch b/Spigot-Server-Patches/0503-Maps-shouldn-t-load-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0502-Maps-shouldn-t-load-chunks.patch rename to Spigot-Server-Patches/0503-Maps-shouldn-t-load-chunks.patch diff --git a/Spigot-Server-Patches/0503-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch b/Spigot-Server-Patches/0504-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch similarity index 100% rename from Spigot-Server-Patches/0503-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch rename to Spigot-Server-Patches/0504-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch diff --git a/Spigot-Server-Patches/0504-Optimize-Bit-Operations-by-inlining.patch b/Spigot-Server-Patches/0505-Optimize-Bit-Operations-by-inlining.patch similarity index 100% rename from Spigot-Server-Patches/0504-Optimize-Bit-Operations-by-inlining.patch rename to Spigot-Server-Patches/0505-Optimize-Bit-Operations-by-inlining.patch diff --git a/Spigot-Server-Patches/0505-Optimize-Light-Engine.patch b/Spigot-Server-Patches/0506-Optimize-Light-Engine.patch similarity index 99% rename from Spigot-Server-Patches/0505-Optimize-Light-Engine.patch rename to Spigot-Server-Patches/0506-Optimize-Light-Engine.patch index 3f222f6058..ef8f6e59ba 100644 --- a/Spigot-Server-Patches/0505-Optimize-Light-Engine.patch +++ b/Spigot-Server-Patches/0506-Optimize-Light-Engine.patch @@ -25,10 +25,10 @@ Massive update to light to improve performance and chunk loading/generation. 8) Fix NPE risk that crashes server in getting nibble data diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index a165b863003fddef179f95b2d987ac7873ede1e8..70fdce2946b94fad32cd7d31f990c4d7916a6e53 100644 +index 604e7004b659daed2844ba1a76bf09288ec549e5..ef980f9859d1d7d0d5e13d0d70e998055f92135e 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -1029,7 +1029,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -1044,7 +1044,7 @@ public class ChunkProviderServer extends IChunkProvider { if (ChunkProviderServer.this.tickDistanceManager()) { return true; } else { @@ -1281,10 +1281,10 @@ index 446c401b3139f8c6c0e70d883340f0140d94b752..a3bce8f13bf278af2d6870891daa9bf6 if (getCurrentPriority() != priority) { this.v.a(this.location, this::getCurrentPriority, priority, this::setPriority); // use preferred priority diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index bf60b43bf3cb75b7545193958e5508415fa55986..46f8fe23cf4442334d344365baba77b2a6394e1b 100644 +index 0e684a040b1a6cee056e8716c2a69620fc440af3..8c5639fa55404474df8656d3f6ad2db1bc71e3da 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -634,6 +634,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -653,6 +653,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // Paper end } diff --git a/Spigot-Server-Patches/0506-Delay-Chunk-Unloads-based-on-Player-Movement.patch b/Spigot-Server-Patches/0507-Delay-Chunk-Unloads-based-on-Player-Movement.patch similarity index 97% rename from Spigot-Server-Patches/0506-Delay-Chunk-Unloads-based-on-Player-Movement.patch rename to Spigot-Server-Patches/0507-Delay-Chunk-Unloads-based-on-Player-Movement.patch index 6c2d7d593e..4738b38c7b 100644 --- a/Spigot-Server-Patches/0506-Delay-Chunk-Unloads-based-on-Player-Movement.patch +++ b/Spigot-Server-Patches/0507-Delay-Chunk-Unloads-based-on-Player-Movement.patch @@ -17,10 +17,10 @@ This allows servers with smaller worlds who do less long distance exploring to s wasting cpu cycles on saving/unloading/reloading chunks repeatedly. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 6b1b4780a8553dfd7da32c3e9e76b142122f6a74..c1e36576d572b779500d2cb2566076be894ca8a2 100644 +index 0746932a3191669052f15270f5c94efbce0bd0c2..0f4fca90fd6c3788a5762c96c344899cb1665466 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -634,4 +634,13 @@ public class PaperWorldConfig { +@@ -639,4 +639,13 @@ public class PaperWorldConfig { private void viewDistance() { this.noTickViewDistance = this.getInt("viewdistances.no-tick-view-distance", -1); } diff --git a/Spigot-Server-Patches/0507-Add-Plugin-Tickets-to-API-Chunk-Methods.patch b/Spigot-Server-Patches/0508-Add-Plugin-Tickets-to-API-Chunk-Methods.patch similarity index 100% rename from Spigot-Server-Patches/0507-Add-Plugin-Tickets-to-API-Chunk-Methods.patch rename to Spigot-Server-Patches/0508-Add-Plugin-Tickets-to-API-Chunk-Methods.patch diff --git a/Spigot-Server-Patches/0508-Fix-missing-chunks-due-to-integer-overflow.patch b/Spigot-Server-Patches/0509-Fix-missing-chunks-due-to-integer-overflow.patch similarity index 100% rename from Spigot-Server-Patches/0508-Fix-missing-chunks-due-to-integer-overflow.patch rename to Spigot-Server-Patches/0509-Fix-missing-chunks-due-to-integer-overflow.patch diff --git a/Spigot-Server-Patches/0509-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch b/Spigot-Server-Patches/0510-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch similarity index 100% rename from Spigot-Server-Patches/0509-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch rename to Spigot-Server-Patches/0510-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch diff --git a/Spigot-Server-Patches/0510-Fix-piston-physics-inconsistency-MC-188840.patch b/Spigot-Server-Patches/0511-Fix-piston-physics-inconsistency-MC-188840.patch similarity index 94% rename from Spigot-Server-Patches/0510-Fix-piston-physics-inconsistency-MC-188840.patch rename to Spigot-Server-Patches/0511-Fix-piston-physics-inconsistency-MC-188840.patch index ab41639c15..33fa3d9944 100644 --- a/Spigot-Server-Patches/0510-Fix-piston-physics-inconsistency-MC-188840.patch +++ b/Spigot-Server-Patches/0511-Fix-piston-physics-inconsistency-MC-188840.patch @@ -46,7 +46,7 @@ index 06adb1fa670e7d755560abae67d46447d63370f0..3b0f3127bcee8e9290b4640bcd4ec0d1 + } } diff --git a/src/main/java/net/minecraft/server/BlockPiston.java b/src/main/java/net/minecraft/server/BlockPiston.java -index 6b1253fe7e8d4bb71d4d19c063d3e84c167c4d7b..0fb6debc0cd5f522614f32f3df1b5f37a415a0f5 100644 +index 6b1253fe7e8d4bb71d4d19c063d3e84c167c4d7b..c3133814f1349b2f70b12967b1b5abc88f71f98c 100644 --- a/src/main/java/net/minecraft/server/BlockPiston.java +++ b/src/main/java/net/minecraft/server/BlockPiston.java @@ -368,12 +368,24 @@ public class BlockPiston extends BlockDirectional { @@ -63,12 +63,13 @@ index 6b1253fe7e8d4bb71d4d19c063d3e84c167c4d7b..0fb6debc0cd5f522614f32f3df1b5f37 blockposition3 = blockposition3.shift(enumdirection1); map.remove(blockposition3); world.setTypeAndData(blockposition3, (IBlockData) Blocks.MOVING_PISTON.getBlockData().set(BlockPiston.FACING, enumdirection), 68); +- world.setTileEntity(blockposition3, BlockPistonMoving.a((IBlockData) list1.get(k), enumdirection, flag, false)); + // Paper start - fix a variety of piston desync dupes + if (!allowDesync) { + iblockdata1 = world.getType(oldPos); + map.replace(oldPos, iblockdata1); + } - world.setTileEntity(blockposition3, BlockPistonMoving.a((IBlockData) list1.get(k), enumdirection, flag, false)); ++ world.setTileEntity(blockposition3, BlockPistonMoving.a(allowDesync ? list1.get(k) : iblockdata1, enumdirection, flag, false)); + if (!allowDesync) { + world.setTypeAndData(oldPos, Blocks.AIR.getBlockData(), 2 | 4 | 16 | 1024); // set air to prevent later physics updates from seeing this block + } diff --git a/Spigot-Server-Patches/0511-Fix-sand-duping.patch b/Spigot-Server-Patches/0512-Fix-sand-duping.patch similarity index 100% rename from Spigot-Server-Patches/0511-Fix-sand-duping.patch rename to Spigot-Server-Patches/0512-Fix-sand-duping.patch diff --git a/Spigot-Server-Patches/0512-Prevent-position-desync-in-playerconnection-causing-.patch b/Spigot-Server-Patches/0513-Prevent-position-desync-in-playerconnection-causing-.patch similarity index 100% rename from Spigot-Server-Patches/0512-Prevent-position-desync-in-playerconnection-causing-.patch rename to Spigot-Server-Patches/0513-Prevent-position-desync-in-playerconnection-causing-.patch diff --git a/Spigot-Server-Patches/0513-Fix-enderdragon-exp-dupe.patch b/Spigot-Server-Patches/0514-Fix-enderdragon-exp-dupe.patch similarity index 100% rename from Spigot-Server-Patches/0513-Fix-enderdragon-exp-dupe.patch rename to Spigot-Server-Patches/0514-Fix-enderdragon-exp-dupe.patch diff --git a/Spigot-Server-Patches/0514-Inventory-getHolder-method-without-block-snapshot.patch b/Spigot-Server-Patches/0515-Inventory-getHolder-method-without-block-snapshot.patch similarity index 100% rename from Spigot-Server-Patches/0514-Inventory-getHolder-method-without-block-snapshot.patch rename to Spigot-Server-Patches/0515-Inventory-getHolder-method-without-block-snapshot.patch diff --git a/Spigot-Server-Patches/0515-Expose-Arrow-getItemStack.patch b/Spigot-Server-Patches/0516-Expose-Arrow-getItemStack.patch similarity index 100% rename from Spigot-Server-Patches/0515-Expose-Arrow-getItemStack.patch rename to Spigot-Server-Patches/0516-Expose-Arrow-getItemStack.patch diff --git a/Spigot-Server-Patches/0516-Add-and-implement-PlayerRecipeBookClickEvent.patch b/Spigot-Server-Patches/0517-Add-and-implement-PlayerRecipeBookClickEvent.patch similarity index 100% rename from Spigot-Server-Patches/0516-Add-and-implement-PlayerRecipeBookClickEvent.patch rename to Spigot-Server-Patches/0517-Add-and-implement-PlayerRecipeBookClickEvent.patch diff --git a/Spigot-Server-Patches/0517-Add-PrepareGrindstoneEvent.patch b/Spigot-Server-Patches/0518-Add-PrepareGrindstoneEvent.patch similarity index 100% rename from Spigot-Server-Patches/0517-Add-PrepareGrindstoneEvent.patch rename to Spigot-Server-Patches/0518-Add-PrepareGrindstoneEvent.patch diff --git a/Spigot-Server-Patches/0518-FIX-DIS-SHIT.patch b/Spigot-Server-Patches/0519-FIX-DIS-SHIT.patch similarity index 100% rename from Spigot-Server-Patches/0518-FIX-DIS-SHIT.patch rename to Spigot-Server-Patches/0519-FIX-DIS-SHIT.patch diff --git a/Spigot-Server-Patches/0520-Hide-sync-chunk-writes-behind-flag.patch b/Spigot-Server-Patches/0520-Hide-sync-chunk-writes-behind-flag.patch new file mode 100644 index 0000000000..143846f239 --- /dev/null +++ b/Spigot-Server-Patches/0520-Hide-sync-chunk-writes-behind-flag.patch @@ -0,0 +1,23 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Spottedleaf +Date: Fri, 26 Jun 2020 22:35:08 -0700 +Subject: [PATCH] Hide sync chunk writes behind flag + +Syncing writes on each write call has terrible performance +on harddrives. + +-DPaper.enable-sync-chunk-writes=true to enable + +diff --git a/src/main/java/net/minecraft/server/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/DedicatedServerProperties.java +index 1122861a8f9c12668e7bd9d65e63fc9166a66d1a..6786fd0947724069366a2375c710ec518a92f2b1 100644 +--- a/src/main/java/net/minecraft/server/DedicatedServerProperties.java ++++ b/src/main/java/net/minecraft/server/DedicatedServerProperties.java +@@ -98,7 +98,7 @@ public class DedicatedServerProperties extends PropertyManager { + return MathHelper.clamp(integer, 1, 29999984); + }, 29999984); +- this.syncChunkWrites = this.getBoolean("sync-chunk-writes", true); ++ this.syncChunkWrites = this.getBoolean("sync-chunk-writes", true) && Boolean.getBoolean("Paper.enable-sync-chunk-writes"); // Paper - hide behind flag + this.enableJmxMonitoring = this.getBoolean("enable-jmx-monitoring", false); + this.enableStatus = this.getBoolean("enable-status", true); + this.entityBroadcastRangePercentage = this.a("entity-broadcast-range-percentage", (integer) -> { diff --git a/work/Bukkit b/work/Bukkit index edc7a378c9..3284612a10 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit edc7a378c9258ef533f90de135e250ca91b1ae02 +Subproject commit 3284612a10e704b4658aa087213a3fa9670b6926 diff --git a/work/CraftBukkit b/work/CraftBukkit index 4ff609e60c..d424351010 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 4ff609e60c191f107682681b5e3a8262f8a4c844 +Subproject commit d4243510102530684b860dbe927311bf47c488db diff --git a/work/Spigot b/work/Spigot index 16d78990fe..6f4ff1b691 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 16d78990fe27633e0ec129216f96d3b50f770025 +Subproject commit 6f4ff1b691828e538ae534eac66e80a1bf2c1adf