diff --git a/Spigot-Server-Patches/0002-Paper-config-files.patch b/Spigot-Server-Patches/0002-Paper-config-files.patch index 51ac0e671..d9b98eb28 100644 --- a/Spigot-Server-Patches/0002-Paper-config-files.patch +++ b/Spigot-Server-Patches/0002-Paper-config-files.patch @@ -268,10 +268,10 @@ index 0000000000000000000000000000000000000000..41c79650b169b87fbc70cf502438a545 +} diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java new file mode 100644 -index 0000000000000000000000000000000000000000..273cdb598b3606b962dcc92564c84ad351b7a74f +index 0000000000000000000000000000000000000000..68d3cb02dbfdc9d6f9d3682a2659c9430b50c490 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -0,0 +1,184 @@ +@@ -0,0 +1,185 @@ +package com.destroystokyo.paper; + +import com.google.common.base.Throwables; @@ -291,6 +291,7 @@ index 0000000000000000000000000000000000000000..273cdb598b3606b962dcc92564c84ad3 +import net.minecraft.server.MinecraftServer; +import org.bukkit.Bukkit; +import org.bukkit.command.Command; ++import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.configuration.InvalidConfigurationException; +import org.bukkit.configuration.file.YamlConfiguration; + diff --git a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch index c16fe13fe..762907459 100644 --- a/Spigot-Server-Patches/0003-MC-Dev-fixes.patch +++ b/Spigot-Server-Patches/0003-MC-Dev-fixes.patch @@ -279,6 +279,27 @@ index 8886cedfe8809fe4711b5f2451e3e6456d2a6513..b77a0f0c2ee30df44b113aa6c8d4fa92 return true; } } +diff --git a/src/main/java/net/minecraft/server/IBlockState.java b/src/main/java/net/minecraft/server/IBlockState.java +index 88f1f201240ef0479c4f0f93f4caca454bbe7e9e..d63a4e4916ed5f5d901be0f4dd2c13cf66239055 100644 +--- a/src/main/java/net/minecraft/server/IBlockState.java ++++ b/src/main/java/net/minecraft/server/IBlockState.java +@@ -16,12 +16,10 @@ public abstract class IBlockState<T extends Comparable<T>> { + private final Codec<IBlockState.a<T>> e; + + protected IBlockState(String s, Class<T> oclass) { +- this.d = Codec.STRING.comapFlatMap((s1) -> { +- return (DataResult) this.b(s1).map(DataResult::success).orElseGet(() -> { +- return DataResult.error("Unable to read property: " + this + " with value: " + s1); +- }); +- }, this::a); +- this.e = this.d.xmap(this::b, IBlockState.a::b); ++ this.d = Codec.STRING.comapFlatMap((s1) -> this.b(s1).map(DataResult::success).orElseGet(() -> { // Paper - decompile error ++ return DataResult.error("Unable to read property: " + this + " with value: " + s1); ++ }), this::a); ++ this.e = this.d.xmap(this::b, (IBlockState.a<T> param) -> param.b()); // Paper - decompile fix + this.a = oclass; + this.b = s; + } diff --git a/src/main/java/net/minecraft/server/IEntityAccess.java b/src/main/java/net/minecraft/server/IEntityAccess.java index 2517b70ddeb985ae7d708c6a1708b42c6a67dd00..c469b5db81fb040fc27cd2e4f7cd61797f56a62d 100644 --- a/src/main/java/net/minecraft/server/IEntityAccess.java @@ -423,6 +444,22 @@ index 998101592723abb26c91d1f92e98be1cf24c954d..ee9069c744df63cbb7f21dd9d28d6d55 } } +diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java +index a5f26a51ba612bc62d406cbefa858af75bd062da..7ea0118d108dd71fa1b0336e471ac4cc36722ff8 100644 +--- a/src/main/java/net/minecraft/server/MinecraftServer.java ++++ b/src/main/java/net/minecraft/server/MinecraftServer.java +@@ -1550,9 +1550,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas + ResourcePackRepository resourcepackrepository = this.resourcePackRepository; + + this.resourcePackRepository.getClass(); +- return stream.map(resourcepackrepository::a).filter(Objects::nonNull).map(ResourcePackLoader::d).collect(ImmutableList.toImmutableList()); // CraftBukkit - decompile error ++ return stream.<ResourcePackLoader>map(resourcepackrepository::a).filter(Objects::nonNull).map(ResourcePackLoader::d).collect(ImmutableList.toImmutableList()); // CraftBukkit - decompile error // Paper - decompile error + }, this).thenCompose((immutablelist) -> { +- return DataPackResources.a(immutablelist, this.j() ? CommandDispatcher.ServerType.DEDICATED : CommandDispatcher.ServerType.INTEGRATED, this.h(), this.executorService, this); ++ return DataPackResources.a((List<IResourcePack>) immutablelist, this.j() ? CommandDispatcher.ServerType.DEDICATED : CommandDispatcher.ServerType.INTEGRATED, this.h(), this.executorService, this); // Paper - decompile error + }).thenAcceptAsync((datapackresources) -> { + this.dataPackResources.close(); + this.dataPackResources = datapackresources; diff --git a/src/main/java/net/minecraft/server/NBTBase.java b/src/main/java/net/minecraft/server/NBTBase.java index 829a7ae0a2b77205fb8e8c5754d0d4333afa224d..8b9e47b4c7f5dc464fa617a59583df9e30a54045 100644 --- a/src/main/java/net/minecraft/server/NBTBase.java diff --git a/Spigot-Server-Patches/0004-MC-Utils.patch b/Spigot-Server-Patches/0004-MC-Utils.patch index b569c8356..5c52196e9 100644 --- a/Spigot-Server-Patches/0004-MC-Utils.patch +++ b/Spigot-Server-Patches/0004-MC-Utils.patch @@ -2318,6 +2318,18 @@ index eff6ebcd30b538cbaedaa031a46a59ea956253ba..30cbfc8eac20910aa55951e3dce63862 @Override public IBlockData getType(BlockPosition blockposition) { return Blocks.AIR.getBlockData(); +diff --git a/src/main/java/net/minecraft/server/BlockBase.java b/src/main/java/net/minecraft/server/BlockBase.java +index 47324feca49786b49563d3d0e854e74ad27c190b..26d446077bb563ca3c5bb0339695b3364a3e41bf 100644 +--- a/src/main/java/net/minecraft/server/BlockBase.java ++++ b/src/main/java/net/minecraft/server/BlockBase.java +@@ -632,6 +632,7 @@ public abstract class BlockBase { + return this.a != null ? this.a.e : Block.a(this.getCollisionShape(iblockaccess, blockposition)); + } + ++ public IBlockData getBlockData() { return p(); } // Paper - OBFHELPER + protected abstract IBlockData p(); + + public boolean isAlwaysDestroyable() { diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java index 8eb94bcb605f882c9ce096fc758df5e3ae3ab28d..b61651fcd6605cd8638ce14f15e41b878add3f1c 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java diff --git a/Spigot-Server-Patches/0005-Paper-Metrics.patch b/Spigot-Server-Patches/0005-Paper-Metrics.patch index 0ac402ed6..999be8eb7 100644 --- a/Spigot-Server-Patches/0005-Paper-Metrics.patch +++ b/Spigot-Server-Patches/0005-Paper-Metrics.patch @@ -647,10 +647,10 @@ index 0000000000000000000000000000000000000000..e257d6b36e0e78dac5b8320017d92776 + } +} diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 273cdb598b3606b962dcc92564c84ad351b7a74f..b6d470e594ce196f560ac6c94ced904b0081b205 100644 +index 68d3cb02dbfdc9d6f9d3682a2659c9430b50c490..b367bb8ea184489f433f8acc798466c38816ae62 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -41,6 +41,7 @@ public class PaperConfig { +@@ -42,6 +42,7 @@ public class PaperConfig { private static boolean verbose; private static boolean fatalError; /*========================================================================*/ @@ -658,7 +658,7 @@ index 273cdb598b3606b962dcc92564c84ad351b7a74f..b6d470e594ce196f560ac6c94ced904b public static void init(File configFile) { CONFIG_FILE = configFile; -@@ -83,6 +84,11 @@ public class PaperConfig { +@@ -84,6 +85,11 @@ public class PaperConfig { for (Map.Entry<String, Command> entry : commands.entrySet()) { MinecraftServer.getServer().server.getCommandMap().register(entry.getKey(), "Paper", entry.getValue()); } diff --git a/Spigot-Server-Patches/0007-Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch b/Spigot-Server-Patches/0007-Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch index 725775fd2..ddc0ee4dd 100644 --- a/Spigot-Server-Patches/0007-Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch +++ b/Spigot-Server-Patches/0007-Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch @@ -117,7 +117,7 @@ index 3e679f66cd922cf0b47a84cdd1a83f311ddf6d0b..f51325612fa14c1428679d6955a6d923 private String entityKeyString; diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 3cae7ef750371cee741c2f27799c1bb5864a278a..f4d88de468e7843585eb5c722c9e94f5d2b47e6a 100644 +index 3cae7ef750371cee741c2f27799c1bb5864a278a..f8d859cda8186d706304b4e182bca34573f09433 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -51,6 +51,15 @@ public abstract class TileEntity implements KeyedObject { // Paper @@ -128,7 +128,7 @@ index 3cae7ef750371cee741c2f27799c1bb5864a278a..f4d88de468e7843585eb5c722c9e94f5 + private java.lang.ref.WeakReference<Chunk> currentChunk = null; + public Chunk getCurrentChunk() { + final Chunk chunk = currentChunk != null ? currentChunk.get() : null; -+ return chunk != null && chunk.isLoaded() ? chunk : null; ++ return chunk != null && chunk.loaded ? chunk : null; + } + public void setCurrentChunk(Chunk chunk) { + this.currentChunk = chunk != null ? new java.lang.ref.WeakReference<>(chunk) : null; diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index 2ae0e78da..27c2861da 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -544,7 +544,7 @@ index 0000000000000000000000000000000000000000..d4ebcf8f66197299256bd6b65710a148 +} diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java new file mode 100644 -index 0000000000000000000000000000000000000000..fa1c920ea6092259149f9e7f9cd7cc1ed27bf338 +index 0000000000000000000000000000000000000000..03bb2102d6952df04753ba9986aad9b494568e2d --- /dev/null +++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java @@ -0,0 +1,118 @@ @@ -608,7 +608,7 @@ index 0000000000000000000000000000000000000000..fa1c920ea6092259149f9e7f9cd7cc1e + public final Timing miscMobSpawning; + + public WorldTimingsHandler(World server) { -+ String name = server.worldData.getName() +" - "; ++ String name = server.getWorld().getName() +" - "; + + mobSpawn = Timings.ofSafe(name + "mobSpawn"); + doChunkUnload = Timings.ofSafe(name + "doChunkUnload"); @@ -663,14 +663,14 @@ index 0000000000000000000000000000000000000000..fa1c920ea6092259149f9e7f9cd7cc1e + } + + public static Timing getTickList(WorldServer worldserver, String timingsType) { -+ return Timings.ofSafe(worldserver.getWorldData().getName() + " - Scheduled " + timingsType); ++ return Timings.ofSafe(worldserver.getWorld().getName() + " - Scheduled " + timingsType); + } +} diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index b6d470e594ce196f560ac6c94ced904b0081b205..f402a29b0904a0094ffe6e42dbdc6fbc0912d9d9 100644 +index b367bb8ea184489f433f8acc798466c38816ae62..a62f4bbb973b9cb6d1ee53f56a0897d70ae176af 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -14,11 +14,14 @@ import java.util.concurrent.TimeUnit; +@@ -14,12 +14,15 @@ import java.util.concurrent.TimeUnit; import java.util.logging.Level; import java.util.regex.Pattern; @@ -678,6 +678,7 @@ index b6d470e594ce196f560ac6c94ced904b0081b205..f402a29b0904a0094ffe6e42dbdc6fbc import net.minecraft.server.MinecraftServer; import org.bukkit.Bukkit; import org.bukkit.command.Command; + import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.InvalidConfigurationException; import org.bukkit.configuration.file.YamlConfiguration; +import co.aikar.timings.Timings; @@ -685,7 +686,7 @@ index b6d470e594ce196f560ac6c94ced904b0081b205..f402a29b0904a0094ffe6e42dbdc6fbc public class PaperConfig { -@@ -187,4 +190,27 @@ public class PaperConfig { +@@ -188,4 +191,27 @@ public class PaperConfig { config.addDefault(path, def); return config.getString(path, config.getString(path)); } @@ -1116,7 +1117,7 @@ index dccb315440f7429fe881bd0d12af8f1ae8e35c3d..96a95413f74592ef0a8e9367fd3ed81f if (!this.world.isClientSide && this.dN() && this.aC()) { this.damageEntity(DamageSource.DROWN, 1.0F); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 67120e3e4a2cd77394fd7e77543223afa2d6a22e..a5284ca66043150c7132f6bee29a952fb6601007 100644 +index 10ba89eeb31adedadd34746b86843accd1869597..04d1af26aaa7005c9dcf84abfb796b848108bbf0 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -65,7 +65,7 @@ import org.bukkit.craftbukkit.CraftServer; @@ -1560,7 +1561,7 @@ index e8ff43662b8397229cb19ea26342b66c88807379..3b8f56c0f0507ebdd9ac20be70688b4c this.g.clear(); this.f.clear(); diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index f4d88de468e7843585eb5c722c9e94f5d2b47e6a..03c6a1c95daaa25208917d6985594eb5f182e8e1 100644 +index f8d859cda8186d706304b4e182bca34573f09433..057d703fe73de9bb9ca6f0e263463d32abae4c13 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -9,11 +9,12 @@ import org.bukkit.craftbukkit.persistence.CraftPersistentDataContainer; @@ -1626,7 +1627,7 @@ index 42294c7c7de146be08d38eddafd8d099073b627a..8a7ce347c35e0527471b3b586a248d64 CrashReport crashreport = CrashReport.a(throwable, "Ticking entity"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being ticked"); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index f45b5ddc66024e993ac94436ee25a03e085742b4..2b39fb903c1cf6ded8aa170f5bd25f4fadb1195a 100644 +index f45b5ddc66024e993ac94436ee25a03e085742b4..dd02f7b8c0c0055a506bceab68cec98faf4a7641 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -3,6 +3,8 @@ package net.minecraft.server; @@ -1687,7 +1688,7 @@ index f45b5ddc66024e993ac94436ee25a03e085742b4..2b39fb903c1cf6ded8aa170f5bd25f4f org.spigotmc.ActivationRange.activateEntities(this); // Spigot timings.entityTick.startTiming(); // Spigot -+ TimingHistory.entityTicks += this.globalEntityList.size(); // Paper ++ TimingHistory.entityTicks += this.entitiesById.size(); // Paper while (objectiterator.hasNext()) { Entry<Entity> entry = (Entry) objectiterator.next(); Entity entity = (Entity) entry.getValue(); diff --git a/Spigot-Server-Patches/0025-Entity-Origin-API.patch b/Spigot-Server-Patches/0025-Entity-Origin-API.patch index 911ea345a..c3f4dc7b4 100644 --- a/Spigot-Server-Patches/0025-Entity-Origin-API.patch +++ b/Spigot-Server-Patches/0025-Entity-Origin-API.patch @@ -5,14 +5,14 @@ Subject: [PATCH] Entity Origin API diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 80f1c4930d6dd602210b07a50b10c45e9f80ae8a..002678bc2bff9aa733650cea3b9bcb96e6fb3f9c 100644 +index 80f1c4930d6dd602210b07a50b10c45e9f80ae8a..12730f52fdb0774dcf8be81547c8f03ef9f184a4 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -167,6 +167,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke public org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only public boolean forceExplosionKnockback; // SPIGOT-949 public Timing tickTimer = MinecraftTimings.getEntityTimings(this); // Paper -+ public Location origin; // Paper ++ public org.bukkit.Location origin; // Paper // Spigot start public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final boolean defaultActivationState; @@ -35,7 +35,7 @@ index 80f1c4930d6dd602210b07a50b10c45e9f80ae8a..002678bc2bff9aa733650cea3b9bcb96 + // Paper start - Restore the entity's origin location + NBTTagList originTag = nbttagcompound.getList("Paper.Origin", 6); + if (!originTag.isEmpty()) { -+ origin = new Location(world.getWorld(), originTag.getDoubleAt(0), originTag.getDoubleAt(1), originTag.getDoubleAt(2)); ++ origin = new org.bukkit.Location(world.getWorld(), originTag.getDoubleAt(0), originTag.getDoubleAt(1), originTag.getDoubleAt(2)); + } + // Paper end + diff --git a/Spigot-Server-Patches/0027-Configurable-top-of-nether-void-damage.patch b/Spigot-Server-Patches/0027-Configurable-top-of-nether-void-damage.patch index 37c6e44a9..05b755623 100644 --- a/Spigot-Server-Patches/0027-Configurable-top-of-nether-void-damage.patch +++ b/Spigot-Server-Patches/0027-Configurable-top-of-nether-void-damage.patch @@ -29,7 +29,7 @@ index d59b82b7bb1f6d1b231f4e394e0a67a3d154d7be..f7a0a33e49cadf9b2bd43f118c106937 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 002678bc2bff9aa733650cea3b9bcb96e6fb3f9c..2adde8312a8e5bed9bfc2bd60961f56c799ee6c6 100644 +index 12730f52fdb0774dcf8be81547c8f03ef9f184a4..be0ade74030c5f8584b5caa22d6d3084a0853afa 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -420,9 +420,16 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0051-Add-configurable-portal-search-radius.patch b/Spigot-Server-Patches/0051-Add-configurable-portal-search-radius.patch index 4457ad57f..06fcc7f4c 100644 --- a/Spigot-Server-Patches/0051-Add-configurable-portal-search-radius.patch +++ b/Spigot-Server-Patches/0051-Add-configurable-portal-search-radius.patch @@ -21,7 +21,7 @@ index 62e793b71b313146b86b466421e7a5f894bef9df..cd47a4ca069df26969de3051c2aac805 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 2adde8312a8e5bed9bfc2bd60961f56c799ee6c6..833234254a93b0aee421f7cdb91f85f269040b91 100644 +index be0ade74030c5f8584b5caa22d6d3084a0853afa..3bda9ab2a19740e3b06f24e2bcc82cc9ea57858e 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -2502,7 +2502,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0056-Disable-Scoreboards-for-non-players-by-default.patch b/Spigot-Server-Patches/0056-Disable-Scoreboards-for-non-players-by-default.patch index 202a44a84..959dc3cfc 100644 --- a/Spigot-Server-Patches/0056-Disable-Scoreboards-for-non-players-by-default.patch +++ b/Spigot-Server-Patches/0056-Disable-Scoreboards-for-non-players-by-default.patch @@ -25,7 +25,7 @@ index abbf59bb91021821876a8960e8f77fac24457ec4..04430aae52205ee167662004e45c145b + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 833234254a93b0aee421f7cdb91f85f269040b91..c2ea0e74b72976131976f875934042cf65ba8263 100644 +index 3bda9ab2a19740e3b06f24e2bcc82cc9ea57858e..b75c6aa78dd9c7478912b0b68de7a27289a480ba 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -2195,6 +2195,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch b/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch index 4a9869fd1..45b97d4ef 100644 --- a/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch +++ b/Spigot-Server-Patches/0060-Default-loading-permissions.yml-before-plugins.patch @@ -16,10 +16,10 @@ modify that. Under the previous logic, plugins were unable (cleanly) override pe A config option has been added for those who depend on the previous behavior, but I don't expect that. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index f402a29b0904a0094ffe6e42dbdc6fbc0912d9d9..6ef5bb9f323da7cbf8cb24d094bf43c4735549b0 100644 +index a62f4bbb973b9cb6d1ee53f56a0897d70ae176af..f207abbe757ad403a29a7a012903aaa88d5b1685 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -213,4 +213,9 @@ public class PaperConfig { +@@ -214,4 +214,9 @@ public class PaperConfig { " - Length: " + timeSummary(Timings.getHistoryLength() / 20) + " - Server Name: " + timingsServerName); } diff --git a/Spigot-Server-Patches/0066-Add-World-Util-Methods.patch b/Spigot-Server-Patches/0066-Add-World-Util-Methods.patch index c50dd3fcd..6e941f70a 100644 --- a/Spigot-Server-Patches/0066-Add-World-Util-Methods.patch +++ b/Spigot-Server-Patches/0066-Add-World-Util-Methods.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add World Util Methods Methods that can be used for other patches to help improve logic. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index f80b0b95ce650b01ecb10d3a2f7c66421ca29178..2a18a905aef50d23d9e5544f4240b2f719abd8f1 100644 +index f80b0b95ce650b01ecb10d3a2f7c66421ca29178..6e05a7deaae13f29c24fb6e364c62948a20d83a8 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -283,6 +283,18 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -283,6 +283,22 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return chunk == null ? null : chunk.getFluid(blockposition); } @@ -17,8 +17,12 @@ index f80b0b95ce650b01ecb10d3a2f7c66421ca29178..2a18a905aef50d23d9e5544f4240b2f7 + public boolean isLoadedAndInBounds(BlockPosition blockposition) { + return getWorldBorder().isInBounds(blockposition) && getChunkIfLoadedImmediately(blockposition.getX() >> 4, blockposition.getZ() >> 4) != null; + } -+ public Chunk getChunkIfLoaded(BlockPosition blockposition) { -+ return getChunkIfLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4); ++ ++ public Chunk getChunkIfLoaded(int x, int z) { ++ return ((WorldServer) this).getChunkProvider().getChunkAtIfLoadedImmediately(x, z); ++ } ++ public final Chunk getChunkIfLoaded(BlockPosition blockposition) { ++ return ((WorldServer) this).getChunkProvider().getChunkAtIfLoadedImmediately(blockposition.getX() >> 4, blockposition.getZ() >> 4); + } + + // reduces need to do isLoaded before getType @@ -40,3 +44,16 @@ index d039e715624d33fc3ec9e87d5ad992415e7dc6b9..d5c0d394feaf8bb991245dbdcc6252cf public boolean a(BlockPosition blockposition) { return (double) (blockposition.getX() + 1) > this.e() && (double) blockposition.getX() < this.g() && (double) (blockposition.getZ() + 1) > this.f() && (double) blockposition.getZ() < this.h(); } +diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java +index 9eec2ec61777222c1290ad3112b003409001e51a..4548a38464fac65a88da26e95660542eeb482ccb 100644 +--- a/src/main/java/net/minecraft/server/WorldServer.java ++++ b/src/main/java/net/minecraft/server/WorldServer.java +@@ -83,7 +83,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { + public final Convertable.ConversionSession convertable; + public final UUID uuid; + +- public Chunk getChunkIfLoaded(int x, int z) { ++ @Override public Chunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI + return this.chunkProvider.getChunkAt(x, z, false); + } + diff --git a/Spigot-Server-Patches/0070-Use-a-Shared-Random-for-Entities.patch b/Spigot-Server-Patches/0070-Use-a-Shared-Random-for-Entities.patch index 100be84da..68a1232e5 100644 --- a/Spigot-Server-Patches/0070-Use-a-Shared-Random-for-Entities.patch +++ b/Spigot-Server-Patches/0070-Use-a-Shared-Random-for-Entities.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Use a Shared Random for Entities Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index c2ea0e74b72976131976f875934042cf65ba8263..9e750c0ff42fa1189f20f10495e1ca1d74c6d51b 100644 +index b75c6aa78dd9c7478912b0b68de7a27289a480ba..0b0dca503a91bbd7991996bf6c395991c993604d 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -58,6 +58,21 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0072-Optimize-isValidLocation-getType-and-getBlockData-fo.patch b/Spigot-Server-Patches/0072-Optimize-isValidLocation-getType-and-getBlockData-fo.patch index 9723792c8..ff7be580c 100644 --- a/Spigot-Server-Patches/0072-Optimize-isValidLocation-getType-and-getBlockData-fo.patch +++ b/Spigot-Server-Patches/0072-Optimize-isValidLocation-getType-and-getBlockData-fo.patch @@ -192,7 +192,7 @@ index c5d7a013e65c2c81b14ceb2476c1c6dfe3239f0d..ee8df274d43be753887fb77e4203e2ee @Override public Fluid getFluid(BlockPosition blockposition) { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 2a18a905aef50d23d9e5544f4240b2f719abd8f1..9067fcbf6d35931d31830b91f42f027076426bad 100644 +index 6479a62d81daacde6e1e72cb57bd99f9c59b5ae7..042f10ba2c6a3283203fdc5e79f78f3dbf6ccc22 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -179,7 +179,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch b/Spigot-Server-Patches/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch index cf5dd4463..6e99c30c0 100644 --- a/Spigot-Server-Patches/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch +++ b/Spigot-Server-Patches/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch @@ -32,7 +32,7 @@ index f87fc631255aa5948459f0726b188ebbbae13c5f..446a2ffcd95fd631750b74fd31b4c410 } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 63c2953d6eb6f3c034be97e0cb2dd5e991c75fdd..777a553fe3abfdc5db3616352ac11de7969f737c 100644 +index 704d59e53f4cf6f94202d6db36b3f7dba3a29c59..5f89477c664662447c1aafbf734a15aee0084f17 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1175,6 +1175,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas @@ -44,10 +44,10 @@ index 63c2953d6eb6f3c034be97e0cb2dd5e991c75fdd..777a553fe3abfdc5db3616352ac11de7 this.methodProfiler.a(() -> { return worldserver + " " + worldserver.getDimensionKey().a(); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 9067fcbf6d35931d31830b91f42f027076426bad..66a4e068f43fad6d8f3858e6665ad70eacbe4617 100644 +index 0611194eac072ce8dcd350dadffbc9da267d6cff..e236a3b3aa11bc5c3bab92959b90827447aa282c 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -435,7 +435,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -439,7 +439,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { // CraftBukkit start iblockdata1.b(this, blockposition, j); // Don't call an event for the old block to limit event spam CraftWorld world = ((WorldServer) this).getWorld(); @@ -56,7 +56,7 @@ index 9067fcbf6d35931d31830b91f42f027076426bad..66a4e068f43fad6d8f3858e6665ad70e BlockPhysicsEvent event = new BlockPhysicsEvent(world.getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()), CraftBlockData.fromData(iblockdata)); this.getServer().getPluginManager().callEvent(event); -@@ -537,7 +537,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -541,7 +541,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { try { // CraftBukkit start CraftWorld world = ((WorldServer) this).getWorld(); @@ -66,15 +66,14 @@ index 9067fcbf6d35931d31830b91f42f027076426bad..66a4e068f43fad6d8f3858e6665ad70e this.getServer().getPluginManager().callEvent(event); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 9e8f22f41889c8592033925c180f46413cfaec14..cc96ce0cb2e75dd86b413da76e878d511cd4e039 100644 +index 20200408da6cae15576926f79de22b955781201d..0746d0cf0c517a28e8faf637ecc19fb07f6eac2b 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -83,6 +83,8 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -82,6 +82,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { + private int tickPosition; public final Convertable.ConversionSession convertable; public final UUID uuid; - + boolean hasPhysicsEvent = true; // Paper -+ - public Chunk getChunkIfLoaded(int x, int z) { + + @Override public Chunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI return this.chunkProvider.getChunkAt(x, z, false); - } diff --git a/Spigot-Server-Patches/0074-Entity-AddTo-RemoveFrom-World-Events.patch b/Spigot-Server-Patches/0074-Entity-AddTo-RemoveFrom-World-Events.patch index f1d7930af..1dac1c374 100644 --- a/Spigot-Server-Patches/0074-Entity-AddTo-RemoveFrom-World-Events.patch +++ b/Spigot-Server-Patches/0074-Entity-AddTo-RemoveFrom-World-Events.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index cc96ce0cb2e75dd86b413da76e878d511cd4e039..f6940921dec04eedc393578ec9827e6f8516611c 100644 +index 0746d0cf0c517a28e8faf637ecc19fb07f6eac2b..a6747315cf3d9d5f22d95aade5b0d4df63bd18f8 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1057,7 +1057,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1056,7 +1056,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { if (entity instanceof EntityInsentient) { this.navigators.remove(((EntityInsentient) entity).getNavigation()); } @@ -17,7 +17,7 @@ index cc96ce0cb2e75dd86b413da76e878d511cd4e039..f6940921dec04eedc393578ec9827e6f entity.valid = false; // CraftBukkit } -@@ -1095,6 +1095,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1094,6 +1094,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { entity.origin = entity.getBukkitEntity().getLocation(); } // Paper end diff --git a/Spigot-Server-Patches/0077-Sanitise-RegionFileCache-and-make-configurable.patch b/Spigot-Server-Patches/0077-Sanitise-RegionFileCache-and-make-configurable.patch index 113e0a0b5..40b7fe709 100644 --- a/Spigot-Server-Patches/0077-Sanitise-RegionFileCache-and-make-configurable.patch +++ b/Spigot-Server-Patches/0077-Sanitise-RegionFileCache-and-make-configurable.patch @@ -11,10 +11,10 @@ The implementation uses a LinkedHashMap as an LRU cache (modified from HashMap). The maximum size of the RegionFileCache is also made configurable. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 6ef5bb9f323da7cbf8cb24d094bf43c4735549b0..d500cd75a9229584a70bbdbda6de9bce67b836e8 100644 +index f207abbe757ad403a29a7a012903aaa88d5b1685..7d726757d1083011a09c9f2ca37c33a81360e964 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -218,4 +218,9 @@ public class PaperConfig { +@@ -219,4 +219,9 @@ public class PaperConfig { private static void loadPermsBeforePlugins() { loadPermsBeforePlugins = getBoolean("settings.load-permissions-yml-before-plugins", true); } diff --git a/Spigot-Server-Patches/0082-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch b/Spigot-Server-Patches/0082-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch index f6f9834a3..f4e225d01 100644 --- a/Spigot-Server-Patches/0082-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch +++ b/Spigot-Server-Patches/0082-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 66a4e068f43fad6d8f3858e6665ad70eacbe4617..b9ddbcd0b409352a14c5b8dde14d7eac41e69dc3 100644 +index b6242cee9f5ab7c4fc9e32d682eb271f4604db41..45daedbba9829193bdc5e7a8f33b6e29c6fbbe10 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -495,6 +495,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -499,6 +499,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public void b(BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1) {} public void applyPhysics(BlockPosition blockposition, Block block) { diff --git a/Spigot-Server-Patches/0086-Remove-unused-World-Tile-Entity-List.patch b/Spigot-Server-Patches/0086-Remove-unused-World-Tile-Entity-List.patch index df5acb06a..94c5479f1 100644 --- a/Spigot-Server-Patches/0086-Remove-unused-World-Tile-Entity-List.patch +++ b/Spigot-Server-Patches/0086-Remove-unused-World-Tile-Entity-List.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Remove unused World Tile Entity List Massive hit to performance and it is completely unnecessary. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index b9ddbcd0b409352a14c5b8dde14d7eac41e69dc3..be3e6b398f20467f843fea8296ad5ceea5efb18a 100644 +index d3d7b605d92d433cb6b6655487a779dd10e03b30..1962f6d9c8c86a4ea275e33750ba3c93512a4855 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -39,7 +39,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -18,7 +18,7 @@ index b9ddbcd0b409352a14c5b8dde14d7eac41e69dc3..be3e6b398f20467f843fea8296ad5cee public final List<TileEntity> tileEntityListTick = Lists.newArrayList(); protected final List<TileEntity> tileEntityListPending = Lists.newArrayList(); protected final java.util.Set<TileEntity> tileEntityListUnload = com.google.common.collect.Sets.newHashSet(); -@@ -660,9 +660,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -664,9 +664,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable { }, tileentity::getPosition}); } @@ -30,7 +30,7 @@ index b9ddbcd0b409352a14c5b8dde14d7eac41e69dc3..be3e6b398f20467f843fea8296ad5cee this.tileEntityListTick.add(tileentity); } -@@ -698,7 +698,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -702,7 +702,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { timings.tileEntityTick.startTiming(); // Spigot if (!this.tileEntityListUnload.isEmpty()) { this.tileEntityListTick.removeAll(this.tileEntityListUnload); @@ -39,7 +39,7 @@ index b9ddbcd0b409352a14c5b8dde14d7eac41e69dc3..be3e6b398f20467f843fea8296ad5cee this.tileEntityListUnload.clear(); } -@@ -759,7 +759,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -763,7 +763,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { tilesThisCycle--; this.tileEntityListTick.remove(tileTickPosition--); // Spigot end @@ -48,7 +48,7 @@ index b9ddbcd0b409352a14c5b8dde14d7eac41e69dc3..be3e6b398f20467f843fea8296ad5cee if (this.isLoaded(tileentity.getPosition())) { this.getChunkAtWorldCoords(tileentity.getPosition()).removeTileEntity(tileentity.getPosition()); } -@@ -789,7 +789,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -793,7 +793,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { this.notify(tileentity1.getPosition(), iblockdata, iblockdata, 3); // CraftBukkit start // From above, don't screw this up - SPIGOT-1746 @@ -57,7 +57,7 @@ index b9ddbcd0b409352a14c5b8dde14d7eac41e69dc3..be3e6b398f20467f843fea8296ad5cee this.a(tileentity1); } // CraftBukkit end -@@ -931,7 +931,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -935,7 +935,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { } else { if (tileentity != null) { this.tileEntityListPending.remove(tileentity); @@ -67,10 +67,10 @@ index b9ddbcd0b409352a14c5b8dde14d7eac41e69dc3..be3e6b398f20467f843fea8296ad5cee } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index f6940921dec04eedc393578ec9827e6f8516611c..e2dfe047e64257b861fa0b168d2790605f09291c 100644 +index a6747315cf3d9d5f22d95aade5b0d4df63bd18f8..db02025e02de1d99e34771380dbf7e71b298d290 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1543,7 +1543,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1542,7 +1542,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } bufferedwriter.write(String.format("entities: %d\n", this.entitiesById.size())); @@ -79,7 +79,7 @@ index f6940921dec04eedc393578ec9827e6f8516611c..e2dfe047e64257b861fa0b168d279060 bufferedwriter.write(String.format("block_ticks: %d\n", this.getBlockTickList().a())); bufferedwriter.write(String.format("fluid_ticks: %d\n", this.getFluidTickList().a())); bufferedwriter.write("distance_manager: " + playerchunkmap.e().c() + "\n"); -@@ -1682,7 +1682,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1681,7 +1681,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { private void a(Writer writer) throws IOException { CSVWriter csvwriter = CSVWriter.a().a("x").a("y").a("z").a("type").a(writer); diff --git a/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch b/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch index fe45ac3a0..b4645d220 100644 --- a/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch +++ b/Spigot-Server-Patches/0088-Configurable-Player-Collision.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable Player Collision diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index d500cd75a9229584a70bbdbda6de9bce67b836e8..e4f0db64c061af684c28f50f0a37fbca693af7be 100644 +index 7d726757d1083011a09c9f2ca37c33a81360e964..3d9a98936cfe933fd71fb82f07e1ba54d5d35800 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -223,4 +223,9 @@ public class PaperConfig { +@@ -224,4 +224,9 @@ public class PaperConfig { private static void regionFileCacheSize() { regionFileCacheSize = Math.max(getInt("settings.region-file-cache-size", 256), 4); } @@ -19,7 +19,7 @@ index d500cd75a9229584a70bbdbda6de9bce67b836e8..e4f0db64c061af684c28f50f0a37fbca + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 777a553fe3abfdc5db3616352ac11de7969f737c..02e5a4214e46f31ba38d1ab814eeacce850dfaa1 100644 +index 5f89477c664662447c1aafbf734a15aee0084f17..26a796513e66d1593d2d7e47062b26bfe07796e9 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -436,6 +436,20 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas diff --git a/Spigot-Server-Patches/0096-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch b/Spigot-Server-Patches/0096-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch index 1e2fc09c3..0bcba10d6 100644 --- a/Spigot-Server-Patches/0096-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch +++ b/Spigot-Server-Patches/0096-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch @@ -102,10 +102,10 @@ index e6d97e7ffae3eadac586bad078123cd4aaa69916..225353e072033d1e5aaf5604b8db255d for ( org.bukkit.map.MapCursor cursor : render.cursors) { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index e2dfe047e64257b861fa0b168d2790605f09291c..6fb4c273b4ce2bafe8ba42f1f9e8b0d7838e5804 100644 +index db02025e02de1d99e34771380dbf7e71b298d290..792d2cb535954e02aec779b5076024f9fc0baf38 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1013,6 +1013,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1012,6 +1012,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { { if ( iter.next().trackee == entity ) { diff --git a/Spigot-Server-Patches/0097-LootTable-API-Replenishable-Lootables-Feature.patch b/Spigot-Server-Patches/0097-LootTable-API-Replenishable-Lootables-Feature.patch index d2cc67291..4ac3e6edd 100644 --- a/Spigot-Server-Patches/0097-LootTable-API-Replenishable-Lootables-Feature.patch +++ b/Spigot-Server-Patches/0097-LootTable-API-Replenishable-Lootables-Feature.patch @@ -520,7 +520,7 @@ index 0000000000000000000000000000000000000000..d50410532c27bd2aa932c2a3f5765ca1 + } +} diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 9e750c0ff42fa1189f20f10495e1ca1d74c6d51b..c6434d735e5838c5bd9e82f61bfb03fb42c412c7 100644 +index 0b0dca503a91bbd7991996bf6c395991c993604d..c4abb65702c4a25df696af02d04f26d168ee7900 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -73,6 +73,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0098-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch b/Spigot-Server-Patches/0098-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch index baa46adcf..3ee4b62f0 100644 --- a/Spigot-Server-Patches/0098-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch +++ b/Spigot-Server-Patches/0098-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Don't save empty scoreboard teams to scoreboard.dat diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index e4f0db64c061af684c28f50f0a37fbca693af7be..67f35fe66b33a4b461a310b6ce4fdedb5eaf1ac4 100644 +index 3d9a98936cfe933fd71fb82f07e1ba54d5d35800..6fbf9ab53c8b7fab93b55d815060033f945d56cd 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -228,4 +228,9 @@ public class PaperConfig { +@@ -229,4 +229,9 @@ public class PaperConfig { private static void enablePlayerCollisions() { enablePlayerCollisions = getBoolean("settings.enable-player-collisions", true); } diff --git a/Spigot-Server-Patches/0102-Optional-TNT-doesn-t-move-in-water.patch b/Spigot-Server-Patches/0102-Optional-TNT-doesn-t-move-in-water.patch index 9f6f94ea6..6c71ab72c 100644 --- a/Spigot-Server-Patches/0102-Optional-TNT-doesn-t-move-in-water.patch +++ b/Spigot-Server-Patches/0102-Optional-TNT-doesn-t-move-in-water.patch @@ -32,7 +32,7 @@ index 6db1312035807c04b98408100fb0a5c04c07aff4..8cf3076f4e0d8d7e81158881c763f89e + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index c6434d735e5838c5bd9e82f61bfb03fb42c412c7..851d05096b9230c1eaaf2a910293697f358eec0a 100644 +index c4abb65702c4a25df696af02d04f26d168ee7900..6d6ce3b5a012f49b2e0725d66ad4bcae4a7310f7 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -2646,6 +2646,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0103-Faster-redstone-torch-rapid-clock-removal.patch b/Spigot-Server-Patches/0103-Faster-redstone-torch-rapid-clock-removal.patch index a1eba2ad1..2ff597a40 100644 --- a/Spigot-Server-Patches/0103-Faster-redstone-torch-rapid-clock-removal.patch +++ b/Spigot-Server-Patches/0103-Faster-redstone-torch-rapid-clock-removal.patch @@ -77,7 +77,7 @@ index d88d435b7777f731bc0bb728ebe4d4cb31c6376e..a63a60348fe45f63deec6fcb27b6be09 public RedstoneUpdateInfo(BlockPosition blockposition, long i) { this.a = blockposition; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index be3e6b398f20467f843fea8296ad5ceea5efb18a..3e6dc44ede30846b8c612b043c1bd625576980e8 100644 +index 6818565b7af8fd9709a3d0a0ba6c091e7c434b7d..8f7222639bcc5b4b1b8af4aa69a100a37766cb4e 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -89,6 +89,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0106-Fix-Double-World-Add-issues.patch b/Spigot-Server-Patches/0106-Fix-Double-World-Add-issues.patch index d884413c8..4db739184 100644 --- a/Spigot-Server-Patches/0106-Fix-Double-World-Add-issues.patch +++ b/Spigot-Server-Patches/0106-Fix-Double-World-Add-issues.patch @@ -8,10 +8,10 @@ Vanilla will double add Spider Jockeys to the world, so ignore already added. Also add debug if something else tries to, and abort before world gets bad state diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 6fb4c273b4ce2bafe8ba42f1f9e8b0d7838e5804..43b588709da17ae779e97d297955edd3425c2a68 100644 +index 792d2cb535954e02aec779b5076024f9fc0baf38..0ae5eb7da3c8baf6ff54cc3b83bba41127457134 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -920,6 +920,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -919,6 +919,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { // CraftBukkit start private boolean addEntity0(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) { org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot 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 7482aba65..54ed5e6c2 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 @@ -5,10 +5,10 @@ Subject: [PATCH] Add setting for proxy online mode status diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 67f35fe66b33a4b461a310b6ce4fdedb5eaf1ac4..53f96a1576582fce83999a1f7e9a2624506ed51f 100644 +index 6fbf9ab53c8b7fab93b55d815060033f945d56cd..5827ef1e3eb35a11867ee4f92f301e1b0245c0fa 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -22,6 +22,7 @@ import org.bukkit.configuration.InvalidConfigurationException; +@@ -23,6 +23,7 @@ import org.bukkit.configuration.InvalidConfigurationException; import org.bukkit.configuration.file.YamlConfiguration; import co.aikar.timings.Timings; import co.aikar.timings.TimingsManager; @@ -16,7 +16,7 @@ index 67f35fe66b33a4b461a310b6ce4fdedb5eaf1ac4..53f96a1576582fce83999a1f7e9a2624 public class PaperConfig { -@@ -233,4 +234,13 @@ public class PaperConfig { +@@ -234,4 +235,13 @@ public class PaperConfig { private static void saveEmptyScoreboardTeams() { saveEmptyScoreboardTeams = getBoolean("settings.save-empty-scoreboard-teams", false); } diff --git a/Spigot-Server-Patches/0110-Optimise-BlockState-s-hashCode-equals.patch b/Spigot-Server-Patches/0110-Optimise-BlockState-s-hashCode-equals.patch index d5f1dddce..85e775879 100644 --- a/Spigot-Server-Patches/0110-Optimise-BlockState-s-hashCode-equals.patch +++ b/Spigot-Server-Patches/0110-Optimise-BlockState-s-hashCode-equals.patch @@ -51,19 +51,10 @@ index 5bd7a236b948666ca31e53cb3a8aa0dc147e274b..36b84446e96faefad3b783f73df74e0f return true; } else if (object instanceof BlockStateInteger && super.equals(object)) { diff --git a/src/main/java/net/minecraft/server/IBlockState.java b/src/main/java/net/minecraft/server/IBlockState.java -index 88f1f201240ef0479c4f0f93f4caca454bbe7e9e..4eea3a4fca4cea96109e54473335fd3660e2f6d6 100644 +index d63a4e4916ed5f5d901be0f4dd2c13cf66239055..6550b55067db31dbbc903fe17a13849383651c5a 100644 --- a/src/main/java/net/minecraft/server/IBlockState.java +++ b/src/main/java/net/minecraft/server/IBlockState.java -@@ -21,7 +21,7 @@ public abstract class IBlockState<T extends Comparable<T>> { - return DataResult.error("Unable to read property: " + this + " with value: " + s1); - }); - }, this::a); -- this.e = this.d.xmap(this::b, IBlockState.a::b); -+ this.e = this.d.xmap(this::b, (IBlockState.a<T> param) -> { return param.b(); }); // Paper - decompile fix - this.a = oclass; - this.b = s; - } -@@ -61,23 +61,17 @@ public abstract class IBlockState<T extends Comparable<T>> { +@@ -59,23 +59,17 @@ public abstract class IBlockState<T extends Comparable<T>> { } public boolean equals(Object object) { diff --git a/Spigot-Server-Patches/0111-Configurable-packet-in-spam-threshold.patch b/Spigot-Server-Patches/0111-Configurable-packet-in-spam-threshold.patch index 55191777e..8000fd33f 100644 --- a/Spigot-Server-Patches/0111-Configurable-packet-in-spam-threshold.patch +++ b/Spigot-Server-Patches/0111-Configurable-packet-in-spam-threshold.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable packet in spam threshold diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 53f96a1576582fce83999a1f7e9a2624506ed51f..010b17d2e7a27ace6ff8b15edff577c4164d2e81 100644 +index 5827ef1e3eb35a11867ee4f92f301e1b0245c0fa..23c9e0f317073bb9c327ec49e0b0586d2123e4e9 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -243,4 +243,13 @@ public class PaperConfig { +@@ -244,4 +244,13 @@ public class PaperConfig { public static boolean isProxyOnlineMode() { return Bukkit.getOnlineMode() || (SpigotConfig.bungee && bungeeOnlineMode); } diff --git a/Spigot-Server-Patches/0112-Configurable-flying-kick-messages.patch b/Spigot-Server-Patches/0112-Configurable-flying-kick-messages.patch index 566c3f320..427d0ff71 100644 --- a/Spigot-Server-Patches/0112-Configurable-flying-kick-messages.patch +++ b/Spigot-Server-Patches/0112-Configurable-flying-kick-messages.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable flying kick messages diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 010b17d2e7a27ace6ff8b15edff577c4164d2e81..5a83fc21cb6801d597a01fb4a83d30488f30bdb6 100644 +index 23c9e0f317073bb9c327ec49e0b0586d2123e4e9..c4086de778cc2ccc958b1a94dd6e9cdb5065076c 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -252,4 +252,11 @@ public class PaperConfig { +@@ -253,4 +253,11 @@ public class PaperConfig { } packetInSpamThreshold = getInt("settings.incoming-packet-spam-threshold", 300); } diff --git a/Spigot-Server-Patches/0113-Chunk-registration-fixes.patch b/Spigot-Server-Patches/0113-Chunk-registration-fixes.patch index 4f58339a2..af8c0e347 100644 --- a/Spigot-Server-Patches/0113-Chunk-registration-fixes.patch +++ b/Spigot-Server-Patches/0113-Chunk-registration-fixes.patch @@ -8,10 +8,10 @@ World checks and the Chunk Add logic are inconsistent on how Y > 256, < 0, is tr Keep them consistent diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 43b588709da17ae779e97d297955edd3425c2a68..6d5bb1c5183c0e7fc83e197f3a6840b2dcb1ad02 100644 +index 0ae5eb7da3c8baf6ff54cc3b83bba41127457134..022b05be76768cf0fb702ac5f9fa48c5e474391c 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -729,7 +729,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -728,7 +728,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { if (entity.ck()) { this.getMethodProfiler().enter("chunkCheck"); int i = MathHelper.floor(entity.locX() / 16.0D); diff --git a/Spigot-Server-Patches/0123-Don-t-let-fishinghooks-use-portals.patch b/Spigot-Server-Patches/0123-Don-t-let-fishinghooks-use-portals.patch index 3f35c50ee..284219eb3 100644 --- a/Spigot-Server-Patches/0123-Don-t-let-fishinghooks-use-portals.patch +++ b/Spigot-Server-Patches/0123-Don-t-let-fishinghooks-use-portals.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't let fishinghooks use portals diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 851d05096b9230c1eaaf2a910293697f358eec0a..3e6d3c2be5fc36db4ae5d022f80f5b0bbc349704 100644 +index 6d6ce3b5a012f49b2e0725d66ad4bcae4a7310f7..de126bf6c95e90dd9a81ee8d815806b8908709ec 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -162,7 +162,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0126-Optimize-World.isLoaded-BlockPosition-Z.patch b/Spigot-Server-Patches/0126-Optimize-World.isLoaded-BlockPosition-Z.patch index d06ad5610..da9b98b91 100644 --- a/Spigot-Server-Patches/0126-Optimize-World.isLoaded-BlockPosition-Z.patch +++ b/Spigot-Server-Patches/0126-Optimize-World.isLoaded-BlockPosition-Z.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Optimize World.isLoaded(BlockPosition)Z Reduce method invocations for World.isLoaded(BlockPosition)Z diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 3e6dc44ede30846b8c612b043c1bd625576980e8..cfd03f29e6c46c66bf3ad9253c88e27b30f313c1 100644 +index 8f7222639bcc5b4b1b8af4aa69a100a37766cb4e..2b5384d43a4bceb0113e88a2e75b3b201fc49393 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -285,6 +285,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0137-Don-t-allow-entities-to-ride-themselves-572.patch b/Spigot-Server-Patches/0137-Don-t-allow-entities-to-ride-themselves-572.patch index 685fef6cc..b0e8a63ed 100644 --- a/Spigot-Server-Patches/0137-Don-t-allow-entities-to-ride-themselves-572.patch +++ b/Spigot-Server-Patches/0137-Don-t-allow-entities-to-ride-themselves-572.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't allow entities to ride themselves - #572 diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 3e6d3c2be5fc36db4ae5d022f80f5b0bbc349704..e1c592c57e54c0c0882978b25286e06d6aaef570 100644 +index de126bf6c95e90dd9a81ee8d815806b8908709ec..e36855b969bdef5e85e6b29879f960b0675a7937 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1950,6 +1950,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0139-Cap-Entity-Collisions.patch b/Spigot-Server-Patches/0139-Cap-Entity-Collisions.patch index f71a66395..89ff13d7b 100644 --- a/Spigot-Server-Patches/0139-Cap-Entity-Collisions.patch +++ b/Spigot-Server-Patches/0139-Cap-Entity-Collisions.patch @@ -27,7 +27,7 @@ index f164844f339793860e773c499443ce160d0a6830..751551f173338217f6682532a9a5e1a2 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index e1c592c57e54c0c0882978b25286e06d6aaef570..6c60cf4ff4e7d5716c0487767b7632a59607ce23 100644 +index e36855b969bdef5e85e6b29879f960b0675a7937..13b10732917ffb823688336e888a329c774cc251 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -188,6 +188,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke 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 4244195e7..799368360 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 @@ -6,10 +6,10 @@ Subject: [PATCH] Add configuration option to prevent player names from being diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 5a83fc21cb6801d597a01fb4a83d30488f30bdb6..295b8390cbc31fc1fcb225f80ec2ff8f0df44321 100644 +index c4086de778cc2ccc958b1a94dd6e9cdb5065076c..5fa63d7ca20b88a44d8800b3ebf74e4c0e376d0b 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -259,4 +259,9 @@ public class PaperConfig { +@@ -260,4 +260,9 @@ public class PaperConfig { flyingKickPlayerMessage = getString("messages.kick.flying-player", flyingKickPlayerMessage); flyingKickVehicleMessage = getString("messages.kick.flying-vehicle", flyingKickVehicleMessage); } diff --git a/Spigot-Server-Patches/0157-Entity-fromMobSpawner.patch b/Spigot-Server-Patches/0157-Entity-fromMobSpawner.patch index dcddacb58..2d71b44b8 100644 --- a/Spigot-Server-Patches/0157-Entity-fromMobSpawner.patch +++ b/Spigot-Server-Patches/0157-Entity-fromMobSpawner.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Entity#fromMobSpawner() diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 6c60cf4ff4e7d5716c0487767b7632a59607ce23..357d9293b66eee667f49e566f6f7b5449666986e 100644 +index 13b10732917ffb823688336e888a329c774cc251..039a95a62e115f7095c38eb9a161dc0ff054a50a 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -188,6 +188,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -29,7 +29,7 @@ index 6c60cf4ff4e7d5716c0487767b7632a59607ce23..357d9293b66eee667f49e566f6f7b544 } catch (Throwable throwable) { @@ -1704,6 +1709,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke if (!originTag.isEmpty()) { - origin = new Location(world.getWorld(), originTag.getDoubleAt(0), originTag.getDoubleAt(1), originTag.getDoubleAt(2)); + origin = new org.bukkit.Location(world.getWorld(), originTag.getDoubleAt(0), originTag.getDoubleAt(1), originTag.getDoubleAt(2)); } + + spawnedViaMobSpawner = nbttagcompound.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status diff --git a/Spigot-Server-Patches/0165-Fix-MC-117075-TE-Unload-Lag-Spike.patch b/Spigot-Server-Patches/0165-Fix-MC-117075-TE-Unload-Lag-Spike.patch index 6d4d4e2c6..ff527489f 100644 --- a/Spigot-Server-Patches/0165-Fix-MC-117075-TE-Unload-Lag-Spike.patch +++ b/Spigot-Server-Patches/0165-Fix-MC-117075-TE-Unload-Lag-Spike.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix MC-117075: TE Unload Lag Spike diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index cfd03f29e6c46c66bf3ad9253c88e27b30f313c1..b1d4f955a59313d7274e39870c9a7300fe012d08 100644 +index 2b5384d43a4bceb0113e88a2e75b3b201fc49393..598a6907432ad8a7fe3b8c6389d3e5251efc913a 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -703,7 +703,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -707,7 +707,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { gameprofilerfiller.enter("blockEntities"); timings.tileEntityTick.startTiming(); // Spigot if (!this.tileEntityListUnload.isEmpty()) { diff --git a/Spigot-Server-Patches/0166-Allow-specifying-a-custom-authentication-servers-dow.patch b/Spigot-Server-Patches/0166-Allow-specifying-a-custom-authentication-servers-dow.patch index cb8773c58..f58baf0ea 100644 --- a/Spigot-Server-Patches/0166-Allow-specifying-a-custom-authentication-servers-dow.patch +++ b/Spigot-Server-Patches/0166-Allow-specifying-a-custom-authentication-servers-dow.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Allow specifying a custom "authentication servers down" kick diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 295b8390cbc31fc1fcb225f80ec2ff8f0df44321..5884b04f7e84048a9710736bd14237140ebf2cf7 100644 +index 5fa63d7ca20b88a44d8800b3ebf74e4c0e376d0b..cee8740e644c492e3d71fd58791e7d52d57e856d 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -1,5 +1,6 @@ @@ -16,7 +16,7 @@ index 295b8390cbc31fc1fcb225f80ec2ff8f0df44321..5884b04f7e84048a9710736bd1423714 import com.google.common.base.Throwables; import java.io.File; -@@ -264,4 +265,9 @@ public class PaperConfig { +@@ -265,4 +266,9 @@ public class PaperConfig { private static void suggestPlayersWhenNull() { suggestPlayersWhenNullTabCompletions = getBoolean("settings.suggest-player-names-when-null-tab-completions", suggestPlayersWhenNullTabCompletions); } diff --git a/Spigot-Server-Patches/0176-Send-attack-SoundEffects-only-to-players-who-can-see.patch b/Spigot-Server-Patches/0176-Send-attack-SoundEffects-only-to-players-who-can-see.patch index 1935a953a..42a588cf8 100644 --- a/Spigot-Server-Patches/0176-Send-attack-SoundEffects-only-to-players-who-can-see.patch +++ b/Spigot-Server-Patches/0176-Send-attack-SoundEffects-only-to-players-who-can-see.patch @@ -72,10 +72,10 @@ index 69c0a4c7bfb1c753d544dcd074ad832d3e5ef3a0..eaed020982bd19dab72872849170fa62 entity.extinguish(); } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index b1d4f955a59313d7274e39870c9a7300fe012d08..ad1841f16ea3ecfbd9c6047483a4b7bd061c1981 100644 +index 598a6907432ad8a7fe3b8c6389d3e5251efc913a..e095444d026c277c69a5d533c7b1f537ac84121e 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -640,6 +640,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -644,6 +644,11 @@ public abstract class World implements GeneratorAccess, AutoCloseable { this.playSound(entityhuman, (double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, soundeffect, soundcategory, f, f1); } diff --git a/Spigot-Server-Patches/0180-use-CB-BlockState-implementations-for-captured-block.patch b/Spigot-Server-Patches/0180-use-CB-BlockState-implementations-for-captured-block.patch index bae6f78ae..746819fb8 100644 --- a/Spigot-Server-Patches/0180-use-CB-BlockState-implementations-for-captured-block.patch +++ b/Spigot-Server-Patches/0180-use-CB-BlockState-implementations-for-captured-block.patch @@ -18,7 +18,7 @@ the blockstate that will be valid for restoration, as opposed to dropping information on restoration when the event is cancelled. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index ad1841f16ea3ecfbd9c6047483a4b7bd061c1981..6f91878fedd3bf8daedc16bcde7ac1fd042f704c 100644 +index e095444d026c277c69a5d533c7b1f537ac84121e..94219fe1e01c6e48123544f4cc14fad1ac6de834 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -71,7 +71,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -30,7 +30,7 @@ index ad1841f16ea3ecfbd9c6047483a4b7bd061c1981..6f91878fedd3bf8daedc16bcde7ac1fd public Map<BlockPosition, TileEntity> capturedTileEntities = new HashMap<>(); public List<EntityItem> captureDrops; public long ticksPerAnimalSpawns; -@@ -323,7 +323,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -327,7 +327,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public boolean a(BlockPosition blockposition, IBlockData iblockdata, int i, int j) { // CraftBukkit start - tree generation if (this.captureTreeGeneration) { @@ -39,7 +39,7 @@ index ad1841f16ea3ecfbd9c6047483a4b7bd061c1981..6f91878fedd3bf8daedc16bcde7ac1fd if (blockstate == null) { blockstate = CapturedBlockState.getTreeBlockState(this, blockposition, i); this.capturedBlockStates.put(blockposition.immutableCopy(), blockstate); -@@ -343,7 +343,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -347,7 +347,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { // CraftBukkit start - capture blockstates boolean captured = false; if (this.captureBlockStates && !this.capturedBlockStates.containsKey(blockposition)) { @@ -48,7 +48,7 @@ index ad1841f16ea3ecfbd9c6047483a4b7bd061c1981..6f91878fedd3bf8daedc16bcde7ac1fd this.capturedBlockStates.put(blockposition.immutableCopy(), blockstate); captured = true; } -@@ -601,7 +601,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -605,7 +605,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public IBlockData getType(BlockPosition blockposition) { // CraftBukkit start - tree generation if (captureTreeGeneration) { diff --git a/Spigot-Server-Patches/0203-Player.setPlayerProfile-API.patch b/Spigot-Server-Patches/0203-Player.setPlayerProfile-API.patch index 8525a40dc..fb09bf917 100644 --- a/Spigot-Server-Patches/0203-Player.setPlayerProfile-API.patch +++ b/Spigot-Server-Patches/0203-Player.setPlayerProfile-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Player.setPlayerProfile API This can be useful for changing name or skins after a player has logged in. diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 5326e7433dc0a4ff0e1d0ca30aad95b1ec718d6a..a781ac0cf8766e915c10ebd3823cbe5b0d1c5230 100644 +index 5326e7433dc0a4ff0e1d0ca30aad95b1ec718d6a..74950d74e6a11d5552369e830f9fdd63c4306221 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -65,7 +65,7 @@ public abstract class EntityHuman extends EntityLiving { @@ -14,7 +14,7 @@ index 5326e7433dc0a4ff0e1d0ca30aad95b1ec718d6a..a781ac0cf8766e915c10ebd3823cbe5b protected final float bO = 0.02F; private int g; - private final GameProfile bQ; -+ private final GameProfile bQ; public final void setProfile(final GameProfile profile) { this.bQ = profile; } // Paper - OBFHELPER ++ private GameProfile bQ; public final void setProfile(final GameProfile profile) { this.bQ = profile; } // Paper - OBFHELPER private ItemStack bS; private final ItemCooldown bT; @Nullable @@ -48,7 +48,7 @@ index 80a21dbc05ed3007f2e827f7a320131244c3044b..e0f0a1e91a037f93b239e779aa8fd92b uniqueId = i.getId(); // Paper end diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 734274db8f8c53d7e5310f2c16b1c64a42a6277c..4f0dabdb6683402d9fd0ea789381928fa06ee119 100644 +index 734274db8f8c53d7e5310f2c16b1c64a42a6277c..44850b387f84aa9a3d1ec47555026b6088fc167e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,6 +1,8 @@ @@ -60,7 +60,15 @@ index 734274db8f8c53d7e5310f2c16b1c64a42a6277c..4f0dabdb6683402d9fd0ea789381928f import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableSet; import com.google.common.io.BaseEncoding; -@@ -1216,8 +1218,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -41,6 +43,7 @@ import net.minecraft.server.EnumColor; + import net.minecraft.server.EnumGamemode; + import net.minecraft.server.GenericAttributes; + import net.minecraft.server.IChatBaseComponent; ++import net.minecraft.server.MCUtil; + import net.minecraft.server.MapIcon; + import net.minecraft.server.MinecraftKey; + import net.minecraft.server.NBTTagCompound; +@@ -1216,8 +1219,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { hiddenPlayers.put(player.getUniqueId(), hidingPlugins); // Remove this player from the hidden player's EntityTrackerEntry @@ -75,7 +83,7 @@ index 734274db8f8c53d7e5310f2c16b1c64a42a6277c..4f0dabdb6683402d9fd0ea789381928f PlayerChunkMap.EntityTracker entry = tracker.trackedEntities.get(other.getId()); if (entry != null) { entry.clear(getHandle()); -@@ -1258,8 +1265,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1258,8 +1266,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } hiddenPlayers.remove(player.getUniqueId()); @@ -90,7 +98,7 @@ index 734274db8f8c53d7e5310f2c16b1c64a42a6277c..4f0dabdb6683402d9fd0ea789381928f getHandle().playerConnection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, other)); -@@ -1268,6 +1280,49 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1268,6 +1281,49 @@ public class CraftPlayer extends CraftHumanEntity implements Player { entry.updatePlayer(getHandle()); } } @@ -126,7 +134,7 @@ index 734274db8f8c53d7e5310f2c16b1c64a42a6277c..4f0dabdb6683402d9fd0ea789381928f + reregisterPlayer(handle); + + //Respawn the player then update their position and selected slot -+ connection.sendPacket(new net.minecraft.server.PacketPlayOutRespawn(handle.dimension, net.minecraft.server.WorldData.c(handle.world.getWorldData().getSeed()), handle.world.getWorldData().getType(), handle.playerInteractManager.getGameMode())); ++ //connection.sendPacket(new net.minecraft.server.PacketPlayOutRespawn(handle.dimension, net.minecraft.server.WorldData.c(handle.world.getWorldData().getSeed()), handle.world.getWorldData().getType(), handle.playerInteractManager.getGameMode())); // TODO: Fix this if you care to make it work + handle.updateAbilities(); + connection.sendPacket(new net.minecraft.server.PacketPlayOutPosition(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch(), new HashSet<>(), 0)); + net.minecraft.server.MinecraftServer.getServer().getPlayerList().updateClient(handle); diff --git a/Spigot-Server-Patches/0206-Make-player-data-saving-configurable.patch b/Spigot-Server-Patches/0206-Make-player-data-saving-configurable.patch index a2139ce94..87ddc9131 100644 --- a/Spigot-Server-Patches/0206-Make-player-data-saving-configurable.patch +++ b/Spigot-Server-Patches/0206-Make-player-data-saving-configurable.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Make player data saving configurable diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 5884b04f7e84048a9710736bd14237140ebf2cf7..ba341e0174cdc3b5b8bc83b7430270181ea92793 100644 +index cee8740e644c492e3d71fd58791e7d52d57e856d..f22bed69f690f6e4754b87dd61cebe9c6627b12d 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -270,4 +270,13 @@ public class PaperConfig { +@@ -271,4 +271,13 @@ public class PaperConfig { private static void authenticationServersDownKickMessage() { authenticationServersDownKickMessage = Strings.emptyToNull(getString("messages.kick.authentication-servers-down", authenticationServersDownKickMessage)); } diff --git a/Spigot-Server-Patches/0209-Flag-to-disable-the-channel-limit.patch b/Spigot-Server-Patches/0209-Flag-to-disable-the-channel-limit.patch index edee7f024..1eea3b243 100644 --- a/Spigot-Server-Patches/0209-Flag-to-disable-the-channel-limit.patch +++ b/Spigot-Server-Patches/0209-Flag-to-disable-the-channel-limit.patch @@ -9,10 +9,10 @@ e.g. servers which allow and support the usage of mod packs. provide an optional flag to disable this check, at your own risk. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 4f0dabdb6683402d9fd0ea789381928fa06ee119..ec0cb22d53733bed33019b257ac06ca9dc80d19e 100644 +index 44850b387f84aa9a3d1ec47555026b6088fc167e..ac621e2a6e7a2eaba5acc1dabca5d0bef4c8b2b3 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -141,6 +141,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -142,6 +142,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Paper start private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus; private String resourcePackHash; @@ -20,7 +20,7 @@ index 4f0dabdb6683402d9fd0ea789381928fa06ee119..ec0cb22d53733bed33019b257ac06ca9 // Paper end public CraftPlayer(CraftServer server, EntityPlayer entity) { -@@ -1485,7 +1486,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1486,7 +1487,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void addChannel(String channel) { diff --git a/Spigot-Server-Patches/0216-Expand-World.spawnParticle-API-and-add-Builder.patch b/Spigot-Server-Patches/0216-Expand-World.spawnParticle-API-and-add-Builder.patch index b5d2d74d2..39200dad2 100644 --- a/Spigot-Server-Patches/0216-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/Spigot-Server-Patches/0216-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -10,7 +10,7 @@ Adds an option to control the force mode of the particle. This adds a new Builder API which is much friendlier to use. diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 6d5bb1c5183c0e7fc83e197f3a6840b2dcb1ad02..7a71e6dfea35addb7d3d33d8ce187cc2c6943de6 100644 +index 022b05be76768cf0fb702ac5f9fa48c5e474391c..0c677b8e1b1a103c7d727dba19fff1f74b7ed382 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -56,7 +56,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -22,7 +22,7 @@ index 6d5bb1c5183c0e7fc83e197f3a6840b2dcb1ad02..7a71e6dfea35addb7d3d33d8ce187cc2 public final ChunkProviderServer chunkProvider; // Paper - public boolean tickingEntities; private final MinecraftServer server; -@@ -1311,12 +1311,17 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1310,12 +1310,17 @@ public class WorldServer extends World implements GeneratorAccessSeed { } public <T extends ParticleParam> int sendParticles(EntityPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) { diff --git a/Spigot-Server-Patches/0226-Configurable-Alternative-LootPool-Luck-Formula.patch b/Spigot-Server-Patches/0226-Configurable-Alternative-LootPool-Luck-Formula.patch index f9025282c..cfcfb0363 100644 --- a/Spigot-Server-Patches/0226-Configurable-Alternative-LootPool-Luck-Formula.patch +++ b/Spigot-Server-Patches/0226-Configurable-Alternative-LootPool-Luck-Formula.patch @@ -36,10 +36,10 @@ This change will result in some major changes to fishing formulas. I would love to see this change in Vanilla, so Mojang please pull :) diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index ba341e0174cdc3b5b8bc83b7430270181ea92793..26ab855dcf38446a3d8577108bd16fdbb76126b2 100644 +index f22bed69f690f6e4754b87dd61cebe9c6627b12d..c8a7d8092a2849b62a8d83d7970756fd76100025 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -279,4 +279,12 @@ public class PaperConfig { +@@ -280,4 +280,12 @@ public class PaperConfig { "such as inventories, experience points, advancements and the like will not be saved when they log out."); } } diff --git a/Spigot-Server-Patches/0232-Implement-EntityKnockbackByEntityEvent.patch b/Spigot-Server-Patches/0232-Implement-EntityKnockbackByEntityEvent.patch index 1932c4e2b..057f304cd 100644 --- a/Spigot-Server-Patches/0232-Implement-EntityKnockbackByEntityEvent.patch +++ b/Spigot-Server-Patches/0232-Implement-EntityKnockbackByEntityEvent.patch @@ -5,11 +5,69 @@ 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 +--- 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 { + 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 + } 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 { + 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 + } + // 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 +--- 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 { + + 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 + 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..324a98bf245f410983840ef9970e7215e84f7465 100644 +index 2ffc8eb4615abfaa6a9e99c45ea436cdf6a461c8..d0a389e6dc73202a3fa7c82eace1c92dece2982e 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -1531,6 +1531,16 @@ public abstract class EntityLiving extends Entity { +@@ -1239,7 +1239,9 @@ 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 + } else { + this.aw = (float) ((int) (Math.random() * 2.0D) * 180); + } +@@ -1287,7 +1289,9 @@ 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 + } + + private boolean f(DamageSource damagesource) { +@@ -1531,8 +1535,19 @@ 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); @@ -19,10 +77,13 @@ index 2ffc8eb4615abfaa6a9e99c45ea436cdf6a461c8..324a98bf245f410983840ef9970e7215 + org.bukkit.util.Vector delta = new org.bukkit.util.Vector(currentMot.x - vec3d.x, currentMot.y - vec3d.y, currentMot.z - vec3d.z); + // Restore old velocity to be able to access it in the event + this.setMot(vec3d); -+ if (entity == null || new com.destroystokyo.paper.event.entity.EntityKnockbackByEntityEvent((LivingEntity) getBukkitEntity(), entity.getBukkitEntity(), f, delta).callEvent()) { ++ if (knockingBackEntity == null || new com.destroystokyo.paper.event.entity.EntityKnockbackByEntityEvent((LivingEntity) getBukkitEntity(), knockingBackEntity.getBukkitEntity(), f, delta).callEvent()) { + this.setMot(vec3d.x + delta.getX(), vec3d.y + delta.getY(), vec3d.z + delta.getZ()); + } + // Paper end } } ++ EntityLiving knockingBackEntity; // Paper + @Nullable + protected SoundEffect getSoundHurt(DamageSource damagesource) { diff --git a/Spigot-Server-Patches/0234-LivingEntity-Hand-Raised-Item-Use-API.patch b/Spigot-Server-Patches/0234-LivingEntity-Hand-Raised-Item-Use-API.patch index 3ed7f9cd8..3a3ca0adf 100644 --- a/Spigot-Server-Patches/0234-LivingEntity-Hand-Raised-Item-Use-API.patch +++ b/Spigot-Server-Patches/0234-LivingEntity-Hand-Raised-Item-Use-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API How long an entity has raised hands to charge an attack or use an item diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 324a98bf245f410983840ef9970e7215e84f7465..3edd63cbfc3d4bf058f7fb56a4ed4a04b80fe927 100644 +index d0a389e6dc73202a3fa7c82eace1c92dece2982e..b80068b184b32256f1944b9863454726852cd502 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -118,7 +118,7 @@ public abstract class EntityLiving extends Entity { @@ -18,7 +18,7 @@ index 324a98bf245f410983840ef9970e7215e84f7465..3edd63cbfc3d4bf058f7fb56a4ed4a04 protected int bk; protected int bl; private BlockPosition bE; -@@ -3149,10 +3149,12 @@ public abstract class EntityLiving extends Entity { +@@ -3154,10 +3154,12 @@ public abstract class EntityLiving extends Entity { return this.activeItem; } 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 076008d16..474051f83 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..785146bfb64fe1a467120d706aff7450cb9a8b96 100644 +index 87ddabbbca4ac8444ad6ff69889d7fd0542045d4..1f012667464779939cd43453dcf066a14f4fa278 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,3 +46,21 @@ index 87ddabbbca4ac8444ad6ff69889d7fd0542045d4..785146bfb64fe1a467120d706aff7450 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 90a0c9674..f22644abc 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 4893daca7ea64504731cfab455e09b0a11c65857..1f3e5c384a66bb0767cc18bdbe99b942f30faa55 100644 +index d94874b02ddcb640c9d94c99d83e77b2e55dce73..1249a7ae8fa8d6ea33cbc276717f1e4553f73b85 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 { @@ -114,10 +114,10 @@ index 70339603aa3e256470be241bf033f3471e2090ea..ef1ea58c252d063ce282d244236a5106 PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game"); cserver.getPluginManager().callEvent(playerQuitEvent); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 7a71e6dfea35addb7d3d33d8ce187cc2c6943de6..dbc7db5c52752c52b3e84b370bbf38772dc20766 100644 +index 0c677b8e1b1a103c7d727dba19fff1f74b7ed382..8a42f9ed3e1579b8b034de9321e5545505298d6b 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -968,7 +968,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -967,7 +967,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { for (TileEntity tileentity : chunk.getTileEntities().values()) { if (tileentity instanceof IInventory) { for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((IInventory) tileentity).getViewers())) { @@ -126,7 +126,7 @@ index 7a71e6dfea35addb7d3d33d8ce187cc2c6943de6..dbc7db5c52752c52b3e84b370bbf3877 } } } -@@ -1026,7 +1026,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1025,7 +1025,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { // Spigot Start if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder) { for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((org.bukkit.inventory.InventoryHolder) entity.getBukkitEntity()).getInventory().getViewers())) { @@ -155,10 +155,10 @@ 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 ec0cb22d53733bed33019b257ac06ca9dc80d19e..5575c44d6f427661de1fec2c69932b446284c54d 100644 +index ac621e2a6e7a2eaba5acc1dabca5d0bef4c8b2b3..0ba5b2a444660f280b673dbd0db9ded38fa6a839 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -788,7 +788,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -789,7 +789,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Close any foreign inventory if (getHandle().activeContainer != getHandle().defaultContainer) { diff --git a/Spigot-Server-Patches/0243-Re-add-vanilla-entity-warnings-for-duplicates.patch b/Spigot-Server-Patches/0243-Re-add-vanilla-entity-warnings-for-duplicates.patch index ce7537874..99513fb60 100644 --- a/Spigot-Server-Patches/0243-Re-add-vanilla-entity-warnings-for-duplicates.patch +++ b/Spigot-Server-Patches/0243-Re-add-vanilla-entity-warnings-for-duplicates.patch @@ -8,10 +8,10 @@ These are a critical sign that somethin went wrong, and you've lost some data... We should kind of know about these things you know. diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index dbc7db5c52752c52b3e84b370bbf38772dc20766..781b84535c105987d4b65e744977c87049b2a1a4 100644 +index 8a42f9ed3e1579b8b034de9321e5545505298d6b..c37b69b1632a72e3c7df5fd2643c0b3ff517d06b 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -958,7 +958,8 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -957,7 +957,8 @@ public class WorldServer extends World implements GeneratorAccessSeed { if (entity1 == null) { return false; } else { diff --git a/Spigot-Server-Patches/0246-add-more-information-to-Entity.toString.patch b/Spigot-Server-Patches/0246-add-more-information-to-Entity.toString.patch index d82bdcfc2..a850ab78a 100644 --- a/Spigot-Server-Patches/0246-add-more-information-to-Entity.toString.patch +++ b/Spigot-Server-Patches/0246-add-more-information-to-Entity.toString.patch @@ -6,7 +6,7 @@ Subject: [PATCH] add more information to Entity.toString() UUID, ticks lived, valid, dead diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 357d9293b66eee667f49e566f6f7b5449666986e..09567fe1628f9d2393e7902782e3cdc91531bb18 100644 +index 039a95a62e115f7095c38eb9a161dc0ff054a50a..2fcf43b7a2c5af2f7965a8556a3be9a086dc6420 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -2429,7 +2429,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0247-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/Spigot-Server-Patches/0247-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch index f4b8a2c0b..634e4ac66 100644 --- a/Spigot-Server-Patches/0247-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch +++ b/Spigot-Server-Patches/0247-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues Add -Ddebug.entities=true to your JVM flags to gain more information diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 09567fe1628f9d2393e7902782e3cdc91531bb18..c84bf924c9d1c98b469f279302d8595cece71960 100644 +index 2fcf43b7a2c5af2f7965a8556a3be9a086dc6420..f735c8cc9f68451ec64c2024769c37955e2ea963 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -76,6 +76,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -40,7 +40,7 @@ index 4ae3e91677ecf9c2104a229b4e8b229d18b87aa4..458802dc4b1f923b159168efff0546bb protected void g() { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 6f91878fedd3bf8daedc16bcde7ac1fd042f704c..8148ecad0e313d2e6c0307915aaa670e7ad5a317 100644 +index 8d9dcdce1f395025ce7f644ba25212a83a438be4..3f91ae81cf87b5455a79fa94111cecae77b9986c 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -68,6 +68,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -52,20 +52,20 @@ index 6f91878fedd3bf8daedc16bcde7ac1fd042f704c..8148ecad0e313d2e6c0307915aaa670e public boolean captureBlockStates = false; public boolean captureTreeGeneration = false; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 781b84535c105987d4b65e744977c87049b2a1a4..ac0bcde5ccc9ebb88922d8b82381b03675b87ae6 100644 +index c37b69b1632a72e3c7df5fd2643c0b3ff517d06b..9177f300e734afc5e4739655cdcb8b33866ff6cc 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -84,6 +84,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -83,6 +83,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { + public final Convertable.ConversionSession convertable; public final UUID uuid; - boolean hasPhysicsEvent = true; // Paper + private static Throwable getAddToWorldStackTrace(Entity entity) { + return new Throwable(entity + " Added to world at " + new java.util.Date()); + } - public Chunk getChunkIfLoaded(int x, int z) { + @Override public Chunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI return this.chunkProvider.getChunkAt(x, z, false); -@@ -920,8 +923,28 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -919,8 +922,28 @@ public class WorldServer extends World implements GeneratorAccessSeed { // CraftBukkit start private boolean addEntity0(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) { org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot @@ -95,7 +95,7 @@ index 781b84535c105987d4b65e744977c87049b2a1a4..ac0bcde5ccc9ebb88922d8b82381b036 // WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getName(entity.getEntityType())); // CraftBukkit return false; } else if (this.isUUIDTaken(entity)) { -@@ -1081,7 +1104,24 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1080,7 +1103,24 @@ public class WorldServer extends World implements GeneratorAccessSeed { } } diff --git a/Spigot-Server-Patches/0252-Option-to-prevent-armor-stands-from-doing-entity-loo.patch b/Spigot-Server-Patches/0252-Option-to-prevent-armor-stands-from-doing-entity-loo.patch index 547cd3815..82bb93105 100644 --- a/Spigot-Server-Patches/0252-Option-to-prevent-armor-stands-from-doing-entity-loo.patch +++ b/Spigot-Server-Patches/0252-Option-to-prevent-armor-stands-from-doing-entity-loo.patch @@ -19,10 +19,10 @@ index 387e0dcb9f01ad947daaa19211331a96742ce004..eaaa51e4bf761f41fd516402ce1ad0f9 + } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 8148ecad0e313d2e6c0307915aaa670e7ad5a317..66ce6afd46be67a131091d16b6a1221bbff333b5 100644 +index 2437b73f70594e6745a1a071e23ef1626aeddfef..ba725d77e49e4e60a951fd8bb65b8422a46d0b71 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -836,6 +836,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -840,6 +840,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { // Paper end } } diff --git a/Spigot-Server-Patches/0253-Vanished-players-don-t-have-rights.patch b/Spigot-Server-Patches/0253-Vanished-players-don-t-have-rights.patch index bf5699bc0..afd2d5c6f 100644 --- a/Spigot-Server-Patches/0253-Vanished-players-don-t-have-rights.patch +++ b/Spigot-Server-Patches/0253-Vanished-players-don-t-have-rights.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Vanished players don't have rights diff --git a/src/main/java/net/minecraft/server/BlockBase.java b/src/main/java/net/minecraft/server/BlockBase.java -index 47324feca49786b49563d3d0e854e74ad27c190b..16a8ee36ba2b23207cb8630623d542ac5943b9df 100644 +index 26d446077bb563ca3c5bb0339695b3364a3e41bf..88a1db211286fc8a6164312d7eb0839c00969e0e 100644 --- a/src/main/java/net/minecraft/server/BlockBase.java +++ b/src/main/java/net/minecraft/server/BlockBase.java @@ -453,6 +453,7 @@ public abstract class BlockBase { @@ -17,7 +17,7 @@ index 47324feca49786b49563d3d0e854e74ad27c190b..16a8ee36ba2b23207cb8630623d542ac return this.getBlock().c(this.p(), iblockaccess, blockposition, voxelshapecollision); } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index c84bf924c9d1c98b469f279302d8595cece71960..3b718673e250a1f9e12ce58481ed533151ad3754 100644 +index f735c8cc9f68451ec64c2024769c37955e2ea963..f35ebacaf7c3a583d48efe58db9583c12c9c31a1 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -98,7 +98,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -108,7 +108,7 @@ index 86f6f082fe2991ea9065b09c9680b76ca1cf7154..b6e2a3d8d0cf510f497c6f974356fafa if (operatorboolean.apply(false, false)) { throw (IllegalArgumentException) SystemUtils.c(new IllegalArgumentException()); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 66ce6afd46be67a131091d16b6a1221bbff333b5..f6cb503b8eb329cb6bfaa960f812da3c99ce45a8 100644 +index ba725d77e49e4e60a951fd8bb65b8422a46d0b71..753b9f61a2f7a1851e18748500d745906e3adee8 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -170,6 +170,46 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0255-Add-some-Debug-to-Chunk-Entity-slices.patch b/Spigot-Server-Patches/0255-Add-some-Debug-to-Chunk-Entity-slices.patch index 31cd188c1..e8239176a 100644 --- a/Spigot-Server-Patches/0255-Add-some-Debug-to-Chunk-Entity-slices.patch +++ b/Spigot-Server-Patches/0255-Add-some-Debug-to-Chunk-Entity-slices.patch @@ -58,7 +58,7 @@ index a27f91e6c3d1f5dd0adf8a3b48a640cc63676114..3ba19f75d24a1539c94f4fed9b8f90ae return; } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 3b718673e250a1f9e12ce58481ed533151ad3754..c9905e99e61ffd4f1f0a000bf18daa403a7ea7d1 100644 +index f35ebacaf7c3a583d48efe58db9583c12c9c31a1..e41c0a5891ef10ab7537f0f00ee6ab3e418d762c 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -71,6 +71,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0258-Prevent-Saving-Bad-entities-to-chunks.patch b/Spigot-Server-Patches/0258-Prevent-Saving-Bad-entities-to-chunks.patch index 3abc5efc8..5ad7dc6a8 100644 --- a/Spigot-Server-Patches/0258-Prevent-Saving-Bad-entities-to-chunks.patch +++ b/Spigot-Server-Patches/0258-Prevent-Saving-Bad-entities-to-chunks.patch @@ -80,10 +80,10 @@ index 28039aa8421207ce04840cc90e03d21bc8b7269f..17b8c4445af2bd2ed907d05ed3c396d4 public static ChunkStatus.Type a(@Nullable NBTTagCompound nbttagcompound) { if (nbttagcompound != null) { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index ac0bcde5ccc9ebb88922d8b82381b03675b87ae6..d81d6f7b984dc3587baadc96fc33f087b3594dcc 100644 +index 9177f300e734afc5e4739655cdcb8b33866ff6cc..972a2fc6febc43156b8aa0917b881c6c604ec2c1 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1001,6 +1001,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1000,6 +1000,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { List[] aentityslice = chunk.getEntitySlices(); // Spigot int i = aentityslice.length; @@ -91,7 +91,7 @@ index ac0bcde5ccc9ebb88922d8b82381b03675b87ae6..d81d6f7b984dc3587baadc96fc33f087 for (int j = 0; j < i; ++j) { List<Entity> entityslice = aentityslice[j]; // Spigot Iterator iterator = entityslice.iterator(); -@@ -1013,11 +1014,25 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1012,11 +1013,25 @@ public class WorldServer extends World implements GeneratorAccessSeed { throw (IllegalStateException) SystemUtils.c(new IllegalStateException("Removing entity while ticking!")); } diff --git a/Spigot-Server-Patches/0260-Ignore-Dead-Entities-in-entityList-iteration.patch b/Spigot-Server-Patches/0260-Ignore-Dead-Entities-in-entityList-iteration.patch index f019e41cd..b55cf6a49 100644 --- a/Spigot-Server-Patches/0260-Ignore-Dead-Entities-in-entityList-iteration.patch +++ b/Spigot-Server-Patches/0260-Ignore-Dead-Entities-in-entityList-iteration.patch @@ -51,7 +51,7 @@ index 3ba19f75d24a1539c94f4fed9b8f90aecc918cdc..f7be161c8557ae3848227b1a61e27374 if (oclass.isInstance(t0) && t0.getBoundingBox().c(axisalignedbb) && (predicate == null || predicate.test(t0))) { // Spigot - instance check list.add(t0); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index c9905e99e61ffd4f1f0a000bf18daa403a7ea7d1..7ccaaa9f2fe2a663674d2cd8a2bd759faec3f603 100644 +index e41c0a5891ef10ab7537f0f00ee6ab3e418d762c..413dd5456d14842ab48143b6ee35e37dcb5ca3db 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -195,6 +195,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -63,10 +63,10 @@ index c9905e99e61ffd4f1f0a000bf18daa403a7ea7d1..7ccaaa9f2fe2a663674d2cd8a2bd759f public float getBukkitYaw() { return this.yaw; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index d81d6f7b984dc3587baadc96fc33f087b3594dcc..ba0bb12dd5c5068d31c8a925e31804ddf2cec5da 100644 +index 972a2fc6febc43156b8aa0917b881c6c604ec2c1..afba8d654bd227ad60ec502de8834c45f239f479 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1153,6 +1153,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1152,6 +1152,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { entity.origin = entity.getBukkitEntity().getLocation(); } // Paper end @@ -74,7 +74,7 @@ index d81d6f7b984dc3587baadc96fc33f087b3594dcc..ba0bb12dd5c5068d31c8a925e31804dd new com.destroystokyo.paper.event.entity.EntityAddToWorldEvent(entity.getBukkitEntity()).callEvent(); // Paper - fire while valid } -@@ -1165,6 +1166,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1164,6 +1165,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { this.removeEntityFromChunk(entity); this.entitiesById.remove(entity.getId()); this.unregisterEntity(entity); diff --git a/Spigot-Server-Patches/0264-Break-up-and-make-tab-spam-limits-configurable.patch b/Spigot-Server-Patches/0264-Break-up-and-make-tab-spam-limits-configurable.patch index 3f1bf012f..1f0031f56 100644 --- a/Spigot-Server-Patches/0264-Break-up-and-make-tab-spam-limits-configurable.patch +++ b/Spigot-Server-Patches/0264-Break-up-and-make-tab-spam-limits-configurable.patch @@ -22,10 +22,10 @@ to take the burden of this into their own hand without having to rely on plugins doing unsafe things. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 26ab855dcf38446a3d8577108bd16fdbb76126b2..adef07d4d521b4aaa6f3389b04aa27e29bec0229 100644 +index c8a7d8092a2849b62a8d83d7970756fd76100025..2e5c71d6b7d120a308076d95a3d5b73c5aca8bc9 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -287,4 +287,18 @@ public class PaperConfig { +@@ -288,4 +288,18 @@ public class PaperConfig { Bukkit.getLogger().log(Level.INFO, "Using Aikar's Alternative Luck Formula to apply Luck attribute to all loot pool calculations. See https://luckformula.emc.gs"); } } diff --git a/Spigot-Server-Patches/0265-Add-hand-to-bucket-events.patch b/Spigot-Server-Patches/0265-Add-hand-to-bucket-events.patch index db1e261dd..0a95da626 100644 --- a/Spigot-Server-Patches/0265-Add-hand-to-bucket-events.patch +++ b/Spigot-Server-Patches/0265-Add-hand-to-bucket-events.patch @@ -64,7 +64,7 @@ index aada95b9d02d8ca0b870ec08875b5b719a543212..d68ee8d5dc5f8a75dc465f155acccb79 ((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutBlockChange(world, blockposition)); // SPIGOT-4238: needed when looking through entity ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-4541 diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index f6cb503b8eb329cb6bfaa960f812da3c99ce45a8..a47de606a82b840180bd203816955fb657cc7c6c 100644 +index aaa68008aacf2e528e6c2dc7e0307ee7dc35da12..7b7785f79ed176967d4c91c2d77c6f6ce73b30b8 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -210,6 +210,17 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -86,10 +86,10 @@ index f6cb503b8eb329cb6bfaa960f812da3c99ce45a8..a47de606a82b840180bd203816955fb6 public boolean s_() { return this.isClientSide; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index ba0bb12dd5c5068d31c8a925e31804ddf2cec5da..14ec04c6503cca58f64fc2a82a9fd715a06dcefb 100644 +index afba8d654bd227ad60ec502de8834c45f239f479..f6c459facde67500499365af6da9f43adcd80606 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1484,15 +1484,17 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1483,15 +1483,17 @@ public class WorldServer extends World implements GeneratorAccessSeed { this.getMinecraftServer().getPlayerList().sendAll(new PacketPlayOutSpawnPosition(blockposition)); } diff --git a/Spigot-Server-Patches/0268-Add-Early-Warning-Feature-to-WatchDog.patch b/Spigot-Server-Patches/0268-Add-Early-Warning-Feature-to-WatchDog.patch index 850f23006..ae4b0dfde 100644 --- a/Spigot-Server-Patches/0268-Add-Early-Warning-Feature-to-WatchDog.patch +++ b/Spigot-Server-Patches/0268-Add-Early-Warning-Feature-to-WatchDog.patch @@ -9,10 +9,10 @@ thread dumps at an interval until the point of crash. This will help diagnose what was going on in that time before the crash. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index adef07d4d521b4aaa6f3389b04aa27e29bec0229..214b577b326bc794fa3721deb6171228dd4f25e6 100644 +index 2e5c71d6b7d120a308076d95a3d5b73c5aca8bc9..1b21911c3e4fd1d4a3305176bb8477c370256906 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -24,6 +24,7 @@ import org.bukkit.configuration.file.YamlConfiguration; +@@ -25,6 +25,7 @@ import org.bukkit.configuration.file.YamlConfiguration; import co.aikar.timings.Timings; import co.aikar.timings.TimingsManager; import org.spigotmc.SpigotConfig; @@ -20,7 +20,7 @@ index adef07d4d521b4aaa6f3389b04aa27e29bec0229..214b577b326bc794fa3721deb6171228 public class PaperConfig { -@@ -288,6 +289,14 @@ public class PaperConfig { +@@ -289,6 +290,14 @@ public class PaperConfig { } } @@ -36,7 +36,7 @@ index adef07d4d521b4aaa6f3389b04aa27e29bec0229..214b577b326bc794fa3721deb6171228 public static int tabSpamLimit = 500; private static void tabSpamLimiters() { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 790d7df8691537a976086b5507db4f97054706de..a7be2875faa968d2e3939974f62c977ca03e9c5b 100644 +index d122fefe0d3b785a5aad6ceceba221279439fe7b..f33624e65a56bd7cf4432eecdd6834fa3f32cda5 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -900,6 +900,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas diff --git a/Spigot-Server-Patches/0274-Optimize-BlockPosition-helper-methods.patch b/Spigot-Server-Patches/0273-Optimize-BlockPosition-helper-methods.patch similarity index 100% rename from Spigot-Server-Patches/0274-Optimize-BlockPosition-helper-methods.patch rename to Spigot-Server-Patches/0273-Optimize-BlockPosition-helper-methods.patch diff --git a/Spigot-Server-Patches/0275-Restore-vanlla-default-mob-spawn-range.patch b/Spigot-Server-Patches/0274-Restore-vanlla-default-mob-spawn-range.patch similarity index 100% rename from Spigot-Server-Patches/0275-Restore-vanlla-default-mob-spawn-range.patch rename to Spigot-Server-Patches/0274-Restore-vanlla-default-mob-spawn-range.patch diff --git a/Spigot-Server-Patches/0276-Fix-MC-124320.patch b/Spigot-Server-Patches/0275-Fix-MC-124320.patch similarity index 100% rename from Spigot-Server-Patches/0276-Fix-MC-124320.patch rename to Spigot-Server-Patches/0275-Fix-MC-124320.patch diff --git a/Spigot-Server-Patches/0277-Slime-Pathfinder-Events.patch b/Spigot-Server-Patches/0276-Slime-Pathfinder-Events.patch similarity index 100% rename from Spigot-Server-Patches/0277-Slime-Pathfinder-Events.patch rename to Spigot-Server-Patches/0276-Slime-Pathfinder-Events.patch diff --git a/Spigot-Server-Patches/0278-Configurable-speed-for-water-flowing-over-lava.patch b/Spigot-Server-Patches/0277-Configurable-speed-for-water-flowing-over-lava.patch similarity index 90% rename from Spigot-Server-Patches/0278-Configurable-speed-for-water-flowing-over-lava.patch rename to Spigot-Server-Patches/0277-Configurable-speed-for-water-flowing-over-lava.patch index 32045df15..adaf8e057 100644 --- a/Spigot-Server-Patches/0278-Configurable-speed-for-water-flowing-over-lava.patch +++ b/Spigot-Server-Patches/0277-Configurable-speed-for-water-flowing-over-lava.patch @@ -5,12 +5,12 @@ Subject: [PATCH] Configurable speed for water flowing over lava diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index bc3df01aab3e79be9c2836820e0eacc69ea6c1f4..487b0d5cd608e84a793eba5fdbd50a9f3d95c79b 100644 +index eaaa51e4bf761f41fd516402ce1ad0f903c6ab71..3c28dc61f97a65a0440c122ac5777cb9e24cdb3a 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -399,4 +399,10 @@ public class PaperWorldConfig { - this.armorStandTick = this.getBoolean("armor-stands-tick", this.armorStandTick); - log("ArmorStand ticking is " + (this.armorStandTick ? "enabled" : "disabled") + " by default"); +@@ -393,4 +393,10 @@ public class PaperWorldConfig { + private void armorStandEntityLookups() { + armorStandEntityLookups = getBoolean("armor-stands-do-collision-entity-lookups", true); } + + public int waterOverLavaFlowSpeed; diff --git a/Spigot-Server-Patches/0278-Optimize-CraftBlockData-Creation.patch b/Spigot-Server-Patches/0278-Optimize-CraftBlockData-Creation.patch new file mode 100644 index 000000000..637c01089 --- /dev/null +++ b/Spigot-Server-Patches/0278-Optimize-CraftBlockData-Creation.patch @@ -0,0 +1,49 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: miclebrick <miclebrick@outlook.com> +Date: Thu, 23 Aug 2018 11:45:32 -0400 +Subject: [PATCH] Optimize CraftBlockData Creation + +Avoids a hashmap lookup by cacheing a reference to the CraftBlockData +and cloning it when one is needed. + +diff --git a/src/main/java/net/minecraft/server/BlockBase.java b/src/main/java/net/minecraft/server/BlockBase.java +index 88a1db211286fc8a6164312d7eb0839c00969e0e..aa4bfc9fe8e917c1c19838b0a7b045a11fc9300b 100644 +--- a/src/main/java/net/minecraft/server/BlockBase.java ++++ b/src/main/java/net/minecraft/server/BlockBase.java +@@ -323,6 +323,14 @@ public abstract class BlockBase { + this.o = blockbase_info.t; + this.p = blockbase_info.u; + } ++ // Paper start - impl cached craft block data, lazy load to fix issue with loading at the wrong time ++ private org.bukkit.craftbukkit.block.data.CraftBlockData cachedCraftBlockData; ++ ++ public org.bukkit.craftbukkit.block.data.CraftBlockData createCraftBlockData() { ++ if (cachedCraftBlockData == null) cachedCraftBlockData = org.bukkit.craftbukkit.block.data.CraftBlockData.createData(getBlockData()); ++ return (org.bukkit.craftbukkit.block.data.CraftBlockData) cachedCraftBlockData.clone(); ++ } ++ // Paper end + + public void a() { + if (!this.getBlock().o()) { +diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +index c7eed6b572cef2c735b1eb2f587c24876047cf94..bbded5671e986be34ebe3100e4c10ee0d5741764 100644 +--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java ++++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +@@ -553,7 +553,17 @@ public class CraftBlockData implements BlockData { + return craft; + } + ++ // Paper start - optimize creating BlockData to not need a map lookup ++ static { ++ // Initialize cached data for all IBlockData instances after registration ++ Block.REGISTRY_ID.iterator().forEachRemaining(IBlockData::createCraftBlockData); ++ } + public static CraftBlockData fromData(IBlockData data) { ++ return data.createCraftBlockData(); ++ } ++ ++ public static CraftBlockData createData(IBlockData data) { ++ // Paper end + return MAP.getOrDefault(data.getBlock().getClass(), CraftBlockData::new).apply(data); + } + } diff --git a/Spigot-Server-Patches/0284-Add-ray-tracing-methods-to-LivingEntity.patch b/Spigot-Server-Patches/0284-Add-ray-tracing-methods-to-LivingEntity.patch index 51df1d92f..eb583d413 100644 --- a/Spigot-Server-Patches/0284-Add-ray-tracing-methods-to-LivingEntity.patch +++ b/Spigot-Server-Patches/0284-Add-ray-tracing-methods-to-LivingEntity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add ray tracing methods to LivingEntity diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 3edd63cbfc3d4bf058f7fb56a4ed4a04b80fe927..4f80c46e327006a3d9028ca25db8554fba7b57ea 100644 +index b80068b184b32256f1944b9863454726852cd502..12e7b1b5d15e94068c85f189c4ad1c5b5fab5e38 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -3436,6 +3436,23 @@ public abstract class EntityLiving extends Entity { +@@ -3441,6 +3441,23 @@ public abstract class EntityLiving extends Entity { this.broadcastItemBreak(enumhand == EnumHand.MAIN_HAND ? EnumItemSlot.MAINHAND : EnumItemSlot.OFFHAND); } // Paper start diff --git a/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch b/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch index 11bffc82a..400cf1fe0 100644 --- a/Spigot-Server-Patches/0285-Expose-attack-cooldown-methods-for-Player.patch +++ b/Spigot-Server-Patches/0285-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 1f3e5c384a66bb0767cc18bdbe99b942f30faa55..0fd29c42179c7ac0c89cfd35b257ab0ad3ae1612 100644 +index 1249a7ae8fa8d6ea33cbc276717f1e4553f73b85..af554396fdb25719c158a81ccab76e91f5df2ff5 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -2006,14 +2006,17 @@ public abstract class EntityHuman extends EntityLiving { +@@ -2010,14 +2010,17 @@ public abstract class EntityHuman extends EntityLiving { this.datawatcher.set(EntityHuman.bs, nbttagcompound); } @@ -27,10 +27,10 @@ index 1f3e5c384a66bb0767cc18bdbe99b942f30faa55..0fd29c42179c7ac0c89cfd35b257ab0a this.aA = 0; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 5575c44d6f427661de1fec2c69932b446284c54d..3ec69b90b5e49407fc986741f189b6ea108a2118 100644 +index 0ba5b2a444660f280b673dbd0db9ded38fa6a839..7b9b7b55c0b726648cfa4b9b87ad70c91fad2d75 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1944,6 +1944,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1945,6 +1945,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { getInventory().setItemInMainHand(hand); } diff --git a/Spigot-Server-Patches/0286-Improve-death-events.patch b/Spigot-Server-Patches/0286-Improve-death-events.patch index f544dc1e6..44df65ab8 100644 --- a/Spigot-Server-Patches/0286-Improve-death-events.patch +++ b/Spigot-Server-Patches/0286-Improve-death-events.patch @@ -27,7 +27,7 @@ index 6281f7900afab3ef1c9ba3c034b91cbfa1900f50..3c2f8407906879c8dca07b538f59f4bb int i = this.f ? 300 : 100; diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 7ccaaa9f2fe2a663674d2cd8a2bd759faec3f603..4e3ea0a00b903b09e2f4d62a330f9faf5ff15f67 100644 +index 413dd5456d14842ab48143b6ee35e37dcb5ca3db..a704feb0c19b56964d017f9e0ea3f26bc3e975f8 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1460,6 +1460,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -47,10 +47,10 @@ index 7ccaaa9f2fe2a663674d2cd8a2bd759faec3f603..4e3ea0a00b903b09e2f4d62a330f9faf protected void k(double d0, double d1, double d2) { diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index d5c09152acc93b25d626284071599afdbd76b709..51e9f4a6e09474a7489d2872a800308ee3f02e46 100644 +index a70b1a17fe884980ef7c3c0a36e567a0e69ef7f0..74c58c3f82a94a3ec5e53c7f92e54cee80dc9e8a 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java -@@ -701,7 +701,8 @@ public class EntityArmorStand extends EntityLiving { +@@ -664,7 +664,8 @@ public class EntityArmorStand extends EntityLiving { @Override public void killEntity() { @@ -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 4f80c46e327006a3d9028ca25db8554fba7b57ea..7105192a5cd8666ac46dcd8a524709d7e429d1b0 100644 +index 12e7b1b5d15e94068c85f189c4ad1c5b5fab5e38..c00031656bb6d2f986f555c68bb2fa9b9b0c0e6d 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 4f80c46e327006a3d9028ca25db8554fba7b57ea..7105192a5cd8666ac46dcd8a524709d7 @Override public float getBukkitYaw() { -@@ -1248,13 +1249,17 @@ public abstract class EntityLiving extends Entity { +@@ -1250,13 +1251,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 4f80c46e327006a3d9028ca25db8554fba7b57ea..7105192a5cd8666ac46dcd8a524709d7 } } else if (flag1) { this.c(damagesource); -@@ -1392,6 +1397,7 @@ public abstract class EntityLiving extends Entity { +@@ -1396,6 +1401,7 @@ public abstract class EntityLiving extends Entity { Entity entity = damagesource.getEntity(); EntityLiving entityliving = this.getKillingEntity(); @@ -169,7 +169,7 @@ index 4f80c46e327006a3d9028ca25db8554fba7b57ea..7105192a5cd8666ac46dcd8a524709d7 if (this.aV >= 0 && entityliving != null) { entityliving.a(this, this.aV, damagesource); } -@@ -1403,16 +1409,36 @@ public abstract class EntityLiving extends Entity { +@@ -1407,16 +1413,36 @@ public abstract class EntityLiving extends Entity { if (this.isSleeping()) { this.entityWakeup(); } @@ -208,7 +208,7 @@ index 4f80c46e327006a3d9028ca25db8554fba7b57ea..7105192a5cd8666ac46dcd8a524709d7 } } -@@ -1420,7 +1446,7 @@ public abstract class EntityLiving extends Entity { +@@ -1424,7 +1450,7 @@ public abstract class EntityLiving extends Entity { if (!this.world.isClientSide) { boolean flag = false; @@ -217,7 +217,7 @@ index 4f80c46e327006a3d9028ca25db8554fba7b57ea..7105192a5cd8666ac46dcd8a524709d7 if (this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) { BlockPosition blockposition = this.getChunkCoordinates(); IBlockData iblockdata = Blocks.WITHER_ROSE.getBlockData(); -@@ -1441,7 +1467,8 @@ public abstract class EntityLiving extends Entity { +@@ -1445,7 +1471,8 @@ public abstract class EntityLiving extends Entity { } } @@ -227,7 +227,7 @@ index 4f80c46e327006a3d9028ca25db8554fba7b57ea..7105192a5cd8666ac46dcd8a524709d7 Entity entity = damagesource.getEntity(); int i; -@@ -1454,22 +1481,26 @@ public abstract class EntityLiving extends Entity { +@@ -1458,22 +1485,26 @@ public abstract class EntityLiving extends Entity { boolean flag = this.lastDamageByPlayerTime > 0; this.dropInventory(); // CraftBukkit - from below @@ -257,7 +257,7 @@ index 4f80c46e327006a3d9028ca25db8554fba7b57ea..7105192a5cd8666ac46dcd8a524709d7 // CraftBukkit start public int getExpReward() { -@@ -1549,6 +1580,7 @@ public abstract class EntityLiving extends Entity { +@@ -1554,6 +1585,7 @@ public abstract class EntityLiving extends Entity { return SoundEffects.ENTITY_GENERIC_HURT; } @@ -265,7 +265,7 @@ index 4f80c46e327006a3d9028ca25db8554fba7b57ea..7105192a5cd8666ac46dcd8a524709d7 @Nullable protected SoundEffect getSoundDeath() { return SoundEffects.ENTITY_GENERIC_DEATH; -@@ -2068,10 +2100,12 @@ public abstract class EntityLiving extends Entity { +@@ -2073,10 +2105,12 @@ public abstract class EntityLiving extends Entity { } @@ -357,10 +357,10 @@ index 7b565ddfffd0b9c78392ee115ef9c20ab89a3380..d78b9fd608da691220f1edeff506b36e this.minecraftKey = minecraftKey; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 3ec69b90b5e49407fc986741f189b6ea108a2118..e112a87792a76ccbc25caa1253c54db601de76aa 100644 +index 7b9b7b55c0b726648cfa4b9b87ad70c91fad2d75..51e7c6d82248b5c0938d37607c64a9c10cb4de4d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1738,7 +1738,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1739,7 +1739,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void sendHealthUpdate() { diff --git a/Spigot-Server-Patches/0293-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch b/Spigot-Server-Patches/0293-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch index b4461e819..9e95ad585 100644 --- a/Spigot-Server-Patches/0293-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch +++ b/Spigot-Server-Patches/0293-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch @@ -6,18 +6,18 @@ Subject: [PATCH] Optimize Biome Mob Lookups for Mob Spawning Uses an EnumMap as well as a Set paired List for O(1) contains calls. diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java -index ae0ac8d383ca11a683465d8c83a8b8a66e567079..4c656f434f2637a6af4cdb9efe3414de81e4ea9b 100644 +index ae0ac8d383ca11a683465d8c83a8b8a66e567079..30aeb45d63394b7d91c2dd7b92cfc9cefa3c088c 100644 --- a/src/main/java/net/minecraft/server/BiomeBase.java +++ b/src/main/java/net/minecraft/server/BiomeBase.java -@@ -69,7 +69,7 @@ public class BiomeBase { - protected final Map<WorldGenStage.Decoration, List<WorldGenFeatureConfigured<?, ?>>> r; - protected final List<WorldGenFeatureConfigured<?, ?>> s = Lists.newArrayList(); - private final Map<StructureGenerator<?>, StructureFeature<?, ?>> u; -- private final Map<EnumCreatureType, List<BiomeBase.BiomeMeta>> v; -+ private final Map<EnumCreatureType, List<BiomeBase.BiomeMeta>> v = Maps.newEnumMap(EnumCreatureType.class); // Paper - private final Map<EntityTypes<?>, BiomeBase.e> w = Maps.newHashMap(); - private final List<BiomeBase.d> x; - private final ThreadLocal<Long2FloatLinkedOpenHashMap> y = ThreadLocal.withInitial(() -> { +@@ -119,7 +119,7 @@ public class BiomeBase { + this.r.put(worldgenstage_decoration, Lists.newArrayList()); + } + +- this.v = Maps.newHashMap(); ++ this.v = Maps.newEnumMap(EnumCreatureType.class); // Paper + EnumCreatureType[] aenumcreaturetype = EnumCreatureType.values(); + + i = aenumcreaturetype.length; @@ -127,7 +127,7 @@ public class BiomeBase { for (j = 0; j < i; ++j) { EnumCreatureType enumcreaturetype = aenumcreaturetype[j]; @@ -27,6 +27,15 @@ index ae0ac8d383ca11a683465d8c83a8b8a66e567079..4c656f434f2637a6af4cdb9efe3414de } } else { +@@ -150,7 +150,7 @@ public class BiomeBase { + this.u = (Map) list.stream().collect(Collectors.toMap((structurefeature) -> { + return structurefeature.b; + }, Function.identity())); +- this.v = map2; ++ this.v = Maps.newEnumMap(EnumCreatureType.class); this.v.putAll(map2); // Paper + this.x = list1; + this.l = (String) optional.orElse(null); // Paper - decompile fix + Stream stream = map1.values().stream().flatMap(Collection::stream).filter((worldgenfeatureconfigured) -> { @@ -433,6 +433,38 @@ public class BiomeBase { return this.l; } diff --git a/Spigot-Server-Patches/0295-Optimize-Server-World-Map.patch b/Spigot-Server-Patches/0295-Optimize-Server-World-Map.patch deleted file mode 100644 index cdcdcc4d1..000000000 --- a/Spigot-Server-Patches/0295-Optimize-Server-World-Map.patch +++ /dev/null @@ -1,242 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aikar <aikar@aikar.co> -Date: Mon, 17 Sep 2018 23:37:31 -0400 -Subject: [PATCH] Optimize Server World Map - -Minecraft moved worlds to a hashmap in 1.13.1. -This creates inconsistent order for iteration of the map. - -This patch restores World management to be back as an Array. - -.values() will allow us to iterate as it was pre 1.13.1 by -ArrayList, giving consistent ordering and effecient iteration performance. - -KeySet and EntrySet iteration is proxied to the List iterator, -and should retain manipulation behavior but nothing should be doing that. - -Getting a World by dimension ID is now back a constant time operation. - -Hopefully no other plugins try to mess with this map, as we are only handling -known NMS used methods, but we can add more if naughty plugins are found later. - -diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldMap.java b/src/main/java/com/destroystokyo/paper/PaperWorldMap.java -new file mode 100644 -index 0000000000000000000000000000000000000000..0f0c5330c364909c85cc8cf58fb5c478ffdaeb25 ---- /dev/null -+++ b/src/main/java/com/destroystokyo/paper/PaperWorldMap.java -@@ -0,0 +1,193 @@ -+package com.destroystokyo.paper; -+ -+import net.minecraft.server.DimensionManager; -+import net.minecraft.server.ResourceKey; -+import net.minecraft.server.World; -+import net.minecraft.server.WorldServer; -+ -+import javax.annotation.Nonnull; -+import java.util.AbstractSet; -+import java.util.ArrayList; -+import java.util.Collection; -+import java.util.HashMap; -+import java.util.Iterator; -+import java.util.List; -+import java.util.Map; -+import java.util.Set; -+ -+public class PaperWorldMap extends HashMap<ResourceKey<World>, WorldServer> { -+ private final List<WorldServer> worlds = new ArrayList<>(); -+ private final List<WorldServer> worldsIterable = new ArrayList<WorldServer>() { -+ @Override -+ public Iterator<WorldServer> iterator() { -+ Iterator<WorldServer> iterator = super.iterator(); -+ return new Iterator<WorldServer>() { -+ private WorldServer last; -+ -+ @Override -+ public boolean hasNext() { -+ return iterator.hasNext(); -+ } -+ -+ @Override -+ public WorldServer next() { -+ this.last = iterator.next(); -+ return last; -+ } -+ -+ @Override -+ public void remove() { -+ worlds.set(last.worldProvider.getDimensionManager().getDimensionID() + 1, null); -+ } -+ }; -+ } -+ }; -+ @Override -+ public int size() { -+ return worldsIterable.size(); -+ } -+ -+ @Override -+ public boolean isEmpty() { -+ return worldsIterable.isEmpty(); -+ } -+ -+ @Override -+ public WorldServer get(Object key) { -+ // Will hit the below method -+ return key instanceof ResourceKey ? get((ResourceKey<World>) key) : null; -+ } -+ // TODO figure out what to do with dimension ids -+ public WorldServer get(ResourceKey<World> key) { -+ int id = key.getDimensionID()+1; -+ return worlds.size() > id ? worlds.get(id) : null; -+ } -+ -+ @Override -+ public boolean containsKey(Object key) { -+ // will hit below method -+ return key instanceof DimensionManager && containsKey((DimensionManager) key); -+ } -+ public boolean containsKey(DimensionManager key) { -+ return get(key) != null; -+ } -+ -+ @Override -+ public WorldServer put(ResourceKey<World> key, WorldServer value) { -+ while (worlds.size() <= key.getDimensionID()+1) { -+ worlds.add(null); -+ } -+ WorldServer old = worlds.set(key.getDimensionID()+1, value); -+ if (old != null) { -+ worldsIterable.remove(old); -+ } -+ worldsIterable.add(value); -+ return old; -+ } -+ -+ @Override -+ public void putAll(Map<? extends ResourceKey<World>, ? extends WorldServer> m) { -+ for (Entry<? extends ResourceKey<World>, ? extends WorldServer> e : m.entrySet()) { -+ put(e.getKey(), e.getValue()); -+ } -+ } -+ -+ @Override -+ public WorldServer remove(Object key) { -+ return key instanceof DimensionManager ? remove((DimensionManager) key) : null; -+ } -+ -+ public WorldServer remove(DimensionManager key) { -+ WorldServer old; -+ if (key.getDimensionID()+1 == worlds.size() - 1) { -+ old = worlds.remove(key.getDimensionID()+1); -+ } else { -+ old = worlds.set(key.getDimensionID() + 1, null); -+ } -+ if (old != null) { -+ worldsIterable.remove(old); -+ } -+ return old; -+ } -+ -+ @Override -+ public void clear() { -+ throw new RuntimeException("What the hell are you doing?"); -+ } -+ -+ @Override -+ public boolean containsValue(Object value) { -+ return value instanceof WorldServer && get(((WorldServer) value).getDimensionKey()) != null; -+ } -+ -+ @Nonnull -+ @Override -+ public Set<ResourceKey<World>> keySet() { -+ return new AbstractSet<ResourceKey<World>>() { -+ @Override -+ public Iterator<ResourceKey<World>> iterator() { -+ Iterator<WorldServer> iterator = worldsIterable.iterator(); -+ return new Iterator<ResourceKey<World>>() { -+ -+ @Override -+ public boolean hasNext() { -+ return iterator.hasNext(); -+ } -+ -+ @Override -+ public ResourceKey<World> next() { -+ return iterator.next().getDimensionKey(); -+ } -+ -+ @Override -+ public void remove() { -+ iterator.remove(); -+ } -+ }; -+ } -+ -+ @Override -+ public int size() { -+ return worlds.size(); -+ } -+ }; -+ } -+ -+ @Override -+ public Collection<WorldServer> values() { -+ return worldsIterable; -+ } -+ -+ @Override -+ public Set<Entry<ResourceKey<World>, WorldServer>> entrySet() { -+ return new AbstractSet<Entry<ResourceKey<World>, WorldServer>>() { -+ @Override -+ public Iterator<Entry<ResourceKey<World>, WorldServer>> iterator() { -+ Iterator<WorldServer> iterator = worldsIterable.iterator(); -+ return new Iterator<Entry<ResourceKey<World>, WorldServer>>() { -+ -+ @Override -+ public boolean hasNext() { -+ return iterator.hasNext(); -+ } -+ -+ @Override -+ public Entry<ResourceKey<World>, WorldServer> next() { -+ WorldServer entry = iterator.next(); -+ return new SimpleEntry<>(entry.getDimensionKey(), entry); -+ } -+ -+ @Override -+ public void remove() { -+ iterator.remove(); -+ } -+ }; -+ } -+ -+ @Override -+ public int size() { -+ return worldsIterable.size(); -+ } -+ }; -+ } -+} -diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index a7be2875faa968d2e3939974f62c977ca03e9c5b..1d4ec1412db104a6437b57afe192063188fabd10 100644 ---- a/src/main/java/net/minecraft/server/MinecraftServer.java -+++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -91,7 +91,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas - private String serverIp; - private int serverPort; - public final IRegistryCustom.Dimension f; -- public final Map<ResourceKey<World>, WorldServer> worldServer; -+ public final Map<ResourceKey<World>, WorldServer> worldServer = new com.destroystokyo.paper.PaperWorldMap(); // Paper; - private PlayerList playerList; - private volatile boolean isRunning; - private volatile boolean isRestarting = false; // Paper - flag to signify we're attempting to restart -@@ -441,7 +441,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas - } - } - this.updateWorldSettings(); -- for (WorldServer worldserver : this.getWorlds()) { -+ for (WorldServer worldserver : com.google.common.collect.Lists.newArrayList(this.getWorlds())) { // Paper - avoid como if 1 world triggers another world - this.loadSpawn(worldserver.getChunkProvider().playerChunkMap.worldLoadListener, worldserver); - this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldLoadEvent(worldserver.getWorld())); - } diff --git a/Spigot-Server-Patches/0296-PreSpawnerSpawnEvent.patch b/Spigot-Server-Patches/0295-PreSpawnerSpawnEvent.patch similarity index 100% rename from Spigot-Server-Patches/0296-PreSpawnerSpawnEvent.patch rename to Spigot-Server-Patches/0295-PreSpawnerSpawnEvent.patch diff --git a/Spigot-Server-Patches/0297-Catch-JsonParseException-in-Entity-and-TE-names.patch b/Spigot-Server-Patches/0296-Catch-JsonParseException-in-Entity-and-TE-names.patch similarity index 100% rename from Spigot-Server-Patches/0297-Catch-JsonParseException-in-Entity-and-TE-names.patch rename to Spigot-Server-Patches/0296-Catch-JsonParseException-in-Entity-and-TE-names.patch diff --git a/Spigot-Server-Patches/0298-Honor-EntityAgeable.ageLock.patch b/Spigot-Server-Patches/0297-Honor-EntityAgeable.ageLock.patch similarity index 100% rename from Spigot-Server-Patches/0298-Honor-EntityAgeable.ageLock.patch rename to Spigot-Server-Patches/0297-Honor-EntityAgeable.ageLock.patch diff --git a/Spigot-Server-Patches/0299-Configurable-connection-throttle-kick-message.patch b/Spigot-Server-Patches/0298-Configurable-connection-throttle-kick-message.patch similarity index 94% rename from Spigot-Server-Patches/0299-Configurable-connection-throttle-kick-message.patch rename to Spigot-Server-Patches/0298-Configurable-connection-throttle-kick-message.patch index 1ba9b1427..521d110f6 100644 --- a/Spigot-Server-Patches/0299-Configurable-connection-throttle-kick-message.patch +++ b/Spigot-Server-Patches/0298-Configurable-connection-throttle-kick-message.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable connection throttle kick message diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 214b577b326bc794fa3721deb6171228dd4f25e6..19c5d2047040c43711339a0206bd01df8e03b5ea 100644 +index 1b21911c3e4fd1d4a3305176bb8477c370256906..d5c97bb6503c9bfafd819dd62397b9decd515df5 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -272,6 +272,11 @@ public class PaperConfig { +@@ -273,6 +273,11 @@ public class PaperConfig { authenticationServersDownKickMessage = Strings.emptyToNull(getString("messages.kick.authentication-servers-down", authenticationServersDownKickMessage)); } diff --git a/Spigot-Server-Patches/0300-Hook-into-CB-plugin-rewrites.patch b/Spigot-Server-Patches/0299-Hook-into-CB-plugin-rewrites.patch similarity index 100% rename from Spigot-Server-Patches/0300-Hook-into-CB-plugin-rewrites.patch rename to Spigot-Server-Patches/0299-Hook-into-CB-plugin-rewrites.patch diff --git a/Spigot-Server-Patches/0301-Allow-setting-the-vex-s-summoner.patch b/Spigot-Server-Patches/0300-Allow-setting-the-vex-s-summoner.patch similarity index 100% rename from Spigot-Server-Patches/0301-Allow-setting-the-vex-s-summoner.patch rename to Spigot-Server-Patches/0300-Allow-setting-the-vex-s-summoner.patch diff --git a/Spigot-Server-Patches/0302-Add-sun-related-API.patch b/Spigot-Server-Patches/0301-Add-sun-related-API.patch similarity index 92% rename from Spigot-Server-Patches/0302-Add-sun-related-API.patch rename to Spigot-Server-Patches/0301-Add-sun-related-API.patch index 6ef848fd8..05d2cd888 100644 --- a/Spigot-Server-Patches/0302-Add-sun-related-API.patch +++ b/Spigot-Server-Patches/0301-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 a38a1f3447accd51dcd295fb28c4108cb87ad832..df98f2244a161c0e66e80f92c91760409734dc69 100644 +index 1b824bd3757b7e6723254c9cb2badaafbd2de2de..7c9b437d950623a978ca3d45c8ca57b39a897179 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -1509,6 +1509,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1511,6 +1511,7 @@ public abstract class EntityInsentient extends EntityLiving { } diff --git a/Spigot-Server-Patches/0303-Turtle-API.patch b/Spigot-Server-Patches/0302-Turtle-API.patch similarity index 95% rename from Spigot-Server-Patches/0303-Turtle-API.patch rename to Spigot-Server-Patches/0302-Turtle-API.patch index 3052a291a..9e8e556e6 100644 --- a/Spigot-Server-Patches/0303-Turtle-API.patch +++ b/Spigot-Server-Patches/0302-Turtle-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Turtle API diff --git a/src/main/java/net/minecraft/server/EntityTurtle.java b/src/main/java/net/minecraft/server/EntityTurtle.java -index dd745894614982fad6277e77b98bed75fc2a2f55..5862e2026b685df80de45c529f1367382a2a60b0 100644 +index dd745894614982fad6277e77b98bed75fc2a2f55..00827c335e9413e986d7f07d0adbcef0d106a553 100644 --- a/src/main/java/net/minecraft/server/EntityTurtle.java +++ b/src/main/java/net/minecraft/server/EntityTurtle.java @@ -27,10 +27,12 @@ public class EntityTurtle extends EntityAnimal { @@ -22,7 +22,12 @@ index dd745894614982fad6277e77b98bed75fc2a2f55..5862e2026b685df80de45c529f136738 private BlockPosition getHomePos() { return (BlockPosition) this.datawatcher.get(EntityTurtle.bw); } -@@ -51,27 +53,33 @@ public class EntityTurtle extends EntityAnimal { +@@ -47,31 +49,37 @@ public class EntityTurtle extends EntityAnimal { + return (Boolean) this.datawatcher.get(EntityTurtle.bx); + } + +- private void setHasEgg(boolean flag) { ++ public void setHasEgg(boolean flag) { // Paper this.datawatcher.set(EntityTurtle.bx, flag); } diff --git a/Spigot-Server-Patches/0304-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch b/Spigot-Server-Patches/0303-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch similarity index 100% rename from Spigot-Server-Patches/0304-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch rename to Spigot-Server-Patches/0303-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch diff --git a/Spigot-Server-Patches/0305-Call-player-spectator-target-events-and-improve-impl.patch b/Spigot-Server-Patches/0304-Call-player-spectator-target-events-and-improve-impl.patch similarity index 100% rename from Spigot-Server-Patches/0305-Call-player-spectator-target-events-and-improve-impl.patch rename to Spigot-Server-Patches/0304-Call-player-spectator-target-events-and-improve-impl.patch diff --git a/Spigot-Server-Patches/0306-Add-Velocity-IP-Forwarding-Support.patch b/Spigot-Server-Patches/0305-Add-Velocity-IP-Forwarding-Support.patch similarity index 98% rename from Spigot-Server-Patches/0306-Add-Velocity-IP-Forwarding-Support.patch rename to Spigot-Server-Patches/0305-Add-Velocity-IP-Forwarding-Support.patch index 6978ec5f3..662903f8f 100644 --- a/Spigot-Server-Patches/0306-Add-Velocity-IP-Forwarding-Support.patch +++ b/Spigot-Server-Patches/0305-Add-Velocity-IP-Forwarding-Support.patch @@ -14,7 +14,7 @@ forwarding, and is integrated into the Minecraft login process by using the 1.13 login plugin message packet. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 19c5d2047040c43711339a0206bd01df8e03b5ea..29cab8730a5e61aeb8bf4d69ccad192c1ff975f4 100644 +index d5c97bb6503c9bfafd819dd62397b9decd515df5..478856f190a8d0177dee39dab4692fc54f9c8ed4 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -8,6 +8,7 @@ import java.io.IOException; @@ -25,7 +25,7 @@ index 19c5d2047040c43711339a0206bd01df8e03b5ea..29cab8730a5e61aeb8bf4d69ccad192c import java.util.HashMap; import java.util.List; import java.util.Map; -@@ -243,7 +244,7 @@ public class PaperConfig { +@@ -244,7 +245,7 @@ public class PaperConfig { } public static boolean isProxyOnlineMode() { @@ -34,7 +34,7 @@ index 19c5d2047040c43711339a0206bd01df8e03b5ea..29cab8730a5e61aeb8bf4d69ccad192c } public static int packetInSpamThreshold = 300; -@@ -315,4 +316,21 @@ public class PaperConfig { +@@ -316,4 +317,21 @@ public class PaperConfig { } tabSpamLimit = getInt("settings.spam-limiter.tab-spam-limit", tabSpamLimit); } diff --git a/Spigot-Server-Patches/0307-Add-more-Witch-API.patch b/Spigot-Server-Patches/0306-Add-more-Witch-API.patch similarity index 100% rename from Spigot-Server-Patches/0307-Add-more-Witch-API.patch rename to Spigot-Server-Patches/0306-Add-more-Witch-API.patch diff --git a/Spigot-Server-Patches/0307-Check-Drowned-for-Villager-Aggression-Config.patch b/Spigot-Server-Patches/0307-Check-Drowned-for-Villager-Aggression-Config.patch new file mode 100644 index 000000000..7a253dc8f --- /dev/null +++ b/Spigot-Server-Patches/0307-Check-Drowned-for-Villager-Aggression-Config.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: BillyGalbreath <Blake.Galbreath@GMail.com> +Date: Wed, 10 Oct 2018 21:22:44 -0500 +Subject: [PATCH] Check Drowned for Villager Aggression Config + + +diff --git a/src/main/java/net/minecraft/server/EntityDrowned.java b/src/main/java/net/minecraft/server/EntityDrowned.java +index 1f1f77776d840c6fa1156239a1da9bb97a328fb1..e6425bdf1a85e773f5555db1aebe7e159f7cd37c 100644 +--- a/src/main/java/net/minecraft/server/EntityDrowned.java ++++ b/src/main/java/net/minecraft/server/EntityDrowned.java +@@ -29,7 +29,7 @@ public class EntityDrowned extends EntityZombie implements IRangedEntity { + this.goalSelector.a(7, new PathfinderGoalRandomStroll(this, 1.0D)); + this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[]{EntityDrowned.class})).a(EntityPigZombie.class)); + this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, 10, true, false, this::j)); +- this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false)); ++ if ( world.spigotConfig.zombieAggressiveTowardsVillager ) this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false)); // Paper + this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityIronGolem.class, true)); + this.targetSelector.a(5, new PathfinderGoalNearestAttackableTarget<>(this, EntityTurtle.class, 10, true, false, EntityTurtle.bv)); + } diff --git a/Spigot-Server-Patches/0308-Here-s-Johnny.patch b/Spigot-Server-Patches/0308-Here-s-Johnny.patch new file mode 100644 index 000000000..ce187e9c8 --- /dev/null +++ b/Spigot-Server-Patches/0308-Here-s-Johnny.patch @@ -0,0 +1,38 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: BillyGalbreath <Blake.Galbreath@GMail.com> +Date: Fri, 12 Oct 2018 01:37:22 -0500 +Subject: [PATCH] Here's Johnny! + + +diff --git a/src/main/java/net/minecraft/server/EntityVindicator.java b/src/main/java/net/minecraft/server/EntityVindicator.java +index 9c152b79164710d3d4175d0acbc9548d61390097..58315906b641ba46ce73b6fefc43ea333bb0a088 100644 +--- a/src/main/java/net/minecraft/server/EntityVindicator.java ++++ b/src/main/java/net/minecraft/server/EntityVindicator.java +@@ -11,7 +11,7 @@ public class EntityVindicator extends EntityIllagerAbstract { + private static final Predicate<EnumDifficulty> b = (enumdifficulty) -> { + return enumdifficulty == EnumDifficulty.NORMAL || enumdifficulty == EnumDifficulty.HARD; + }; +- private boolean bv; ++ private boolean bv; public boolean isJohnny() { return bv; } public void setJohnny(boolean johnny) { bv = johnny; } // Paper - OBFHELPER + + public EntityVindicator(EntityTypes<? extends EntityVindicator> entitytypes, World world) { + super(entitytypes, world); +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java +index 951d47929893fce38183b81cf4ec6a7d4204acd1..5ff957ced7a86f4fa3a0751b4eed5a6fdc525da4 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java +@@ -25,4 +25,14 @@ public class CraftVindicator extends CraftIllager implements Vindicator { + public EntityType getType() { + return EntityType.VINDICATOR; + } ++ ++ // Paper start ++ public boolean isJohnny() { ++ return getHandle().isJohnny(); ++ } ++ ++ public void setJohnny(boolean johnny) { ++ getHandle().setJohnny(johnny); ++ } ++ // Paper end + } diff --git a/Spigot-Server-Patches/0308-Add-option-to-prevent-players-from-moving-into-unloa.patch b/Spigot-Server-Patches/0309-Add-option-to-prevent-players-from-moving-into-unloa.patch similarity index 96% rename from Spigot-Server-Patches/0308-Add-option-to-prevent-players-from-moving-into-unloa.patch rename to Spigot-Server-Patches/0309-Add-option-to-prevent-players-from-moving-into-unloa.patch index 189701cc3..c826b39ad 100644 --- a/Spigot-Server-Patches/0308-Add-option-to-prevent-players-from-moving-into-unloa.patch +++ b/Spigot-Server-Patches/0309-Add-option-to-prevent-players-from-moving-into-unloa.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add option to prevent players from moving into unloaded diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 487b0d5cd608e84a793eba5fdbd50a9f3d95c79b..b49a1a6f5017c9e183a7d08b16e89899c25a9717 100644 +index 3c28dc61f97a65a0440c122ac5777cb9e24cdb3a..6f660388aa0d56577ad1c3f463c96d925c964821 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -405,4 +405,9 @@ public class PaperWorldConfig { +@@ -399,4 +399,9 @@ public class PaperWorldConfig { waterOverLavaFlowSpeed = getInt("water-over-lava-flow-speed", 5); log("Water over lava flow speed: " + waterOverLavaFlowSpeed); } diff --git a/Spigot-Server-Patches/0309-Reset-players-airTicks-on-respawn.patch b/Spigot-Server-Patches/0310-Reset-players-airTicks-on-respawn.patch similarity index 93% rename from Spigot-Server-Patches/0309-Reset-players-airTicks-on-respawn.patch rename to Spigot-Server-Patches/0310-Reset-players-airTicks-on-respawn.patch index 92ecb5f73..695aa03bb 100644 --- a/Spigot-Server-Patches/0309-Reset-players-airTicks-on-respawn.patch +++ b/Spigot-Server-Patches/0310-Reset-players-airTicks-on-respawn.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Reset players airTicks on respawn diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 4e3ea0a00b903b09e2f4d62a330f9faf5ff15f67..58ecc49ba91cdb9c100ce3319434f2110b9a5892 100644 +index a704feb0c19b56964d017f9e0ea3f26bc3e975f8..41c14d367e0b51e109001167d3c7b40676f364b8 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -2256,6 +2256,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0310-Don-t-sleep-after-profile-lookups-if-not-needed.patch b/Spigot-Server-Patches/0311-Don-t-sleep-after-profile-lookups-if-not-needed.patch similarity index 100% rename from Spigot-Server-Patches/0310-Don-t-sleep-after-profile-lookups-if-not-needed.patch rename to Spigot-Server-Patches/0311-Don-t-sleep-after-profile-lookups-if-not-needed.patch diff --git a/Spigot-Server-Patches/0311-Improve-Server-Thread-Pool-and-Thread-Priorities.patch b/Spigot-Server-Patches/0312-Improve-Server-Thread-Pool-and-Thread-Priorities.patch similarity index 97% rename from Spigot-Server-Patches/0311-Improve-Server-Thread-Pool-and-Thread-Priorities.patch rename to Spigot-Server-Patches/0312-Improve-Server-Thread-Pool-and-Thread-Priorities.patch index dd6bcdf54..d4913bb16 100644 --- a/Spigot-Server-Patches/0311-Improve-Server-Thread-Pool-and-Thread-Priorities.patch +++ b/Spigot-Server-Patches/0312-Improve-Server-Thread-Pool-and-Thread-Priorities.patch @@ -12,7 +12,7 @@ server threads Allow usage of a single thread executor by not using ForkJoin so single core CPU's. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 1d4ec1412db104a6437b57afe192063188fabd10..e4f033d5ad66da5a38e5bfee861e9ea3399f30fe 100644 +index a7be2875faa968d2e3939974f62c977ca03e9c5b..29f7e78fc21ccca1a080055fe616996d1ede666f 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -176,6 +176,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas diff --git a/Spigot-Server-Patches/0312-Optimize-World-Time-Updates.patch b/Spigot-Server-Patches/0313-Optimize-World-Time-Updates.patch similarity index 96% rename from Spigot-Server-Patches/0312-Optimize-World-Time-Updates.patch rename to Spigot-Server-Patches/0313-Optimize-World-Time-Updates.patch index 3767af10e..399bcc49d 100644 --- a/Spigot-Server-Patches/0312-Optimize-World-Time-Updates.patch +++ b/Spigot-Server-Patches/0313-Optimize-World-Time-Updates.patch @@ -8,7 +8,7 @@ the updates per world, so that we can re-use the same packet object for every player unless they have per-player time enabled. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index e4f033d5ad66da5a38e5bfee861e9ea3399f30fe..4c610db03f4d8bae0e310d6a0680cefb7bc74872 100644 +index 29f7e78fc21ccca1a080055fe616996d1ede666f..b336cd541b8e3a9ebe3d89a487160d18a294dade 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1197,12 +1197,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas diff --git a/Spigot-Server-Patches/0313-Restore-custom-InventoryHolder-support.patch b/Spigot-Server-Patches/0314-Restore-custom-InventoryHolder-support.patch similarity index 100% rename from Spigot-Server-Patches/0313-Restore-custom-InventoryHolder-support.patch rename to Spigot-Server-Patches/0314-Restore-custom-InventoryHolder-support.patch diff --git a/Spigot-Server-Patches/0314-Use-Vanilla-Minecart-Speeds.patch b/Spigot-Server-Patches/0315-Use-Vanilla-Minecart-Speeds.patch similarity index 100% rename from Spigot-Server-Patches/0314-Use-Vanilla-Minecart-Speeds.patch rename to Spigot-Server-Patches/0315-Use-Vanilla-Minecart-Speeds.patch diff --git a/Spigot-Server-Patches/0315-Fix-SpongeAbsortEvent-handling.patch b/Spigot-Server-Patches/0316-Fix-SpongeAbsortEvent-handling.patch similarity index 100% rename from Spigot-Server-Patches/0315-Fix-SpongeAbsortEvent-handling.patch rename to Spigot-Server-Patches/0316-Fix-SpongeAbsortEvent-handling.patch diff --git a/Spigot-Server-Patches/0316-Don-t-allow-digging-into-unloaded-chunks.patch b/Spigot-Server-Patches/0317-Don-t-allow-digging-into-unloaded-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0316-Don-t-allow-digging-into-unloaded-chunks.patch rename to Spigot-Server-Patches/0317-Don-t-allow-digging-into-unloaded-chunks.patch diff --git a/Spigot-Server-Patches/0317-Book-Size-Limits.patch b/Spigot-Server-Patches/0318-Book-Size-Limits.patch similarity index 96% rename from Spigot-Server-Patches/0317-Book-Size-Limits.patch rename to Spigot-Server-Patches/0318-Book-Size-Limits.patch index 7d5aa7cfc..508e80ba6 100644 --- a/Spigot-Server-Patches/0317-Book-Size-Limits.patch +++ b/Spigot-Server-Patches/0318-Book-Size-Limits.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Book Size Limits Puts some limits on the size of books. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 29cab8730a5e61aeb8bf4d69ccad192c1ff975f4..6f688cca9f769a6d7b1d1b9bc48e16632da3a847 100644 +index 478856f190a8d0177dee39dab4692fc54f9c8ed4..01d48da8b2f89ad3a615ad10c044c5f0a08ee4ed 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -333,4 +333,11 @@ public class PaperConfig { +@@ -334,4 +334,11 @@ public class PaperConfig { velocitySecretKey = secret.getBytes(StandardCharsets.UTF_8); } } diff --git a/Spigot-Server-Patches/0318-Make-the-default-permission-message-configurable.patch b/Spigot-Server-Patches/0319-Make-the-default-permission-message-configurable.patch similarity index 91% rename from Spigot-Server-Patches/0318-Make-the-default-permission-message-configurable.patch rename to Spigot-Server-Patches/0319-Make-the-default-permission-message-configurable.patch index e01e5e223..51b20c32f 100644 --- a/Spigot-Server-Patches/0318-Make-the-default-permission-message-configurable.patch +++ b/Spigot-Server-Patches/0319-Make-the-default-permission-message-configurable.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Make the default permission message configurable diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 6f688cca9f769a6d7b1d1b9bc48e16632da3a847..1aa7d0cfaf5697daeeb98e237387f27e76bca16f 100644 +index 01d48da8b2f89ad3a615ad10c044c5f0a08ee4ed..f9b1b198299166759fe0bd0a36d8d88c626e06a4 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -19,6 +19,7 @@ import java.util.regex.Pattern; @@ -14,9 +14,9 @@ index 6f688cca9f769a6d7b1d1b9bc48e16632da3a847..1aa7d0cfaf5697daeeb98e237387f27e import org.bukkit.Bukkit; +import org.bukkit.ChatColor; import org.bukkit.command.Command; + import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.InvalidConfigurationException; - import org.bukkit.configuration.file.YamlConfiguration; -@@ -278,6 +279,11 @@ public class PaperConfig { +@@ -279,6 +280,11 @@ public class PaperConfig { connectionThrottleKickMessage = getString("messages.kick.connection-throttle", connectionThrottleKickMessage); } diff --git a/Spigot-Server-Patches/0319-Prevent-rayTrace-from-loading-chunks.patch b/Spigot-Server-Patches/0320-Prevent-rayTrace-from-loading-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0319-Prevent-rayTrace-from-loading-chunks.patch rename to Spigot-Server-Patches/0320-Prevent-rayTrace-from-loading-chunks.patch diff --git a/Spigot-Server-Patches/0320-Handle-Large-Packets-disconnecting-client.patch b/Spigot-Server-Patches/0321-Handle-Large-Packets-disconnecting-client.patch similarity index 100% rename from Spigot-Server-Patches/0320-Handle-Large-Packets-disconnecting-client.patch rename to Spigot-Server-Patches/0321-Handle-Large-Packets-disconnecting-client.patch diff --git a/Spigot-Server-Patches/0321-force-entity-dismount-during-teleportation.patch b/Spigot-Server-Patches/0322-force-entity-dismount-during-teleportation.patch similarity index 94% rename from Spigot-Server-Patches/0321-force-entity-dismount-during-teleportation.patch rename to Spigot-Server-Patches/0322-force-entity-dismount-during-teleportation.patch index 1a7cab548..a61ae61a2 100644 --- a/Spigot-Server-Patches/0321-force-entity-dismount-during-teleportation.patch +++ b/Spigot-Server-Patches/0322-force-entity-dismount-during-teleportation.patch @@ -20,7 +20,7 @@ this is going to be the best soultion all around. Improvements/suggestions welcome! diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 58ecc49ba91cdb9c100ce3319434f2110b9a5892..6d06a5c258981db3bc645087b37a5a8339bc06eb 100644 +index 41c14d367e0b51e109001167d3c7b40676f364b8..505ba8e298a825ce69cc60c76cb040edeb0acdbd 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1948,12 +1948,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -72,7 +72,7 @@ index 58ecc49ba91cdb9c100ce3319434f2110b9a5892..6d06a5c258981db3bc645087b37a5a83 if (event.isCancelled()) { return false; diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 0fd29c42179c7ac0c89cfd35b257ab0ad3ae1612..8af8676888e4deff66094053d14203c2f5b20ab1 100644 +index af554396fdb25719c158a81ccab76e91f5df2ff5..5ef91da9733fd9276e7bd819a11a0548e01b17f0 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -942,9 +942,11 @@ public abstract class EntityHuman extends EntityLiving { @@ -91,10 +91,10 @@ index 0fd29c42179c7ac0c89cfd35b257ab0ad3ae1612..8af8676888e4deff66094053d14203c2 } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 7105192a5cd8666ac46dcd8a524709d7e429d1b0..1481cbafa1b4e48822d9e0fa2735b9829440fca3 100644 +index c00031656bb6d2f986f555c68bb2fa9b9b0c0e6d..0b4e39d93f28ec5c7835bace2ea969a6e99ac2a3 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2886,11 +2886,13 @@ public abstract class EntityLiving extends Entity { +@@ -2891,11 +2891,13 @@ public abstract class EntityLiving extends Entity { return ((Byte) this.datawatcher.get(EntityLiving.an) & 4) != 0; } diff --git a/Spigot-Server-Patches/0322-Add-more-Zombie-API.patch b/Spigot-Server-Patches/0323-Add-more-Zombie-API.patch similarity index 100% rename from Spigot-Server-Patches/0322-Add-more-Zombie-API.patch rename to Spigot-Server-Patches/0323-Add-more-Zombie-API.patch diff --git a/Spigot-Server-Patches/0323-Add-PlayerConnectionCloseEvent.patch b/Spigot-Server-Patches/0324-Add-PlayerConnectionCloseEvent.patch similarity index 100% rename from Spigot-Server-Patches/0323-Add-PlayerConnectionCloseEvent.patch rename to Spigot-Server-Patches/0324-Add-PlayerConnectionCloseEvent.patch diff --git a/Spigot-Server-Patches/0324-Prevent-Enderman-from-loading-chunks.patch b/Spigot-Server-Patches/0325-Prevent-Enderman-from-loading-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0324-Prevent-Enderman-from-loading-chunks.patch rename to Spigot-Server-Patches/0325-Prevent-Enderman-from-loading-chunks.patch diff --git a/Spigot-Server-Patches/0325-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch b/Spigot-Server-Patches/0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch similarity index 94% rename from Spigot-Server-Patches/0325-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch rename to Spigot-Server-Patches/0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch index 9a8fbec48..6a9ea81f6 100644 --- a/Spigot-Server-Patches/0325-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch +++ b/Spigot-Server-Patches/0326-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch @@ -106,10 +106,10 @@ index 00333548b470435aa89fb0f4b29047eb1461e992..5770d4183c1b9ab6119a25930283c023 public Location getBedSpawnLocation() { NBTTagCompound data = getData(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index e112a87792a76ccbc25caa1253c54db601de76aa..346629cba5ff956229e386caa5449fd068a16c60 100644 +index 51e7c6d82248b5c0938d37607c64a9c10cb4de4d..d61a255abede0ae19519d83117a877d1a04307bf 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -142,6 +142,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -143,6 +143,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus; private String resourcePackHash; private static final boolean DISABLE_CHANNEL_LIMIT = System.getProperty("paper.disableChannelLimit") != null; // Paper - add a flag to disable the channel limit @@ -117,7 +117,7 @@ index e112a87792a76ccbc25caa1253c54db601de76aa..346629cba5ff956229e386caa5449fd0 // Paper end public CraftPlayer(CraftServer server, EntityPlayer entity) { -@@ -1389,6 +1390,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1390,6 +1391,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.firstPlayed = firstPlayed; } @@ -136,7 +136,7 @@ index e112a87792a76ccbc25caa1253c54db601de76aa..346629cba5ff956229e386caa5449fd0 public void readExtraData(NBTTagCompound nbttagcompound) { hasPlayedBefore = true; if (nbttagcompound.hasKey("bukkit")) { -@@ -1411,6 +1424,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1412,6 +1425,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void setExtraData(NBTTagCompound nbttagcompound) { @@ -145,7 +145,7 @@ index e112a87792a76ccbc25caa1253c54db601de76aa..346629cba5ff956229e386caa5449fd0 if (!nbttagcompound.hasKey("bukkit")) { nbttagcompound.set("bukkit", new NBTTagCompound()); } -@@ -1425,6 +1440,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1426,6 +1441,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { data.setLong("firstPlayed", getFirstPlayed()); data.setLong("lastPlayed", System.currentTimeMillis()); data.setString("lastKnownName", handle.getName()); diff --git a/Spigot-Server-Patches/0326-Fix-PlayerEditBookEvent.patch b/Spigot-Server-Patches/0327-Fix-PlayerEditBookEvent.patch similarity index 100% rename from Spigot-Server-Patches/0326-Fix-PlayerEditBookEvent.patch rename to Spigot-Server-Patches/0327-Fix-PlayerEditBookEvent.patch diff --git a/Spigot-Server-Patches/0327-Workaround-for-vehicle-tracking-issue-on-disconnect.patch b/Spigot-Server-Patches/0328-Workaround-for-vehicle-tracking-issue-on-disconnect.patch similarity index 100% rename from Spigot-Server-Patches/0327-Workaround-for-vehicle-tracking-issue-on-disconnect.patch rename to Spigot-Server-Patches/0328-Workaround-for-vehicle-tracking-issue-on-disconnect.patch diff --git a/Spigot-Server-Patches/0328-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch b/Spigot-Server-Patches/0329-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch similarity index 100% rename from Spigot-Server-Patches/0328-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch rename to Spigot-Server-Patches/0329-Fire-BlockPistonRetractEvent-for-all-empty-pistons.patch diff --git a/Spigot-Server-Patches/0329-Block-Entity-remove-from-being-called-on-Players.patch b/Spigot-Server-Patches/0330-Block-Entity-remove-from-being-called-on-Players.patch similarity index 89% rename from Spigot-Server-Patches/0329-Block-Entity-remove-from-being-called-on-Players.patch rename to Spigot-Server-Patches/0330-Block-Entity-remove-from-being-called-on-Players.patch index 713a6809c..785bf4323 100644 --- a/Spigot-Server-Patches/0329-Block-Entity-remove-from-being-called-on-Players.patch +++ b/Spigot-Server-Patches/0330-Block-Entity-remove-from-being-called-on-Players.patch @@ -12,10 +12,10 @@ Player we will look at limiting the scope of this change. It appears to be unintentional in the few cases we've seen so far. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 346629cba5ff956229e386caa5449fd068a16c60..addce5ab16b975b3c6690ae09aef88dfbfb454b8 100644 +index d61a255abede0ae19519d83117a877d1a04307bf..b9dcd216dd9e4eeee824b252446afdac3ca44d24 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1989,6 +1989,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1990,6 +1990,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void resetCooldown() { getHandle().resetCooldown(); } diff --git a/Spigot-Server-Patches/0330-BlockDestroyEvent.patch b/Spigot-Server-Patches/0331-BlockDestroyEvent.patch similarity index 92% rename from Spigot-Server-Patches/0330-BlockDestroyEvent.patch rename to Spigot-Server-Patches/0331-BlockDestroyEvent.patch index b1debf0a1..3c0fe7d7e 100644 --- a/Spigot-Server-Patches/0330-BlockDestroyEvent.patch +++ b/Spigot-Server-Patches/0331-BlockDestroyEvent.patch @@ -11,10 +11,10 @@ floating in the air. This can replace many uses of BlockPhysicsEvent diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index a47de606a82b840180bd203816955fb657cc7c6c..366e4c6f3d83fd038c08f92d97d500e47d8e2104 100644 +index f0b3de717d5e425fb08c5afdfb3571fb6b8ab556..5e253b3609de30ac6a0a8f156c6f6d07a5bb99ce 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -529,8 +529,20 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -533,8 +533,20 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return false; } else { Fluid fluid = this.getFluid(blockposition); diff --git a/Spigot-Server-Patches/0331-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch b/Spigot-Server-Patches/0332-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch similarity index 100% rename from Spigot-Server-Patches/0331-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch rename to Spigot-Server-Patches/0332-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch diff --git a/Spigot-Server-Patches/0332-Fix-sign-edit-memory-leak.patch b/Spigot-Server-Patches/0333-Fix-sign-edit-memory-leak.patch similarity index 100% rename from Spigot-Server-Patches/0332-Fix-sign-edit-memory-leak.patch rename to Spigot-Server-Patches/0333-Fix-sign-edit-memory-leak.patch diff --git a/Spigot-Server-Patches/0333-Limit-Client-Sign-length-more.patch b/Spigot-Server-Patches/0334-Limit-Client-Sign-length-more.patch similarity index 100% rename from Spigot-Server-Patches/0333-Limit-Client-Sign-length-more.patch rename to Spigot-Server-Patches/0334-Limit-Client-Sign-length-more.patch diff --git a/Spigot-Server-Patches/0334-Don-t-check-ConvertSigns-boolean-every-sign-save.patch b/Spigot-Server-Patches/0335-Don-t-check-ConvertSigns-boolean-every-sign-save.patch similarity index 100% rename from Spigot-Server-Patches/0334-Don-t-check-ConvertSigns-boolean-every-sign-save.patch rename to Spigot-Server-Patches/0335-Don-t-check-ConvertSigns-boolean-every-sign-save.patch diff --git a/Spigot-Server-Patches/0335-Optimize-Network-Manager-and-add-advanced-packet-sup.patch b/Spigot-Server-Patches/0336-Optimize-Network-Manager-and-add-advanced-packet-sup.patch similarity index 97% rename from Spigot-Server-Patches/0335-Optimize-Network-Manager-and-add-advanced-packet-sup.patch rename to Spigot-Server-Patches/0336-Optimize-Network-Manager-and-add-advanced-packet-sup.patch index 916220447..398c7ed46 100644 --- a/Spigot-Server-Patches/0335-Optimize-Network-Manager-and-add-advanced-packet-sup.patch +++ b/Spigot-Server-Patches/0336-Optimize-Network-Manager-and-add-advanced-packet-sup.patch @@ -306,10 +306,17 @@ index 64d61eca4bbb4a9e18d78c8d2a55114134f56b6f..020dce1a42e8e083c21fdcb7b954bc40 final PacketListener packetListener = this.i(); if (packetListener instanceof PlayerConnection) { diff --git a/src/main/java/net/minecraft/server/Packet.java b/src/main/java/net/minecraft/server/Packet.java -index 2d8e6a2f4a0c3c5d74a647d7164b0028781d3bf5..c5edf8c4b01cc7ddac06797133e6fd13ec5b6592 100644 +index 2d8e6a2f4a0c3c5d74a647d7164b0028781d3bf5..545dbe6ddcce1d172f465b4a7ab85654ee5fdbb4 100644 --- a/src/main/java/net/minecraft/server/Packet.java +++ b/src/main/java/net/minecraft/server/Packet.java -@@ -11,6 +11,20 @@ public interface Packet<T extends PacketListener> { +@@ -1,5 +1,6 @@ + package net.minecraft.server; + ++import io.netty.channel.ChannelFuture; // Paper + import java.io.IOException; + + public interface Packet<T extends PacketListener> { +@@ -11,6 +12,20 @@ public interface Packet<T extends PacketListener> { void a(T t0); // Paper start @@ -323,7 +330,7 @@ index 2d8e6a2f4a0c3c5d74a647d7164b0028781d3bf5..c5edf8c4b01cc7ddac06797133e6fd13 + * @param player Null if not at PLAY stage yet + * @param future Can be null if packet was cancelled + */ -+ default void onPacketDispatchFinish(@javax.annotation.Nullable EntityPlayer player, @javax.annotation.Nullable io.netty.channel.ChannelFuture future) {} ++ default void onPacketDispatchFinish(@javax.annotation.Nullable EntityPlayer player, @javax.annotation.Nullable ChannelFuture future) {} + default boolean hasFinishListener() { return false; } + default boolean isReady() { return true; } + default java.util.List<Packet> getExtraPackets() { return null; } diff --git a/Spigot-Server-Patches/0336-Handle-Oversized-Tile-Entities-in-chunks.patch b/Spigot-Server-Patches/0337-Handle-Oversized-Tile-Entities-in-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0336-Handle-Oversized-Tile-Entities-in-chunks.patch rename to Spigot-Server-Patches/0337-Handle-Oversized-Tile-Entities-in-chunks.patch diff --git a/Spigot-Server-Patches/0337-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch b/Spigot-Server-Patches/0338-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch similarity index 100% rename from Spigot-Server-Patches/0337-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch rename to Spigot-Server-Patches/0338-MC-145260-Fix-Whitelist-On-Off-inconsistency.patch diff --git a/Spigot-Server-Patches/0338-Set-Zombie-last-tick-at-start-of-drowning-process.patch b/Spigot-Server-Patches/0339-Set-Zombie-last-tick-at-start-of-drowning-process.patch similarity index 100% rename from Spigot-Server-Patches/0338-Set-Zombie-last-tick-at-start-of-drowning-process.patch rename to Spigot-Server-Patches/0339-Set-Zombie-last-tick-at-start-of-drowning-process.patch diff --git a/Spigot-Server-Patches/0339-Allow-Saving-of-Oversized-Chunks.patch b/Spigot-Server-Patches/0340-Allow-Saving-of-Oversized-Chunks.patch similarity index 100% rename from Spigot-Server-Patches/0339-Allow-Saving-of-Oversized-Chunks.patch rename to Spigot-Server-Patches/0340-Allow-Saving-of-Oversized-Chunks.patch diff --git a/Spigot-Server-Patches/0340-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch b/Spigot-Server-Patches/0341-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch similarity index 100% rename from Spigot-Server-Patches/0340-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch rename to Spigot-Server-Patches/0341-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch diff --git a/Spigot-Server-Patches/0341-Add-LivingEntity-getTargetEntity.patch b/Spigot-Server-Patches/0342-Add-LivingEntity-getTargetEntity.patch similarity index 96% rename from Spigot-Server-Patches/0341-Add-LivingEntity-getTargetEntity.patch rename to Spigot-Server-Patches/0342-Add-LivingEntity-getTargetEntity.patch index 0260bb0eb..f653f441e 100644 --- a/Spigot-Server-Patches/0341-Add-LivingEntity-getTargetEntity.patch +++ b/Spigot-Server-Patches/0342-Add-LivingEntity-getTargetEntity.patch @@ -46,7 +46,7 @@ index 02c09f39848399a86d46bd17569b4f01a7b5ab1f..ed9b2f9adfecdc6d1b9925579ec51065 double[] adouble = new double[]{1.0D}; double d0 = vec3d1.x - vec3d.x; diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 6d06a5c258981db3bc645087b37a5a8339bc06eb..a76a618ecec1c9ed4afe39b942d44dad15d23fbc 100644 +index 505ba8e298a825ce69cc60c76cb040edeb0acdbd..e87fa15250a57c9b7ed4f4b530289b7b28bb7c9c 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1426,6 +1426,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -66,10 +66,10 @@ index 6d06a5c258981db3bc645087b37a5a8339bc06eb..a76a618ecec1c9ed4afe39b942d44dad return 0.0F; } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 1481cbafa1b4e48822d9e0fa2735b9829440fca3..79cf31d6fcd0e82ee146c489448a93a6e55e4190 100644 +index 0b4e39d93f28ec5c7835bace2ea969a6e99ac2a3..4c011f93c600d87951fe1dc8bf6b84fac7a532cb 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -3489,6 +3489,37 @@ public abstract class EntityLiving extends Entity { +@@ -3494,6 +3494,37 @@ public abstract class EntityLiving extends Entity { return world.rayTrace(raytrace); } diff --git a/Spigot-Server-Patches/0342-Use-proper-max-length-when-serialising-BungeeCord-te.patch b/Spigot-Server-Patches/0343-Use-proper-max-length-when-serialising-BungeeCord-te.patch similarity index 100% rename from Spigot-Server-Patches/0342-Use-proper-max-length-when-serialising-BungeeCord-te.patch rename to Spigot-Server-Patches/0343-Use-proper-max-length-when-serialising-BungeeCord-te.patch diff --git a/Spigot-Server-Patches/0343-Entity-getEntitySpawnReason.patch b/Spigot-Server-Patches/0344-Entity-getEntitySpawnReason.patch similarity index 95% rename from Spigot-Server-Patches/0343-Entity-getEntitySpawnReason.patch rename to Spigot-Server-Patches/0344-Entity-getEntitySpawnReason.patch index a542d274e..6fec15969 100644 --- a/Spigot-Server-Patches/0343-Entity-getEntitySpawnReason.patch +++ b/Spigot-Server-Patches/0344-Entity-getEntitySpawnReason.patch @@ -10,7 +10,7 @@ persistenting Living Entity, SPAWNER for spawners, or DEFAULT since data was not stored. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index a76a618ecec1c9ed4afe39b942d44dad15d23fbc..70e520d7fe8150aa67e81b4983a165f00fe8a554 100644 +index e87fa15250a57c9b7ed4f4b530289b7b28bb7c9c..83dda2bb95d38ff248d635420c0bf12e7b7e95ab 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -72,6 +72,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -72,10 +72,10 @@ index e4651eb2a94080bfa431b0b775ae8019fc922538..4b8dd6c1a9c796ded5ee0a63ccecebca }); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 14ec04c6503cca58f64fc2a82a9fd715a06dcefb..a72f16cbcbc226854043bfec07e1e57dbe33c62c 100644 +index f6c459facde67500499365af6da9f43adcd80606..1b0c99de1cfe7de1096a3af043dccf0ba3f0ccfe 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -923,6 +923,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -922,6 +922,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { // CraftBukkit start private boolean addEntity0(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) { org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot diff --git a/Spigot-Server-Patches/0344-Update-entity-Metadata-for-all-tracked-players.patch b/Spigot-Server-Patches/0345-Update-entity-Metadata-for-all-tracked-players.patch similarity index 100% rename from Spigot-Server-Patches/0344-Update-entity-Metadata-for-all-tracked-players.patch rename to Spigot-Server-Patches/0345-Update-entity-Metadata-for-all-tracked-players.patch diff --git a/Spigot-Server-Patches/0345-Implement-PlayerPostRespawnEvent.patch b/Spigot-Server-Patches/0346-Implement-PlayerPostRespawnEvent.patch similarity index 100% rename from Spigot-Server-Patches/0345-Implement-PlayerPostRespawnEvent.patch rename to Spigot-Server-Patches/0346-Implement-PlayerPostRespawnEvent.patch diff --git a/Spigot-Server-Patches/0346-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch b/Spigot-Server-Patches/0347-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch similarity index 100% rename from Spigot-Server-Patches/0346-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch rename to Spigot-Server-Patches/0347-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch diff --git a/Spigot-Server-Patches/0347-Implement-getters-and-setters-for-EntityItem-owner-a.patch b/Spigot-Server-Patches/0348-Implement-getters-and-setters-for-EntityItem-owner-a.patch similarity index 100% rename from Spigot-Server-Patches/0347-Implement-getters-and-setters-for-EntityItem-owner-a.patch rename to Spigot-Server-Patches/0348-Implement-getters-and-setters-for-EntityItem-owner-a.patch diff --git a/Spigot-Server-Patches/0348-Server-Tick-Events.patch b/Spigot-Server-Patches/0349-Server-Tick-Events.patch similarity index 93% rename from Spigot-Server-Patches/0348-Server-Tick-Events.patch rename to Spigot-Server-Patches/0349-Server-Tick-Events.patch index 0217e2a92..8c10f3925 100644 --- a/Spigot-Server-Patches/0348-Server-Tick-Events.patch +++ b/Spigot-Server-Patches/0349-Server-Tick-Events.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Server Tick Events Fires event at start and end of a server tick diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 4c610db03f4d8bae0e310d6a0680cefb7bc74872..b6e103bf140d04e9f3bda4112252da5d5fedcf6d 100644 +index b336cd541b8e3a9ebe3d89a487160d18a294dade..544bc9660b1104e7782bd9e06252d0bd9b2e700d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1120,6 +1120,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas diff --git a/Spigot-Server-Patches/0349-PlayerDeathEvent-getItemsToKeep.patch b/Spigot-Server-Patches/0350-PlayerDeathEvent-getItemsToKeep.patch similarity index 100% rename from Spigot-Server-Patches/0349-PlayerDeathEvent-getItemsToKeep.patch rename to Spigot-Server-Patches/0350-PlayerDeathEvent-getItemsToKeep.patch diff --git a/Spigot-Server-Patches/0350-Optimize-Captured-TileEntity-Lookup.patch b/Spigot-Server-Patches/0351-Optimize-Captured-TileEntity-Lookup.patch similarity index 89% rename from Spigot-Server-Patches/0350-Optimize-Captured-TileEntity-Lookup.patch rename to Spigot-Server-Patches/0351-Optimize-Captured-TileEntity-Lookup.patch index e5dcccb09..48bf2bccc 100644 --- a/Spigot-Server-Patches/0350-Optimize-Captured-TileEntity-Lookup.patch +++ b/Spigot-Server-Patches/0351-Optimize-Captured-TileEntity-Lookup.patch @@ -10,10 +10,10 @@ Optimize to check if the captured list even has values in it, and also to just do a get call since the value can never be null. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 366e4c6f3d83fd038c08f92d97d500e47d8e2104..f36cf803c874d187581ade362b3c52419bbc8f48 100644 +index 5e253b3609de30ac6a0a8f156c6f6d07a5bb99ce..eee2cb4d95ff11c93d34472c563fac137df3b6f9 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -939,12 +939,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -943,12 +943,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return null; } else { // CraftBukkit start diff --git a/Spigot-Server-Patches/0351-Add-Heightmap-API.patch b/Spigot-Server-Patches/0352-Add-Heightmap-API.patch similarity index 94% rename from Spigot-Server-Patches/0351-Add-Heightmap-API.patch rename to Spigot-Server-Patches/0352-Add-Heightmap-API.patch index ac3d09b42..fdfa62e1d 100644 --- a/Spigot-Server-Patches/0351-Add-Heightmap-API.patch +++ b/Spigot-Server-Patches/0352-Add-Heightmap-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add Heightmap API diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index f36cf803c874d187581ade362b3c52419bbc8f48..8773b521db869f26525af7b4342955ade835b8ef 100644 +index eee2cb4d95ff11c93d34472c563fac137df3b6f9..feb59eebc09bf1c83d8dbe0a893248a19377ebd5 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -639,8 +639,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -643,8 +643,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { } } diff --git a/Spigot-Server-Patches/0352-Mob-Spawner-API-Enhancements.patch b/Spigot-Server-Patches/0353-Mob-Spawner-API-Enhancements.patch similarity index 100% rename from Spigot-Server-Patches/0352-Mob-Spawner-API-Enhancements.patch rename to Spigot-Server-Patches/0353-Mob-Spawner-API-Enhancements.patch diff --git a/Spigot-Server-Patches/0353-Per-Player-View-Distance-API-placeholders.patch b/Spigot-Server-Patches/0354-Per-Player-View-Distance-API-placeholders.patch similarity index 96% rename from Spigot-Server-Patches/0353-Per-Player-View-Distance-API-placeholders.patch rename to Spigot-Server-Patches/0354-Per-Player-View-Distance-API-placeholders.patch index 947adc711..0620e888d 100644 --- a/Spigot-Server-Patches/0353-Per-Player-View-Distance-API-placeholders.patch +++ b/Spigot-Server-Patches/0354-Per-Player-View-Distance-API-placeholders.patch @@ -40,10 +40,10 @@ index 9331f96f68f121b41ce74904d624520291b7c72e..1074995e8c8a83f6cdb94019123fbffa double deltaZ = this.locZ() - player.locZ(); double distanceSquared = deltaX * deltaX + deltaZ * deltaZ; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index addce5ab16b975b3c6690ae09aef88dfbfb454b8..4bef2d3c8318da57e5721d728953f8d5ac6b0ff6 100644 +index b9dcd216dd9e4eeee824b252446afdac3ca44d24..021345ddef4d382021ab8cbba91f4b58851aeabd 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1998,6 +1998,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1999,6 +1999,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { super.remove(); } } diff --git a/Spigot-Server-Patches/0354-Fix-CB-call-to-changed-postToMainThread-method.patch b/Spigot-Server-Patches/0355-Fix-CB-call-to-changed-postToMainThread-method.patch similarity index 100% rename from Spigot-Server-Patches/0354-Fix-CB-call-to-changed-postToMainThread-method.patch rename to Spigot-Server-Patches/0355-Fix-CB-call-to-changed-postToMainThread-method.patch diff --git a/Spigot-Server-Patches/0355-Fix-sounds-when-item-frames-are-modified-MC-123450.patch b/Spigot-Server-Patches/0356-Fix-sounds-when-item-frames-are-modified-MC-123450.patch similarity index 100% rename from Spigot-Server-Patches/0355-Fix-sounds-when-item-frames-are-modified-MC-123450.patch rename to Spigot-Server-Patches/0356-Fix-sounds-when-item-frames-are-modified-MC-123450.patch diff --git a/Spigot-Server-Patches/0356-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch b/Spigot-Server-Patches/0357-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch similarity index 95% rename from Spigot-Server-Patches/0356-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch rename to Spigot-Server-Patches/0357-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch index 4252e2f67..9c1241c1b 100644 --- a/Spigot-Server-Patches/0356-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch +++ b/Spigot-Server-Patches/0357-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch @@ -16,7 +16,7 @@ handling that should have been handled synchronously will be handled synchronously when the server gets shut down. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index b6e103bf140d04e9f3bda4112252da5d5fedcf6d..09d2b5d07c16c186534fdf02ae9242bfee7655d5 100644 +index 544bc9660b1104e7782bd9e06252d0bd9b2e700d..59099a93f5fad12e348f435a29e5ededeb6faefd 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -2065,7 +2065,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas diff --git a/Spigot-Server-Patches/0357-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch b/Spigot-Server-Patches/0358-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch similarity index 92% rename from Spigot-Server-Patches/0357-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch rename to Spigot-Server-Patches/0358-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch index bd5fadc70..1f5051b28 100644 --- a/Spigot-Server-Patches/0357-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch +++ b/Spigot-Server-Patches/0358-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch @@ -19,10 +19,10 @@ This change ensures the chunks are always loaded when entities are added to the world, or a valid entity moves between chunks. diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index a72f16cbcbc226854043bfec07e1e57dbe33c62c..c14d51f1ec37d7b40172ce8cc1c66a7a4f4a3bd5 100644 +index 1b0c99de1cfe7de1096a3af043dccf0ba3f0ccfe..18305112c8fcf1de1a21d9afea1a987859615dc7 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -736,11 +736,18 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -735,11 +735,18 @@ public class WorldServer extends World implements GeneratorAccessSeed { int k = MathHelper.floor(entity.locZ() / 16.0D); if (!entity.inChunk || entity.chunkX != i || entity.chunkY != j || entity.chunkZ != k) { @@ -42,7 +42,7 @@ index a72f16cbcbc226854043bfec07e1e57dbe33c62c..c14d51f1ec37d7b40172ce8cc1c66a7a if (entity.inChunk) { WorldServer.LOGGER.warn("Entity {} left loaded chunk area", entity); } -@@ -955,7 +962,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -954,7 +961,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { return false; } // CraftBukkit end diff --git a/Spigot-Server-Patches/0358-Duplicate-UUID-Resolve-Option.patch b/Spigot-Server-Patches/0359-Duplicate-UUID-Resolve-Option.patch similarity index 96% rename from Spigot-Server-Patches/0358-Duplicate-UUID-Resolve-Option.patch rename to Spigot-Server-Patches/0359-Duplicate-UUID-Resolve-Option.patch index 62049235c..42d139948 100644 --- a/Spigot-Server-Patches/0358-Duplicate-UUID-Resolve-Option.patch +++ b/Spigot-Server-Patches/0359-Duplicate-UUID-Resolve-Option.patch @@ -33,10 +33,10 @@ But for those who are ok with leaving this inconsistent behavior, you may use WA It is recommended you regenerate the entities, as these were legit entities, and deserve your love. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index b49a1a6f5017c9e183a7d08b16e89899c25a9717..2debafdc1bb539a49c3f0723b696ea56e9b3eb16 100644 +index 6f660388aa0d56577ad1c3f463c96d925c964821..36df7068075e3ead6c7669a448fb885ad94c9fa3 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -410,4 +410,43 @@ public class PaperWorldConfig { +@@ -404,4 +404,43 @@ public class PaperWorldConfig { private void preventMovingIntoUnloadedChunks() { preventMovingIntoUnloadedChunks = getBoolean("prevent-moving-into-unloaded-chunks", false); } @@ -93,7 +93,7 @@ index f7be161c8557ae3848227b1a61e27374770ad243..141f2e8975b01fc2a5e7743955894f10 int k = MathHelper.floor(entity.locY() / 16.0D); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 70e520d7fe8150aa67e81b4983a165f00fe8a554..4fbe3d2547de278b537c12940a8351c8d1521d1b 100644 +index 83dda2bb95d38ff248d635420c0bf12e7b7e95ab..ef492fe260ef1d00f83b2f298a4fab4fd71ea4b5 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -2676,6 +2676,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -197,7 +197,7 @@ index 458802dc4b1f923b159168efff0546bb731da07b..936be3fd8954933ac218f62a172df687 ChunkCoordIntPair chunkcoordintpair = playerchunk.i(); CompletableFuture<Either<List<IChunkAccess>, PlayerChunk.Failure>> completablefuture = this.a(chunkcoordintpair, 1, (i) -> { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index c14d51f1ec37d7b40172ce8cc1c66a7a4f4a3bd5..4e926d5f483ad0d0fae5ceddf0b279128c030a5e 100644 +index 18305112c8fcf1de1a21d9afea1a987859615dc7..638d7303f55e99293703bca80c43f8f00a43c550 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -5,6 +5,8 @@ import com.google.common.collect.ImmutableList; @@ -209,7 +209,7 @@ index c14d51f1ec37d7b40172ce8cc1c66a7a4f4a3bd5..4e926d5f483ad0d0fae5ceddf0b27912 import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Queues; -@@ -989,8 +991,24 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -988,8 +990,24 @@ public class WorldServer extends World implements GeneratorAccessSeed { if (entity1 == null) { return false; } else { diff --git a/Spigot-Server-Patches/0359-improve-CraftWorld-isChunkLoaded.patch b/Spigot-Server-Patches/0360-improve-CraftWorld-isChunkLoaded.patch similarity index 100% rename from Spigot-Server-Patches/0359-improve-CraftWorld-isChunkLoaded.patch rename to Spigot-Server-Patches/0360-improve-CraftWorld-isChunkLoaded.patch diff --git a/Spigot-Server-Patches/0360-Configurable-Keep-Spawn-Loaded-range-per-world.patch b/Spigot-Server-Patches/0361-Configurable-Keep-Spawn-Loaded-range-per-world.patch similarity index 96% rename from Spigot-Server-Patches/0360-Configurable-Keep-Spawn-Loaded-range-per-world.patch rename to Spigot-Server-Patches/0361-Configurable-Keep-Spawn-Loaded-range-per-world.patch index cfe67f23c..6cbe5687f 100644 --- a/Spigot-Server-Patches/0360-Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/Spigot-Server-Patches/0361-Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Configurable Keep Spawn Loaded range per world This lets you disable it for some worlds and lower it for others. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 2debafdc1bb539a49c3f0723b696ea56e9b3eb16..91c9a027dd7aef8253f3d707c95e4ed917d32580 100644 +index 36df7068075e3ead6c7669a448fb885ad94c9fa3..8c61c0f0e60c32743c438fcdce76b236cc2a56c4 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -449,4 +449,10 @@ public class PaperWorldConfig { +@@ -443,4 +443,10 @@ public class PaperWorldConfig { break; } } @@ -21,7 +21,7 @@ index 2debafdc1bb539a49c3f0723b696ea56e9b3eb16..91c9a027dd7aef8253f3d707c95e4ed9 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 09d2b5d07c16c186534fdf02ae9242bfee7655d5..adfcc92a0f059e724e51a17468939a87938797ab 100644 +index 21d014f1cae27c769471caad7f9e28f727213e07..e197bbca9891659998488c08c981619311055fc5 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -608,6 +608,14 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas @@ -55,7 +55,7 @@ index 09d2b5d07c16c186534fdf02ae9242bfee7655d5..adfcc92a0f059e724e51a17468939a87 + worldserver.addTicketsForSpawn(radiusBlocks, blockposition); } + // Paper end -+ LOGGER.info("Loaded " + chunkproviderserver.b() + " spawn chunks for world " + worldserver.getWorldData().getName()); // Paper ++ LOGGER.info("Loaded " + chunkproviderserver.b() + " spawn chunks for world " + worldserver.getWorld().getName()); // Paper // CraftBukkit start // this.nextTick = SystemUtils.getMonotonicMillis() + 10L; @@ -102,10 +102,10 @@ index 3868572aed50c8bffd93727a139a3fbb8dc19688..ae77805f71c6c574d92f39c51b1e48f2 @Override public void a(ChunkCoordIntPair chunkcoordintpair) { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 4e926d5f483ad0d0fae5ceddf0b279128c030a5e..58c6f9194dbd767650117594eee3ae0ba3a00dce 100644 +index 638d7303f55e99293703bca80c43f8f00a43c550..aeb787c68121e8aeca868def9c39010a527d0f70 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1501,12 +1501,88 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1500,12 +1500,88 @@ public class WorldServer extends World implements GeneratorAccessSeed { return ((PersistentIdCounts) this.getMinecraftServer().D().getWorldPersistentData().a(PersistentIdCounts::new, "idcounts")).a(); } diff --git a/Spigot-Server-Patches/0361-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch b/Spigot-Server-Patches/0362-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch similarity index 100% rename from Spigot-Server-Patches/0361-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch rename to Spigot-Server-Patches/0362-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch diff --git a/Spigot-Server-Patches/0362-ChunkMapDistance-CME.patch b/Spigot-Server-Patches/0363-ChunkMapDistance-CME.patch similarity index 100% rename from Spigot-Server-Patches/0362-ChunkMapDistance-CME.patch rename to Spigot-Server-Patches/0363-ChunkMapDistance-CME.patch diff --git a/Spigot-Server-Patches/0363-Implement-CraftBlockSoundGroup.patch b/Spigot-Server-Patches/0364-Implement-CraftBlockSoundGroup.patch similarity index 100% rename from Spigot-Server-Patches/0363-Implement-CraftBlockSoundGroup.patch rename to Spigot-Server-Patches/0364-Implement-CraftBlockSoundGroup.patch diff --git a/Spigot-Server-Patches/0364-Chunk-debug-command.patch b/Spigot-Server-Patches/0365-Chunk-debug-command.patch similarity index 99% rename from Spigot-Server-Patches/0364-Chunk-debug-command.patch rename to Spigot-Server-Patches/0365-Chunk-debug-command.patch index 86c21d406..b5c50b513 100644 --- a/Spigot-Server-Patches/0364-Chunk-debug-command.patch +++ b/Spigot-Server-Patches/0365-Chunk-debug-command.patch @@ -198,7 +198,7 @@ index 6921def2dc8dd7f2b8ba9d46ab697a9f9b62cf4e..9f4c79629c981d496b96cf8a7a4c8e05 public final ChunkGenerator chunkGenerator; private final WorldServer world; diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java -index 2eacc5de340ca5558d9a0cba9baa26bbebef714d..5658b2a3c4601d07545b08b0a7179c8f3b051bd4 100644 +index 2eacc5de340ca5558d9a0cba9baa26bbebef714d..99801463d958540b5148e55c1e44f90a1078c371 100644 --- a/src/main/java/net/minecraft/server/MCUtil.java +++ b/src/main/java/net/minecraft/server/MCUtil.java @@ -5,7 +5,13 @@ import com.destroystokyo.paper.profile.CraftPlayerProfile; @@ -320,7 +320,7 @@ index 2eacc5de340ca5558d9a0cba9baa26bbebef714d..5658b2a3c4601d07545b08b0a7179c8f + return Integer.compare(v1.location.z, v2.location.z); + }); + -+ worldData.addProperty("name", world.getWorldData().getName()); ++ worldData.addProperty("name", world.getWorld().getName()); + worldData.addProperty("view-distance", world.spigotConfig.viewDistance); + worldData.addProperty("keep-spawn-loaded", world.keepSpawnInMemory); + worldData.addProperty("keep-spawn-loaded-range", world.paperConfig.keepLoadedRange); diff --git a/Spigot-Server-Patches/0365-Catch-exceptions-from-dispenser-entity-spawns.patch b/Spigot-Server-Patches/0366-Catch-exceptions-from-dispenser-entity-spawns.patch similarity index 100% rename from Spigot-Server-Patches/0365-Catch-exceptions-from-dispenser-entity-spawns.patch rename to Spigot-Server-Patches/0366-Catch-exceptions-from-dispenser-entity-spawns.patch diff --git a/Spigot-Server-Patches/0366-Fix-World-isChunkGenerated-calls.patch b/Spigot-Server-Patches/0367-Fix-World-isChunkGenerated-calls.patch similarity index 100% rename from Spigot-Server-Patches/0366-Fix-World-isChunkGenerated-calls.patch rename to Spigot-Server-Patches/0367-Fix-World-isChunkGenerated-calls.patch diff --git a/Spigot-Server-Patches/0367-Show-blockstate-location-if-we-failed-to-read-it.patch b/Spigot-Server-Patches/0368-Show-blockstate-location-if-we-failed-to-read-it.patch similarity index 100% rename from Spigot-Server-Patches/0367-Show-blockstate-location-if-we-failed-to-read-it.patch rename to Spigot-Server-Patches/0368-Show-blockstate-location-if-we-failed-to-read-it.patch diff --git a/Spigot-Server-Patches/0368-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch b/Spigot-Server-Patches/0369-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch similarity index 100% rename from Spigot-Server-Patches/0368-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch rename to Spigot-Server-Patches/0369-Synchronize-DataPaletteBlock-instead-of-ReentrantLoc.patch diff --git a/Spigot-Server-Patches/0369-incremental-chunk-saving.patch b/Spigot-Server-Patches/0370-incremental-chunk-saving.patch similarity index 94% rename from Spigot-Server-Patches/0369-incremental-chunk-saving.patch rename to Spigot-Server-Patches/0370-incremental-chunk-saving.patch index 0c3ccad78..fe5581751 100644 --- a/Spigot-Server-Patches/0369-incremental-chunk-saving.patch +++ b/Spigot-Server-Patches/0370-incremental-chunk-saving.patch @@ -5,10 +5,10 @@ Subject: [PATCH] incremental chunk saving diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 91c9a027dd7aef8253f3d707c95e4ed917d32580..b947b31fc3b135f116af97907d5301619cc33070 100644 +index 8c61c0f0e60c32743c438fcdce76b236cc2a56c4..c52fa7bfa82bcd03203f9a2311f09c9b7e5d9911 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -455,4 +455,19 @@ public class PaperWorldConfig { +@@ -449,4 +449,19 @@ public class PaperWorldConfig { keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16); log( "Keep Spawn Loaded Range: " + (keepLoadedRange/16)); } @@ -62,7 +62,7 @@ index 726926f19c6725c1d935beec2f0f766d7466835e..f2ff1aa915c218bb1fc72467ccbd73cc public void close() throws IOException { // CraftBukkit start diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index adfcc92a0f059e724e51a17468939a87938797ab..c6e96ebe3d3372e1c0868de46dd3b099dbd66bf3 100644 +index e197bbca9891659998488c08c981619311055fc5..1c28fdb8fb98cecb3c473fa0ea31edce7bbf002b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -152,6 +152,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas @@ -73,7 +73,7 @@ index adfcc92a0f059e724e51a17468939a87938797ab..c6e96ebe3d3372e1c0868de46dd3b099 public File bukkitDataPackFolder; public CommandDispatcher vanillaCommandDispatcher; private boolean forceTicks; -@@ -1144,14 +1145,28 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas +@@ -1144,14 +1145,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas this.serverPing.b().a(agameprofile); } @@ -90,11 +90,7 @@ index adfcc92a0f059e724e51a17468939a87938797ab..c6e96ebe3d3372e1c0868de46dd3b099 + // Paper start + for (WorldServer world : getWorlds()) { + if (world.paperConfig.autoSavePeriod > 0) { -+ try { -+ world.saveIncrementally(serverAutoSave); -+ } catch (ExceptionWorldConflict exceptionWorldConflict) { -+ MinecraftServer.LOGGER.warn(exceptionWorldConflict.getMessage()); -+ } ++ world.saveIncrementally(serverAutoSave); + } + } + // Paper end @@ -261,10 +257,10 @@ index 6dda11ffc022aa9bc7481506811a710a184f5e78..39d89d6209123ae2146ae292009cad44 return PlayerChunk.getChunkState(playerchunk.getTicketLevel()); }); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 58c6f9194dbd767650117594eee3ae0ba3a00dce..c2fffa60b3d020e4c70a2cabcf61ec36fb9edc65 100644 +index aeb787c68121e8aeca868def9c39010a527d0f70..13d0d358ced5f1617fc17f6706d359d0cf6c796d 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -769,11 +769,43 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -768,11 +768,43 @@ public class WorldServer extends World implements GeneratorAccessSeed { return !this.server.a(this, blockposition, entityhuman) && this.getWorldBorder().a(blockposition); } @@ -309,7 +305,7 @@ index 58c6f9194dbd767650117594eee3ae0ba3a00dce..c2fffa60b3d020e4c70a2cabcf61ec36 try (co.aikar.timings.Timing ignored = timings.worldSave.startTiming()) { // Paper if (iprogressupdate != null) { iprogressupdate.a(new ChatMessage("menu.savingLevel")); -@@ -799,6 +831,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -798,6 +830,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { // CraftBukkit end } diff --git a/Spigot-Server-Patches/0370-Anti-Xray.patch b/Spigot-Server-Patches/0371-Anti-Xray.patch similarity index 99% rename from Spigot-Server-Patches/0370-Anti-Xray.patch rename to Spigot-Server-Patches/0371-Anti-Xray.patch index fc10c0f70..a6cf99e56 100644 --- a/Spigot-Server-Patches/0370-Anti-Xray.patch +++ b/Spigot-Server-Patches/0371-Anti-Xray.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Anti-Xray diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index b947b31fc3b135f116af97907d5301619cc33070..43925ed1e5c210399ba9fedb7bf890a6bd617e4a 100644 +index c52fa7bfa82bcd03203f9a2311f09c9b7e5d9911..b3d080aa109d0ed77a3318d07474ec7e46aaa054 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -1,7 +1,9 @@ @@ -18,7 +18,7 @@ index b947b31fc3b135f116af97907d5301619cc33070..43925ed1e5c210399ba9fedb7bf890a6 import org.bukkit.Bukkit; import org.bukkit.configuration.file.YamlConfiguration; import org.spigotmc.SpigotWorldConfig; -@@ -470,4 +472,31 @@ public class PaperWorldConfig { +@@ -464,4 +466,31 @@ public class PaperWorldConfig { private void maxAutoSaveChunksPerTick() { maxAutoSaveChunksPerTick = getInt("max-auto-save-chunks-per-tick", 24); } @@ -98,7 +98,7 @@ index 0000000000000000000000000000000000000000..df7e4183d8842f5be8ae9d0698f8fa90 +} diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java new file mode 100644 -index 0000000000000000000000000000000000000000..4ecd180fa84376319ef78bf9b21bf669b22ff817 +index 0000000000000000000000000000000000000000..c0d7767adb996edf9f645be591e4eee1d1dddf97 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java @@ -0,0 +1,620 @@ @@ -197,7 +197,7 @@ index 0000000000000000000000000000000000000000..4ecd180fa84376319ef78bf9b21bf669 + IBlockData blockData = ChunkSection.GLOBAL_PALETTE.getObject(i); + + if (blockData != null) { -+ solidGlobal[i] = blockData.getBlock().isOccluding(blockData, emptyChunk, zeroPos) ++ solidGlobal[i] = blockData.isOccluding(emptyChunk, zeroPos) + && blockData.getBlock() != Blocks.SPAWNER && blockData.getBlock() != Blocks.BARRIER && blockData.getBlock() != Blocks.SHULKER_BOX; + // shulker box checks TE. + } @@ -1382,7 +1382,7 @@ index ee8df274d43be753887fb77e4203e2ee30ea02b3..9f91c02b444874e690eacb0cfa0c8101 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 8773b521db869f26525af7b4342955ade835b8ef..1434a6e2830aa455bb6ccfd2ce8c034b8d300414 100644 +index c40d7ef4682c686282094330a0954bd09596c9d5..350178efcbacea6261df98d694c49dde8fa57d97 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -2,6 +2,8 @@ package net.minecraft.server; @@ -1414,7 +1414,7 @@ index 8773b521db869f26525af7b4342955ade835b8ef..1434a6e2830aa455bb6ccfd2ce8c034b this.generator = gen; this.world = new CraftWorld((WorldServer) this, gen, env); this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit -@@ -402,6 +406,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -406,6 +410,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { // CraftBukkit end IBlockData iblockdata1 = chunk.setType(blockposition, iblockdata, (i & 64) != 0, (i & 1024) == 0); // CraftBukkit custom NO_PLACE flag @@ -1423,10 +1423,10 @@ index 8773b521db869f26525af7b4342955ade835b8ef..1434a6e2830aa455bb6ccfd2ce8c034b if (iblockdata1 == null) { // CraftBukkit start - remove blockstate if failed (or the same) diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index c2fffa60b3d020e4c70a2cabcf61ec36fb9edc65..789fd7d3d7679408d11a20cca6db96ecb86a067d 100644 +index 13d0d358ced5f1617fc17f6706d359d0cf6c796d..abda45b1e833ef9d795f11670cf650ed2479673c 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -96,7 +96,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -95,7 +95,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { // Add env and gen to constructor, WorldData -> WorldDataServer public WorldServer(MinecraftServer minecraftserver, Executor executor, Convertable.ConversionSession convertable_conversionsession, IWorldDataServer iworlddataserver, ResourceKey<World> resourcekey, ResourceKey<DimensionManager> resourcekey1, DimensionManager dimensionmanager, WorldLoadListener worldloadlistener, ChunkGenerator chunkgenerator, boolean flag, long i, List<MobSpawner> list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) { diff --git a/Spigot-Server-Patches/0371-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch b/Spigot-Server-Patches/0372-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch similarity index 94% rename from Spigot-Server-Patches/0371-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch rename to Spigot-Server-Patches/0372-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch index 134323c6d..fde8ce6bd 100644 --- a/Spigot-Server-Patches/0371-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch +++ b/Spigot-Server-Patches/0372-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch @@ -17,10 +17,10 @@ This should fully solve all of the issues around it so that only natural influences natural spawns. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 43925ed1e5c210399ba9fedb7bf890a6bd617e4a..16727e92f591725c8f8cefb250b7ab8c64a19472 100644 +index b3d080aa109d0ed77a3318d07474ec7e46aaa054..1b60c649310f44fdf4533dfde50703b544c8d946 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -473,6 +473,16 @@ public class PaperWorldConfig { +@@ -467,6 +467,16 @@ public class PaperWorldConfig { maxAutoSaveChunksPerTick = getInt("max-auto-save-chunks-per-tick", 24); } diff --git a/Spigot-Server-Patches/0372-Configurable-projectile-relative-velocity.patch b/Spigot-Server-Patches/0373-Configurable-projectile-relative-velocity.patch similarity index 95% rename from Spigot-Server-Patches/0372-Configurable-projectile-relative-velocity.patch rename to Spigot-Server-Patches/0373-Configurable-projectile-relative-velocity.patch index 5f2519a43..8129975d2 100644 --- a/Spigot-Server-Patches/0372-Configurable-projectile-relative-velocity.patch +++ b/Spigot-Server-Patches/0373-Configurable-projectile-relative-velocity.patch @@ -25,10 +25,10 @@ P3) Solutions for 1) and especially 2) might not be future-proof, while this server-internal fix makes this change future-proof. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 16727e92f591725c8f8cefb250b7ab8c64a19472..a6e68b2ab8890d9d2a842ca0a6b565a1831fed6b 100644 +index 1b60c649310f44fdf4533dfde50703b544c8d946..1bbea57d94dfe493741a4b32d5a7b71e6cb77305 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -509,4 +509,9 @@ public class PaperWorldConfig { +@@ -503,4 +503,9 @@ public class PaperWorldConfig { } log("Anti-Xray: " + (antiXray ? "enabled" : "disabled") + " / Engine Mode: " + engineMode.getDescription() + " / Up to " + ((maxChunkSectionIndex + 1) * 16) + " blocks / Update Radius: " + updateRadius); } diff --git a/Spigot-Server-Patches/0373-Mark-entities-as-being-ticked-when-notifying-navigat.patch b/Spigot-Server-Patches/0374-Mark-entities-as-being-ticked-when-notifying-navigat.patch similarity index 81% rename from Spigot-Server-Patches/0373-Mark-entities-as-being-ticked-when-notifying-navigat.patch rename to Spigot-Server-Patches/0374-Mark-entities-as-being-ticked-when-notifying-navigat.patch index cee98a020..12552ee96 100644 --- a/Spigot-Server-Patches/0373-Mark-entities-as-being-ticked-when-notifying-navigat.patch +++ b/Spigot-Server-Patches/0374-Mark-entities-as-being-ticked-when-notifying-navigat.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Mark entities as being ticked when notifying navigation diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 789fd7d3d7679408d11a20cca6db96ecb86a067d..2738d61709a956e83ab7b4e05063a99bcbb7e01b 100644 +index abda45b1e833ef9d795f11670cf650ed2479673c..ed5b69682fc80d8ff9a0e068d45456a75cbe3891 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1320,6 +1320,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1319,6 +1319,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { VoxelShape voxelshape1 = iblockdata1.getCollisionShape(this, blockposition); if (VoxelShapes.c(voxelshape, voxelshape1, OperatorBoolean.NOT_SAME)) { @@ -16,7 +16,7 @@ index 789fd7d3d7679408d11a20cca6db96ecb86a067d..2738d61709a956e83ab7b4e05063a99b Iterator iterator = this.navigators.iterator(); while (iterator.hasNext()) { -@@ -1330,6 +1331,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1329,6 +1330,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } } diff --git a/Spigot-Server-Patches/0374-offset-item-frame-ticking.patch b/Spigot-Server-Patches/0375-offset-item-frame-ticking.patch similarity index 100% rename from Spigot-Server-Patches/0374-offset-item-frame-ticking.patch rename to Spigot-Server-Patches/0375-offset-item-frame-ticking.patch diff --git a/Spigot-Server-Patches/0375-Avoid-hopper-searches-if-there-are-no-items.patch b/Spigot-Server-Patches/0376-Avoid-hopper-searches-if-there-are-no-items.patch similarity index 100% rename from Spigot-Server-Patches/0375-Avoid-hopper-searches-if-there-are-no-items.patch rename to Spigot-Server-Patches/0376-Avoid-hopper-searches-if-there-are-no-items.patch diff --git a/Spigot-Server-Patches/0376-Asynchronous-chunk-IO-and-loading.patch b/Spigot-Server-Patches/0377-Asynchronous-chunk-IO-and-loading.patch similarity index 99% rename from Spigot-Server-Patches/0376-Asynchronous-chunk-IO-and-loading.patch rename to Spigot-Server-Patches/0377-Asynchronous-chunk-IO-and-loading.patch index 31aeb6500..5d19c0d71 100644 --- a/Spigot-Server-Patches/0376-Asynchronous-chunk-IO-and-loading.patch +++ b/Spigot-Server-Patches/0377-Asynchronous-chunk-IO-and-loading.patch @@ -121,7 +121,7 @@ tasks required to be executed by the chunk load task (i.e lighting and some poi tasks). diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java -index fa1c920ea6092259149f9e7f9cd7cc1ed27bf338..98acbfa44dd9042b26fdf719d7748f92d201c928 100644 +index 03bb2102d6952df04753ba9986aad9b494568e2d..2956a831af9b8cbc87c8761838db5b36389a7ad2 100644 --- a/src/main/java/co/aikar/timings/WorldTimingsHandler.java +++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java @@ -57,6 +57,17 @@ public class WorldTimingsHandler { @@ -140,7 +140,7 @@ index fa1c920ea6092259149f9e7f9cd7cc1ed27bf338..98acbfa44dd9042b26fdf719d7748f92 + public final Timing chunkUnloadDataSave; + public WorldTimingsHandler(World server) { - String name = server.worldData.getName() +" - "; + String name = server.getWorld().getName() +" - "; @@ -110,6 +121,17 @@ public class WorldTimingsHandler { @@ -199,7 +199,7 @@ index af810987846efcd2bffbd23c31481b2d31c168dd..331493a172f58e71b464d635efdba461 doChunkInfo(sender, args); break; diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 1aa7d0cfaf5697daeeb98e237387f27e76bca16f..8c2202fbc1c38e6cd19005d010e365ae14233f51 100644 +index f9b1b198299166759fe0bd0a36d8d88c626e06a4..bf86444c479f346e7d56f10a7c0ebefd62f08f59 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -1,5 +1,6 @@ @@ -209,7 +209,7 @@ index 1aa7d0cfaf5697daeeb98e237387f27e76bca16f..8c2202fbc1c38e6cd19005d010e365ae import com.google.common.base.Strings; import com.google.common.base.Throwables; -@@ -346,4 +347,54 @@ public class PaperConfig { +@@ -347,4 +348,54 @@ public class PaperConfig { maxBookPageSize = getInt("settings.book-size.page-max", maxBookPageSize); maxBookTotalSizeMultiplier = getDouble("settings.book-size.total-multiplier", maxBookTotalSizeMultiplier); } @@ -334,14 +334,13 @@ index 0000000000000000000000000000000000000000..5af0ac3d9e87c06053e65433060f1577 +} diff --git a/src/main/java/com/destroystokyo/paper/io/PaperFileIOThread.java b/src/main/java/com/destroystokyo/paper/io/PaperFileIOThread.java new file mode 100644 -index 0000000000000000000000000000000000000000..a6434b4e28a73ecab4350862c5747b7494761ba0 +index 0000000000000000000000000000000000000000..1917d7be7dfddc93c95b9fd864cf13f9a24c8f96 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/io/PaperFileIOThread.java -@@ -0,0 +1,607 @@ +@@ -0,0 +1,606 @@ +package com.destroystokyo.paper.io; + +import net.minecraft.server.ChunkCoordIntPair; -+import net.minecraft.server.ExceptionWorldConflict; +import net.minecraft.server.MinecraftServer; +import net.minecraft.server.NBTTagCompound; +import net.minecraft.server.RegionFile; @@ -882,15 +881,15 @@ index 0000000000000000000000000000000000000000..a6434b4e28a73ecab4350862c5747b74 + } + + // check if another process is writing -+ try { -+ this.world.checkSession(); -+ } catch (final ExceptionWorldConflict ex) { ++ /*try { TODO: Can we restore this? ++ ((WorldServer)this.world).checkSession(); ++ } catch (final Exception ex) { + LOGGER.fatal("Couldn't save chunk; already in use by another instance of Minecraft?", ex); + // we don't need to set the write counter to -1 as we know at this stage there's no point in re-scheduling + // writes since they'll fail anyways. + return; + } -+ ++*/ + for (;;) { + final long writeCounter; + final NBTTagCompound data; @@ -2916,7 +2915,7 @@ index fa03834dacacf7ae6a326c88007256a261153c27..c0d2df8ef3b4d0224ede2b7a4ef4e3f9 } } diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java -index 5658b2a3c4601d07545b08b0a7179c8f3b051bd4..b2e8ddc9ff1bf5f519d971455d48a2faad3638f2 100644 +index 99801463d958540b5148e55c1e44f90a1078c371..9615c4d324e42f7f91a7e60b6151c16d20e9c739 100644 --- a/src/main/java/net/minecraft/server/MCUtil.java +++ b/src/main/java/net/minecraft/server/MCUtil.java @@ -696,4 +696,9 @@ public final class MCUtil { @@ -2942,7 +2941,7 @@ index ca45b10b5dd7003314ff4c3294f13d2c53d9e678..32a4d1d036ed01e556348361407b7ea2 DedicatedServer dedicatedserver1 = new DedicatedServer(optionset, datapackconfiguration1, thread, iregistrycustom_dimension, convertable_conversionsession, resourcepackrepository, datapackresources, null, dedicatedserversettings, DataConverterRegistry.a(), minecraftsessionservice, gameprofilerepository, usercache, WorldLoadListenerLogger::new); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c6e96ebe3d3372e1c0868de46dd3b099dbd66bf3..aa9b16e75123dfff4c2ea9501a9ae2e584f85803 100644 +index 1c28fdb8fb98cecb3c473fa0ea31edce7bbf002b..3a9e872922de10b597cc898ba76f3fbfd46e41bb 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -808,7 +808,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas @@ -3893,10 +3892,10 @@ index b8c15047771bd4527b86e514a3b950b2ffc6eef0..303f6b0953ff3c29bd31ec5e02386a92 HAS_SPACE(VillagePlaceRecord::d), IS_OCCUPIED(VillagePlaceRecord::e), ANY((villageplacerecord) -> { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 2738d61709a956e83ab7b4e05063a99bcbb7e01b..88a7217101070222c3c9a07ce6a6d7d75573144d 100644 +index ed5b69682fc80d8ff9a0e068d45456a75cbe3891..6e9a5b77ef7e67534b64781ee9db6b6d3e33e879 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -94,6 +94,79 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -93,6 +93,79 @@ public class WorldServer extends World implements GeneratorAccessSeed { return this.chunkProvider.getChunkAt(x, z, false); } @@ -3976,7 +3975,7 @@ index 2738d61709a956e83ab7b4e05063a99bcbb7e01b..88a7217101070222c3c9a07ce6a6d7d7 // Add env and gen to constructor, WorldData -> WorldDataServer public WorldServer(MinecraftServer minecraftserver, Executor executor, Convertable.ConversionSession convertable_conversionsession, IWorldDataServer iworlddataserver, ResourceKey<World> resourcekey, ResourceKey<DimensionManager> resourcekey1, DimensionManager dimensionmanager, WorldLoadListener worldloadlistener, ChunkGenerator chunkgenerator, boolean flag, long i, List<MobSpawner> list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) { super(iworlddataserver, resourcekey, resourcekey1, dimensionmanager, minecraftserver::getMethodProfiler, false, flag, i, gen, env, executor); // Paper pass executor -@@ -141,6 +214,8 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -140,6 +213,8 @@ public class WorldServer extends World implements GeneratorAccessSeed { this.dragonBattle = null; } this.getServer().addWorld(this.getWorld()); // CraftBukkit @@ -3985,7 +3984,7 @@ index 2738d61709a956e83ab7b4e05063a99bcbb7e01b..88a7217101070222c3c9a07ce6a6d7d7 } // CraftBukkit start -@@ -1570,7 +1645,10 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1569,7 +1644,10 @@ public class WorldServer extends World implements GeneratorAccessSeed { } MCUtil.getSpiralOutChunks(spawn, radiusInBlocks >> 4).forEach(pair -> { diff --git a/Spigot-Server-Patches/0377-Use-getChunkIfLoadedImmediately-in-places.patch b/Spigot-Server-Patches/0378-Use-getChunkIfLoadedImmediately-in-places.patch similarity index 91% rename from Spigot-Server-Patches/0377-Use-getChunkIfLoadedImmediately-in-places.patch rename to Spigot-Server-Patches/0378-Use-getChunkIfLoadedImmediately-in-places.patch index 684a858e9..78b6285e2 100644 --- a/Spigot-Server-Patches/0377-Use-getChunkIfLoadedImmediately-in-places.patch +++ b/Spigot-Server-Patches/0378-Use-getChunkIfLoadedImmediately-in-places.patch @@ -21,7 +21,7 @@ index 795b24c8d102417ae7e730254ecddefc06dbe0df..e382315c91540ac24821e432ee31a824 return; } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 1434a6e2830aa455bb6ccfd2ce8c034b8d300414..4564c6ebb3aaed1ca63ff26524bba2edda551f85 100644 +index 350178efcbacea6261df98d694c49dde8fa57d97..37a06b96b9d5c98b23e5da7352f549f4a959abbd 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -103,6 +103,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -38,7 +38,7 @@ index 1434a6e2830aa455bb6ccfd2ce8c034b8d300414..4564c6ebb3aaed1ca63ff26524bba2ed protected World(WorldDataMutable worlddatamutable, ResourceKey<World> resourcekey, ResourceKey<DimensionManager> resourcekey1, DimensionManager dimensionmanager, Supplier<GameProfilerFiller> supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env, java.util.concurrent.Executor executor) { this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((WorldDataServer) worlddatamutable).getName()); // Spigot this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig((((WorldDataServer)worlddatamutable).getName()), this.spigotConfig); // Paper -@@ -1033,14 +1040,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1037,14 +1044,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { } public boolean p(BlockPosition blockposition) { @@ -55,7 +55,7 @@ index 1434a6e2830aa455bb6ccfd2ce8c034b8d300414..4564c6ebb3aaed1ca63ff26524bba2ed return ichunkaccess == null ? false : ichunkaccess.getType(blockposition).a((IBlockAccess) this, blockposition, entity, enumdirection); } -@@ -1161,7 +1168,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1165,7 +1172,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { for (int i1 = i; i1 < j; ++i1) { for (int j1 = k; j1 < l; ++j1) { @@ -65,13 +65,13 @@ index 1434a6e2830aa455bb6ccfd2ce8c034b8d300414..4564c6ebb3aaed1ca63ff26524bba2ed if (chunk != null) { chunk.a(oclass, axisalignedbb, list, predicate); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 88a7217101070222c3c9a07ce6a6d7d75573144d..3e42d52d2256c85b7dcbbd0e363fa1e1c789b1bf 100644 +index 6e9a5b77ef7e67534b64781ee9db6b6d3e33e879..85a025bd20cbcf5547b0c9e0f8d4a62f5bcfc358 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -91,7 +91,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -90,7 +90,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } - public Chunk getChunkIfLoaded(int x, int z) { + @Override public Chunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI - return this.chunkProvider.getChunkAt(x, z, false); + return this.chunkProvider.getChunkAtIfLoadedImmediately(x, z); // Paper } diff --git a/Spigot-Server-Patches/0378-Reduce-sync-loads.patch b/Spigot-Server-Patches/0379-Reduce-sync-loads.patch similarity index 97% rename from Spigot-Server-Patches/0378-Reduce-sync-loads.patch rename to Spigot-Server-Patches/0379-Reduce-sync-loads.patch index 7d7d74706..3e6485f9a 100644 --- a/Spigot-Server-Patches/0378-Reduce-sync-loads.patch +++ b/Spigot-Server-Patches/0379-Reduce-sync-loads.patch @@ -298,10 +298,10 @@ index edd901bb53385fa3d189a0057d57f98bf8b7115c..707db4febac59a4d09d6420ea2add469 this.serverThreadQueue.awaitTasks(completablefuture::isDone); com.destroystokyo.paper.io.chunk.ChunkTaskManager.popChunkWait(); // Paper - async chunk debug diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 4564c6ebb3aaed1ca63ff26524bba2edda551f85..ddd66c2519d67585df06d68612a0c8a8830669ac 100644 +index 37a06b96b9d5c98b23e5da7352f549f4a959abbd..b2852df57368294c8965fbc50a496a8f465304ae 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1101,7 +1101,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1105,7 +1105,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { for (int i1 = i; i1 <= j; ++i1) { for (int j1 = k; j1 <= l; ++j1) { @@ -310,7 +310,7 @@ index 4564c6ebb3aaed1ca63ff26524bba2edda551f85..ddd66c2519d67585df06d68612a0c8a8 if (chunk != null) { chunk.a(entity, axisalignedbb, list, predicate); -@@ -1122,7 +1122,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1126,7 +1126,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { for (int i1 = i; i1 < j; ++i1) { for (int j1 = k; j1 < l; ++j1) { @@ -319,7 +319,7 @@ index 4564c6ebb3aaed1ca63ff26524bba2edda551f85..ddd66c2519d67585df06d68612a0c8a8 if (chunk != null) { chunk.a(entitytypes, axisalignedbb, list, predicate); -@@ -1145,7 +1145,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1149,7 +1149,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { for (int i1 = i; i1 < j; ++i1) { for (int j1 = k; j1 < l; ++j1) { @@ -329,10 +329,10 @@ index 4564c6ebb3aaed1ca63ff26524bba2edda551f85..ddd66c2519d67585df06d68612a0c8a8 if (chunk != null) { chunk.a(oclass, axisalignedbb, list, predicate); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 3e42d52d2256c85b7dcbbd0e363fa1e1c789b1bf..0dd249f94905c30b5320109a3f0b17cac70def8d 100644 +index 85a025bd20cbcf5547b0c9e0f8d4a62f5bcfc358..7e01a4953c7fcff3a1199c7ca4c7731748418d69 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -166,6 +166,12 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -165,6 +165,12 @@ public class WorldServer extends World implements GeneratorAccessSeed { }; public final com.destroystokyo.paper.io.chunk.ChunkTaskManager asyncChunkTaskManager; // Paper end diff --git a/Spigot-Server-Patches/0379-Implement-alternative-item-despawn-rate.patch b/Spigot-Server-Patches/0380-Implement-alternative-item-despawn-rate.patch similarity index 97% rename from Spigot-Server-Patches/0379-Implement-alternative-item-despawn-rate.patch rename to Spigot-Server-Patches/0380-Implement-alternative-item-despawn-rate.patch index 47adb6a10..f12dba254 100644 --- a/Spigot-Server-Patches/0379-Implement-alternative-item-despawn-rate.patch +++ b/Spigot-Server-Patches/0380-Implement-alternative-item-despawn-rate.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement alternative item-despawn-rate diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index a6e68b2ab8890d9d2a842ca0a6b565a1831fed6b..cf9d980e61be199a34cff98f805e511f9410dd51 100644 +index 1bbea57d94dfe493741a4b32d5a7b71e6cb77305..f7a52481fa00a45fdebe6715dfde85c0f91fb8c0 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -1,10 +1,15 @@ @@ -24,7 +24,7 @@ index a6e68b2ab8890d9d2a842ca0a6b565a1831fed6b..cf9d980e61be199a34cff98f805e511f import org.bukkit.configuration.file.YamlConfiguration; import org.spigotmc.SpigotWorldConfig; -@@ -514,4 +519,52 @@ public class PaperWorldConfig { +@@ -508,4 +513,52 @@ public class PaperWorldConfig { private void disableRelativeProjectileVelocity() { disableRelativeProjectileVelocity = getBoolean("game-mechanics.disable-relative-projectile-velocity", false); } diff --git a/Spigot-Server-Patches/0380-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch b/Spigot-Server-Patches/0381-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch similarity index 96% rename from Spigot-Server-Patches/0380-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch rename to Spigot-Server-Patches/0381-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch index 4091fbc5f..ef4223df2 100644 --- a/Spigot-Server-Patches/0380-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch +++ b/Spigot-Server-Patches/0381-Do-less-work-if-we-have-a-custom-Bukkit-generator.patch @@ -7,7 +7,7 @@ If the Bukkit generator already has a spawn, use it immediately instead of spending time generating one that we won't use diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index aa9b16e75123dfff4c2ea9501a9ae2e584f85803..bdb98d308df3e3481697d03f882e048d6df46946 100644 +index 824e9df675edd664ceb11c8cdb39f035df237ce3..13edd764d79a5974ec58392e70d049172c1090f4 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -513,11 +513,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas diff --git a/Spigot-Server-Patches/0381-Fix-MC-158900.patch b/Spigot-Server-Patches/0382-Fix-MC-158900.patch similarity index 100% rename from Spigot-Server-Patches/0381-Fix-MC-158900.patch rename to Spigot-Server-Patches/0382-Fix-MC-158900.patch diff --git a/Spigot-Server-Patches/0382-implement-optional-per-player-mob-spawns.patch b/Spigot-Server-Patches/0383-implement-optional-per-player-mob-spawns.patch similarity index 99% rename from Spigot-Server-Patches/0382-implement-optional-per-player-mob-spawns.patch rename to Spigot-Server-Patches/0383-implement-optional-per-player-mob-spawns.patch index 131819e18..8a0e0c71d 100644 --- a/Spigot-Server-Patches/0382-implement-optional-per-player-mob-spawns.patch +++ b/Spigot-Server-Patches/0383-implement-optional-per-player-mob-spawns.patch @@ -25,10 +25,10 @@ index 98acbfa44dd9042b26fdf719d7748f92d201c928..a94ebf7c76f167d3b66f7d243910c13d poiUnload = Timings.ofSafe(name + "Chunk unload - POI"); chunkUnload = Timings.ofSafe(name + "Chunk unload - Chunk"); diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index cf9d980e61be199a34cff98f805e511f9410dd51..3d9a48e56194225cf39e31d13d26ec17afedadaf 100644 +index f7a52481fa00a45fdebe6715dfde85c0f91fb8c0..884549b7a0f3c8084bdf9da98611e8abc942cf45 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 { +@@ -561,4 +561,9 @@ public class PaperWorldConfig { } } } diff --git a/Spigot-Server-Patches/0383-Prevent-consuming-the-wrong-itemstack.patch b/Spigot-Server-Patches/0384-Prevent-consuming-the-wrong-itemstack.patch similarity index 88% rename from Spigot-Server-Patches/0383-Prevent-consuming-the-wrong-itemstack.patch rename to Spigot-Server-Patches/0384-Prevent-consuming-the-wrong-itemstack.patch index 4fc97cb71..6c675a91c 100644 --- a/Spigot-Server-Patches/0383-Prevent-consuming-the-wrong-itemstack.patch +++ b/Spigot-Server-Patches/0384-Prevent-consuming-the-wrong-itemstack.patch @@ -5,10 +5,10 @@ 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 79cf31d6fcd0e82ee146c489448a93a6e55e4190..d44d594b52cd63adcede55fbe6548b758b482c90 100644 +index 4c011f93c600d87951fe1dc8bf6b84fac7a532cb..1cd1c80a867316cf68998962bba169db04cefe13 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -3062,10 +3062,13 @@ public abstract class EntityLiving extends Entity { +@@ -3067,10 +3067,13 @@ public abstract class EntityLiving extends Entity { this.datawatcher.set(EntityLiving.an, (byte) j); } @@ -24,7 +24,7 @@ index 79cf31d6fcd0e82ee146c489448a93a6e55e4190..d44d594b52cd63adcede55fbe6548b75 this.activeItem = itemstack; this.bk = itemstack.k(); if (!this.world.isClientSide) { -@@ -3141,6 +3144,7 @@ public abstract class EntityLiving extends Entity { +@@ -3146,6 +3149,7 @@ public abstract class EntityLiving extends Entity { this.releaseActiveItem(); } else { if (!this.activeItem.isEmpty() && this.isHandRaised()) { @@ -32,7 +32,7 @@ index 79cf31d6fcd0e82ee146c489448a93a6e55e4190..d44d594b52cd63adcede55fbe6548b75 this.b(this.activeItem, 16); // CraftBukkit start - fire PlayerItemConsumeEvent ItemStack itemstack; -@@ -3171,8 +3175,8 @@ public abstract class EntityLiving extends Entity { +@@ -3176,8 +3180,8 @@ public abstract class EntityLiving extends Entity { this.a(this.getRaisedHand(), itemstack); // CraftBukkit end this.clearActiveItem(); diff --git a/Spigot-Server-Patches/0384-only-add-passanger-entities-once-from-spawners.patch b/Spigot-Server-Patches/0385-only-add-passanger-entities-once-from-spawners.patch similarity index 100% rename from Spigot-Server-Patches/0384-only-add-passanger-entities-once-from-spawners.patch rename to Spigot-Server-Patches/0385-only-add-passanger-entities-once-from-spawners.patch diff --git a/Spigot-Server-Patches/0385-Fix-nether-portal-creation.patch b/Spigot-Server-Patches/0386-Fix-nether-portal-creation.patch similarity index 100% rename from Spigot-Server-Patches/0385-Fix-nether-portal-creation.patch rename to Spigot-Server-Patches/0386-Fix-nether-portal-creation.patch diff --git a/Spigot-Server-Patches/0386-Generator-Settings.patch b/Spigot-Server-Patches/0387-Generator-Settings.patch similarity index 97% rename from Spigot-Server-Patches/0386-Generator-Settings.patch rename to Spigot-Server-Patches/0387-Generator-Settings.patch index 04d445d5d..0d4deceea 100644 --- a/Spigot-Server-Patches/0386-Generator-Settings.patch +++ b/Spigot-Server-Patches/0387-Generator-Settings.patch @@ -5,10 +5,10 @@ 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 3d9a48e56194225cf39e31d13d26ec17afedadaf..a9d7e81ef123a7da7785a4b8dc868a0e256a61d0 100644 +index 884549b7a0f3c8084bdf9da98611e8abc942cf45..fa1b426c79d9cb4b64c43e90167f1f1fc35ac65c 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 { +@@ -566,4 +566,9 @@ public class PaperWorldConfig { private void perPlayerMobSpawns() { perPlayerMobSpawns = getBoolean("per-player-mob-spawns", false); } diff --git a/Spigot-Server-Patches/0387-Fix-MC-161754.patch b/Spigot-Server-Patches/0388-Fix-MC-161754.patch similarity index 100% rename from Spigot-Server-Patches/0387-Fix-MC-161754.patch rename to Spigot-Server-Patches/0388-Fix-MC-161754.patch diff --git a/Spigot-Server-Patches/0388-Performance-improvement-for-Chunk.getEntities.patch b/Spigot-Server-Patches/0389-Performance-improvement-for-Chunk.getEntities.patch similarity index 100% rename from Spigot-Server-Patches/0388-Performance-improvement-for-Chunk.getEntities.patch rename to Spigot-Server-Patches/0389-Performance-improvement-for-Chunk.getEntities.patch diff --git a/Spigot-Server-Patches/0389-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch b/Spigot-Server-Patches/0390-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch similarity index 100% rename from Spigot-Server-Patches/0389-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch rename to Spigot-Server-Patches/0390-Fix-spawning-of-hanging-entities-that-are-not-ItemFr.patch diff --git a/Spigot-Server-Patches/0390-Expose-the-internal-current-tick.patch b/Spigot-Server-Patches/0391-Expose-the-internal-current-tick.patch similarity index 100% rename from Spigot-Server-Patches/0390-Expose-the-internal-current-tick.patch rename to Spigot-Server-Patches/0391-Expose-the-internal-current-tick.patch diff --git a/Spigot-Server-Patches/0391-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch b/Spigot-Server-Patches/0392-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch similarity index 100% rename from Spigot-Server-Patches/0391-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch rename to Spigot-Server-Patches/0392-Fix-stuck-in-sneak-when-changing-worlds-MC-10657.patch diff --git a/Spigot-Server-Patches/0392-Add-option-to-disable-pillager-patrols.patch b/Spigot-Server-Patches/0393-Add-option-to-disable-pillager-patrols.patch similarity index 91% rename from Spigot-Server-Patches/0392-Add-option-to-disable-pillager-patrols.patch rename to Spigot-Server-Patches/0393-Add-option-to-disable-pillager-patrols.patch index d11e1de6e..c12cd0021 100644 --- a/Spigot-Server-Patches/0392-Add-option-to-disable-pillager-patrols.patch +++ b/Spigot-Server-Patches/0393-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 a9d7e81ef123a7da7785a4b8dc868a0e256a61d0..f8a617a62e62d088077712bfb66656c28b82a3c5 100644 +index fa1b426c79d9cb4b64c43e90167f1f1fc35ac65c..57c11414934d60de065d81aa76b69c9be12a440a 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 { +@@ -571,4 +571,9 @@ public class PaperWorldConfig { private void generatorSettings() { generateFlatBedrock = getBoolean("generator-settings.flat-bedrock", false); } diff --git a/Spigot-Server-Patches/0393-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch b/Spigot-Server-Patches/0394-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch similarity index 92% rename from Spigot-Server-Patches/0393-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch rename to Spigot-Server-Patches/0394-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch index e55c366dd..b1fafcbc7 100644 --- a/Spigot-Server-Patches/0393-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch +++ b/Spigot-Server-Patches/0394-Fix-AssertionError-when-player-hand-set-to-empty-typ.patch @@ -7,10 +7,10 @@ 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 d44d594b52cd63adcede55fbe6548b758b482c90..17491b9f9b4c8fb931a249580810681cb618ee45 100644 +index 1cd1c80a867316cf68998962bba169db04cefe13..8dc2e28b2386a3b9512dfcc382f9deb534381392 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2035,6 +2035,7 @@ public abstract class EntityLiving extends Entity { +@@ -2040,6 +2040,7 @@ public abstract class EntityLiving extends Entity { return predicate.test(this.getItemInMainHand().getItem()) || predicate.test(this.getItemInOffHand().getItem()); } diff --git a/Spigot-Server-Patches/0394-PlayerLaunchProjectileEvent.patch b/Spigot-Server-Patches/0395-PlayerLaunchProjectileEvent.patch similarity index 100% rename from Spigot-Server-Patches/0394-PlayerLaunchProjectileEvent.patch rename to Spigot-Server-Patches/0395-PlayerLaunchProjectileEvent.patch diff --git a/Spigot-Server-Patches/0395-Add-CraftMagicNumbers.isSupportedApiVersion.patch b/Spigot-Server-Patches/0396-Add-CraftMagicNumbers.isSupportedApiVersion.patch similarity index 100% rename from Spigot-Server-Patches/0395-Add-CraftMagicNumbers.isSupportedApiVersion.patch rename to Spigot-Server-Patches/0396-Add-CraftMagicNumbers.isSupportedApiVersion.patch diff --git a/Spigot-Server-Patches/0396-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch b/Spigot-Server-Patches/0397-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch similarity index 100% rename from Spigot-Server-Patches/0396-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch rename to Spigot-Server-Patches/0397-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch diff --git a/Spigot-Server-Patches/0397-MC-145656-Fix-Follow-Range-Initial-Target.patch b/Spigot-Server-Patches/0398-MC-145656-Fix-Follow-Range-Initial-Target.patch similarity index 95% rename from Spigot-Server-Patches/0397-MC-145656-Fix-Follow-Range-Initial-Target.patch rename to Spigot-Server-Patches/0398-MC-145656-Fix-Follow-Range-Initial-Target.patch index e8540c0cd..f6392b286 100644 --- a/Spigot-Server-Patches/0397-MC-145656-Fix-Follow-Range-Initial-Target.patch +++ b/Spigot-Server-Patches/0398-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 f8a617a62e62d088077712bfb66656c28b82a3c5..5c5a79d0ea00c9c4c2e93d524291f48f92e77857 100644 +index 57c11414934d60de065d81aa76b69c9be12a440a..4573fb7e5672cf7e7b2784c1f8102cfd39ee58e9 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -582,4 +582,9 @@ public class PaperWorldConfig { +@@ -576,4 +576,9 @@ public class PaperWorldConfig { private void pillagerSettings() { disablePillagerPatrols = getBoolean("game-mechanics.disable-pillager-patrols", disablePillagerPatrols); } diff --git a/Spigot-Server-Patches/0398-Optimize-Hoppers.patch b/Spigot-Server-Patches/0399-Optimize-Hoppers.patch similarity index 97% rename from Spigot-Server-Patches/0398-Optimize-Hoppers.patch rename to Spigot-Server-Patches/0399-Optimize-Hoppers.patch index 4239e6d92..2df758448 100644 --- a/Spigot-Server-Patches/0398-Optimize-Hoppers.patch +++ b/Spigot-Server-Patches/0399-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 5c5a79d0ea00c9c4c2e93d524291f48f92e77857..4bfe2fb948ee204f8c5a8c316141904a8a6a8b16 100644 +index 4573fb7e5672cf7e7b2784c1f8102cfd39ee58e9..1757cf8e0883e8908b97e0a7beb1e6ecec10d8e6 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -587,4 +587,13 @@ public class PaperWorldConfig { +@@ -581,4 +581,13 @@ public class PaperWorldConfig { private void entitiesTargetWithFollowRange() { entitiesTargetWithFollowRange = getBoolean("entities-target-with-follow-range", entitiesTargetWithFollowRange); } @@ -73,10 +73,10 @@ index a075a41d954836864a5186b383e967a9ac262df8..64150130fa0081786190eada4cd2d131 itemstack.d(this.D()); if (this.tag != null) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index bdb98d308df3e3481697d03f882e048d6df46946..82d0492fd208ca7991d07cdc6296635290d5af3b 100644 +index 8b7dcb88e04fbad29538e8d2945020fca02b4143..620ee43ada7543e21f6c10afec424cff6017f2cd 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1252,6 +1252,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas +@@ -1248,6 +1248,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas while (iterator.hasNext()) { WorldServer worldserver = (WorldServer) iterator.next(); worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper @@ -85,7 +85,7 @@ index bdb98d308df3e3481697d03f882e048d6df46946..82d0492fd208ca7991d07cdc62966352 this.methodProfiler.a(() -> { return worldserver + " " + worldserver.getDimensionKey().a(); diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 54285237ed5a096b2e46cabd78f7dcd5128133a8..543bbd1610fb2e6df4e8ad7fbf9f2cf9b4c6cbe6 100644 +index 2b06c95b4fac97513e706ef073fdd7418e1f092c..67fda8bd5a0ad6fea2df0066c61e006c8a49980c 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -62,6 +62,7 @@ public abstract class TileEntity implements KeyedObject { // Paper @@ -481,10 +481,10 @@ index 5ebba482a65cfe6079484a99f016f968c59df8ee..d017904561d093bf8f0061f646a75aa5 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index ddd66c2519d67585df06d68612a0c8a8830669ac..9b751727d137316290f363e39993f75293fd0887 100644 +index b2852df57368294c8965fbc50a496a8f465304ae..41302dc5a2f30987dab448d2715f9eeea8174dfc 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1133,8 +1133,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1137,8 +1137,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return list; } diff --git a/Spigot-Server-Patches/0399-PlayerDeathEvent-shouldDropExperience.patch b/Spigot-Server-Patches/0400-PlayerDeathEvent-shouldDropExperience.patch similarity index 100% rename from Spigot-Server-Patches/0399-PlayerDeathEvent-shouldDropExperience.patch rename to Spigot-Server-Patches/0400-PlayerDeathEvent-shouldDropExperience.patch diff --git a/Spigot-Server-Patches/0400-Prevent-bees-loading-chunks-checking-hive-position.patch b/Spigot-Server-Patches/0401-Prevent-bees-loading-chunks-checking-hive-position.patch similarity index 100% rename from Spigot-Server-Patches/0400-Prevent-bees-loading-chunks-checking-hive-position.patch rename to Spigot-Server-Patches/0401-Prevent-bees-loading-chunks-checking-hive-position.patch diff --git a/Spigot-Server-Patches/0401-Don-t-load-Chunks-from-Hoppers-and-other-things.patch b/Spigot-Server-Patches/0402-Don-t-load-Chunks-from-Hoppers-and-other-things.patch similarity index 100% rename from Spigot-Server-Patches/0401-Don-t-load-Chunks-from-Hoppers-and-other-things.patch rename to Spigot-Server-Patches/0402-Don-t-load-Chunks-from-Hoppers-and-other-things.patch diff --git a/Spigot-Server-Patches/0402-Guard-against-serializing-mismatching-chunk-coordina.patch b/Spigot-Server-Patches/0403-Guard-against-serializing-mismatching-chunk-coordina.patch similarity index 100% rename from Spigot-Server-Patches/0402-Guard-against-serializing-mismatching-chunk-coordina.patch rename to Spigot-Server-Patches/0403-Guard-against-serializing-mismatching-chunk-coordina.patch diff --git a/Spigot-Server-Patches/0403-Optimise-IEntityAccess-getPlayerByUUID.patch b/Spigot-Server-Patches/0404-Optimise-IEntityAccess-getPlayerByUUID.patch similarity index 93% rename from Spigot-Server-Patches/0403-Optimise-IEntityAccess-getPlayerByUUID.patch rename to Spigot-Server-Patches/0404-Optimise-IEntityAccess-getPlayerByUUID.patch index 8087a97ce..596ba2a61 100644 --- a/Spigot-Server-Patches/0403-Optimise-IEntityAccess-getPlayerByUUID.patch +++ b/Spigot-Server-Patches/0404-Optimise-IEntityAccess-getPlayerByUUID.patch @@ -23,10 +23,10 @@ index 48e8b005bd9589135eff03a110ecce8776ab208a..74d4c28246e7db850e6d993e07a84b2a EntityHuman entityhuman = (EntityHuman) this.getPlayers().get(i); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 0dd249f94905c30b5320109a3f0b17cac70def8d..1d4e34b2ece861e7e4f2fe0f15f6fbf8ab47f86c 100644 +index 7e01a4953c7fcff3a1199c7ca4c7731748418d69..cdb558edd9aa176a7750403afd6634e29ada616f 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -173,6 +173,15 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -172,6 +172,15 @@ public class WorldServer extends World implements GeneratorAccessSeed { } // Paper end diff --git a/Spigot-Server-Patches/0404-Fix-items-not-falling-correctly.patch b/Spigot-Server-Patches/0405-Fix-items-not-falling-correctly.patch similarity index 100% rename from Spigot-Server-Patches/0404-Fix-items-not-falling-correctly.patch rename to Spigot-Server-Patches/0405-Fix-items-not-falling-correctly.patch diff --git a/Spigot-Server-Patches/0405-Lag-compensate-eating.patch b/Spigot-Server-Patches/0406-Lag-compensate-eating.patch similarity index 89% rename from Spigot-Server-Patches/0405-Lag-compensate-eating.patch rename to Spigot-Server-Patches/0406-Lag-compensate-eating.patch index 97c8f1a7b..838167719 100644 --- a/Spigot-Server-Patches/0405-Lag-compensate-eating.patch +++ b/Spigot-Server-Patches/0406-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 17491b9f9b4c8fb931a249580810681cb618ee45..3d30dcfdf124ff634afff3db17375bad06a19ad8 100644 +index 8dc2e28b2386a3b9512dfcc382f9deb534381392..ce586a89b3d812e5c6ff371c2abcb15df8de99d9 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 { @@ -19,7 +19,7 @@ index 17491b9f9b4c8fb931a249580810681cb618ee45..3d30dcfdf124ff634afff3db17375bad protected int bl; private BlockPosition bE; private Optional<BlockPosition> bF; -@@ -3012,6 +3012,11 @@ public abstract class EntityLiving extends Entity { +@@ -3017,6 +3017,11 @@ public abstract class EntityLiving extends Entity { return ((Byte) this.datawatcher.get(EntityLiving.an) & 2) > 0 ? EnumHand.OFF_HAND : EnumHand.MAIN_HAND; } @@ -31,7 +31,7 @@ index 17491b9f9b4c8fb931a249580810681cb618ee45..3d30dcfdf124ff634afff3db17375bad private void u() { if (this.isHandRaised()) { if (ItemStack.d(this.b(this.getRaisedHand()), this.activeItem)) { -@@ -3021,7 +3026,13 @@ public abstract class EntityLiving extends Entity { +@@ -3026,7 +3031,13 @@ public abstract class EntityLiving extends Entity { this.b(this.activeItem, 5); } @@ -46,7 +46,7 @@ index 17491b9f9b4c8fb931a249580810681cb618ee45..3d30dcfdf124ff634afff3db17375bad this.s(); } } else { -@@ -3071,7 +3082,10 @@ public abstract class EntityLiving extends Entity { +@@ -3076,7 +3087,10 @@ public abstract class EntityLiving extends Entity { if (!itemstack.isEmpty() && !this.isHandRaised() || forceUpdate) { // Paper use override flag this.activeItem = itemstack; @@ -58,7 +58,7 @@ index 17491b9f9b4c8fb931a249580810681cb618ee45..3d30dcfdf124ff634afff3db17375bad if (!this.world.isClientSide) { this.c(1, true); this.c(2, enumhand == EnumHand.OFF_HAND); -@@ -3095,7 +3109,10 @@ public abstract class EntityLiving extends Entity { +@@ -3100,7 +3114,10 @@ public abstract class EntityLiving extends Entity { } } else if (!this.isHandRaised() && !this.activeItem.isEmpty()) { this.activeItem = ItemStack.b; @@ -70,7 +70,7 @@ index 17491b9f9b4c8fb931a249580810681cb618ee45..3d30dcfdf124ff634afff3db17375bad } } -@@ -3217,7 +3234,10 @@ public abstract class EntityLiving extends Entity { +@@ -3222,7 +3239,10 @@ public abstract class EntityLiving extends Entity { } this.activeItem = ItemStack.b; diff --git a/Spigot-Server-Patches/0406-Optimize-call-to-getFluid-for-explosions.patch b/Spigot-Server-Patches/0407-Optimize-call-to-getFluid-for-explosions.patch similarity index 100% rename from Spigot-Server-Patches/0406-Optimize-call-to-getFluid-for-explosions.patch rename to Spigot-Server-Patches/0407-Optimize-call-to-getFluid-for-explosions.patch diff --git a/Spigot-Server-Patches/0407-Fix-last-firework-in-stack-not-having-effects-when-d.patch b/Spigot-Server-Patches/0408-Fix-last-firework-in-stack-not-having-effects-when-d.patch similarity index 100% rename from Spigot-Server-Patches/0407-Fix-last-firework-in-stack-not-having-effects-when-d.patch rename to Spigot-Server-Patches/0408-Fix-last-firework-in-stack-not-having-effects-when-d.patch diff --git a/Spigot-Server-Patches/0408-Entity-Activation-Range-2.0.patch b/Spigot-Server-Patches/0409-Entity-Activation-Range-2.0.patch similarity index 96% rename from Spigot-Server-Patches/0408-Entity-Activation-Range-2.0.patch rename to Spigot-Server-Patches/0409-Entity-Activation-Range-2.0.patch index 1f4cded06..cecf2bb12 100644 --- a/Spigot-Server-Patches/0408-Entity-Activation-Range-2.0.patch +++ b/Spigot-Server-Patches/0409-Entity-Activation-Range-2.0.patch @@ -13,20 +13,8 @@ Adds water Mobs to activation range config and nerfs fish Adds flying monsters to control ghast and phantoms Adds villagers as separate config -diff --git a/src/main/java/net/minecraft/server/BehaviorController.java b/src/main/java/net/minecraft/server/BehaviorController.java -index ae2905b403a63396d9cdc61444586ea5548f2974..5ba4f96eec81dc6552aa195eaf544fe400441458 100644 ---- a/src/main/java/net/minecraft/server/BehaviorController.java -+++ b/src/main/java/net/minecraft/server/BehaviorController.java -@@ -379,6 +379,7 @@ public class BehaviorController<E extends EntityLiving> { - - } - -+ public boolean hasActivity(Activity activity) { return c(activity); } // Paper - OBFHELPER - public boolean c(Activity activity) { - return this.j.contains(activity); - } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 4fbe3d2547de278b537c12940a8351c8d1521d1b..1eb5c6085fece782db0533ff8b7c5629b284c083 100644 +index ef492fe260ef1d00f83b2f298a4fab4fd71ea4b5..2935c23d3cac78a8b5fbd33024d9bbf0de565ac2 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -192,6 +192,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -80,7 +68,7 @@ index c94197a50269622e8995685119bac984c45e6833..11d384729326af693a9a679195acbd59 protected EntityCreature(EntityTypes<? extends EntityCreature> 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 081baca9a101d188e4810d04f69811d52de7a107..9f6f2caf25825bb135037c6205cb578dd375b9f8 100644 +index dbd7850df45fb9ee550ce33f97bdfe9cf5bfcd34..61323f9b15350b1d227b2f3de67c40846ba7c2f9 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 { @@ -111,7 +99,7 @@ index 081baca9a101d188e4810d04f69811d52de7a107..9f6f2caf25825bb135037c6205cb578d 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 3d30dcfdf124ff634afff3db17375bad06a19ad8..27b92664cee1c685b5b6b9b385150bb5fdb9fa7a 100644 +index ce586a89b3d812e5c6ff371c2abcb15df8de99d9..3662752ce3a300b1d35b5214a8cf602ab6399edb 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 { @@ -330,7 +318,7 @@ index 50487dbf0ac162d7608b67b4fb50fa7f8bfba69d..04b28555b1bb68536e40bb6526136787 return this.c; } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 9b751727d137316290f363e39993f75293fd0887..7d13f7a8b7272ad2ac86e706c1b8c7649cccb01c 100644 +index 41302dc5a2f30987dab448d2715f9eeea8174dfc..6d3b851f65858f6d768aa64c0bef71e18c45f0a2 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -81,6 +81,12 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -347,7 +335,7 @@ index 9b751727d137316290f363e39993f75293fd0887..7d13f7a8b7272ad2ac86e706c1b8c764 public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..97af8f8e3c48694c390036bb1455e6d22fcd1c49 100644 +index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..5dcc1ba547db7cc53a08426a7ad119ae88690136 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -2,24 +2,34 @@ package org.spigotmc; @@ -636,14 +624,14 @@ index b73af0a5fb2d08c2f3a52c699ef0d8ed34c83f77..97af8f8e3c48694c390036bb1455e6d2 + + if (config.villagersActiveForPanic) { + for (Activity activity : VILLAGER_PANIC_IMMUNITIES) { -+ if (behaviorController.hasActivity(activity)) { ++ if (behaviorController.c(activity)) { + return 20*5; + } + } + } + + if (config.villagersWorkImmunityAfter > 0 && inactiveFor >= config.villagersWorkImmunityAfter) { -+ if (behaviorController.hasActivity(Activity.WORK)) { ++ if (behaviorController.c(Activity.WORK)) { + return config.villagersWorkImmunityFor; + } + } diff --git a/Spigot-Server-Patches/0409-Add-effect-to-block-break-naturally.patch b/Spigot-Server-Patches/0410-Add-effect-to-block-break-naturally.patch similarity index 100% rename from Spigot-Server-Patches/0409-Add-effect-to-block-break-naturally.patch rename to Spigot-Server-Patches/0410-Add-effect-to-block-break-naturally.patch diff --git a/Spigot-Server-Patches/0410-Tracking-Range-Improvements.patch b/Spigot-Server-Patches/0411-Tracking-Range-Improvements.patch similarity index 100% rename from Spigot-Server-Patches/0410-Tracking-Range-Improvements.patch rename to Spigot-Server-Patches/0411-Tracking-Range-Improvements.patch diff --git a/Spigot-Server-Patches/0411-Fix-items-vanishing-through-end-portal.patch b/Spigot-Server-Patches/0412-Fix-items-vanishing-through-end-portal.patch similarity index 94% rename from Spigot-Server-Patches/0411-Fix-items-vanishing-through-end-portal.patch rename to Spigot-Server-Patches/0412-Fix-items-vanishing-through-end-portal.patch index a9befce1d..3cc0b86e7 100644 --- a/Spigot-Server-Patches/0411-Fix-items-vanishing-through-end-portal.patch +++ b/Spigot-Server-Patches/0412-Fix-items-vanishing-through-end-portal.patch @@ -13,7 +13,7 @@ Quickly loading the exact world spawn chunk before searching the heightmap resolves the issue without having to load all spawn chunks. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 1eb5c6085fece782db0533ff8b7c5629b284c083..097bab174bd05ee42c172e8926f5c66000bed239 100644 +index 2935c23d3cac78a8b5fbd33024d9bbf0de565ac2..9cf05a78871fba00c2453dc103d822271a8fec0b 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -2531,6 +2531,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0412-Bees-get-gravity-in-void.-Fixes-MC-167279.patch b/Spigot-Server-Patches/0413-Bees-get-gravity-in-void.-Fixes-MC-167279.patch similarity index 100% rename from Spigot-Server-Patches/0412-Bees-get-gravity-in-void.-Fixes-MC-167279.patch rename to Spigot-Server-Patches/0413-Bees-get-gravity-in-void.-Fixes-MC-167279.patch diff --git a/Spigot-Server-Patches/0413-Optimise-getChunkAt-calls-for-loaded-chunks.patch b/Spigot-Server-Patches/0414-Optimise-getChunkAt-calls-for-loaded-chunks.patch similarity index 97% rename from Spigot-Server-Patches/0413-Optimise-getChunkAt-calls-for-loaded-chunks.patch rename to Spigot-Server-Patches/0414-Optimise-getChunkAt-calls-for-loaded-chunks.patch index 0ca1c3c83..c49febe09 100644 --- a/Spigot-Server-Patches/0413-Optimise-getChunkAt-calls-for-loaded-chunks.patch +++ b/Spigot-Server-Patches/0414-Optimise-getChunkAt-calls-for-loaded-chunks.patch @@ -65,7 +65,7 @@ index 1597b7a882769109f467d81ecbadc45ff6779b7e..67d6facd37462beef49dac311019b197 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 7d13f7a8b7272ad2ac86e706c1b8c7649cccb01c..50848896588e16bf2a498ba28ab30919a081afd5 100644 +index 91f8927892a7c8f4456163d9de5e307f0e15cf54..276c805b60630952bcc1e467bb501926f214ed10 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -319,6 +319,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { diff --git a/Spigot-Server-Patches/0414-Allow-overriding-the-java-version-check.patch b/Spigot-Server-Patches/0415-Allow-overriding-the-java-version-check.patch similarity index 100% rename from Spigot-Server-Patches/0414-Allow-overriding-the-java-version-check.patch rename to Spigot-Server-Patches/0415-Allow-overriding-the-java-version-check.patch diff --git a/Spigot-Server-Patches/0415-Add-ThrownEggHatchEvent.patch b/Spigot-Server-Patches/0416-Add-ThrownEggHatchEvent.patch similarity index 100% rename from Spigot-Server-Patches/0415-Add-ThrownEggHatchEvent.patch rename to Spigot-Server-Patches/0416-Add-ThrownEggHatchEvent.patch diff --git a/Spigot-Server-Patches/0416-Optimise-random-block-ticking.patch b/Spigot-Server-Patches/0417-Optimise-random-block-ticking.patch similarity index 97% rename from Spigot-Server-Patches/0416-Optimise-random-block-ticking.patch rename to Spigot-Server-Patches/0417-Optimise-random-block-ticking.patch index be5febc5c..94fadc2a2 100644 --- a/Spigot-Server-Patches/0416-Optimise-random-block-ticking.patch +++ b/Spigot-Server-Patches/0417-Optimise-random-block-ticking.patch @@ -230,7 +230,7 @@ index 900b551f6f76862443b09c1e76ad596eda5655f4..1cb45f97b644347d16b66b46113b1e44 public interface a<T> { diff --git a/src/main/java/net/minecraft/server/EntityTurtle.java b/src/main/java/net/minecraft/server/EntityTurtle.java -index 5862e2026b685df80de45c529f1367382a2a60b0..a5cd127c0f133b0ef136f4efad9d71eab2edf8e4 100644 +index 00827c335e9413e986d7f07d0adbcef0d106a553..c66a8011dde4932e03ea91194ea92a7263e48428 100644 --- a/src/main/java/net/minecraft/server/EntityTurtle.java +++ b/src/main/java/net/minecraft/server/EntityTurtle.java @@ -29,7 +29,7 @@ public class EntityTurtle extends EntityAnimal { @@ -243,10 +243,10 @@ index 5862e2026b685df80de45c529f1367382a2a60b0..a5cd127c0f133b0ef136f4efad9d71ea // TODO Paper: Obf helpers here can prolly be removed? check that no newer patches use them public final BlockPosition getHome() { return this.getHomePos(); } // Paper - OBFHELPER diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 50848896588e16bf2a498ba28ab30919a081afd5..d2b3e06dda10fc321768301c35f319767796d7d5 100644 +index ce55c4729024ce9e226d9dd14f7c3ea4bde7ca34..e52ec352fb98cd030d7c13362d0bf950c60c6372 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1460,10 +1460,18 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1464,10 +1464,18 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public abstract TagRegistry p(); public BlockPosition a(int i, int j, int k, int l) { @@ -267,10 +267,10 @@ index 50848896588e16bf2a498ba28ab30919a081afd5..d2b3e06dda10fc321768301c35f31976 public boolean isSavingDisabled() { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 1d4e34b2ece861e7e4f2fe0f15f6fbf8ab47f86c..3266ecf2ad975613942a9cd127440dd898b12ff5 100644 +index cdb558edd9aa176a7750403afd6634e29ada616f..ce1f2b1dda28d706744aece90b96518495e288a4 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -558,7 +558,12 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -557,7 +557,12 @@ public class WorldServer extends World implements GeneratorAccessSeed { }); } @@ -284,7 +284,7 @@ index 1d4e34b2ece861e7e4f2fe0f15f6fbf8ab47f86c..3266ecf2ad975613942a9cd127440dd8 ChunkCoordIntPair chunkcoordintpair = chunk.getPos(); boolean flag = this.isRaining(); int j = chunkcoordintpair.d(); -@@ -566,10 +571,10 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -565,10 +570,10 @@ public class WorldServer extends World implements GeneratorAccessSeed { GameProfilerFiller gameprofilerfiller = this.getMethodProfiler(); gameprofilerfiller.enter("thunder"); @@ -297,7 +297,7 @@ index 1d4e34b2ece861e7e4f2fe0f15f6fbf8ab47f86c..3266ecf2ad975613942a9cd127440dd8 if (this.isRainingAt(blockposition)) { DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition); boolean flag1 = this.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING) && this.random.nextDouble() < (double) difficultydamagescaler.b() * paperConfig.skeleHorseSpawnChance; // Paper -@@ -592,59 +597,77 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -591,59 +596,77 @@ public class WorldServer extends World implements GeneratorAccessSeed { } gameprofilerfiller.exitEnter("iceandsnow"); diff --git a/Spigot-Server-Patches/0417-Entity-Jump-API.patch b/Spigot-Server-Patches/0418-Entity-Jump-API.patch similarity index 94% rename from Spigot-Server-Patches/0417-Entity-Jump-API.patch rename to Spigot-Server-Patches/0418-Entity-Jump-API.patch index 63f5a0bfa..50977959f 100644 --- a/Spigot-Server-Patches/0417-Entity-Jump-API.patch +++ b/Spigot-Server-Patches/0418-Entity-Jump-API.patch @@ -5,10 +5,10 @@ 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 27b92664cee1c685b5b6b9b385150bb5fdb9fa7a..e4c7f4c100e1b8d4470da954a3b72f9e0ec5b494 100644 +index 3662752ce3a300b1d35b5214a8cf602ab6399edb..be102d9fed4596f2e53cca102c5a779ded2bf26f 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2748,8 +2748,10 @@ public abstract class EntityLiving extends Entity { +@@ -2753,8 +2753,10 @@ public abstract class EntityLiving extends Entity { } else if (this.aN() && (!this.onGround || d7 > d8)) { this.c((Tag) TagsFluid.LAVA); } else if ((this.onGround || flag && d7 <= d8) && this.jumpTicks == 0) { diff --git a/Spigot-Server-Patches/0418-Add-option-to-nerf-pigmen-from-nether-portals.patch b/Spigot-Server-Patches/0419-Add-option-to-nerf-pigmen-from-nether-portals.patch similarity index 93% rename from Spigot-Server-Patches/0418-Add-option-to-nerf-pigmen-from-nether-portals.patch rename to Spigot-Server-Patches/0419-Add-option-to-nerf-pigmen-from-nether-portals.patch index f635e4ca9..c59b4d906 100644 --- a/Spigot-Server-Patches/0418-Add-option-to-nerf-pigmen-from-nether-portals.patch +++ b/Spigot-Server-Patches/0419-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 4bfe2fb948ee204f8c5a8c316141904a8a6a8b16..3496f615aa9857aa704767f460b1b166295ccf39 100644 +index 1757cf8e0883e8908b97e0a7beb1e6ecec10d8e6..4c12e1b65a0e7e1a7aa1bbaf433f4881cef314f2 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -596,4 +596,9 @@ public class PaperWorldConfig { +@@ -590,4 +590,9 @@ public class PaperWorldConfig { disableHopperMoveEvents = getBoolean("hopper.disable-move-event", disableHopperMoveEvents); log("Hopper Move Item Events: " + (disableHopperMoveEvents ? "disabled" : "enabled")); } @@ -32,7 +32,7 @@ index e5b8d45ed9f62c28b0429859593d881546ccead2..77f8d5e6662fa75e622f07b3e6efae04 } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 097bab174bd05ee42c172e8926f5c66000bed239..45df15c6c96dcda115fff827f2443ac8b07b1ad7 100644 +index 9cf05a78871fba00c2453dc103d822271a8fec0b..f55ae42b1445ed0fe8e29f5d47c9b3464011c023 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -194,6 +194,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0419-Make-the-GUI-graph-fancier.patch b/Spigot-Server-Patches/0420-Make-the-GUI-graph-fancier.patch similarity index 99% rename from Spigot-Server-Patches/0419-Make-the-GUI-graph-fancier.patch rename to Spigot-Server-Patches/0420-Make-the-GUI-graph-fancier.patch index 9497aa062..57daa6a3a 100644 --- a/Spigot-Server-Patches/0419-Make-the-GUI-graph-fancier.patch +++ b/Spigot-Server-Patches/0420-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 82d0492fd208ca7991d07cdc6296635290d5af3b..52f4d5bff6a50a0f220a25045ec73a10f58bb006 100644 +index 7ca38adcaa619a95c183bed13be566105442afd5..bd39bdcfeec7fb275a8ec80d467bad413e5356ce 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<TickTas diff --git a/Spigot-Server-Patches/0420-add-hand-to-BlockMultiPlaceEvent.patch b/Spigot-Server-Patches/0421-add-hand-to-BlockMultiPlaceEvent.patch similarity index 100% rename from Spigot-Server-Patches/0420-add-hand-to-BlockMultiPlaceEvent.patch rename to Spigot-Server-Patches/0421-add-hand-to-BlockMultiPlaceEvent.patch diff --git a/Spigot-Server-Patches/0421-Prevent-teleporting-dead-entities.patch b/Spigot-Server-Patches/0422-Prevent-teleporting-dead-entities.patch similarity index 100% rename from Spigot-Server-Patches/0421-Prevent-teleporting-dead-entities.patch rename to Spigot-Server-Patches/0422-Prevent-teleporting-dead-entities.patch diff --git a/Spigot-Server-Patches/0422-Validate-tripwire-hook-placement-before-update.patch b/Spigot-Server-Patches/0423-Validate-tripwire-hook-placement-before-update.patch similarity index 100% rename from Spigot-Server-Patches/0422-Validate-tripwire-hook-placement-before-update.patch rename to Spigot-Server-Patches/0423-Validate-tripwire-hook-placement-before-update.patch diff --git a/Spigot-Server-Patches/0423-Add-option-to-allow-iron-golems-to-spawn-in-air.patch b/Spigot-Server-Patches/0424-Add-option-to-allow-iron-golems-to-spawn-in-air.patch similarity index 95% rename from Spigot-Server-Patches/0423-Add-option-to-allow-iron-golems-to-spawn-in-air.patch rename to Spigot-Server-Patches/0424-Add-option-to-allow-iron-golems-to-spawn-in-air.patch index 533e3f738..c64e305b3 100644 --- a/Spigot-Server-Patches/0423-Add-option-to-allow-iron-golems-to-spawn-in-air.patch +++ b/Spigot-Server-Patches/0424-Add-option-to-allow-iron-golems-to-spawn-in-air.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add option to allow iron golems to spawn in air diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 3496f615aa9857aa704767f460b1b166295ccf39..101a473ff8979b37098fde7ac6ac66c6ed1b0282 100644 +index 4c12e1b65a0e7e1a7aa1bbaf433f4881cef314f2..5ea9bcfbb1a938e93bb919212f5cc9df5deec3cb 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -385,6 +385,11 @@ public class PaperWorldConfig { diff --git a/Spigot-Server-Patches/0424-Configurable-chance-of-villager-zombie-infection.patch b/Spigot-Server-Patches/0425-Configurable-chance-of-villager-zombie-infection.patch similarity index 94% rename from Spigot-Server-Patches/0424-Configurable-chance-of-villager-zombie-infection.patch rename to Spigot-Server-Patches/0425-Configurable-chance-of-villager-zombie-infection.patch index 69cc38bd0..262b299a3 100644 --- a/Spigot-Server-Patches/0424-Configurable-chance-of-villager-zombie-infection.patch +++ b/Spigot-Server-Patches/0425-Configurable-chance-of-villager-zombie-infection.patch @@ -8,10 +8,10 @@ This allows you to solve an issue in vanilla behavior where: * On normal difficulty they will have a 50% of getting infected or dying. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 101a473ff8979b37098fde7ac6ac66c6ed1b0282..9e8485679bd36481c2bd2f0c7cfa49892f0e4baf 100644 +index 5ea9bcfbb1a938e93bb919212f5cc9df5deec3cb..92a15842ac189049b2afef2f0ecf8ac964949bed 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -606,4 +606,9 @@ public class PaperWorldConfig { +@@ -600,4 +600,9 @@ public class PaperWorldConfig { private void nerfNetherPortalPigmen() { nerfNetherPortalPigmen = getBoolean("game-mechanics.nerf-pigmen-from-nether-portals", nerfNetherPortalPigmen); } diff --git a/Spigot-Server-Patches/0425-Optimise-Chunk-getFluid.patch b/Spigot-Server-Patches/0426-Optimise-Chunk-getFluid.patch similarity index 100% rename from Spigot-Server-Patches/0425-Optimise-Chunk-getFluid.patch rename to Spigot-Server-Patches/0426-Optimise-Chunk-getFluid.patch diff --git a/Spigot-Server-Patches/0426-Optimise-TickListServer-by-rewriting-it.patch b/Spigot-Server-Patches/0427-Optimise-TickListServer-by-rewriting-it.patch similarity index 99% rename from Spigot-Server-Patches/0426-Optimise-TickListServer-by-rewriting-it.patch rename to Spigot-Server-Patches/0427-Optimise-TickListServer-by-rewriting-it.patch index d7a6348ff..7151ec4c7 100644 --- a/Spigot-Server-Patches/0426-Optimise-TickListServer-by-rewriting-it.patch +++ b/Spigot-Server-Patches/0427-Optimise-TickListServer-by-rewriting-it.patch @@ -42,10 +42,10 @@ sets the excessive tick delay to the specified ticks (defaults to 60 * 20 ticks, aka 60 seconds) diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 8c2202fbc1c38e6cd19005d010e365ae14233f51..c03ff5f856f669ed535379f6c9d41812b7472743 100644 +index bf86444c479f346e7d56f10a7c0ebefd62f08f59..8508b3e10e60a4ce36d471b1d3f7ffc836a6ddf7 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -348,6 +348,13 @@ public class PaperConfig { +@@ -349,6 +349,13 @@ public class PaperConfig { maxBookTotalSizeMultiplier = getDouble("settings.book-size.total-multiplier", maxBookTotalSizeMultiplier); } @@ -1146,10 +1146,10 @@ index 3b8f56c0f0507ebdd9ac20be70688b4c0cfe4cf8..149d2b4f929c11b8baf17163bbd6ff82 } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 3266ecf2ad975613942a9cd127440dd898b12ff5..b8e635e351773663f62bd07193c6b0aceef0a3f3 100644 +index ce1f2b1dda28d706744aece90b96518495e288a4..61e988dc83d6f2c2e9f583aa3b88c26732cd6736 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -182,6 +182,15 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -181,6 +181,15 @@ public class WorldServer extends World implements GeneratorAccessSeed { } // Paper end @@ -1165,7 +1165,7 @@ index 3266ecf2ad975613942a9cd127440dd898b12ff5..b8e635e351773663f62bd07193c6b0ac // Add env and gen to constructor, WorldData -> WorldDataServer public WorldServer(MinecraftServer minecraftserver, Executor executor, Convertable.ConversionSession convertable_conversionsession, IWorldDataServer iworlddataserver, ResourceKey<World> resourcekey, ResourceKey<DimensionManager> resourcekey1, DimensionManager dimensionmanager, WorldLoadListener worldloadlistener, ChunkGenerator chunkgenerator, boolean flag, long i, List<MobSpawner> list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) { super(iworlddataserver, resourcekey, resourcekey1, dimensionmanager, minecraftserver::getMethodProfiler, false, flag, i, gen, env, executor); // Paper pass executor -@@ -189,12 +198,21 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -188,12 +197,21 @@ public class WorldServer extends World implements GeneratorAccessSeed { convertable = convertable_conversionsession; uuid = WorldUUID.getUUID(convertable_conversionsession.folder.toFile()); // CraftBukkit end diff --git a/Spigot-Server-Patches/0427-Pillager-patrol-spawn-settings-and-per-player-option.patch b/Spigot-Server-Patches/0428-Pillager-patrol-spawn-settings-and-per-player-option.patch similarity index 97% rename from Spigot-Server-Patches/0427-Pillager-patrol-spawn-settings-and-per-player-option.patch rename to Spigot-Server-Patches/0428-Pillager-patrol-spawn-settings-and-per-player-option.patch index 29e962965..15f3e8747 100644 --- a/Spigot-Server-Patches/0427-Pillager-patrol-spawn-settings-and-per-player-option.patch +++ b/Spigot-Server-Patches/0428-Pillager-patrol-spawn-settings-and-per-player-option.patch @@ -10,10 +10,10 @@ When not per player it will use the Vanilla mechanic of one delay per world and the world age for the start day. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 9e8485679bd36481c2bd2f0c7cfa49892f0e4baf..2688b3018eaab4e7ba95754164f83065a98e53fc 100644 +index 92a15842ac189049b2afef2f0ecf8ac964949bed..4281c125661c7a717e5a787510f593a16f6ad730 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -584,10 +584,21 @@ public class PaperWorldConfig { +@@ -578,10 +578,21 @@ public class PaperWorldConfig { } public boolean disablePillagerPatrols = false; diff --git a/Spigot-Server-Patches/0428-Ensure-Entity-is-never-double-registered.patch b/Spigot-Server-Patches/0429-Ensure-Entity-is-never-double-registered.patch similarity index 89% rename from Spigot-Server-Patches/0428-Ensure-Entity-is-never-double-registered.patch rename to Spigot-Server-Patches/0429-Ensure-Entity-is-never-double-registered.patch index 501c1f82c..a02c5160f 100644 --- a/Spigot-Server-Patches/0428-Ensure-Entity-is-never-double-registered.patch +++ b/Spigot-Server-Patches/0429-Ensure-Entity-is-never-double-registered.patch @@ -11,7 +11,7 @@ Vs behavior of non ticking of just overwriting state. We will now simply log a warning when this happens instead of crashing the server. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 45df15c6c96dcda115fff827f2443ac8b07b1ad7..0f775f417d5c8418ea895329b50313cc3350ea58 100644 +index f55ae42b1445ed0fe8e29f5d47c9b3464011c023..d4bb4e73ce8867ce56dce0ea84dea2dff91846d4 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -59,6 +59,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -23,10 +23,10 @@ index 45df15c6c96dcda115fff827f2443ac8b07b1ad7..0f775f417d5c8418ea895329b50313cc private boolean locked = false; @Override diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index b8e635e351773663f62bd07193c6b0aceef0a3f3..17f9e9119723561a4b01efbb91d651fbc9c8726e 100644 +index 61e988dc83d6f2c2e9f583aa3b88c26732cd6736..fca8194f27d5a8707296600bca7027a80c13877c 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -532,6 +532,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -531,6 +531,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { Entity entity2; while ((entity2 = (Entity) this.entitiesToAdd.poll()) != null) { @@ -34,7 +34,7 @@ index b8e635e351773663f62bd07193c6b0aceef0a3f3..17f9e9119723561a4b01efbb91d651fb this.registerEntity(entity2); } -@@ -1228,6 +1229,19 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1227,6 +1228,19 @@ public class WorldServer extends World implements GeneratorAccessSeed { public void unregisterEntity(Entity entity) { org.spigotmc.AsyncCatcher.catchOp("entity unregister"); // Spigot @@ -54,7 +54,7 @@ index b8e635e351773663f62bd07193c6b0aceef0a3f3..17f9e9119723561a4b01efbb91d651fb // Spigot start if ( entity instanceof EntityHuman ) { -@@ -1294,9 +1308,21 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1293,9 +1307,21 @@ public class WorldServer extends World implements GeneratorAccessSeed { private void registerEntity(Entity entity) { org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot diff --git a/Spigot-Server-Patches/0429-Fix-unregistering-entities-from-unloading-chunks.patch b/Spigot-Server-Patches/0430-Fix-unregistering-entities-from-unloading-chunks.patch similarity index 90% rename from Spigot-Server-Patches/0429-Fix-unregistering-entities-from-unloading-chunks.patch rename to Spigot-Server-Patches/0430-Fix-unregistering-entities-from-unloading-chunks.patch index 8baef3ad5..06161dd93 100644 --- a/Spigot-Server-Patches/0429-Fix-unregistering-entities-from-unloading-chunks.patch +++ b/Spigot-Server-Patches/0430-Fix-unregistering-entities-from-unloading-chunks.patch @@ -15,10 +15,10 @@ Combine that with a buggy detail of the previous implementation of the Dupe UUID patch, then this was the likely source of the "Ghost entities" diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 17f9e9119723561a4b01efbb91d651fbc9c8726e..f792ff541793855d9ed0b60f5990b6fdfa303995 100644 +index fca8194f27d5a8707296600bca7027a80c13877c..59afafecabd59ede1398c124769262f7568426ed 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1387,9 +1387,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1386,9 +1386,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { } private void removeEntityFromChunk(Entity entity) { diff --git a/Spigot-Server-Patches/0430-Remote-Connections-shouldn-t-hold-up-shutdown.patch b/Spigot-Server-Patches/0431-Remote-Connections-shouldn-t-hold-up-shutdown.patch similarity index 100% rename from Spigot-Server-Patches/0430-Remote-Connections-shouldn-t-hold-up-shutdown.patch rename to Spigot-Server-Patches/0431-Remote-Connections-shouldn-t-hold-up-shutdown.patch diff --git a/Spigot-Server-Patches/0431-Do-not-allow-bees-to-load-chunks-for-beehives.patch b/Spigot-Server-Patches/0432-Do-not-allow-bees-to-load-chunks-for-beehives.patch similarity index 100% rename from Spigot-Server-Patches/0431-Do-not-allow-bees-to-load-chunks-for-beehives.patch rename to Spigot-Server-Patches/0432-Do-not-allow-bees-to-load-chunks-for-beehives.patch diff --git a/Spigot-Server-Patches/0432-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch b/Spigot-Server-Patches/0433-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch similarity index 92% rename from Spigot-Server-Patches/0432-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch rename to Spigot-Server-Patches/0433-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch index ff50f90ba..19dd50072 100644 --- a/Spigot-Server-Patches/0432-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch +++ b/Spigot-Server-Patches/0433-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch @@ -26,10 +26,10 @@ index fe3aab87de4e1eb60b19352499790fd9b571e169..c9be4ae99458863bf91687c3667d67bc EntityTypes<?> entitytypes = entity.getEntityType(); int i = entitytypes.getChunkRange() * 16; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index f792ff541793855d9ed0b60f5990b6fdfa303995..2609ae63556053adccdce19677d2e52aaab4ebf6 100644 +index 59afafecabd59ede1398c124769262f7568426ed..4f2c8a9fbfa4596f5414dd742affc4cc45deab5a 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1353,7 +1353,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1352,7 +1352,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } } @@ -38,7 +38,7 @@ index f792ff541793855d9ed0b60f5990b6fdfa303995..2609ae63556053adccdce19677d2e52a // CraftBukkit start - SPIGOT-5278 if (entity instanceof EntityDrowned) { this.navigators.add(((EntityDrowned) entity).navigationWater); -@@ -1364,6 +1364,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1363,6 +1363,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { this.navigators.add(((EntityInsentient) entity).getNavigation()); } entity.valid = true; // CraftBukkit diff --git a/Spigot-Server-Patches/0433-Optimize-Collision-to-not-load-chunks.patch b/Spigot-Server-Patches/0434-Optimize-Collision-to-not-load-chunks.patch similarity index 98% rename from Spigot-Server-Patches/0433-Optimize-Collision-to-not-load-chunks.patch rename to Spigot-Server-Patches/0434-Optimize-Collision-to-not-load-chunks.patch index 7d9181fa4..1df4dcaad 100644 --- a/Spigot-Server-Patches/0433-Optimize-Collision-to-not-load-chunks.patch +++ b/Spigot-Server-Patches/0434-Optimize-Collision-to-not-load-chunks.patch @@ -14,7 +14,7 @@ movement will load only the chunk the player enters anyways and avoids loading massive amounts of surrounding chunks due to large AABB lookups. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 0f775f417d5c8418ea895329b50313cc3350ea58..a64e21964ed6131d2fc62345e04a30885e1d9a74 100644 +index d4bb4e73ce8867ce56dce0ea84dea2dff91846d4..8f1e8728502d1dcae1fb538875f72460fc926d7c 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -80,6 +80,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0434-Don-t-tick-dead-players.patch b/Spigot-Server-Patches/0435-Don-t-tick-dead-players.patch similarity index 100% rename from Spigot-Server-Patches/0434-Don-t-tick-dead-players.patch rename to Spigot-Server-Patches/0435-Don-t-tick-dead-players.patch diff --git a/Spigot-Server-Patches/0435-Dead-Player-s-shouldn-t-be-able-to-move.patch b/Spigot-Server-Patches/0436-Dead-Player-s-shouldn-t-be-able-to-move.patch similarity index 100% rename from Spigot-Server-Patches/0435-Dead-Player-s-shouldn-t-be-able-to-move.patch rename to Spigot-Server-Patches/0436-Dead-Player-s-shouldn-t-be-able-to-move.patch diff --git a/Spigot-Server-Patches/0436-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch b/Spigot-Server-Patches/0437-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch similarity index 100% rename from Spigot-Server-Patches/0436-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch rename to Spigot-Server-Patches/0437-Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch diff --git a/Spigot-Server-Patches/0437-Increase-Light-Queue-Size.patch b/Spigot-Server-Patches/0438-Increase-Light-Queue-Size.patch similarity index 88% rename from Spigot-Server-Patches/0437-Increase-Light-Queue-Size.patch rename to Spigot-Server-Patches/0438-Increase-Light-Queue-Size.patch index 36ff7c0f7..a9aa089fe 100644 --- a/Spigot-Server-Patches/0437-Increase-Light-Queue-Size.patch +++ b/Spigot-Server-Patches/0438-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 2688b3018eaab4e7ba95754164f83065a98e53fc..e4821d4c23689aaf51b60c66fc1e6bc7a0b02fd5 100644 +index 4281c125661c7a717e5a787510f593a16f6ad730..a11d356733901521ee0523629f0cffc1d94391bc 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -622,4 +622,9 @@ public class PaperWorldConfig { +@@ -616,4 +616,9 @@ public class PaperWorldConfig { private void zombieVillagerInfectionChance() { zombieVillagerInfectionChance = getDouble("zombie-villager-infection-chance", zombieVillagerInfectionChance); } @@ -28,7 +28,7 @@ index 2688b3018eaab4e7ba95754164f83065a98e53fc..e4821d4c23689aaf51b60c66fc1e6bc7 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 52f4d5bff6a50a0f220a25045ec73a10f58bb006..2bfda68d2bdf54a6fedb237086a2182ac37d1627 100644 +index bd39bdcfeec7fb275a8ec80d467bad413e5356ce..16c9ed590a20279dd21512b29f8f5f64a4be1eff 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -663,7 +663,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas diff --git a/Spigot-Server-Patches/0438-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch b/Spigot-Server-Patches/0439-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch similarity index 94% rename from Spigot-Server-Patches/0438-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch rename to Spigot-Server-Patches/0439-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch index d634f33c5..9cc358583 100644 --- a/Spigot-Server-Patches/0438-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch +++ b/Spigot-Server-Patches/0439-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch @@ -42,10 +42,10 @@ index a58ef60d9976b3afc50e94364cf474bd2e5fdfd6..dd07223978c9aa648673d96ba7b3db11 public static final Timing commandFunctionsTimer = Timings.ofSafe("Command Functions"); public static final Timing connectionTimer = Timings.ofSafe("Connection Handler"); diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index c03ff5f856f669ed535379f6c9d41812b7472743..5814c0da1fe82ccf9a74c6418bee021543749d86 100644 +index 8508b3e10e60a4ce36d471b1d3f7ffc836a6ddf7..aad1420dc63c16b558ad1ca34accf8a7a9af6363 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -404,4 +404,9 @@ public class PaperConfig { +@@ -405,4 +405,9 @@ public class PaperConfig { log("Async Chunks: Enabled - Chunks will be loaded much faster, without lag."); } } @@ -135,7 +135,7 @@ index e14e8bcf235339c1537a1e0a7702a364ee784c93..d1f832db33f21f8ba910d2c0c163af78 protected boolean executeNext() { // CraftBukkit start - process pending Chunk loadCallback() and unloadCallback() after each run task diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 2bfda68d2bdf54a6fedb237086a2182ac37d1627..5c45a88a6659873ec0cc1a62ebe7b5d700c079bd 100644 +index 962061aa4de1cad05acac4fe09ecedbb81c55d9b..9e68d293ab8d67e9450a6633beccfba881d2287a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -942,6 +942,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas @@ -187,7 +187,7 @@ index 2bfda68d2bdf54a6fedb237086a2182ac37d1627..5c45a88a6659873ec0cc1a62ebe7b5d7 return !this.canOversleep(); }); isOversleep = false;MinecraftTimings.serverOversleep.stopTiming(); -@@ -1209,13 +1228,16 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas +@@ -1205,13 +1224,16 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas } protected void b(BooleanSupplier booleansupplier) { @@ -204,7 +204,7 @@ index 2bfda68d2bdf54a6fedb237086a2182ac37d1627..5c45a88a6659873ec0cc1a62ebe7b5d7 this.methodProfiler.exitEnter("levels"); Iterator iterator = this.getWorlds().iterator(); -@@ -1226,7 +1248,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas +@@ -1222,7 +1244,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas processQueue.remove().run(); } MinecraftTimings.processQueueTimer.stopTiming(); // Spigot @@ -213,7 +213,7 @@ index 2bfda68d2bdf54a6fedb237086a2182ac37d1627..5c45a88a6659873ec0cc1a62ebe7b5d7 MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper // Send time updates to everyone, it will get the right time from the world the player is in. // Paper start - optimize time updates -@@ -1268,9 +1290,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas +@@ -1264,9 +1286,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas this.methodProfiler.enter("tick"); try { @@ -226,10 +226,10 @@ index 2bfda68d2bdf54a6fedb237086a2182ac37d1627..5c45a88a6659873ec0cc1a62ebe7b5d7 // Spigot Start CrashReport crashreport; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 2609ae63556053adccdce19677d2e52aaab4ebf6..661718302a2eac338d9185d9d31ab7f704d4bee3 100644 +index 4f2c8a9fbfa4596f5414dd742affc4cc45deab5a..2cc9fd7aee91cc78156fc6001f0c461530a7f882 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -453,6 +453,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -452,6 +452,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } timings.scheduledBlocks.stopTiming(); // Paper @@ -237,7 +237,7 @@ index 2609ae63556053adccdce19677d2e52aaab4ebf6..661718302a2eac338d9185d9d31ab7f7 gameprofilerfiller.exitEnter("raid"); this.timings.raids.startTiming(); // Paper - timings this.persistentRaid.a(); -@@ -461,6 +462,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -460,6 +461,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { timings.doSounds.startTiming(); // Spigot this.ah(); timings.doSounds.stopTiming(); // Spigot @@ -245,7 +245,7 @@ index 2609ae63556053adccdce19677d2e52aaab4ebf6..661718302a2eac338d9185d9d31ab7f7 this.ticking = false; gameprofilerfiller.exitEnter("entities"); boolean flag3 = true || !this.players.isEmpty() || !this.getForceLoadedChunks().isEmpty(); // CraftBukkit - this prevents entity cleanup, other issues on servers with no players -@@ -528,6 +530,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -527,6 +529,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { timings.entityTick.stopTiming(); // Spigot this.tickingEntities = false; @@ -253,7 +253,7 @@ index 2609ae63556053adccdce19677d2e52aaab4ebf6..661718302a2eac338d9185d9d31ab7f7 Entity entity2; -@@ -537,6 +540,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -536,6 +539,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } timings.tickEntities.stopTiming(); // Spigot diff --git a/Spigot-Server-Patches/0439-Don-t-move-existing-players-to-world-spawn.patch b/Spigot-Server-Patches/0440-Don-t-move-existing-players-to-world-spawn.patch similarity index 100% rename from Spigot-Server-Patches/0439-Don-t-move-existing-players-to-world-spawn.patch rename to Spigot-Server-Patches/0440-Don-t-move-existing-players-to-world-spawn.patch diff --git a/Spigot-Server-Patches/0440-Add-tick-times-API-and-mspt-command.patch b/Spigot-Server-Patches/0441-Add-tick-times-API-and-mspt-command.patch similarity index 94% rename from Spigot-Server-Patches/0440-Add-tick-times-API-and-mspt-command.patch rename to Spigot-Server-Patches/0441-Add-tick-times-API-and-mspt-command.patch index 30bb26e8f..63fff254d 100644 --- a/Spigot-Server-Patches/0440-Add-tick-times-API-and-mspt-command.patch +++ b/Spigot-Server-Patches/0441-Add-tick-times-API-and-mspt-command.patch @@ -75,10 +75,10 @@ index 0000000000000000000000000000000000000000..d0211d4f39f9d6af1d751ac66342b42c + } +} diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 5814c0da1fe82ccf9a74c6418bee021543749d86..c31a97c6ae0dd1493039158e67c5f3ba237ad234 100644 +index aad1420dc63c16b558ad1ca34accf8a7a9af6363..ac01d492872fde6df2b7113005457c714b91fe44 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -68,6 +68,7 @@ public class PaperConfig { +@@ -69,6 +69,7 @@ public class PaperConfig { commands = new HashMap<String, Command>(); commands.put("paper", new PaperCommand("paper")); @@ -87,7 +87,7 @@ index 5814c0da1fe82ccf9a74c6418bee021543749d86..c31a97c6ae0dd1493039158e67c5f3ba version = getInt("config-version", 20); set("config-version", 20); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 5c45a88a6659873ec0cc1a62ebe7b5d700c079bd..852dc6a5edcf88adcf8d04f1109d7eaff1bea8f9 100644 +index 9e68d293ab8d67e9450a6633beccfba881d2287a..f61a2f30e43120beecfa6056c0c14985411d9b7d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -107,6 +107,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas @@ -102,7 +102,7 @@ index 5c45a88a6659873ec0cc1a62ebe7b5d700c079bd..852dc6a5edcf88adcf8d04f1109d7eaf @Nullable private KeyPair H; @Nullable -@@ -1220,6 +1225,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas +@@ -1216,6 +1221,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas this.ag = this.ag * 0.8F + (float) l / 1000000.0F * 0.19999999F; long i1 = SystemUtils.getMonotonicNanos(); @@ -115,7 +115,7 @@ index 5c45a88a6659873ec0cc1a62ebe7b5d700c079bd..852dc6a5edcf88adcf8d04f1109d7eaf this.circularTimer.a(i1 - i); this.methodProfiler.exit(); org.spigotmc.WatchdogThread.tick(); // Spigot -@@ -2175,4 +2186,30 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas +@@ -2171,4 +2182,30 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas public SaveData getSaveData() { return this.saveData; } diff --git a/Spigot-Server-Patches/0441-Expose-MinecraftServer-isRunning.patch b/Spigot-Server-Patches/0442-Expose-MinecraftServer-isRunning.patch similarity index 100% rename from Spigot-Server-Patches/0441-Expose-MinecraftServer-isRunning.patch rename to Spigot-Server-Patches/0442-Expose-MinecraftServer-isRunning.patch diff --git a/Spigot-Server-Patches/0442-Add-Raw-Byte-ItemStack-Serialization.patch b/Spigot-Server-Patches/0443-Add-Raw-Byte-ItemStack-Serialization.patch similarity index 100% rename from Spigot-Server-Patches/0442-Add-Raw-Byte-ItemStack-Serialization.patch rename to Spigot-Server-Patches/0443-Add-Raw-Byte-ItemStack-Serialization.patch diff --git a/Spigot-Server-Patches/0443-Remove-streams-from-Mob-AI-System.patch b/Spigot-Server-Patches/0444-Remove-streams-from-Mob-AI-System.patch similarity index 100% rename from Spigot-Server-Patches/0443-Remove-streams-from-Mob-AI-System.patch rename to Spigot-Server-Patches/0444-Remove-streams-from-Mob-AI-System.patch diff --git a/Spigot-Server-Patches/0444-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch b/Spigot-Server-Patches/0445-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch similarity index 92% rename from Spigot-Server-Patches/0444-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch rename to Spigot-Server-Patches/0445-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch index 7544fe4be..c0924a8a5 100644 --- a/Spigot-Server-Patches/0444-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch +++ b/Spigot-Server-Patches/0445-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Delay unsafe actions until after entity ticking is done This will help prevent many cases of unregistering entities during entity ticking diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 661718302a2eac338d9185d9d31ab7f704d4bee3..d0493919e71159ac6b38a64b2411fea722b53306 100644 +index 2cc9fd7aee91cc78156fc6001f0c461530a7f882..00df3260d4f208052515fcd2613be1d6f92e7b1f 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -61,6 +61,16 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -26,7 +26,7 @@ index 661718302a2eac338d9185d9d31ab7f704d4bee3..d0493919e71159ac6b38a64b2411fea7 private final MinecraftServer server; public final WorldDataServer worldDataServer; // CraftBukkit - type public boolean savingDisabled; -@@ -530,6 +540,16 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -529,6 +539,16 @@ public class WorldServer extends World implements GeneratorAccessSeed { timings.entityTick.stopTiming(); // Spigot this.tickingEntities = false; diff --git a/Spigot-Server-Patches/0445-Async-command-map-building.patch b/Spigot-Server-Patches/0446-Async-command-map-building.patch similarity index 100% rename from Spigot-Server-Patches/0445-Async-command-map-building.patch rename to Spigot-Server-Patches/0446-Async-command-map-building.patch diff --git a/Spigot-Server-Patches/0446-Improved-Watchdog-Support.patch b/Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch similarity index 98% rename from Spigot-Server-Patches/0446-Improved-Watchdog-Support.patch rename to Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch index 4550c8ac6..db289a8e7 100644 --- a/Spigot-Server-Patches/0446-Improved-Watchdog-Support.patch +++ b/Spigot-Server-Patches/0447-Improved-Watchdog-Support.patch @@ -109,7 +109,7 @@ index 63fdae15ccbef0c39718b320dbd096794bcfa3b4..6beefff203ed6e448898eb5b2e95800d } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 852dc6a5edcf88adcf8d04f1109d7eaff1bea8f9..e4e946c0b3c6b73f02567fffaaabf06312cbea91 100644 +index f61a2f30e43120beecfa6056c0c14985411d9b7d..3e42cd6ec6ecfc04a6e2e9c96459e1a88e504e39 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -160,7 +160,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas @@ -252,7 +252,7 @@ index 852dc6a5edcf88adcf8d04f1109d7eaff1bea8f9..e4e946c0b3c6b73f02567fffaaabf063 return new TickTask(this.ticks, runnable); } -@@ -1312,6 +1363,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas +@@ -1308,6 +1359,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas try { crashreport = CrashReport.a(throwable, "Exception ticking world"); } catch (Throwable t) { @@ -298,10 +298,10 @@ index 3299ac0b0115cb1166c1ee449bd49292e553b7af..dc7a4eabf83d5b74ccde170764dcd1e9 a(SystemUtils.e); a(SystemUtils.f); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index d2b3e06dda10fc321768301c35f319767796d7d5..91294ff7e86a997cc81f287517b2ff5529fc0a91 100644 +index e52ec352fb98cd030d7c13362d0bf950c60c6372..d2e7eb96d09fae86c3702a4e1d7905eb5eb96cb8 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -840,6 +840,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -844,6 +844,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { gameprofilerfiller.exit(); } catch (Throwable throwable) { @@ -309,7 +309,7 @@ index d2b3e06dda10fc321768301c35f319767796d7d5..91294ff7e86a997cc81f287517b2ff55 // Paper start - Prevent tile entity and entity crashes String msg = "TileEntity threw exception at " + tileentity.world.getWorld().getName() + ":" + tileentity.position.getX() + "," + tileentity.position.getY() + "," + tileentity.position.getZ(); System.err.println(msg); -@@ -915,6 +916,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -919,6 +920,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { try { consumer.accept(entity); } catch (Throwable throwable) { diff --git a/Spigot-Server-Patches/0447-Optimize-Pathfinding.patch b/Spigot-Server-Patches/0448-Optimize-Pathfinding.patch similarity index 100% rename from Spigot-Server-Patches/0447-Optimize-Pathfinding.patch rename to Spigot-Server-Patches/0448-Optimize-Pathfinding.patch diff --git a/Spigot-Server-Patches/0448-Reduce-Either-Optional-allocation.patch b/Spigot-Server-Patches/0449-Reduce-Either-Optional-allocation.patch similarity index 100% rename from Spigot-Server-Patches/0448-Reduce-Either-Optional-allocation.patch rename to Spigot-Server-Patches/0449-Reduce-Either-Optional-allocation.patch diff --git a/Spigot-Server-Patches/0449-Remove-streams-from-PairedQueue.patch b/Spigot-Server-Patches/0450-Remove-streams-from-PairedQueue.patch similarity index 100% rename from Spigot-Server-Patches/0449-Remove-streams-from-PairedQueue.patch rename to Spigot-Server-Patches/0450-Remove-streams-from-PairedQueue.patch diff --git a/Spigot-Server-Patches/0450-Reduce-memory-footprint-of-NBTTagCompound.patch b/Spigot-Server-Patches/0451-Reduce-memory-footprint-of-NBTTagCompound.patch similarity index 100% rename from Spigot-Server-Patches/0450-Reduce-memory-footprint-of-NBTTagCompound.patch rename to Spigot-Server-Patches/0451-Reduce-memory-footprint-of-NBTTagCompound.patch diff --git a/Spigot-Server-Patches/0451-Prevent-opening-inventories-when-frozen.patch b/Spigot-Server-Patches/0452-Prevent-opening-inventories-when-frozen.patch similarity index 100% rename from Spigot-Server-Patches/0451-Prevent-opening-inventories-when-frozen.patch rename to Spigot-Server-Patches/0452-Prevent-opening-inventories-when-frozen.patch diff --git a/Spigot-Server-Patches/0452-Optimise-ArraySetSorted-removeIf.patch b/Spigot-Server-Patches/0453-Optimise-ArraySetSorted-removeIf.patch similarity index 100% rename from Spigot-Server-Patches/0452-Optimise-ArraySetSorted-removeIf.patch rename to Spigot-Server-Patches/0453-Optimise-ArraySetSorted-removeIf.patch diff --git a/Spigot-Server-Patches/0453-Don-t-run-entity-collision-code-if-not-needed.patch b/Spigot-Server-Patches/0454-Don-t-run-entity-collision-code-if-not-needed.patch similarity index 89% rename from Spigot-Server-Patches/0453-Don-t-run-entity-collision-code-if-not-needed.patch rename to Spigot-Server-Patches/0454-Don-t-run-entity-collision-code-if-not-needed.patch index 50c37d080..4d6eff6ae 100644 --- a/Spigot-Server-Patches/0453-Don-t-run-entity-collision-code-if-not-needed.patch +++ b/Spigot-Server-Patches/0454-Don-t-run-entity-collision-code-if-not-needed.patch @@ -7,10 +7,10 @@ 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 e4c7f4c100e1b8d4470da954a3b72f9e0ec5b494..cee156e0847af3187de8a7c9bc0791dff3886b15 100644 +index be102d9fed4596f2e53cca102c5a779ded2bf26f..9e877999abd8ba4b548dd6e06b04f5f0a99f92dd 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2814,10 +2814,16 @@ public abstract class EntityLiving extends Entity { +@@ -2819,10 +2819,16 @@ public abstract class EntityLiving extends Entity { protected void doTick() {} protected void collideNearby() { diff --git a/Spigot-Server-Patches/0454-Optimise-entity-hard-collision-checking.patch b/Spigot-Server-Patches/0455-Optimise-entity-hard-collision-checking.patch similarity index 97% rename from Spigot-Server-Patches/0454-Optimise-entity-hard-collision-checking.patch rename to Spigot-Server-Patches/0455-Optimise-entity-hard-collision-checking.patch index 4026e5242..c98e68010 100644 --- a/Spigot-Server-Patches/0454-Optimise-entity-hard-collision-checking.patch +++ b/Spigot-Server-Patches/0455-Optimise-entity-hard-collision-checking.patch @@ -88,7 +88,7 @@ index cb24f27bc443880b18ffc36236f6ec7174c9d493..b65ae2d6919a67498d0646c552273508 } if (entity instanceof EntityItem) { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index a64e21964ed6131d2fc62345e04a30885e1d9a74..83f248b2a045a55ddffd8988f4d176992de26148 100644 +index 8f1e8728502d1dcae1fb538875f72460fc926d7c..c879e5d9acd400db5b7fdb770e5f8cc419e3bb23 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -211,6 +211,40 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -190,10 +190,10 @@ index 74d4c28246e7db850e6d993e07a84b2a6ca24ce2..24705eef5514bfb078bea6f87e5457e7 } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 91294ff7e86a997cc81f287517b2ff5529fc0a91..cafa47b90320249f84cd1cc4aca1908a4982bffb 100644 +index 0c00b0f6e2729467d21272142660319b50adcbf2..cd5d8f892516a8c3746ab315fa3f00eccd165deb 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1105,6 +1105,32 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1109,6 +1109,32 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return this.getChunkAt(i, j, ChunkStatus.FULL, false); } diff --git a/Spigot-Server-Patches/0455-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch b/Spigot-Server-Patches/0456-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch similarity index 100% rename from Spigot-Server-Patches/0455-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch rename to Spigot-Server-Patches/0456-Optimize-ChunkProviderServer-s-chunk-level-checking-.patch diff --git a/Spigot-Server-Patches/0456-Restrict-vanilla-teleport-command-to-valid-locations.patch b/Spigot-Server-Patches/0457-Restrict-vanilla-teleport-command-to-valid-locations.patch similarity index 100% rename from Spigot-Server-Patches/0456-Restrict-vanilla-teleport-command-to-valid-locations.patch rename to Spigot-Server-Patches/0457-Restrict-vanilla-teleport-command-to-valid-locations.patch diff --git a/Spigot-Server-Patches/0457-Implement-Player-Client-Options-API.patch b/Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch similarity index 97% rename from Spigot-Server-Patches/0457-Implement-Player-Client-Options-API.patch rename to Spigot-Server-Patches/0458-Implement-Player-Client-Options-API.patch index 9d74d6d5c..e95a98c46 100644 --- a/Spigot-Server-Patches/0457-Implement-Player-Client-Options-API.patch +++ b/Spigot-Server-Patches/0458-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 0bf9de73e800cbbe0553bf491cb1546bb1677b63..e6bf2b5268c03edfb3205f13a963ec1d9388526c 100644 +index 2db0cfd6c32c58beadc71d4be487776500c1b8a6..3fa9e7b52b24629c96436fdd46d4e8c28c35f00e 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 { @@ -158,7 +158,7 @@ index dbc3552d50c4129e1844c8a379ab5ba396645f52..be97a0b01b3272e01ece90172f283e3f return this.e; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 4bef2d3c8318da57e5721d728953f8d5ac6b0ff6..b28e5abea5d2585d9beff574dd82651e7d20275b 100644 +index 021345ddef4d382021ab8cbba91f4b58851aeabd..6032a67b3f242580d8de5e77554e3ec317d3019d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,5 +1,8 @@ @@ -170,7 +170,7 @@ index 4bef2d3c8318da57e5721d728953f8d5ac6b0ff6..b28e5abea5d2585d9beff574dd82651e import com.destroystokyo.paper.Title; import com.destroystokyo.paper.profile.CraftPlayerProfile; import com.destroystokyo.paper.profile.PlayerProfile; -@@ -2008,6 +2011,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2009,6 +2012,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void setViewDistance(int viewDistance) { throw new NotImplementedException("Per-Player View Distance APIs need further understanding to properly implement (There are per world view distances though!)"); // TODO } diff --git a/Spigot-Server-Patches/0458-Fix-Chunk-Post-Processing-deadlock-risk.patch b/Spigot-Server-Patches/0459-Fix-Chunk-Post-Processing-deadlock-risk.patch similarity index 100% rename from Spigot-Server-Patches/0458-Fix-Chunk-Post-Processing-deadlock-risk.patch rename to Spigot-Server-Patches/0459-Fix-Chunk-Post-Processing-deadlock-risk.patch diff --git a/Spigot-Server-Patches/0459-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch b/Spigot-Server-Patches/0460-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch similarity index 100% rename from Spigot-Server-Patches/0459-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch rename to Spigot-Server-Patches/0460-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch diff --git a/Spigot-Server-Patches/0460-Broadcast-join-message-to-console.patch b/Spigot-Server-Patches/0461-Broadcast-join-message-to-console.patch similarity index 100% rename from Spigot-Server-Patches/0460-Broadcast-join-message-to-console.patch rename to Spigot-Server-Patches/0461-Broadcast-join-message-to-console.patch diff --git a/Spigot-Server-Patches/0461-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch b/Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch similarity index 100% rename from Spigot-Server-Patches/0461-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch rename to Spigot-Server-Patches/0462-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch diff --git a/Spigot-Server-Patches/0462-Load-Chunks-for-Login-Asynchronously.patch b/Spigot-Server-Patches/0463-Load-Chunks-for-Login-Asynchronously.patch similarity index 99% rename from Spigot-Server-Patches/0462-Load-Chunks-for-Login-Asynchronously.patch rename to Spigot-Server-Patches/0463-Load-Chunks-for-Login-Asynchronously.patch index c18d76c30..d578d77d2 100644 --- a/Spigot-Server-Patches/0462-Load-Chunks-for-Login-Asynchronously.patch +++ b/Spigot-Server-Patches/0463-Load-Chunks-for-Login-Asynchronously.patch @@ -18,7 +18,7 @@ index 0080a0cbe58d1a81c434ef97659428c8bf1ec290..eebd4c50a7324250d3ebe7060739a71a boolean flag1 = this.playerChunkMap.b(); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 83f248b2a045a55ddffd8988f4d176992de26148..3bcd6c5a32515b96bb7424bcafd5cd0a04954b7b 100644 +index c879e5d9acd400db5b7fdb770e5f8cc419e3bb23..228666eccfb924d2844c911e734eef4b0a6b3afa 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1326,7 +1326,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0463-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch b/Spigot-Server-Patches/0464-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch similarity index 93% rename from Spigot-Server-Patches/0463-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch rename to Spigot-Server-Patches/0464-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch index b2f572fd5..44301e1d9 100644 --- a/Spigot-Server-Patches/0463-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch +++ b/Spigot-Server-Patches/0464-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch @@ -7,7 +7,7 @@ The code following this has better support for null worlds to move them back to the world spawn. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 3bcd6c5a32515b96bb7424bcafd5cd0a04954b7b..66adeb5e986e721a7e98d57cf5414cdb82cdc071 100644 +index 228666eccfb924d2844c911e734eef4b0a6b3afa..465abc3d4fe2386aa57565e4441fac7f55e26924 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1754,9 +1754,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke diff --git a/Spigot-Server-Patches/0464-Add-PlayerAttackEntityCooldownResetEvent.patch b/Spigot-Server-Patches/0465-Add-PlayerAttackEntityCooldownResetEvent.patch similarity index 91% rename from Spigot-Server-Patches/0464-Add-PlayerAttackEntityCooldownResetEvent.patch rename to Spigot-Server-Patches/0465-Add-PlayerAttackEntityCooldownResetEvent.patch index d6d011132..616e67881 100644 --- a/Spigot-Server-Patches/0464-Add-PlayerAttackEntityCooldownResetEvent.patch +++ b/Spigot-Server-Patches/0465-Add-PlayerAttackEntityCooldownResetEvent.patch @@ -5,10 +5,10 @@ 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 cee156e0847af3187de8a7c9bc0791dff3886b15..d4451116215b0a396fc536fac992e962b3e8a100 100644 +index 9e877999abd8ba4b548dd6e06b04f5f0a99f92dd..19e4d9ae15ca77fbcee3b6d6436ba69c80c3b79f 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -1820,7 +1820,16 @@ public abstract class EntityLiving extends Entity { +@@ -1825,7 +1825,16 @@ public abstract class EntityLiving extends Entity { EntityDamageEvent event = CraftEventFactory.handleLivingEntityDamageEvent(this, damagesource, originalDamage, hardHatModifier, blockingModifier, armorModifier, resistanceModifier, magicModifier, absorptionModifier, hardHat, blocking, armor, resistance, magic, absorption); if (damagesource.getEntity() instanceof EntityHuman) { diff --git a/Spigot-Server-Patches/0465-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch b/Spigot-Server-Patches/0466-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch similarity index 100% rename from Spigot-Server-Patches/0465-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch rename to Spigot-Server-Patches/0466-Allow-multiple-callbacks-to-schedule-for-Callback-Ex.patch diff --git a/Spigot-Server-Patches/0466-Don-t-fire-BlockFade-on-worldgen-threads.patch b/Spigot-Server-Patches/0467-Don-t-fire-BlockFade-on-worldgen-threads.patch similarity index 100% rename from Spigot-Server-Patches/0466-Don-t-fire-BlockFade-on-worldgen-threads.patch rename to Spigot-Server-Patches/0467-Don-t-fire-BlockFade-on-worldgen-threads.patch diff --git a/Spigot-Server-Patches/0467-Add-phantom-creative-and-insomniac-controls.patch b/Spigot-Server-Patches/0468-Add-phantom-creative-and-insomniac-controls.patch similarity index 96% rename from Spigot-Server-Patches/0467-Add-phantom-creative-and-insomniac-controls.patch rename to Spigot-Server-Patches/0468-Add-phantom-creative-and-insomniac-controls.patch index 76796703e..48bc1c6ed 100644 --- a/Spigot-Server-Patches/0467-Add-phantom-creative-and-insomniac-controls.patch +++ b/Spigot-Server-Patches/0468-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 e4821d4c23689aaf51b60c66fc1e6bc7a0b02fd5..5785f24b0646f8dbf3fba0bbc3b3e5b93e02f162 100644 +index a11d356733901521ee0523629f0cffc1d94391bc..b5535da444b2a3aac783dd12baed88ee80f527e5 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -627,4 +627,11 @@ public class PaperWorldConfig { +@@ -621,4 +621,11 @@ public class PaperWorldConfig { private void lightQueueSize() { lightQueueSize = getInt("light-queue-size", lightQueueSize); } diff --git a/Spigot-Server-Patches/0468-Fix-numerous-item-duplication-issues-and-teleport-is.patch b/Spigot-Server-Patches/0469-Fix-numerous-item-duplication-issues-and-teleport-is.patch similarity index 94% rename from Spigot-Server-Patches/0468-Fix-numerous-item-duplication-issues-and-teleport-is.patch rename to Spigot-Server-Patches/0469-Fix-numerous-item-duplication-issues-and-teleport-is.patch index 539ad92f8..ea4c6ea2e 100644 --- a/Spigot-Server-Patches/0468-Fix-numerous-item-duplication-issues-and-teleport-is.patch +++ b/Spigot-Server-Patches/0469-Fix-numerous-item-duplication-issues-and-teleport-is.patch @@ -16,7 +16,7 @@ So even if something NEW comes up, it would be impossible to drop the same item twice because the source was destroyed. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 66adeb5e986e721a7e98d57cf5414cdb82cdc071..f6bd3f458e340c7b19921c135415acdfc3f54802 100644 +index 465abc3d4fe2386aa57565e4441fac7f55e26924..3ff93f1498896ec1c92eb8273fb1e656a2cd8179 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1910,11 +1910,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -66,10 +66,10 @@ index 66adeb5e986e721a7e98d57cf5414cdb82cdc071..f6bd3f458e340c7b19921c135415acdf public float a(Explosion explosion, IBlockAccess iblockaccess, BlockPosition blockposition, IBlockData iblockdata, Fluid fluid, float f) { diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index 51e9f4a6e09474a7489d2872a800308ee3f02e46..250bccee4a27801b41c50d59e93396c696ab6974 100644 +index 74c58c3f82a94a3ec5e53c7f92e54cee80dc9e8a..f1893ad3a7bcb1996a0ae590ea33573fe03bcd17 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java -@@ -557,7 +557,7 @@ public class EntityArmorStand extends EntityLiving { +@@ -542,7 +542,7 @@ public class EntityArmorStand extends EntityLiving { for (i = 0; i < this.handItems.size(); ++i) { itemstack = (ItemStack) this.handItems.get(i); if (!itemstack.isEmpty()) { @@ -78,7 +78,7 @@ index 51e9f4a6e09474a7489d2872a800308ee3f02e46..250bccee4a27801b41c50d59e93396c6 this.handItems.set(i, ItemStack.b); } } -@@ -565,7 +565,7 @@ public class EntityArmorStand extends EntityLiving { +@@ -550,7 +550,7 @@ public class EntityArmorStand extends EntityLiving { for (i = 0; i < this.armorItems.size(); ++i) { itemstack = (ItemStack) this.armorItems.get(i); if (!itemstack.isEmpty()) { diff --git a/Spigot-Server-Patches/0469-Implement-Brigadier-Mojang-API.patch b/Spigot-Server-Patches/0470-Implement-Brigadier-Mojang-API.patch similarity index 100% rename from Spigot-Server-Patches/0469-Implement-Brigadier-Mojang-API.patch rename to Spigot-Server-Patches/0470-Implement-Brigadier-Mojang-API.patch diff --git a/Spigot-Server-Patches/0470-Villager-Restocks-API.patch b/Spigot-Server-Patches/0471-Villager-Restocks-API.patch similarity index 100% rename from Spigot-Server-Patches/0470-Villager-Restocks-API.patch rename to Spigot-Server-Patches/0471-Villager-Restocks-API.patch diff --git a/Spigot-Server-Patches/0471-Validate-PickItem-Packet-and-kick-for-invalid.patch b/Spigot-Server-Patches/0472-Validate-PickItem-Packet-and-kick-for-invalid.patch similarity index 100% rename from Spigot-Server-Patches/0471-Validate-PickItem-Packet-and-kick-for-invalid.patch rename to Spigot-Server-Patches/0472-Validate-PickItem-Packet-and-kick-for-invalid.patch diff --git a/Spigot-Server-Patches/0472-Expose-game-version.patch b/Spigot-Server-Patches/0473-Expose-game-version.patch similarity index 100% rename from Spigot-Server-Patches/0472-Expose-game-version.patch rename to Spigot-Server-Patches/0473-Expose-game-version.patch diff --git a/Spigot-Server-Patches/0473-Sync-position-on-teleportation.patch b/Spigot-Server-Patches/0474-Sync-position-on-teleportation.patch similarity index 100% rename from Spigot-Server-Patches/0473-Sync-position-on-teleportation.patch rename to Spigot-Server-Patches/0474-Sync-position-on-teleportation.patch diff --git a/Spigot-Server-Patches/0474-Optimize-Voxel-Shape-Merging.patch b/Spigot-Server-Patches/0475-Optimize-Voxel-Shape-Merging.patch similarity index 100% rename from Spigot-Server-Patches/0474-Optimize-Voxel-Shape-Merging.patch rename to Spigot-Server-Patches/0475-Optimize-Voxel-Shape-Merging.patch diff --git a/Spigot-Server-Patches/0475-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch b/Spigot-Server-Patches/0476-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch similarity index 100% rename from Spigot-Server-Patches/0475-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch rename to Spigot-Server-Patches/0476-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch diff --git a/Spigot-Server-Patches/0476-Implement-Mob-Goal-API.patch b/Spigot-Server-Patches/0477-Implement-Mob-Goal-API.patch similarity index 100% rename from Spigot-Server-Patches/0476-Implement-Mob-Goal-API.patch rename to Spigot-Server-Patches/0477-Implement-Mob-Goal-API.patch diff --git a/Spigot-Server-Patches/0477-Use-distance-map-to-optimise-entity-tracker.patch b/Spigot-Server-Patches/0478-Use-distance-map-to-optimise-entity-tracker.patch similarity index 98% rename from Spigot-Server-Patches/0477-Use-distance-map-to-optimise-entity-tracker.patch rename to Spigot-Server-Patches/0478-Use-distance-map-to-optimise-entity-tracker.patch index 284637ce1..50eee8647 100644 --- a/Spigot-Server-Patches/0477-Use-distance-map-to-optimise-entity-tracker.patch +++ b/Spigot-Server-Patches/0478-Use-distance-map-to-optimise-entity-tracker.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Use distance map to optimise entity tracker Use the distance map to find candidate players for tracking. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index f6bd3f458e340c7b19921c135415acdfc3f54802..fa15abb838aa4560acaaca1bd1d982b9b8073674 100644 +index 3ff93f1498896ec1c92eb8273fb1e656a2cd8179..b11383b35662b1e59b89e916e55340cee2726944 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -245,6 +245,21 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -44,14 +44,14 @@ index 9b89c0c8a3f1dada4e9b2aaeed0b92e56229b7ca..0c46297e6ff229538d77b2f481e4ab13 List<Entity> list = this.tracker.getPassengers(); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index e4e946c0b3c6b73f02567fffaaabf06312cbea91..45715f50deb7c3c31a1d2f9795ad026e4938dc47 100644 +index 3e42cd6ec6ecfc04a6e2e9c96459e1a88e504e39..084f36bb29a3fa28dbac1fa6f50849e5722ab9fe 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1531,6 +1531,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas +@@ -1527,6 +1527,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas } } -+ public final int applyTrackingRangeScale(int value) { return this.b(i); } // Paper - OBFHELPER ++ public final int applyTrackingRangeScale(int value) { return this.b(value); } // Paper - OBFHELPER public int b(int i) { return i; } diff --git a/Spigot-Server-Patches/0478-Optimize-isOutsideRange-to-use-distance-maps.patch b/Spigot-Server-Patches/0479-Optimize-isOutsideRange-to-use-distance-maps.patch similarity index 100% rename from Spigot-Server-Patches/0478-Optimize-isOutsideRange-to-use-distance-maps.patch rename to Spigot-Server-Patches/0479-Optimize-isOutsideRange-to-use-distance-maps.patch diff --git a/Spigot-Server-Patches/0479-Stop-copy-on-write-operations-for-updating-light-dat.patch b/Spigot-Server-Patches/0480-Stop-copy-on-write-operations-for-updating-light-dat.patch similarity index 100% rename from Spigot-Server-Patches/0479-Stop-copy-on-write-operations-for-updating-light-dat.patch rename to Spigot-Server-Patches/0480-Stop-copy-on-write-operations-for-updating-light-dat.patch diff --git a/Spigot-Server-Patches/0480-No-Tick-view-distance-implementation.patch b/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch similarity index 99% rename from Spigot-Server-Patches/0480-No-Tick-view-distance-implementation.patch rename to Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch index 9d29a5b09..3bb1b60f3 100644 --- a/Spigot-Server-Patches/0480-No-Tick-view-distance-implementation.patch +++ b/Spigot-Server-Patches/0481-No-Tick-view-distance-implementation.patch @@ -23,10 +23,10 @@ index d4ebcf8f66197299256bd6b65710a1488c90ea41..a3b41ce5fc70948d4804659a472cb622 })); diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 5785f24b0646f8dbf3fba0bbc3b3e5b93e02f162..0746932a3191669052f15270f5c94efbce0bd0c2 100644 +index b5535da444b2a3aac783dd12baed88ee80f527e5..65f9ec884c7e36b7d1340dcfdf186ee0669178e4 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -634,4 +634,9 @@ public class PaperWorldConfig { +@@ -628,4 +628,9 @@ public class PaperWorldConfig { phantomIgnoreCreative = getBoolean("phantoms-do-not-spawn-on-creative-players", phantomIgnoreCreative); phantomOnlyAttackInsomniacs = getBoolean("phantoms-only-attack-insomniacs", phantomOnlyAttackInsomniacs); } @@ -582,10 +582,10 @@ index e0a95fde93d4a2339831cb8ea0918174e9914e34..bdee3540b675f8036c5c6a59d6f53057 while (iterator.hasNext()) { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index cafa47b90320249f84cd1cc4aca1908a4982bffb..965b43da38832f37091929d954c2bb7e7fbc7798 100644 +index cd5d8f892516a8c3746ab315fa3f00eccd165deb..7fcf3d8b7decfa2e1df2f28fbecef9de8887c724 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -502,8 +502,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -506,8 +506,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable { this.b(blockposition, iblockdata1, iblockdata2); } diff --git a/Spigot-Server-Patches/0481-Add-villager-reputation-API.patch b/Spigot-Server-Patches/0482-Add-villager-reputation-API.patch similarity index 100% rename from Spigot-Server-Patches/0481-Add-villager-reputation-API.patch rename to Spigot-Server-Patches/0482-Add-villager-reputation-API.patch diff --git a/Spigot-Server-Patches/0482-Fix-Light-Command.patch b/Spigot-Server-Patches/0483-Fix-Light-Command.patch similarity index 96% rename from Spigot-Server-Patches/0482-Fix-Light-Command.patch rename to Spigot-Server-Patches/0483-Fix-Light-Command.patch index a4d507695..83aced771 100644 --- a/Spigot-Server-Patches/0482-Fix-Light-Command.patch +++ b/Spigot-Server-Patches/0483-Fix-Light-Command.patch @@ -7,7 +7,7 @@ This lets you run /paper fixlight <chunkRadius> (max 5) to automatically fix all light data in the chunks. diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java -index 182b440ba4802d199b8e44f7779b3401ace495d5..10b72083322b7f8e3e14525b3e834f5374ec369d 100644 +index 182b440ba4802d199b8e44f7779b3401ace495d5..cc3fc5200f75f80a60b4cbc260e3a0bc4bb3a869 100644 --- a/src/main/java/com/destroystokyo/paper/PaperCommand.java +++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java @@ -20,6 +20,7 @@ import org.bukkit.command.Command; @@ -45,7 +45,7 @@ index 182b440ba4802d199b8e44f7779b3401ace495d5..10b72083322b7f8e3e14525b3e834f53 case "ver": case "version": Command ver = org.bukkit.Bukkit.getServer().getCommandMap().getCommand("version"); -@@ -160,6 +164,75 @@ public class PaperCommand extends Command { +@@ -160,6 +164,77 @@ public class PaperCommand extends Command { return true; } @@ -94,10 +94,12 @@ index 182b440ba4802d199b8e44f7779b3401ace495d5..10b72083322b7f8e3e14525b3e834f53 + } + lightengine.a(world.paperConfig.lightQueueSize + 16 * 256); // ensure full chunk can fit into queue + sender.sendMessage("Updating Light " + coord); ++ int cx = chunk.getPos().x << 4; ++ int cz = chunk.getPos().z << 4; + for (int y = 0; y < world.getHeight(); y++) { + for (int x = 0; x < 16; x++) { + for (int z = 0; z < 16; z++) { -+ BlockPosition pos = new BlockPosition(chunk.getPos().getBlockX() + x, y, chunk.getPos().getBlockZ() + z); ++ BlockPosition pos = new BlockPosition(cx + x, y, cz + z); + lightengine.a(pos); + } + } @@ -107,7 +109,7 @@ index 182b440ba4802d199b8e44f7779b3401ace495d5..10b72083322b7f8e3e14525b3e834f53 + if (visibleChunk != null) { + world.getChunkProvider().playerChunkMap.addLightTask(visibleChunk, () -> { + MinecraftServer.getServer().processQueue.add(() -> { -+ visibleChunk.sendPacketToTrackedPlayers(new PacketPlayOutLightUpdate(chunk.getPos(), lightengine), false); ++ visibleChunk.sendPacketToTrackedPlayers(new PacketPlayOutLightUpdate(chunk.getPos(), lightengine, true), false); + updateLight(sender, world, lightengine, queue); + }); + }); diff --git a/Spigot-Server-Patches/0483-Fix-PotionEffect-ignores-icon-flag.patch b/Spigot-Server-Patches/0484-Fix-PotionEffect-ignores-icon-flag.patch similarity index 100% rename from Spigot-Server-Patches/0483-Fix-PotionEffect-ignores-icon-flag.patch rename to Spigot-Server-Patches/0484-Fix-PotionEffect-ignores-icon-flag.patch diff --git a/Spigot-Server-Patches/0484-Optimize-brigadier-child-sorting-performance.patch b/Spigot-Server-Patches/0485-Optimize-brigadier-child-sorting-performance.patch similarity index 100% rename from Spigot-Server-Patches/0484-Optimize-brigadier-child-sorting-performance.patch rename to Spigot-Server-Patches/0485-Optimize-brigadier-child-sorting-performance.patch diff --git a/Spigot-Server-Patches/0485-Don-t-toString-block-unless-actually-showing-the-mes.patch b/Spigot-Server-Patches/0486-Don-t-toString-block-unless-actually-showing-the-mes.patch similarity index 100% rename from Spigot-Server-Patches/0485-Don-t-toString-block-unless-actually-showing-the-mes.patch rename to Spigot-Server-Patches/0486-Don-t-toString-block-unless-actually-showing-the-mes.patch diff --git a/Spigot-Server-Patches/0486-Potential-bed-API.patch b/Spigot-Server-Patches/0487-Potential-bed-API.patch similarity index 100% rename from Spigot-Server-Patches/0486-Potential-bed-API.patch rename to Spigot-Server-Patches/0487-Potential-bed-API.patch diff --git a/Spigot-Server-Patches/0487-Wait-for-Async-Tasks-during-shutdown.patch b/Spigot-Server-Patches/0488-Wait-for-Async-Tasks-during-shutdown.patch similarity index 96% rename from Spigot-Server-Patches/0487-Wait-for-Async-Tasks-during-shutdown.patch rename to Spigot-Server-Patches/0488-Wait-for-Async-Tasks-during-shutdown.patch index c04562f74..5da518c14 100644 --- a/Spigot-Server-Patches/0487-Wait-for-Async-Tasks-during-shutdown.patch +++ b/Spigot-Server-Patches/0488-Wait-for-Async-Tasks-during-shutdown.patch @@ -10,7 +10,7 @@ Adds a 5 second grace period for any async tasks to finish and warns if any are still running after that delay just as reload does. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 45715f50deb7c3c31a1d2f9795ad026e4938dc47..10e6572afa5b5cf65673b65541ef2fafb0b2aaae 100644 +index 9745f0812b65d9137458741ca5803324670deeef..96e617049ab7c69a0d8ffbade894f187566c21b1 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -773,6 +773,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas diff --git a/Spigot-Server-Patches/0488-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch b/Spigot-Server-Patches/0489-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch similarity index 100% rename from Spigot-Server-Patches/0488-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch rename to Spigot-Server-Patches/0489-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch diff --git a/Spigot-Server-Patches/0489-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch b/Spigot-Server-Patches/0490-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch similarity index 94% rename from Spigot-Server-Patches/0489-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch rename to Spigot-Server-Patches/0490-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch index 74dd00654..4f818cdf8 100644 --- a/Spigot-Server-Patches/0489-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch +++ b/Spigot-Server-Patches/0490-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch @@ -13,10 +13,10 @@ A config is provided if you rather let players use these exploits, and let them destroy the worlds End Portals and get on top of the nether easy. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index c31a97c6ae0dd1493039158e67c5f3ba237ad234..e1c9e559b25792296b6b8f6dd1070035d10d82f2 100644 +index ac01d492872fde6df2b7113005457c714b91fe44..44f431bee68275d48aad75367aaec40a7ca59bea 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -410,4 +410,10 @@ public class PaperConfig { +@@ -411,4 +411,10 @@ public class PaperConfig { private static void midTickChunkTasks() { midTickChunkTasks = getInt("settings.chunk-tasks-per-tick", midTickChunkTasks); } @@ -47,7 +47,7 @@ index 4f9c6b25f152b348a00dadf4b8f58ec3adc3476e..81725611d5b8c10c05d561984f92dc67 public co.aikar.timings.Timing getTiming() { if (timing == null) { diff --git a/src/main/java/net/minecraft/server/BlockBase.java b/src/main/java/net/minecraft/server/BlockBase.java -index 16a8ee36ba2b23207cb8630623d542ac5943b9df..ea272c5f818a07535851c93ab905bde906a0e61e 100644 +index aa4bfc9fe8e917c1c19838b0a7b045a11fc9300b..ff770a3b0e5c4fcccc498ecca51dad9863b0fe0e 100644 --- a/src/main/java/net/minecraft/server/BlockBase.java +++ b/src/main/java/net/minecraft/server/BlockBase.java @@ -138,7 +138,7 @@ public abstract class BlockBase { @@ -59,7 +59,7 @@ index 16a8ee36ba2b23207cb8630623d542ac5943b9df..ea272c5f818a07535851c93ab905bde9 } @Deprecated -@@ -334,7 +334,11 @@ public abstract class BlockBase { +@@ -342,7 +342,11 @@ public abstract class BlockBase { public Block getBlock() { return (Block) this.c; } @@ -72,7 +72,7 @@ index 16a8ee36ba2b23207cb8630623d542ac5943b9df..ea272c5f818a07535851c93ab905bde9 public Material getMaterial() { return this.g; } -@@ -424,7 +428,7 @@ public abstract class BlockBase { +@@ -432,7 +436,7 @@ public abstract class BlockBase { } public EnumPistonReaction getPushReaction() { @@ -145,10 +145,10 @@ index 22a19e761fdec68cc9405988b977021a8b6398eb..e408ec8c645e9ceb278a13a5b0de8ecf this.world.getMethodProfiler().enter("explosion_blocks"); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 965b43da38832f37091929d954c2bb7e7fbc7798..bf32f4d81e58f6d7ccf1b6eb9daebe0986169b1c 100644 +index 6b74ba5241c9eaf7d9531dbcae4bbc4796979fa2..4356298141cf20781ff1ffdf1fddb356ca1657cf 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -400,6 +400,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -404,6 +404,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public boolean a(BlockPosition blockposition, IBlockData iblockdata, int i, int j) { // CraftBukkit start - tree generation if (this.captureTreeGeneration) { diff --git a/Spigot-Server-Patches/0490-Optimize-NibbleArray-to-use-pooled-buffers.patch b/Spigot-Server-Patches/0491-Optimize-NibbleArray-to-use-pooled-buffers.patch similarity index 95% rename from Spigot-Server-Patches/0490-Optimize-NibbleArray-to-use-pooled-buffers.patch rename to Spigot-Server-Patches/0491-Optimize-NibbleArray-to-use-pooled-buffers.patch index 8b2082f5e..a45915f39 100644 --- a/Spigot-Server-Patches/0490-Optimize-NibbleArray-to-use-pooled-buffers.patch +++ b/Spigot-Server-Patches/0491-Optimize-NibbleArray-to-use-pooled-buffers.patch @@ -247,10 +247,19 @@ index 67c960292db9d99ac85b5d0dda50ae48ef942c1b..5e3efa1fa6c089df35971ce5c83da384 for (int i = 0; i < 16; ++i) { System.arraycopy(this.a, 0, abyte, i * 128, 128); diff --git a/src/main/java/net/minecraft/server/PacketPlayOutLightUpdate.java b/src/main/java/net/minecraft/server/PacketPlayOutLightUpdate.java -index 6b70df646c6a690ab9437ead96c5ff097e4e12d2..1015a1d80530451be0cbee51e135526d3d3d99a7 100644 +index 6b70df646c6a690ab9437ead96c5ff097e4e12d2..a22f0cccecc85b4e4fe4603bcfa213f15c23db69 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutLightUpdate.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutLightUpdate.java -@@ -17,14 +17,43 @@ public class PacketPlayOutLightUpdate implements Packet<PacketListenerPlayOut> { +@@ -1,6 +1,8 @@ + package net.minecraft.server; + + import com.google.common.collect.Lists; ++import io.netty.channel.ChannelFuture; // Paper ++ + import java.io.IOException; + import java.util.Iterator; + import java.util.List; +@@ -17,14 +19,43 @@ public class PacketPlayOutLightUpdate implements Packet<PacketListenerPlayOut> { private List<byte[]> h; private boolean i; @@ -265,7 +274,7 @@ index 6b70df646c6a690ab9437ead96c5ff097e4e12d2..1015a1d80530451be0cbee51e135526d + } + + @Override -+ public void onPacketDispatchFinish(EntityPlayer player, io.netty.channel.ChannelFuture future) { ++ public void onPacketDispatchFinish(EntityPlayer player, ChannelFuture future) { + if (remainingSends.decrementAndGet() <= 0) { + // incase of any race conditions, schedule this delayed + MCUtil.scheduleTask(5, () -> { @@ -296,7 +305,7 @@ index 6b70df646c6a690ab9437ead96c5ff097e4e12d2..1015a1d80530451be0cbee51e135526d for (int i = 0; i < 18; ++i) { NibbleArray nibblearray = lightengine.a(EnumSkyBlock.SKY).a(SectionPosition.a(chunkcoordintpair, -1 + i)); -@@ -35,7 +64,7 @@ public class PacketPlayOutLightUpdate implements Packet<PacketListenerPlayOut> { +@@ -35,7 +66,7 @@ public class PacketPlayOutLightUpdate implements Packet<PacketListenerPlayOut> { this.e |= 1 << i; } else { this.c |= 1 << i; @@ -305,7 +314,7 @@ index 6b70df646c6a690ab9437ead96c5ff097e4e12d2..1015a1d80530451be0cbee51e135526d } } -@@ -44,7 +73,7 @@ public class PacketPlayOutLightUpdate implements Packet<PacketListenerPlayOut> { +@@ -44,7 +75,7 @@ public class PacketPlayOutLightUpdate implements Packet<PacketListenerPlayOut> { this.f |= 1 << i; } else { this.d |= 1 << i; @@ -314,7 +323,7 @@ index 6b70df646c6a690ab9437ead96c5ff097e4e12d2..1015a1d80530451be0cbee51e135526d } } } -@@ -57,8 +86,8 @@ public class PacketPlayOutLightUpdate implements Packet<PacketListenerPlayOut> { +@@ -57,8 +88,8 @@ public class PacketPlayOutLightUpdate implements Packet<PacketListenerPlayOut> { this.i = flag; this.c = i; this.d = j; @@ -325,7 +334,7 @@ index 6b70df646c6a690ab9437ead96c5ff097e4e12d2..1015a1d80530451be0cbee51e135526d for (int k = 0; k < 18; ++k) { NibbleArray nibblearray; -@@ -66,7 +95,7 @@ public class PacketPlayOutLightUpdate implements Packet<PacketListenerPlayOut> { +@@ -66,7 +97,7 @@ public class PacketPlayOutLightUpdate implements Packet<PacketListenerPlayOut> { if ((this.c & 1 << k) != 0) { nibblearray = lightengine.a(EnumSkyBlock.SKY).a(SectionPosition.a(chunkcoordintpair, -1 + k)); if (nibblearray != null && !nibblearray.c()) { @@ -334,7 +343,7 @@ index 6b70df646c6a690ab9437ead96c5ff097e4e12d2..1015a1d80530451be0cbee51e135526d } else { this.c &= ~(1 << k); if (nibblearray != null) { -@@ -78,7 +107,7 @@ public class PacketPlayOutLightUpdate implements Packet<PacketListenerPlayOut> { +@@ -78,7 +109,7 @@ public class PacketPlayOutLightUpdate implements Packet<PacketListenerPlayOut> { if ((this.d & 1 << k) != 0) { nibblearray = lightengine.a(EnumSkyBlock.BLOCK).a(SectionPosition.a(chunkcoordintpair, -1 + k)); if (nibblearray != null && !nibblearray.c()) { diff --git a/Spigot-Server-Patches/0491-Reduce-MutableInt-allocations-from-light-engine.patch b/Spigot-Server-Patches/0492-Reduce-MutableInt-allocations-from-light-engine.patch similarity index 100% rename from Spigot-Server-Patches/0491-Reduce-MutableInt-allocations-from-light-engine.patch rename to Spigot-Server-Patches/0492-Reduce-MutableInt-allocations-from-light-engine.patch diff --git a/Spigot-Server-Patches/0492-Reduce-allocation-of-Vec3D-by-entity-tracker.patch b/Spigot-Server-Patches/0493-Reduce-allocation-of-Vec3D-by-entity-tracker.patch similarity index 100% rename from Spigot-Server-Patches/0492-Reduce-allocation-of-Vec3D-by-entity-tracker.patch rename to Spigot-Server-Patches/0493-Reduce-allocation-of-Vec3D-by-entity-tracker.patch diff --git a/Spigot-Server-Patches/0493-Ensure-safe-gateway-teleport.patch b/Spigot-Server-Patches/0494-Ensure-safe-gateway-teleport.patch similarity index 100% rename from Spigot-Server-Patches/0493-Ensure-safe-gateway-teleport.patch rename to Spigot-Server-Patches/0494-Ensure-safe-gateway-teleport.patch diff --git a/Spigot-Server-Patches/0494-Add-option-for-console-having-all-permissions.patch b/Spigot-Server-Patches/0495-Add-option-for-console-having-all-permissions.patch similarity index 95% rename from Spigot-Server-Patches/0494-Add-option-for-console-having-all-permissions.patch rename to Spigot-Server-Patches/0495-Add-option-for-console-having-all-permissions.patch index bbfc2ca38..42c9b660a 100644 --- a/Spigot-Server-Patches/0494-Add-option-for-console-having-all-permissions.patch +++ b/Spigot-Server-Patches/0495-Add-option-for-console-having-all-permissions.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add option for console having all permissions diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index e1c9e559b25792296b6b8f6dd1070035d10d82f2..08f744ee5e83d317f872f9c48e2037a24327d76f 100644 +index 44f431bee68275d48aad75367aaec40a7ca59bea..06adb1fa670e7d755560abae67d46447d63370f0 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -416,4 +416,9 @@ public class PaperConfig { +@@ -417,4 +417,9 @@ public class PaperConfig { allowBlockPermanentBreakingExploits = getBoolean("allow-perm-block-break-exploits", allowBlockPermanentBreakingExploits); } diff --git a/Spigot-Server-Patches/0495-Workaround-for-Client-Lag-Spikes-MC-162253.patch b/Spigot-Server-Patches/0496-Workaround-for-Client-Lag-Spikes-MC-162253.patch similarity index 100% rename from Spigot-Server-Patches/0495-Workaround-for-Client-Lag-Spikes-MC-162253.patch rename to Spigot-Server-Patches/0496-Workaround-for-Client-Lag-Spikes-MC-162253.patch diff --git a/Spigot-Server-Patches/0496-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch similarity index 99% rename from Spigot-Server-Patches/0496-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch rename to Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch index 32810a519..bba3a8063 100644 --- a/Spigot-Server-Patches/0496-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch +++ b/Spigot-Server-Patches/0497-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch @@ -617,7 +617,7 @@ index 0e3ceb60e503c74fc65b1d08371645ffbb26ef5c..d5740a25bb487fc186333e908968c6a2 for (int i = 0; i < this.inventory.getSize(); ++i) { ItemStack itemstack = this.inventory.getItem(i); diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java -index 2f9c014454cf5fe771c6da84ad4af7e7790fdc7d..2e58e58548f0fc7af98b0c6294bf855f54705f9b 100644 +index a68e4fc411ae84f12b1ca7443fa66f6325712af8..ce17f5114e997b48073bb078336dc43bdae190a7 100644 --- a/src/main/java/net/minecraft/server/MCUtil.java +++ b/src/main/java/net/minecraft/server/MCUtil.java @@ -654,6 +654,7 @@ public final class MCUtil { @@ -1231,10 +1231,10 @@ index 745633509d3f948d46529d5439ec14cd01a05563..5ae74d0856f7fb4a7ee35e5d778d78fe 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 b28e5abea5d2585d9beff574dd82651e7d20275b..663f9136c4101bb48944ed5ea952f6375e8b2781 100644 +index 6032a67b3f242580d8de5e77554e3ec317d3019d..b602fc8e7747b839a853310c5d5592d3ac4c0855 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -741,6 +741,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -742,6 +742,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { throw new UnsupportedOperationException("Cannot set rotation of players. Consider teleporting instead."); } diff --git a/Spigot-Server-Patches/0497-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch b/Spigot-Server-Patches/0498-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch similarity index 100% rename from Spigot-Server-Patches/0497-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch rename to Spigot-Server-Patches/0498-Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch diff --git a/Spigot-Server-Patches/0498-Optimize-sending-packets-to-nearby-locations-sounds-.patch b/Spigot-Server-Patches/0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch similarity index 100% rename from Spigot-Server-Patches/0498-Optimize-sending-packets-to-nearby-locations-sounds-.patch rename to Spigot-Server-Patches/0499-Optimize-sending-packets-to-nearby-locations-sounds-.patch diff --git a/Spigot-Server-Patches/0499-Improve-Chunk-Status-Transition-Speed.patch b/Spigot-Server-Patches/0500-Improve-Chunk-Status-Transition-Speed.patch similarity index 100% rename from Spigot-Server-Patches/0499-Improve-Chunk-Status-Transition-Speed.patch rename to Spigot-Server-Patches/0500-Improve-Chunk-Status-Transition-Speed.patch diff --git a/Spigot-Server-Patches/0500-Fix-villager-trading-demand-MC-163962.patch b/Spigot-Server-Patches/0501-Fix-villager-trading-demand-MC-163962.patch similarity index 100% rename from Spigot-Server-Patches/0500-Fix-villager-trading-demand-MC-163962.patch rename to Spigot-Server-Patches/0501-Fix-villager-trading-demand-MC-163962.patch diff --git a/Spigot-Server-Patches/0501-Maps-shouldn-t-load-chunks.patch b/Spigot-Server-Patches/0502-Maps-shouldn-t-load-chunks.patch similarity index 100% rename from Spigot-Server-Patches/0501-Maps-shouldn-t-load-chunks.patch rename to Spigot-Server-Patches/0502-Maps-shouldn-t-load-chunks.patch diff --git a/Spigot-Server-Patches/0502-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch b/Spigot-Server-Patches/0503-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch similarity index 91% rename from Spigot-Server-Patches/0502-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch rename to Spigot-Server-Patches/0503-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch index 96bcd2c18..4bcf7fe0c 100644 --- a/Spigot-Server-Patches/0502-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch +++ b/Spigot-Server-Patches/0503-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch @@ -19,10 +19,10 @@ index 90be8c6091dc590a020721f45c7ff7b137cc806d..faa556d4358bc9890ae80c18ee10c38a } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index d0493919e71159ac6b38a64b2411fea722b53306..b79302b83921111d5fa32794babf1fa57b7bbcb1 100644 +index 00df3260d4f208052515fcd2613be1d6f92e7b1f..4a4508f45b76379dfa567036696d3bf1f4a5c4f4 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -303,8 +303,8 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -302,8 +302,8 @@ public class WorldServer extends World implements GeneratorAccessSeed { this.worldDataServer.setThundering(flag1); } diff --git a/Spigot-Server-Patches/0503-Optimize-Bit-Operations-by-inlining.patch b/Spigot-Server-Patches/0504-Optimize-Bit-Operations-by-inlining.patch similarity index 100% rename from Spigot-Server-Patches/0503-Optimize-Bit-Operations-by-inlining.patch rename to Spigot-Server-Patches/0504-Optimize-Bit-Operations-by-inlining.patch diff --git a/Spigot-Server-Patches/0504-Optimize-Light-Engine.patch b/Spigot-Server-Patches/0505-Optimize-Light-Engine.patch similarity index 99% rename from Spigot-Server-Patches/0504-Optimize-Light-Engine.patch rename to Spigot-Server-Patches/0505-Optimize-Light-Engine.patch index 3c31180a4..04e66be87 100644 --- a/Spigot-Server-Patches/0504-Optimize-Light-Engine.patch +++ b/Spigot-Server-Patches/0505-Optimize-Light-Engine.patch @@ -1307,10 +1307,10 @@ index 35f4d2d9591e625ab0bbeab7b606761e74965eec..698d82dd736529a8cbfad5c6bed70ab9 this.a.a(t0); this.f(); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index b79302b83921111d5fa32794babf1fa57b7bbcb1..bed2cbabc0ac921bfdc4c6e4a04973a5411ebaa0 100644 +index 4a4508f45b76379dfa567036696d3bf1f4a5c4f4..f24c4def3799d2787b1bc14b2dea532e6a93d6ee 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -709,6 +709,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -708,6 +708,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } gameprofilerfiller.exit(); timings.chunkTicksBlocks.stopTiming(); // Paper diff --git a/Spigot-Server-Patches/0505-Delay-Chunk-Unloads-based-on-Player-Movement.patch b/Spigot-Server-Patches/0506-Delay-Chunk-Unloads-based-on-Player-Movement.patch similarity index 97% rename from Spigot-Server-Patches/0505-Delay-Chunk-Unloads-based-on-Player-Movement.patch rename to Spigot-Server-Patches/0506-Delay-Chunk-Unloads-based-on-Player-Movement.patch index 4738b38c7..a2cfef729 100644 --- a/Spigot-Server-Patches/0505-Delay-Chunk-Unloads-based-on-Player-Movement.patch +++ b/Spigot-Server-Patches/0506-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 0746932a3191669052f15270f5c94efbce0bd0c2..0f4fca90fd6c3788a5762c96c344899cb1665466 100644 +index 65f9ec884c7e36b7d1340dcfdf186ee0669178e4..b04fe735839de47e4101dade366a668c9237f6b6 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -639,4 +639,13 @@ public class PaperWorldConfig { +@@ -633,4 +633,13 @@ public class PaperWorldConfig { private void viewDistance() { this.noTickViewDistance = this.getInt("viewdistances.no-tick-view-distance", -1); } diff --git a/Spigot-Server-Patches/0506-Add-Plugin-Tickets-to-API-Chunk-Methods.patch b/Spigot-Server-Patches/0507-Add-Plugin-Tickets-to-API-Chunk-Methods.patch similarity index 100% rename from Spigot-Server-Patches/0506-Add-Plugin-Tickets-to-API-Chunk-Methods.patch rename to Spigot-Server-Patches/0507-Add-Plugin-Tickets-to-API-Chunk-Methods.patch diff --git a/Spigot-Server-Patches/0507-Fix-missing-chunks-due-to-integer-overflow.patch b/Spigot-Server-Patches/0508-Fix-missing-chunks-due-to-integer-overflow.patch similarity index 100% rename from Spigot-Server-Patches/0507-Fix-missing-chunks-due-to-integer-overflow.patch rename to Spigot-Server-Patches/0508-Fix-missing-chunks-due-to-integer-overflow.patch diff --git a/Spigot-Server-Patches/0508-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch b/Spigot-Server-Patches/0509-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch similarity index 100% rename from Spigot-Server-Patches/0508-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch rename to Spigot-Server-Patches/0509-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch diff --git a/Spigot-Server-Patches/0509-Fix-piston-physics-inconsistency-MC-188840.patch b/Spigot-Server-Patches/0510-Fix-piston-physics-inconsistency-MC-188840.patch similarity index 97% rename from Spigot-Server-Patches/0509-Fix-piston-physics-inconsistency-MC-188840.patch rename to Spigot-Server-Patches/0510-Fix-piston-physics-inconsistency-MC-188840.patch index 8e81d5690..ab41639c1 100644 --- a/Spigot-Server-Patches/0509-Fix-piston-physics-inconsistency-MC-188840.patch +++ b/Spigot-Server-Patches/0510-Fix-piston-physics-inconsistency-MC-188840.patch @@ -32,10 +32,10 @@ This patch fixes https://bugs.mojang.com/browse/MC-188840 This patch also fixes rail duping and carpet duping. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 08f744ee5e83d317f872f9c48e2037a24327d76f..f9831b1ac15c9fa08c7201a43fe9f1824ddc03c3 100644 +index 06adb1fa670e7d755560abae67d46447d63370f0..3b0f3127bcee8e9290b4640bcd4ec0d17fb43f43 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -421,4 +421,9 @@ public class PaperConfig { +@@ -422,4 +422,9 @@ public class PaperConfig { consoleHasAllPermissions = getBoolean("settings.console-has-all-permissions", consoleHasAllPermissions); } diff --git a/Spigot-Server-Patches/0510-Fix-sand-duping.patch b/Spigot-Server-Patches/0511-Fix-sand-duping.patch similarity index 100% rename from Spigot-Server-Patches/0510-Fix-sand-duping.patch rename to Spigot-Server-Patches/0511-Fix-sand-duping.patch diff --git a/Spigot-Server-Patches/0511-Prevent-position-desync-in-playerconnection-causing-.patch b/Spigot-Server-Patches/0512-Prevent-position-desync-in-playerconnection-causing-.patch similarity index 100% rename from Spigot-Server-Patches/0511-Prevent-position-desync-in-playerconnection-causing-.patch rename to Spigot-Server-Patches/0512-Prevent-position-desync-in-playerconnection-causing-.patch diff --git a/Spigot-Server-Patches/0512-Fix-enderdragon-exp-dupe.patch b/Spigot-Server-Patches/0513-Fix-enderdragon-exp-dupe.patch similarity index 100% rename from Spigot-Server-Patches/0512-Fix-enderdragon-exp-dupe.patch rename to Spigot-Server-Patches/0513-Fix-enderdragon-exp-dupe.patch diff --git a/Spigot-Server-Patches/0513-Inventory-getHolder-method-without-block-snapshot.patch b/Spigot-Server-Patches/0514-Inventory-getHolder-method-without-block-snapshot.patch similarity index 100% rename from Spigot-Server-Patches/0513-Inventory-getHolder-method-without-block-snapshot.patch rename to Spigot-Server-Patches/0514-Inventory-getHolder-method-without-block-snapshot.patch diff --git a/Spigot-Server-Patches/0514-Expose-Arrow-getItemStack.patch b/Spigot-Server-Patches/0515-Expose-Arrow-getItemStack.patch similarity index 100% rename from Spigot-Server-Patches/0514-Expose-Arrow-getItemStack.patch rename to Spigot-Server-Patches/0515-Expose-Arrow-getItemStack.patch diff --git a/Spigot-Server-Patches/0515-Add-and-implement-PlayerRecipeBookClickEvent.patch b/Spigot-Server-Patches/0516-Add-and-implement-PlayerRecipeBookClickEvent.patch similarity index 100% rename from Spigot-Server-Patches/0515-Add-and-implement-PlayerRecipeBookClickEvent.patch rename to Spigot-Server-Patches/0516-Add-and-implement-PlayerRecipeBookClickEvent.patch diff --git a/Spigot-Server-Patches/0516-Add-PrepareGrindstoneEvent.patch b/Spigot-Server-Patches/0517-Add-PrepareGrindstoneEvent.patch similarity index 100% rename from Spigot-Server-Patches/0516-Add-PrepareGrindstoneEvent.patch rename to Spigot-Server-Patches/0517-Add-PrepareGrindstoneEvent.patch diff --git a/Spigot-Server-Patches/0273-Allow-disabling-armour-stand-ticking.patch b/removed/1.16/0274-Allow-disabling-armour-stand-ticking.patch similarity index 53% rename from Spigot-Server-Patches/0273-Allow-disabling-armour-stand-ticking.patch rename to removed/1.16/0274-Allow-disabling-armour-stand-ticking.patch index b792c77db..dca49d795 100644 --- a/Spigot-Server-Patches/0273-Allow-disabling-armour-stand-ticking.patch +++ b/removed/1.16/0274-Allow-disabling-armour-stand-ticking.patch @@ -20,7 +20,7 @@ index eaaa51e4bf761f41fd516402ce1ad0f903c6ab71..bc3df01aab3e79be9c2836820e0eacc6 + } } diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index a70b1a17fe884980ef7c3c0a36e567a0e69ef7f0..d5c09152acc93b25d626284071599afdbd76b709 100644 +index 61d7d507aaac3e7e5a885387ae89c67dfb1c9844..42b9a339e9c35db596ec78881c32c801c2d739f4 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java @@ -44,6 +44,12 @@ public class EntityArmorStand extends EntityLiving { @@ -37,11 +37,11 @@ index a70b1a17fe884980ef7c3c0a36e567a0e69ef7f0..d5c09152acc93b25d626284071599afd public EntityArmorStand(EntityTypes<? extends EntityArmorStand> entitytypes, World world) { super(entitytypes, world); @@ -55,6 +61,7 @@ public class EntityArmorStand extends EntityLiving { - this.rightArmPose = EntityArmorStand.bt; - this.leftLegPose = EntityArmorStand.bu; - this.rightLegPose = EntityArmorStand.bv; + this.rightArmPose = EntityArmorStand.bu; + this.leftLegPose = EntityArmorStand.bv; + this.rightLegPose = EntityArmorStand.bw; + if (world != null) this.canTick = world.paperConfig.armorStandTick; // Paper - armour stand ticking - this.G = 0.0F; + this.H = 0.0F; } @@ -135,6 +142,7 @@ public class EntityArmorStand extends EntityLiving { @@ -136,11 +136,125 @@ index a70b1a17fe884980ef7c3c0a36e567a0e69ef7f0..d5c09152acc93b25d626284071599afd public void setRightLegPose(Vector3f vector3f) { this.rightLegPose = vector3f; - this.datawatcher.set(EntityArmorStand.bo, vector3f); + this.datawatcher.set(EntityArmorStand.bp, vector3f); + this.noTickPoseDirty = true; // Paper - Allow updates when not ticking } public Vector3f r() { +diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java +index a4051c1f0cdcf179e7afe60d301982412da7ed64..990aea604d02db723193722ed692c3a3725f987d 100644 +--- a/src/main/java/net/minecraft/server/EntityLiving.java ++++ b/src/main/java/net/minecraft/server/EntityLiving.java +@@ -2329,52 +2329,7 @@ public abstract class EntityLiving extends Entity { + } + } + +- EnumItemSlot[] aenumitemslot = EnumItemSlot.values(); +- int k = aenumitemslot.length; +- +- for (int l = 0; l < k; ++l) { +- EnumItemSlot enumitemslot = aenumitemslot[l]; +- ItemStack itemstack; +- +- switch (enumitemslot.a()) { +- case HAND: +- itemstack = (ItemStack) this.bu.get(enumitemslot.b()); +- break; +- case ARMOR: +- itemstack = (ItemStack) this.bv.get(enumitemslot.b()); +- break; +- default: +- continue; +- } +- +- ItemStack itemstack1 = this.getEquipment(enumitemslot); +- +- if (!ItemStack.matches(itemstack1, itemstack)) { +- // Paper start - PlayerArmorChangeEvent +- if (this instanceof EntityPlayer && enumitemslot.getType() == EnumItemSlot.Function.ARMOR) { +- final org.bukkit.inventory.ItemStack oldItem = CraftItemStack.asBukkitCopy(itemstack); +- final org.bukkit.inventory.ItemStack newItem = CraftItemStack.asBukkitCopy(itemstack1); +- new PlayerArmorChangeEvent((Player) this.getBukkitEntity(), PlayerArmorChangeEvent.SlotType.valueOf(enumitemslot.name()), oldItem, newItem).callEvent(); +- } +- // Paper end +- ((WorldServer) this.world).getChunkProvider().broadcast(this, new PacketPlayOutEntityEquipment(this.getId(), enumitemslot, itemstack1)); +- if (!itemstack.isEmpty()) { +- this.getAttributeMap().a(itemstack.a(enumitemslot)); +- } +- +- if (!itemstack1.isEmpty()) { +- this.getAttributeMap().b(itemstack1.a(enumitemslot)); +- } +- +- switch (enumitemslot.a()) { +- case HAND: +- this.bu.set(enumitemslot.b(), itemstack1.cloneItemStack()); +- break; +- case ARMOR: +- this.bv.set(enumitemslot.b(), itemstack1.cloneItemStack()); +- } +- } +- } ++ updateEntityEquipment(); // Paper - split into own method + + if (this.ticksLived % 20 == 0) { + this.getCombatTracker().g(); +@@ -2475,6 +2430,55 @@ public abstract class EntityLiving extends Entity { + } + } + ++ // Paper start - split into own method from above ++ public void updateEntityEquipment() { ++ EnumItemSlot[] aenumitemslot = EnumItemSlot.values(); ++ int k = aenumitemslot.length; ++ for (int l = 0; l < k; ++l) { ++ EnumItemSlot enumitemslot = aenumitemslot[l]; ++ ItemStack itemstack; ++ ++ switch (enumitemslot.a()) { ++ case HAND: ++ itemstack = (ItemStack) this.bu.get(enumitemslot.b()); ++ break; ++ case ARMOR: ++ itemstack = (ItemStack) this.bv.get(enumitemslot.b()); ++ break; ++ default: ++ continue; ++ } ++ ++ ItemStack itemstack1 = this.getEquipment(enumitemslot); ++ ++ if (!ItemStack.matches(itemstack1, itemstack)) { ++ // Paper start - PlayerArmorChangeEvent ++ if (this instanceof EntityPlayer && enumitemslot.getType() == EnumItemSlot.Function.ARMOR) { ++ final org.bukkit.inventory.ItemStack oldItem = CraftItemStack.asBukkitCopy(itemstack); ++ final org.bukkit.inventory.ItemStack newItem = CraftItemStack.asBukkitCopy(itemstack1); ++ new PlayerArmorChangeEvent((Player) this.getBukkitEntity(), PlayerArmorChangeEvent.SlotType.valueOf(enumitemslot.name()), oldItem, newItem).callEvent(); ++ } ++ // Paper end ++ ((WorldServer) this.world).getChunkProvider().broadcast(this, new PacketPlayOutEntityEquipment(this.getId(), enumitemslot, itemstack1)); ++ if (!itemstack.isEmpty()) { ++ this.getAttributeMap().a(itemstack.a(enumitemslot)); ++ } ++ ++ if (!itemstack1.isEmpty()) { ++ this.getAttributeMap().b(itemstack1.a(enumitemslot)); ++ } ++ ++ switch (enumitemslot.a()) { ++ case HAND: ++ this.bu.set(enumitemslot.b(), itemstack1.cloneItemStack()); ++ break; ++ case ARMOR: ++ this.bv.set(enumitemslot.b(), itemstack1.cloneItemStack()); ++ } ++ } ++ } ++ } ++ + protected float f(float f, float f1) { + float f2 = MathHelper.g(f - this.aI); + diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java index d1d689e5d78c569313c4059c4652724605dc07d2..ac105270d5c7e2070f52782fc7dbdcd381db33a5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java