diff --git a/Spigot-API-Patches/0045-Fireworks-API-s.patch b/Spigot-API-Patches/0045-Fireworks-API-s.patch index abfe4d2ae..d05ffa7a0 100644 --- a/Spigot-API-Patches/0045-Fireworks-API-s.patch +++ b/Spigot-API-Patches/0045-Fireworks-API-s.patch @@ -1,4 +1,4 @@ -From 6920434f57d65bdcb36d94c4c347c5e30f3775ad Mon Sep 17 00:00:00 2001 +From 2bde8cda0f726300a485db3267cad3e528cebaa2 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 28 Dec 2016 01:18:55 -0500 Subject: [PATCH] Fireworks API's @@ -7,7 +7,7 @@ Get the Entity being boosted Get the firework launcher diff --git a/src/main/java/org/bukkit/entity/Firework.java b/src/main/java/org/bukkit/entity/Firework.java -index 1c55f0338..7df26cf7f 100644 +index d6ea16ec4..a6250043e 100644 --- a/src/main/java/org/bukkit/entity/Firework.java +++ b/src/main/java/org/bukkit/entity/Firework.java @@ -3,6 +3,9 @@ package org.bukkit.entity; @@ -20,10 +20,10 @@ index 1c55f0338..7df26cf7f 100644 public interface Firework extends Entity { /** -@@ -25,4 +28,15 @@ public interface Firework extends Entity { - * remaining fuse. +@@ -43,4 +46,15 @@ public interface Firework extends Entity { + * @param shotAtAngle */ - void detonate(); + void setShotAtAngle(boolean shotAtAngle); + + // Paper start + @Nullable @@ -37,5 +37,5 @@ index 1c55f0338..7df26cf7f 100644 + // Paper end } -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0002-Paper-config-files.patch b/Spigot-Server-Patches/0002-Paper-config-files.patch index f32ef3ceb..7a5f53d27 100644 --- a/Spigot-Server-Patches/0002-Paper-config-files.patch +++ b/Spigot-Server-Patches/0002-Paper-config-files.patch @@ -1,4 +1,4 @@ -From d99eaf4f0c6f2a9b5cd3be7cee05369dca7244d1 Mon Sep 17 00:00:00 2001 +From c1950775d3e3996cd0c5525df5195bdc8c292ad0 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 29 Feb 2016 21:02:09 -0600 Subject: [PATCH] Paper config files @@ -518,10 +518,10 @@ index 0000000000..a738657394 + } +} diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index d88c9b6f65..5e0797afde 100644 +index e02e003006..e6cf90484c 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java -@@ -152,6 +152,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -162,6 +162,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer org.spigotmc.SpigotConfig.init((File) options.valueOf("spigot-settings")); org.spigotmc.SpigotConfig.registerCommands(); // Spigot end @@ -599,7 +599,7 @@ index bec64d7f28..7f648dbbc9 100644 this.world = new CraftWorld((WorldServer) this, gen, env); this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 8465a91088..4d38bf5018 100644 +index 305b6eaa93..dce5bde54f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -756,6 +756,7 @@ public final class CraftServer implements Server { @@ -626,7 +626,7 @@ index 8465a91088..4d38bf5018 100644 overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*"); ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions"); -@@ -1958,4 +1961,35 @@ public final class CraftServer implements Server { +@@ -1959,4 +1962,35 @@ public final class CraftServer implements Server { { return spigot; } diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index 754fd129a..13fab8a0f 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -1,4 +1,4 @@ -From 98451ed1b8e477f1cbf7b5da71e9437d7e665207 Mon Sep 17 00:00:00 2001 +From 07b31610596dc222d66d78b3b1e468314d3157e8 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 04:00:11 -0600 Subject: [PATCH] Timings v2 @@ -358,7 +358,7 @@ index 3ed48be382..c4d989f702 100644 } } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index baf3bd461b..f351d021dc 100644 +index 3b785a3ade..e51e3b74cc 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -129,11 +129,13 @@ public class ChunkProviderServer extends IChunkProvider { @@ -387,7 +387,7 @@ index baf3bd461b..f351d021dc 100644 } @Override -@@ -354,7 +358,9 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -362,7 +366,9 @@ public class ChunkProviderServer extends IChunkProvider { this.tickDistanceManager(); this.world.timings.doChunkMap.stopTiming(); // Spigot this.world.getMethodProfiler().exitEnter("chunks"); @@ -397,7 +397,7 @@ index baf3bd461b..f351d021dc 100644 this.world.timings.doChunkUnload.startTiming(); // Spigot this.world.getMethodProfiler().exitEnter("unload"); this.playerChunkMap.unloadChunks(booleansupplier); -@@ -379,10 +385,12 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -387,10 +393,12 @@ public class ChunkProviderServer extends IChunkProvider { boolean flag2 = world.ticksPerAnimalSpawns != 0L && worlddata.getTime() % world.ticksPerAnimalSpawns == 0L; // CraftBukkit // PAIL: TODO monster ticks this.world.getMethodProfiler().enter("naturalSpawnCount"); @@ -410,7 +410,7 @@ index baf3bd461b..f351d021dc 100644 this.world.getMethodProfiler().exit(); this.playerChunkMap.f().forEach((playerchunk) -> { Optional optional = ((Either) playerchunk.b().getNow(PlayerChunk.UNLOADED_CHUNK)).left(); -@@ -391,7 +399,9 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -399,7 +407,9 @@ public class ChunkProviderServer extends IChunkProvider { Chunk chunk = (Chunk) optional.get(); this.world.getMethodProfiler().enter("broadcast"); @@ -420,7 +420,7 @@ index baf3bd461b..f351d021dc 100644 this.world.getMethodProfiler().exit(); ChunkCoordIntPair chunkcoordintpair = playerchunk.i(); -@@ -441,9 +451,9 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -449,9 +459,9 @@ public class ChunkProviderServer extends IChunkProvider { this.world.getMethodProfiler().exit(); } @@ -432,7 +432,7 @@ index baf3bd461b..f351d021dc 100644 } } }); -@@ -456,9 +466,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -464,9 +474,7 @@ public class ChunkProviderServer extends IChunkProvider { this.world.getMethodProfiler().exit(); } @@ -521,7 +521,7 @@ index 53735b52a3..721839b4c6 100644 int j = 0; CustomFunction.c[] acustomfunction_c = customfunction.b(); diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 5e0797afde..f572cd8fc7 100644 +index e6cf90484c..ce3ca4830e 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -19,6 +19,8 @@ import java.util.Collections; @@ -542,7 +542,7 @@ index 5e0797afde..f572cd8fc7 100644 import org.bukkit.event.server.ServerCommandEvent; import org.bukkit.craftbukkit.util.Waitable; import org.bukkit.event.server.RemoteServerCommandEvent; -@@ -428,7 +430,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -425,7 +427,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer } public void handleCommandQueue() { @@ -551,7 +551,7 @@ index 5e0797afde..f572cd8fc7 100644 while (!this.serverCommandQueue.isEmpty()) { ServerCommand servercommand = (ServerCommand) this.serverCommandQueue.remove(0); -@@ -443,7 +445,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -440,7 +442,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer // CraftBukkit end } @@ -560,7 +560,7 @@ index 5e0797afde..f572cd8fc7 100644 } @Override -@@ -669,6 +671,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -666,6 +668,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @Override public String executeRemoteCommand(String s) { @@ -568,7 +568,7 @@ index 5e0797afde..f572cd8fc7 100644 this.remoteControlCommandListener.clearMessages(); this.executeSync(() -> { // CraftBukkit start - fire RemoteServerCommandEvent -@@ -677,10 +680,39 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -674,10 +677,39 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer if (event.isCancelled()) { return; } @@ -648,7 +648,7 @@ index d4954801cb..fd4712c710 100644 protected Vec3D a(Vec3D vec3d, EnumMoveType enummovetype) { diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index dcbc4ea7e1..b1f130f91d 100644 +index 2b13f4c9f9..47379046dc 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -35,7 +35,7 @@ import org.bukkit.event.entity.EntityTeleportEvent; @@ -660,7 +660,7 @@ index dcbc4ea7e1..b1f130f91d 100644 public abstract class EntityLiving extends Entity { -@@ -2214,7 +2214,6 @@ public abstract class EntityLiving extends Entity { +@@ -2215,7 +2215,6 @@ public abstract class EntityLiving extends Entity { @Override public void tick() { @@ -668,7 +668,7 @@ index dcbc4ea7e1..b1f130f91d 100644 super.tick(); this.o(); this.p(); -@@ -2289,9 +2288,7 @@ public abstract class EntityLiving extends Entity { +@@ -2290,9 +2289,7 @@ public abstract class EntityLiving extends Entity { } } @@ -678,7 +678,7 @@ index dcbc4ea7e1..b1f130f91d 100644 double d0 = this.locX - this.lastX; double d1 = this.locZ - this.lastZ; float f = (float) (d0 * d0 + d1 * d1); -@@ -2371,8 +2368,6 @@ public abstract class EntityLiving extends Entity { +@@ -2372,8 +2369,6 @@ public abstract class EntityLiving extends Entity { if (this.isSleeping()) { this.pitch = 0.0F; } @@ -687,7 +687,7 @@ index dcbc4ea7e1..b1f130f91d 100644 } protected float e(float f, float f1) { -@@ -2446,7 +2441,6 @@ public abstract class EntityLiving extends Entity { +@@ -2447,7 +2442,6 @@ public abstract class EntityLiving extends Entity { this.setMot(d4, d5, d6); this.world.getMethodProfiler().enter("ai"); @@ -695,7 +695,7 @@ index dcbc4ea7e1..b1f130f91d 100644 if (this.isFrozen()) { this.jumping = false; this.bb = 0.0F; -@@ -2457,7 +2451,6 @@ public abstract class EntityLiving extends Entity { +@@ -2458,7 +2452,6 @@ public abstract class EntityLiving extends Entity { this.doTick(); this.world.getMethodProfiler().exit(); } @@ -703,7 +703,7 @@ index dcbc4ea7e1..b1f130f91d 100644 this.world.getMethodProfiler().exit(); this.world.getMethodProfiler().enter("jump"); -@@ -2482,9 +2475,7 @@ public abstract class EntityLiving extends Entity { +@@ -2483,9 +2476,7 @@ public abstract class EntityLiving extends Entity { this.n(); AxisAlignedBB axisalignedbb = this.getBoundingBox(); @@ -713,7 +713,7 @@ index dcbc4ea7e1..b1f130f91d 100644 this.world.getMethodProfiler().exit(); this.world.getMethodProfiler().enter("push"); if (this.bq > 0) { -@@ -2492,9 +2483,7 @@ public abstract class EntityLiving extends Entity { +@@ -2493,9 +2484,7 @@ public abstract class EntityLiving extends Entity { this.a(axisalignedbb, this.getBoundingBox()); } @@ -724,7 +724,7 @@ index dcbc4ea7e1..b1f130f91d 100644 } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 1701d39eab..d9eb5ce085 100644 +index cec3794cd4..bc0e483a2a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -63,7 +63,7 @@ import org.bukkit.craftbukkit.CraftServer; @@ -736,7 +736,7 @@ index 1701d39eab..d9eb5ce085 100644 import org.spigotmc.SlackActivityAccountant; // Spigot public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant implements IMojangStatistics, ICommandListener, AutoCloseable, Runnable { -@@ -684,6 +684,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { return !this.canSleepForTick(); }); -@@ -961,7 +962,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit @@ -777,7 +777,7 @@ index 1701d39eab..d9eb5ce085 100644 } this.methodProfiler.enter("snooper"); -@@ -1012,30 +1011,34 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Tue, 1 Mar 2016 14:32:43 -0600 Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang @@ -19,10 +19,10 @@ index 3f35a28ba1..cf00f35a5b 100644 throwable = throwable1; throw throwable1; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index d9eb5ce085..15c6818f10 100644 +index bc0e483a2a..d7c0006605 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1300,7 +1300,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Thu, 1 Mar 2018 19:37:52 -0600 Subject: [PATCH] Add version history to version command @@ -192,10 +192,10 @@ index 0000000000..aac3f66cb2 + } +} diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index c7ea4ec4fe..6e1509c2c1 100644 +index ce3ca4830e..895049287c 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java -@@ -162,6 +162,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -172,6 +172,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer return false; } com.destroystokyo.paper.PaperConfig.registerCommands(); diff --git a/Spigot-Server-Patches/0022-Optimize-TileEntity-Ticking.patch b/Spigot-Server-Patches/0022-Optimize-TileEntity-Ticking.patch index 125837ca8..c82654138 100644 --- a/Spigot-Server-Patches/0022-Optimize-TileEntity-Ticking.patch +++ b/Spigot-Server-Patches/0022-Optimize-TileEntity-Ticking.patch @@ -1,11 +1,11 @@ -From f330251e5134f41873289563ce02eb5c70499ce7 Mon Sep 17 00:00:00 2001 +From cc69a9a63cd4b9e2e5248acd36fa6f8117868852 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 8 Mar 2015 22:55:25 -0600 Subject: [PATCH] Optimize TileEntity Ticking diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java -index ffaf16cff8..387e366130 100644 +index ffaf16cff8..6b94826536 100644 --- a/src/main/java/net/minecraft/server/TileEntityChest.java +++ b/src/main/java/net/minecraft/server/TileEntityChest.java @@ -7,7 +7,7 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity; @@ -17,7 +17,7 @@ index ffaf16cff8..387e366130 100644 private NonNullList items; protected float a; -@@ -101,13 +101,19 @@ public class TileEntityChest extends TileEntityLootable implements ITickable { +@@ -101,22 +101,31 @@ public class TileEntityChest extends TileEntityLootable implements ITickable { return nbttagcompound; } @@ -28,6 +28,7 @@ index ffaf16cff8..387e366130 100644 int k = this.position.getZ(); ++this.j; +- this.viewingCount = a(this.world, this, this.j, i, j, k, this.viewingCount); + } + + public void doOpenLogic() { @@ -35,10 +36,10 @@ index ffaf16cff8..387e366130 100644 + int j = this.position.getY(); + int k = this.position.getZ(); + - this.viewingCount = a(this.world, this, this.j, i, j, k, this.viewingCount); ++ //this.viewingCount = a(this.world, this, this.j, i, j, k, this.viewingCount); // Paper - check is faulty given our logic is called before active container set this.b = this.a; float f = 0.1F; -@@ -115,8 +121,11 @@ public class TileEntityChest extends TileEntityLootable implements ITickable { + if (this.viewingCount > 0 && this.a == 0.0F) { this.a(SoundEffects.BLOCK_CHEST_OPEN); } diff --git a/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch b/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch index 81c592beb..5775dcc05 100644 --- a/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch +++ b/Spigot-Server-Patches/0023-Further-improve-server-tick-loop.patch @@ -1,4 +1,4 @@ -From 3a06c1c75bebcf36bb3d8ea4553d07efb2eba026 Mon Sep 17 00:00:00 2001 +From bb298197fb834218d8cd16207a2cbd0b75718392 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 1 Mar 2016 23:09:29 -0600 Subject: [PATCH] Further improve server tick loop @@ -12,7 +12,7 @@ Previous implementation did not calculate TPS correctly. Switch to a realistic rolling average and factor in std deviation as an extra reporting variable diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index cec120cf2..7bb83014b 100644 +index d7c0006605..6594138f35 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -157,7 +157,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Wed, 2 Mar 2016 11:59:48 -0600 Subject: [PATCH] Optimize explosions @@ -123,10 +123,10 @@ index cdd8939504..bd6a0bd16b 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index a7b8567ec5..980284c3e9 100644 +index 6594138f35..55d10058f5 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1144,6 +1144,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Thu, 3 Mar 2016 02:15:57 -0600 Subject: [PATCH] Expose server CommandMap diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 58428bfbf7..84cb33c317 100644 +index 145178ebc0..a21067c279 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1587,6 +1587,7 @@ public final class CraftServer implements Server { +@@ -1588,6 +1588,7 @@ public final class CraftServer implements Server { return helpMap; } diff --git a/Spigot-Server-Patches/0054-Add-exception-reporting-event.patch b/Spigot-Server-Patches/0054-Add-exception-reporting-event.patch index d16ab2eb8..7e420d199 100644 --- a/Spigot-Server-Patches/0054-Add-exception-reporting-event.patch +++ b/Spigot-Server-Patches/0054-Add-exception-reporting-event.patch @@ -1,4 +1,4 @@ -From cf75b4463e247e36daca0616d92949435ca35c66 Mon Sep 17 00:00:00 2001 +From f2305fbc79aca7ff5edca26550381010447e8b93 Mon Sep 17 00:00:00 2001 From: Joseph Hirschfeld Date: Thu, 3 Mar 2016 03:15:41 -0600 Subject: [PATCH] Add exception reporting event @@ -80,7 +80,7 @@ index 46635a5308..6c13ae3bae 100644 } } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 25e0163c60..4e60de0b6e 100644 +index e51e3b74cc..0ce2d6d0fb 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -15,6 +15,9 @@ import java.util.function.BooleanSupplier; @@ -121,7 +121,7 @@ index 2cb0962ff1..21a8ed3231 100644 } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index e2ab4b1bfb..14b0875eee 100644 +index 89694d3faf..7a681bda7c 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -681,6 +681,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -141,7 +141,7 @@ index e2ab4b1bfb..14b0875eee 100644 } } diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index d4a9af975d..88b5aa3a51 100644 +index 8b17dde509..d6cecfc09b 100644 --- a/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java @@ -1,5 +1,6 @@ @@ -159,8 +159,8 @@ index d4a9af975d..88b5aa3a51 100644 return null; } } -@@ -252,6 +254,7 @@ public class RegionFile implements AutoCloseable { - this.b(chunkcoordintpair, (int) (SystemUtils.getTimeMillis() / 1000L)); +@@ -262,6 +264,7 @@ public class RegionFile implements AutoCloseable { + // this.b(chunkcoordintpair, (int) (SystemUtils.getTimeMillis() / 1000L)); // Spigot - move this into writeChunk } catch (IOException ioexception) { ioexception.printStackTrace(); + ServerInternalException.reportInternalException(ioexception); // Paper diff --git a/Spigot-Server-Patches/0059-Chunk-Save-Reattempt.patch b/Spigot-Server-Patches/0059-Chunk-Save-Reattempt.patch index a3e2f9431..47f2f2f49 100644 --- a/Spigot-Server-Patches/0059-Chunk-Save-Reattempt.patch +++ b/Spigot-Server-Patches/0059-Chunk-Save-Reattempt.patch @@ -1,4 +1,4 @@ -From 73bc13803b289003e2a94fdc929696f601d6bd33 Mon Sep 17 00:00:00 2001 +From 6951163f41c48961ff495eadbc07949a8ae88979 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 4 Mar 2013 23:46:10 -0500 Subject: [PATCH] Chunk Save Reattempt @@ -6,12 +6,12 @@ Subject: [PATCH] Chunk Save Reattempt We commonly have "Stream Closed" errors on chunk saving, so this code should re-try to save the chunk in the event of failure and hopefully prevent rollbacks. diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index 88b5aa3a51..b062a31c49 100644 +index d6cecfc09b..fb529eac91 100644 --- a/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java -@@ -253,8 +253,7 @@ public class RegionFile implements AutoCloseable { +@@ -263,8 +263,7 @@ public class RegionFile implements AutoCloseable { - this.b(chunkcoordintpair, (int) (SystemUtils.getTimeMillis() / 1000L)); + // this.b(chunkcoordintpair, (int) (SystemUtils.getTimeMillis() / 1000L)); // Spigot - move this into writeChunk } catch (IOException ioexception) { - ioexception.printStackTrace(); - ServerInternalException.reportInternalException(ioexception); // Paper diff --git a/Spigot-Server-Patches/0061-Allow-Reloading-of-Custom-Permissions.patch b/Spigot-Server-Patches/0061-Allow-Reloading-of-Custom-Permissions.patch index f05ecb468..169a82054 100644 --- a/Spigot-Server-Patches/0061-Allow-Reloading-of-Custom-Permissions.patch +++ b/Spigot-Server-Patches/0061-Allow-Reloading-of-Custom-Permissions.patch @@ -1,4 +1,4 @@ -From dbb22dc1a9bfe5505d64cc586fda7ec2ee362d19 Mon Sep 17 00:00:00 2001 +From e4a631c318c73bc88e050bf30fb9175776e1d5c0 Mon Sep 17 00:00:00 2001 From: William Date: Fri, 18 Mar 2016 03:30:17 -0400 Subject: [PATCH] Allow Reloading of Custom Permissions @@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Custom Permissions https://github.com/PaperMC/Paper/issues/49 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index adcb6fd1f3..20bd804bce 100644 +index 4a43da08a5..8b8e85b711 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2047,5 +2047,23 @@ public final class CraftServer implements Server { +@@ -2048,5 +2048,23 @@ public final class CraftServer implements Server { return null; } } diff --git a/Spigot-Server-Patches/0064-Handle-Item-Meta-Inconsistencies.patch b/Spigot-Server-Patches/0064-Handle-Item-Meta-Inconsistencies.patch index 1786f9092..745667f60 100644 --- a/Spigot-Server-Patches/0064-Handle-Item-Meta-Inconsistencies.patch +++ b/Spigot-Server-Patches/0064-Handle-Item-Meta-Inconsistencies.patch @@ -1,4 +1,4 @@ -From aca6f8a1376268c04f3c40395342b898ff07377d Mon Sep 17 00:00:00 2001 +From 6fe36de0f7fe5dcb63bfb2f004a97256243b1829 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 28 May 2015 23:00:19 -0400 Subject: [PATCH] Handle Item Meta Inconsistencies @@ -18,7 +18,7 @@ For consistency, the old API methods now forward to use the ItemMeta API equivalents, and should deprecate the old API's. diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index 7bcc72399..5bc078d31 100644 +index 9ebfbff46b..b1dfd64d15 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -7,6 +7,8 @@ import com.mojang.brigadier.StringReader; @@ -78,7 +78,7 @@ index 7bcc72399..5bc078d31 100644 public boolean hasEnchantments() { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index c04ec4a7c..c45fe35e0 100644 +index c04ec4a7cb..c45fe35e03 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -178,28 +178,11 @@ public final class CraftItemStack extends ItemStack { @@ -193,7 +193,7 @@ index c04ec4a7c..c45fe35e0 100644 static Map getEnchantments(net.minecraft.server.ItemStack item) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 4f1834014..b0682e529 100644 +index de54a67a2a..084c958899 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -6,6 +6,7 @@ import com.google.common.collect.HashMultimap; @@ -296,7 +296,7 @@ index 4f1834014..b0682e529 100644 } if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) { -@@ -1197,7 +1200,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1200,7 +1203,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { clone.customModelData = this.customModelData; clone.blockData = this.blockData; if (this.enchantments != null) { @@ -305,7 +305,7 @@ index 4f1834014..b0682e529 100644 } if (this.hasAttributeModifiers()) { clone.attributeModifiers = HashMultimap.create(this.attributeModifiers); -@@ -1425,6 +1428,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1428,6 +1431,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } } diff --git a/Spigot-Server-Patches/0067-Custom-replacement-for-eaten-items.patch b/Spigot-Server-Patches/0067-Custom-replacement-for-eaten-items.patch index 4e69dff84..a17f60c82 100644 --- a/Spigot-Server-Patches/0067-Custom-replacement-for-eaten-items.patch +++ b/Spigot-Server-Patches/0067-Custom-replacement-for-eaten-items.patch @@ -1,14 +1,14 @@ -From f77b9c5b4e36960ad5e5abb91bb4ddd2d271a65a Mon Sep 17 00:00:00 2001 +From 86eb3bc68d65c0bb4cd7005648825ece1e7239a8 Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Sun, 21 Jun 2015 15:07:20 -0400 Subject: [PATCH] Custom replacement for eaten items diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index acd6a3f142..f32408b3b5 100644 +index c335a20fa9..adacb1847c 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2817,12 +2817,13 @@ public abstract class EntityLiving extends Entity { +@@ -2818,12 +2818,13 @@ public abstract class EntityLiving extends Entity { protected void q() { if (!this.activeItem.isEmpty() && this.isHandRaised()) { @@ -23,7 +23,7 @@ index acd6a3f142..f32408b3b5 100644 world.getServer().getPluginManager().callEvent(event); if (event.isCancelled()) { -@@ -2837,9 +2838,20 @@ public abstract class EntityLiving extends Entity { +@@ -2838,9 +2839,20 @@ public abstract class EntityLiving extends Entity { itemstack = this.activeItem.a(this.world, this); } diff --git a/Spigot-Server-Patches/0068-handle-NaN-health-absorb-values-and-repair-bad-data.patch b/Spigot-Server-Patches/0068-handle-NaN-health-absorb-values-and-repair-bad-data.patch index 7debaef39..9aecac9b6 100644 --- a/Spigot-Server-Patches/0068-handle-NaN-health-absorb-values-and-repair-bad-data.patch +++ b/Spigot-Server-Patches/0068-handle-NaN-health-absorb-values-and-repair-bad-data.patch @@ -1,11 +1,11 @@ -From 37a4d63b60bde00f515935ca5b79e9fb60c4527f Mon Sep 17 00:00:00 2001 +From a4600ef6c1900a74208033a6768d2f829096b2b8 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 27 Sep 2015 01:18:02 -0400 Subject: [PATCH] handle NaN health/absorb values and repair bad data diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 645b7f605c..18e152b8fb 100644 +index adacb1847c..217fd0c2dd 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -543,7 +543,13 @@ public abstract class EntityLiving extends Entity { @@ -34,7 +34,7 @@ index 645b7f605c..18e152b8fb 100644 // CraftBukkit start - Handle scaled health if (this instanceof EntityPlayer) { org.bukkit.craftbukkit.entity.CraftPlayer player = ((EntityPlayer) this).getBukkitEntity(); -@@ -2675,7 +2685,7 @@ public abstract class EntityLiving extends Entity { +@@ -2676,7 +2686,7 @@ public abstract class EntityLiving extends Entity { } public void setAbsorptionHearts(float f) { @@ -44,7 +44,7 @@ index 645b7f605c..18e152b8fb 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 2e0621b889..d0d61fd290 100644 +index b6a93c4f4c..427f392f9a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1574,6 +1574,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0074-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch b/Spigot-Server-Patches/0074-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch index f4c7db508..551f70b59 100644 --- a/Spigot-Server-Patches/0074-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch +++ b/Spigot-Server-Patches/0074-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch @@ -1,4 +1,4 @@ -From 9bbb2d0782475e8049ba823fc4e5432d6f47a12b Mon Sep 17 00:00:00 2001 +From 73e6613f2094496f99ac2c93ca84523bfee82c9f Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 19:55:45 -0400 Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener @@ -32,10 +32,10 @@ index ef392f5fe8..227fe073fd 100644 } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 980284c3e9..0740737672 100644 +index 55d10058f5..fe50d4ff71 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1110,6 +1110,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Tue, 29 Mar 2016 06:56:23 +0300 Subject: [PATCH] Reduce IO ops opening a new region file. diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index b062a31c49..4e6288e8bb 100644 +index fb529eac91..3aeac69c26 100644 --- a/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java @@ -26,7 +26,7 @@ public class RegionFile implements AutoCloseable { private final File file; // Spigot end private static final byte[] a = new byte[4096]; -- private final RandomAccessFile b; -+ private final RandomAccessFile b; private RandomAccessFile getDataFile() { return this.b; } // Paper - OBFHELPER +- private final RandomAccessFile b; // PAIL dataFile ++ private final RandomAccessFile b; private RandomAccessFile getDataFile() { return this.b; } // Paper - OBFHELPER // PAIL dataFile private final int[] c = new int[1024]; private final int[] d = new int[1024]; - private final List e; + private final List e; // PAIL freeSectors @@ -59,10 +59,19 @@ public class RegionFile implements AutoCloseable { this.e.set(1, false); this.b.seek(0L); diff --git a/Spigot-Server-Patches/0091-Configurable-Player-Collision.patch b/Spigot-Server-Patches/0091-Configurable-Player-Collision.patch index 0e4685aac..af294903f 100644 --- a/Spigot-Server-Patches/0091-Configurable-Player-Collision.patch +++ b/Spigot-Server-Patches/0091-Configurable-Player-Collision.patch @@ -1,4 +1,4 @@ -From c37becf719c64b0f3313627c7d9e6ee6be8fccd3 Mon Sep 17 00:00:00 2001 +From ad70f23c1ea684f7771bb2b748da2103093c3711 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 13 Apr 2016 02:10:49 -0400 Subject: [PATCH] Configurable Player Collision @@ -19,7 +19,7 @@ index 0cef1853f5..dc3438890b 100644 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 1cbb8b1ef7..257258c189 100644 +index fe50d4ff71..e3bd80c934 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -446,6 +446,20 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Thu, 28 Apr 2016 00:57:27 -0400 Subject: [PATCH] remove null possibility for getServer singleton @@ -6,7 +6,7 @@ Subject: [PATCH] remove null possibility for getServer singleton to stop IDE complaining about potential NPE diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 815b8dc243..5a04e6d72e 100644 +index e3bd80c934..17b9e9a31d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -68,6 +68,7 @@ import org.spigotmc.SlackActivityAccountant; // Spigot @@ -25,7 +25,7 @@ index 815b8dc243..5a04e6d72e 100644 this.resourcePackRepository = new ResourcePackRepository<>(ResourcePackLoader::new); this.ai = new CraftingManager(); this.aj = new TagRegistry(); -@@ -2122,7 +2124,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Mon, 16 May 2016 20:47:41 -0400 Subject: [PATCH] Optimize UserCache / Thread Safe @@ -10,10 +10,10 @@ Additionally, move Saving of the User cache to be done async, incase the user never changed the default setting for Spigot's save on stop only. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 9562fde4c..842116da7 100644 +index 17b9e9a31d..6a2933f4ff 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -750,7 +750,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Mon, 16 May 2016 23:19:16 -0400 Subject: [PATCH] Avoid blocking on Network Manager creation @@ -6,7 +6,7 @@ Subject: [PATCH] Avoid blocking on Network Manager creation Per Paper issue 294 diff --git a/src/main/java/net/minecraft/server/ServerConnection.java b/src/main/java/net/minecraft/server/ServerConnection.java -index 42c654a1d..e7ed6af9c 100644 +index 7de96ae69d..379c79272b 100644 --- a/src/main/java/net/minecraft/server/ServerConnection.java +++ b/src/main/java/net/minecraft/server/ServerConnection.java @@ -39,6 +39,15 @@ public class ServerConnection { @@ -34,7 +34,7 @@ index 42c654a1d..e7ed6af9c 100644 channel.pipeline().addLast("packet_handler", networkmanager); networkmanager.setPacketListener(new HandshakeListener(ServerConnection.this.e, networkmanager)); } -@@ -102,6 +111,7 @@ public class ServerConnection { +@@ -112,6 +121,7 @@ public class ServerConnection { synchronized (this.g) { // Spigot Start diff --git a/Spigot-Server-Patches/0114-Add-setting-for-proxy-online-mode-status.patch b/Spigot-Server-Patches/0114-Add-setting-for-proxy-online-mode-status.patch index a6011fc58..4e952548f 100644 --- a/Spigot-Server-Patches/0114-Add-setting-for-proxy-online-mode-status.patch +++ b/Spigot-Server-Patches/0114-Add-setting-for-proxy-online-mode-status.patch @@ -1,11 +1,11 @@ -From 034805841cca15ab64c5afcd20a1b40847100b57 Mon Sep 17 00:00:00 2001 +From 8076467ee1a1540dbc421f8aa8f049cb4e36fbac Mon Sep 17 00:00:00 2001 From: Gabriele C Date: Fri, 5 Aug 2016 01:03:08 +0200 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 cbfe12734..1daa2e453 100644 +index cbfe12734d..1daa2e4535 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; @@ -31,7 +31,7 @@ index cbfe12734..1daa2e453 100644 + } } diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java -index 21a8ed323..0794aff5b 100644 +index 21a8ed3231..0794aff5b7 100644 --- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java +++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java @@ -58,7 +58,8 @@ public class NameReferencingFileConverter { @@ -45,10 +45,10 @@ index 21a8ed323..0794aff5b 100644 } else { String[] astring1 = astring; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index facd9c8ad..0d9e98914 100644 +index 6f6b0bea39..893d3e5c4c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1357,7 +1357,8 @@ public final class CraftServer implements Server { +@@ -1358,7 +1358,8 @@ public final class CraftServer implements Server { // Spigot Start GameProfile profile = null; // Only fetch an online UUID in online mode diff --git a/Spigot-Server-Patches/0127-Allow-Reloading-of-Command-Aliases.patch b/Spigot-Server-Patches/0127-Allow-Reloading-of-Command-Aliases.patch index a8ce40ce2..1ceadc472 100644 --- a/Spigot-Server-Patches/0127-Allow-Reloading-of-Command-Aliases.patch +++ b/Spigot-Server-Patches/0127-Allow-Reloading-of-Command-Aliases.patch @@ -1,4 +1,4 @@ -From 5c80b1af654f2ab86eac1b897c4436a67cdc693e Mon Sep 17 00:00:00 2001 +From 194c189b347a96b95a782873d42e50a6fd2c4f49 Mon Sep 17 00:00:00 2001 From: willies952002 Date: Mon, 28 Nov 2016 10:21:52 -0500 Subject: [PATCH] Allow Reloading of Command Aliases @@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases Reload the aliases stored in commands.yml diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 0d9e98914..9b4e957d6 100644 +index 893d3e5c4c..ca6158dc73 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2076,5 +2076,24 @@ public final class CraftServer implements Server { +@@ -2077,5 +2077,24 @@ public final class CraftServer implements Server { DefaultPermissions.registerCorePermissions(); CraftDefaultPermissions.registerCorePermissions(); } diff --git a/Spigot-Server-Patches/0139-Firework-API-s.patch b/Spigot-Server-Patches/0139-Firework-API-s.patch index a56341d62..a102e6e8f 100644 --- a/Spigot-Server-Patches/0139-Firework-API-s.patch +++ b/Spigot-Server-Patches/0139-Firework-API-s.patch @@ -1,11 +1,11 @@ -From 8278f3309ebe8c14615c79687585125ae81dd34a Mon Sep 17 00:00:00 2001 +From 5cc70c7a81386cc66cead409e9f0e90d4ccd07af Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 28 Dec 2016 07:18:33 +0100 Subject: [PATCH] Firework API's diff --git a/src/main/java/net/minecraft/server/EntityFireworks.java b/src/main/java/net/minecraft/server/EntityFireworks.java -index 020562cd3..aaae9b376 100644 +index fd3897c056..3cf3b1c174 100644 --- a/src/main/java/net/minecraft/server/EntityFireworks.java +++ b/src/main/java/net/minecraft/server/EntityFireworks.java @@ -3,6 +3,8 @@ package net.minecraft.server; @@ -18,7 +18,7 @@ index 020562cd3..aaae9b376 100644 public class EntityFireworks extends Entity implements IProjectile { @@ -12,7 +14,8 @@ public class EntityFireworks extends Entity implements IProjectile { - private static final DataWatcherObject d = DataWatcher.a(EntityFireworks.class, DataWatcherRegistry.i); + public static final DataWatcherObject d = DataWatcher.a(EntityFireworks.class, DataWatcherRegistry.i); // PAIL private int ticksFlown; public int expectedLifespan; - private EntityLiving ridingEntity; @@ -27,7 +27,7 @@ index 020562cd3..aaae9b376 100644 public EntityFireworks(EntityTypes entitytypes, World world) { super(entitytypes, world); -@@ -255,6 +258,11 @@ public class EntityFireworks extends Entity implements IProjectile { +@@ -263,6 +266,11 @@ public class EntityFireworks extends Entity implements IProjectile { } nbttagcompound.setBoolean("ShotAtAngle", (Boolean) this.datawatcher.get(EntityFireworks.d)); @@ -39,7 +39,7 @@ index 020562cd3..aaae9b376 100644 } @Override -@@ -270,7 +278,11 @@ public class EntityFireworks extends Entity implements IProjectile { +@@ -278,7 +286,11 @@ public class EntityFireworks extends Entity implements IProjectile { if (nbttagcompound.hasKey("ShotAtAngle")) { this.datawatcher.set(EntityFireworks.d, nbttagcompound.getBoolean("ShotAtAngle")); } @@ -53,7 +53,7 @@ index 020562cd3..aaae9b376 100644 @Override diff --git a/src/main/java/net/minecraft/server/ItemCrossbow.java b/src/main/java/net/minecraft/server/ItemCrossbow.java -index 28d7fdeef..874d9f500 100644 +index 28d7fdeef8..874d9f500e 100644 --- a/src/main/java/net/minecraft/server/ItemCrossbow.java +++ b/src/main/java/net/minecraft/server/ItemCrossbow.java @@ -199,6 +199,7 @@ public class ItemCrossbow extends ItemProjectileWeapon { @@ -65,7 +65,7 @@ index 28d7fdeef..874d9f500 100644 object = a(world, entityliving, itemstack, itemstack1); if (flag || f3 != 0.0F) { diff --git a/src/main/java/net/minecraft/server/ItemFireworks.java b/src/main/java/net/minecraft/server/ItemFireworks.java -index 37caa79cb..aea46ffae 100644 +index 37caa79cba..aea46ffae5 100644 --- a/src/main/java/net/minecraft/server/ItemFireworks.java +++ b/src/main/java/net/minecraft/server/ItemFireworks.java @@ -17,6 +17,7 @@ public class ItemFireworks extends Item { @@ -90,7 +90,7 @@ index 37caa79cb..aea46ffae 100644 itemstack.subtract(1); } diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java -index 3f6d2676e..b1fd18151 100644 +index 3f6d2676e7..b1fd18151b 100644 --- a/src/main/java/net/minecraft/server/NBTTagCompound.java +++ b/src/main/java/net/minecraft/server/NBTTagCompound.java @@ -112,7 +112,7 @@ public class NBTTagCompound implements NBTBase { @@ -103,7 +103,7 @@ index 3f6d2676e..b1fd18151 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java -index 6b69be742..37374ae5b 100644 +index d3cbad9a5c..219a1e4c0d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java @@ -2,6 +2,7 @@ package org.bukkit.craftbukkit.entity; @@ -126,13 +126,12 @@ index 6b69be742..37374ae5b 100644 public class CraftFirework extends CraftEntity implements Firework { private final Random random = new Random(); -@@ -68,4 +72,18 @@ public class CraftFirework extends CraftEntity implements Firework { - public void detonate() { - getHandle().expectedLifespan = 0; +@@ -78,4 +82,17 @@ public class CraftFirework extends CraftEntity implements Firework { + public void setShotAtAngle(boolean shotAtAngle) { + getHandle().getDataWatcher().set(EntityFireworks.d, shotAtAngle); } + + // Paper start -+ + @Override + public UUID getSpawningEntity() { + return getHandle().spawningEntity; @@ -146,5 +145,5 @@ index 6b69be742..37374ae5b 100644 + // Paper end } -- -2.22.0.windows.1 +2.22.0 diff --git a/Spigot-Server-Patches/0145-Cap-Entity-Collisions.patch b/Spigot-Server-Patches/0145-Cap-Entity-Collisions.patch index 0cac4d6b7..b8b753be5 100644 --- a/Spigot-Server-Patches/0145-Cap-Entity-Collisions.patch +++ b/Spigot-Server-Patches/0145-Cap-Entity-Collisions.patch @@ -1,4 +1,4 @@ -From b40164fbd816aa8ff20c8416815fc9d49ad83204 Mon Sep 17 00:00:00 2001 +From 99aef69d63d3a44c6b7fcb9a5cbe573b0826402c Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 22 Jan 2017 18:07:56 -0500 Subject: [PATCH] Cap Entity Collisions @@ -39,10 +39,10 @@ index f4188fc75d..482864ac62 100644 // Spigot end diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index c5e671961b..96bed03b15 100644 +index 6ba5e98400..79edb3b3cb 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2559,8 +2559,11 @@ public abstract class EntityLiving extends Entity { +@@ -2560,8 +2560,11 @@ public abstract class EntityLiving extends Entity { } } diff --git a/Spigot-Server-Patches/0149-Properly-handle-async-calls-to-restart-the-server.patch b/Spigot-Server-Patches/0149-Properly-handle-async-calls-to-restart-the-server.patch index 66a09e198..24337dffb 100644 --- a/Spigot-Server-Patches/0149-Properly-handle-async-calls-to-restart-the-server.patch +++ b/Spigot-Server-Patches/0149-Properly-handle-async-calls-to-restart-the-server.patch @@ -1,4 +1,4 @@ -From 22fe020e25d7e0ad7e8d2974617403a6cfe1d20b Mon Sep 17 00:00:00 2001 +From 7dc83c0fff37f349a9d529e535df8226404a49b2 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 12 May 2017 23:34:11 -0500 Subject: [PATCH] Properly handle async calls to restart the server @@ -30,7 +30,7 @@ will have plugins and worlds saving to the disk has a high potential to result in corruption/dataloss. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 842116da7..7f6c3d4f6 100644 +index 6a2933f4ff..f621350ea6 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -88,6 +88,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Fri, 9 Jun 2017 07:24:34 -0700 Subject: [PATCH] Add configuration option to prevent player names from being @@ -20,10 +20,10 @@ index b5a50afd24..11d2a1013b 100644 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 9ccf6a6891..f762ff1d2e 100644 +index ca6158dc73..8e6f23d278 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2095,5 +2095,10 @@ public final class CraftServer implements Server { +@@ -2096,5 +2096,10 @@ public final class CraftServer implements Server { commandMap.registerServerAliases(); return true; } diff --git a/Spigot-Server-Patches/0153-Use-TerminalConsoleAppender-for-console-improvements.patch b/Spigot-Server-Patches/0153-Use-TerminalConsoleAppender-for-console-improvements.patch index 3d0868f33..46a96d653 100644 --- a/Spigot-Server-Patches/0153-Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/Spigot-Server-Patches/0153-Use-TerminalConsoleAppender-for-console-improvements.patch @@ -1,4 +1,4 @@ -From 1e4a0195e149cf0b657118531e001bacde3daeb7 Mon Sep 17 00:00:00 2001 +From 0200910eb828793d2cec73d86c74afecef8c1fce Mon Sep 17 00:00:00 2001 From: Minecrell Date: Fri, 9 Jun 2017 19:03:43 +0200 Subject: [PATCH] Use TerminalConsoleAppender for console improvements @@ -143,7 +143,7 @@ index 0000000000..685deaa0e5 + +} diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index f2c65e40a1..f8fa3f78e7 100644 +index 895049287c..92d0aa6d66 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -85,6 +85,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -156,7 +156,7 @@ index f2c65e40a1..f8fa3f78e7 100644 jline.console.ConsoleReader bufferedreader = reader; // CraftBukkit end -@@ -107,6 +110,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -117,6 +120,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer DedicatedServer.LOGGER.error("Exception handling console input", ioexception); } @@ -165,7 +165,7 @@ index f2c65e40a1..f8fa3f78e7 100644 } }; -@@ -118,6 +123,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -128,6 +133,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer } global.addHandler(new org.bukkit.craftbukkit.util.ForwardLogHandler()); @@ -175,7 +175,7 @@ index f2c65e40a1..f8fa3f78e7 100644 final org.apache.logging.log4j.core.Logger logger = ((org.apache.logging.log4j.core.Logger) LogManager.getRootLogger()); for (org.apache.logging.log4j.core.Appender appender : logger.getAppenders().values()) { if (appender instanceof org.apache.logging.log4j.core.appender.ConsoleAppender) { -@@ -126,6 +134,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -136,6 +144,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer } new org.bukkit.craftbukkit.util.TerminalConsoleWriterThread(System.out, this.reader).start(); @@ -185,7 +185,7 @@ index f2c65e40a1..f8fa3f78e7 100644 System.setOut(new PrintStream(new LoggerOutputStream(logger, Level.INFO), true)); System.setErr(new PrintStream(new LoggerOutputStream(logger, Level.WARN), true)); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 43319f1061..6c2b050da3 100644 +index f621350ea6..8fcffc9fa3 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -57,7 +57,7 @@ import org.apache.commons.lang3.Validate; @@ -225,7 +225,7 @@ index 43319f1061..6c2b050da3 100644 Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this)); } // CraftBukkit end -@@ -941,7 +945,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Mon, 15 Jan 2018 22:11:48 -0500 Subject: [PATCH] Basic PlayerProfile API @@ -429,10 +429,10 @@ index 1f6a126329..6d278a0da5 100644 * Calculates distance between 2 entities * @param e1 diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 6c2b050da3..22d653cfcd 100644 +index 8fcffc9fa3..32a9e54d0a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1259,7 +1259,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Mon, 18 Sep 2017 12:00:03 +0200 Subject: [PATCH] Use Log4j IOStreams to redirect System.out/err to logger @@ -12,7 +12,7 @@ results in a separate line, even though it should not result in a line break. Log4j's implementation handles it correctly. diff --git a/pom.xml b/pom.xml -index 54d214a8cf..ea6fb01249 100644 +index 58b14a740e..a70c0ec07a 100644 --- a/pom.xml +++ b/pom.xml @@ -63,6 +63,11 @@ @@ -28,10 +28,10 @@ index 54d214a8cf..ea6fb01249 100644 org.ow2.asm asm diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index f8fa3f78e7..118d90242e 100644 +index 92d0aa6d66..c6eb88c34b 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java -@@ -137,8 +137,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -147,8 +147,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer */ // Paper end diff --git a/Spigot-Server-Patches/0175-Handle-plugin-prefixes-using-Log4J-configuration.patch b/Spigot-Server-Patches/0175-Handle-plugin-prefixes-using-Log4J-configuration.patch index 610429c3b..50c152f29 100644 --- a/Spigot-Server-Patches/0175-Handle-plugin-prefixes-using-Log4J-configuration.patch +++ b/Spigot-Server-Patches/0175-Handle-plugin-prefixes-using-Log4J-configuration.patch @@ -1,4 +1,4 @@ -From 8e9be82d7e127ea31437f7c85c18273646a24ea6 Mon Sep 17 00:00:00 2001 +From d6a94ec50d3adf4c4c7ed9c15c680b40bab4f77e Mon Sep 17 00:00:00 2001 From: Minecrell Date: Thu, 21 Sep 2017 16:14:55 +0200 Subject: [PATCH] Handle plugin prefixes using Log4J configuration @@ -15,7 +15,7 @@ This may cause additional prefixes to be disabled for plugins bypassing the plugin logger. diff --git a/pom.xml b/pom.xml -index ea6fb01249..d955106433 100644 +index a70c0ec07a..5ab1f29846 100644 --- a/pom.xml +++ b/pom.xml @@ -61,7 +61,7 @@ @@ -28,10 +28,10 @@ index ea6fb01249..d955106433 100644 org.apache.logging.log4j diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index fc6cb9306a..bd601333ee 100644 +index d873256c01..783aa6db1f 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -291,7 +291,7 @@ public class SpigotConfig +@@ -286,7 +286,7 @@ public class SpigotConfig private static void playerSample() { playerSample = getInt( "settings.sample-count", 12 ); diff --git a/Spigot-Server-Patches/0184-Add-PlayerArmorChangeEvent.patch b/Spigot-Server-Patches/0184-Add-PlayerArmorChangeEvent.patch index c5ce6747c..90636c83c 100644 --- a/Spigot-Server-Patches/0184-Add-PlayerArmorChangeEvent.patch +++ b/Spigot-Server-Patches/0184-Add-PlayerArmorChangeEvent.patch @@ -1,11 +1,11 @@ -From 37eb7bf78423b3149998c38df7884b3adc0704c2 Mon Sep 17 00:00:00 2001 +From d8089c4bf30144a196c0cea8306ef6d32899ce37 Mon Sep 17 00:00:00 2001 From: pkt77 Date: Fri, 10 Nov 2017 23:46:34 -0500 Subject: [PATCH] Add PlayerArmorChangeEvent diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index efc7617957..72adeb7271 100644 +index 46dfb3c498..74c1f7c447 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -1,5 +1,6 @@ @@ -15,7 +15,7 @@ index efc7617957..72adeb7271 100644 import com.google.common.base.Objects; import com.google.common.collect.ImmutableList; import com.google.common.collect.Maps; -@@ -2275,6 +2276,13 @@ public abstract class EntityLiving extends Entity { +@@ -2276,6 +2277,13 @@ public abstract class EntityLiving extends Entity { ItemStack itemstack1 = this.getEquipment(enumitemslot); if (!ItemStack.matches(itemstack1, itemstack)) { diff --git a/Spigot-Server-Patches/0188-AsyncTabCompleteEvent.patch b/Spigot-Server-Patches/0188-AsyncTabCompleteEvent.patch index 8fd04bc5b..5857f3fea 100644 --- a/Spigot-Server-Patches/0188-AsyncTabCompleteEvent.patch +++ b/Spigot-Server-Patches/0188-AsyncTabCompleteEvent.patch @@ -1,4 +1,4 @@ -From c20b37ca6d31358fe106f4fef2c13036fd20b95a Mon Sep 17 00:00:00 2001 +From 8dc339d494ac04fa85ad7eca65213096c14c98f4 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 26 Nov 2017 13:19:58 -0500 Subject: [PATCH] AsyncTabCompleteEvent @@ -72,10 +72,10 @@ index 1d140b3fe7..6008613fae 100644 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 9f29be85c2..66d4dccedd 100644 +index 308ae2e157..3938adf7c7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1667,7 +1667,7 @@ public final class CraftServer implements Server { +@@ -1668,7 +1668,7 @@ public final class CraftServer implements Server { offers = tabCompleteChat(player, message); } diff --git a/Spigot-Server-Patches/0199-Add-ArmorStand-Item-Meta.patch b/Spigot-Server-Patches/0199-Add-ArmorStand-Item-Meta.patch index ca3a6b250..4014efe53 100644 --- a/Spigot-Server-Patches/0199-Add-ArmorStand-Item-Meta.patch +++ b/Spigot-Server-Patches/0199-Add-ArmorStand-Item-Meta.patch @@ -1,4 +1,4 @@ -From 99a5fd70220d1da44b64c78c13482bd4669132dc Mon Sep 17 00:00:00 2001 +From 92d718d2cc5efcad7c1d148a44a3e1869ef20fd0 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 27 Jan 2018 17:04:14 -0500 Subject: [PATCH] Add ArmorStand Item Meta @@ -267,7 +267,7 @@ index f700522840..3723faccac 100644 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index b0682e5299..704a7d91e3 100644 +index 084c958899..195b2e8f9a 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -162,6 +162,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -278,7 +278,7 @@ index b0682e5299..704a7d91e3 100644 .put(CraftMetaItem.class, "UNSPECIFIC") .build(); -@@ -1421,7 +1422,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1424,7 +1425,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { CraftMetaKnowledgeBook.BOOK_RECIPES.NBT, CraftMetaTropicalFishBucket.VARIANT.NBT, CraftMetaCrossbow.CHARGED.NBT, diff --git a/Spigot-Server-Patches/0206-Implement-extended-PaperServerListPingEvent.patch b/Spigot-Server-Patches/0206-Implement-extended-PaperServerListPingEvent.patch index 67f63800e..4914671a3 100644 --- a/Spigot-Server-Patches/0206-Implement-extended-PaperServerListPingEvent.patch +++ b/Spigot-Server-Patches/0206-Implement-extended-PaperServerListPingEvent.patch @@ -1,4 +1,4 @@ -From f96c992cf77cd972d27bca1231e644e6ba854b7f Mon Sep 17 00:00:00 2001 +From d041c59da4e509e0633e7380feb6c02c4a8a20e8 Mon Sep 17 00:00:00 2001 From: Minecrell Date: Wed, 11 Oct 2017 15:56:26 +0200 Subject: [PATCH] Implement extended PaperServerListPingEvent @@ -6,7 +6,7 @@ Subject: [PATCH] Implement extended PaperServerListPingEvent diff --git a/src/main/java/com/destroystokyo/paper/network/PaperServerListPingEventImpl.java b/src/main/java/com/destroystokyo/paper/network/PaperServerListPingEventImpl.java new file mode 100644 -index 000000000..c1a8e295b +index 0000000000..c1a8e295b6 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/network/PaperServerListPingEventImpl.java @@ -0,0 +1,31 @@ @@ -43,7 +43,7 @@ index 000000000..c1a8e295b +} diff --git a/src/main/java/com/destroystokyo/paper/network/PaperStatusClient.java b/src/main/java/com/destroystokyo/paper/network/PaperStatusClient.java new file mode 100644 -index 000000000..a2a409e63 +index 0000000000..a2a409e635 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/network/PaperStatusClient.java @@ -0,0 +1,11 @@ @@ -60,7 +60,7 @@ index 000000000..a2a409e63 +} diff --git a/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java b/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java new file mode 100644 -index 000000000..a85466bc7 +index 0000000000..a85466bc7e --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java @@ -0,0 +1,112 @@ @@ -177,7 +177,7 @@ index 000000000..a85466bc7 + +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 798bf3521..46b3fcf07 100644 +index 32a9e54d0a..37353b29da 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1,6 +1,9 @@ @@ -190,7 +190,7 @@ index 798bf3521..46b3fcf07 100644 import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.gson.JsonElement; -@@ -1057,7 +1060,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant= 5000000000L) { this.Z = i; this.serverPing.setPlayerSample(new ServerPing.ServerPingPlayerSample(this.getMaxPlayers(), this.getPlayerCount())); @@ -200,7 +200,7 @@ index 798bf3521..46b3fcf07 100644 for (int k = 0; k < agameprofile.length; ++k) { diff --git a/src/main/java/net/minecraft/server/PacketStatusListener.java b/src/main/java/net/minecraft/server/PacketStatusListener.java -index 2b08f285d..295c9ac22 100644 +index 2b08f285d1..295c9ac22d 100644 --- a/src/main/java/net/minecraft/server/PacketStatusListener.java +++ b/src/main/java/net/minecraft/server/PacketStatusListener.java @@ -37,6 +37,8 @@ public class PacketStatusListener implements PacketStatusInListener { @@ -223,7 +223,7 @@ index 2b08f285d..295c9ac22 100644 // CraftBukkit end } diff --git a/src/main/java/net/minecraft/server/ServerPing.java b/src/main/java/net/minecraft/server/ServerPing.java -index aa125a52d..ea52e89bd 100644 +index aa125a52dc..ea52e89bd9 100644 --- a/src/main/java/net/minecraft/server/ServerPing.java +++ b/src/main/java/net/minecraft/server/ServerPing.java @@ -29,6 +29,7 @@ public class ServerPing { @@ -248,10 +248,10 @@ index aa125a52d..ea52e89bd 100644 this.c = agameprofile; } diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index bd601333e..6c5430ff9 100644 +index 783aa6db1f..33767c85ca 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -290,7 +290,7 @@ public class SpigotConfig +@@ -285,7 +285,7 @@ public class SpigotConfig public static int playerSample; private static void playerSample() { diff --git a/Spigot-Server-Patches/0211-getPlayerUniqueId-API.patch b/Spigot-Server-Patches/0211-getPlayerUniqueId-API.patch index 4c32a2668..3db5804e8 100644 --- a/Spigot-Server-Patches/0211-getPlayerUniqueId-API.patch +++ b/Spigot-Server-Patches/0211-getPlayerUniqueId-API.patch @@ -1,4 +1,4 @@ -From c4a08d45b71ddad5c9fbb4f09f5544aa45715b22 Mon Sep 17 00:00:00 2001 +From 5a68a156dd67d7290fb1dd4f2acfda61f0fe004d Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 22 Mar 2018 01:40:24 -0400 Subject: [PATCH] getPlayerUniqueId API @@ -9,10 +9,10 @@ In Offline Mode, will return an Offline UUID This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 66d4dccedd..208556355c 100644 +index 3938adf7c7..8b5765e619 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1360,6 +1360,26 @@ public final class CraftServer implements Server { +@@ -1361,6 +1361,26 @@ public final class CraftServer implements Server { return recipients.size(); } diff --git a/Spigot-Server-Patches/0234-Make-shield-blocking-delay-configurable.patch b/Spigot-Server-Patches/0234-Make-shield-blocking-delay-configurable.patch index 129a92a85..ed68420b3 100644 --- a/Spigot-Server-Patches/0234-Make-shield-blocking-delay-configurable.patch +++ b/Spigot-Server-Patches/0234-Make-shield-blocking-delay-configurable.patch @@ -1,4 +1,4 @@ -From bc6650512170cc798661473a88c62c3871774f8b Mon Sep 17 00:00:00 2001 +From 370986b06ddf12b6508978905b94d0e75f742699 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 16 Jun 2018 01:18:16 -0500 Subject: [PATCH] Make shield blocking delay configurable @@ -19,10 +19,10 @@ index da10550030..182ac2e7f6 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 72adeb7271..a578dec9db 100644 +index 74c1f7c447..a873685e47 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2921,7 +2921,7 @@ public abstract class EntityLiving extends Entity { +@@ -2922,7 +2922,7 @@ public abstract class EntityLiving extends Entity { if (this.isHandRaised() && !this.activeItem.isEmpty()) { Item item = this.activeItem.getItem(); @@ -31,7 +31,7 @@ index 72adeb7271..a578dec9db 100644 } else { return false; } -@@ -3157,4 +3157,15 @@ public abstract class EntityLiving extends Entity { +@@ -3158,4 +3158,15 @@ public abstract class EntityLiving extends Entity { public void d(EnumHand enumhand) { this.c(enumhand == EnumHand.MAIN_HAND ? EnumItemSlot.MAINHAND : EnumItemSlot.OFFHAND); } @@ -48,7 +48,7 @@ index 72adeb7271..a578dec9db 100644 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 42cc158824..513b3fac7f 100644 +index 4cbe1ec22c..06cc48a1dc 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -619,5 +619,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/Spigot-Server-Patches/0239-Implement-EntityKnockbackByEntityEvent.patch b/Spigot-Server-Patches/0239-Implement-EntityKnockbackByEntityEvent.patch index 1941b68a8..72c3b056c 100644 --- a/Spigot-Server-Patches/0239-Implement-EntityKnockbackByEntityEvent.patch +++ b/Spigot-Server-Patches/0239-Implement-EntityKnockbackByEntityEvent.patch @@ -1,4 +1,4 @@ -From c32f8c825de97cc79061ca8cd11e41cbdbdb7dea Mon Sep 17 00:00:00 2001 +From ad8b55ff30923ed0f1e1422f1f7abbfa1e5448d5 Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Mon, 18 Jun 2018 15:46:23 +0200 Subject: [PATCH] Implement EntityKnockbackByEntityEvent @@ -6,10 +6,10 @@ 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/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index a578dec9db..c2634f8813 100644 +index a873685e47..dfbd40a997 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -1430,6 +1430,16 @@ public abstract class EntityLiving extends Entity { +@@ -1431,6 +1431,16 @@ public abstract class EntityLiving extends Entity { Vec3D vec3d1 = (new Vec3D(d0, 0.0D, d1)).d().a((double) f); this.setMot(vec3d.x / 2.0D - vec3d1.x, this.onGround ? Math.min(0.4D, vec3d.y / 2.0D + (double) f) : vec3d.y, vec3d.z / 2.0D - vec3d1.z); diff --git a/Spigot-Server-Patches/0241-LivingEntity-Hand-Raised-Item-Use-API.patch b/Spigot-Server-Patches/0241-LivingEntity-Hand-Raised-Item-Use-API.patch index a43b37fe4..f4f12aa02 100644 --- a/Spigot-Server-Patches/0241-LivingEntity-Hand-Raised-Item-Use-API.patch +++ b/Spigot-Server-Patches/0241-LivingEntity-Hand-Raised-Item-Use-API.patch @@ -1,4 +1,4 @@ -From 639efcb00e1ca46a92d1ac3b84ba20c10f04a4ba Mon Sep 17 00:00:00 2001 +From ea688d4a7f14a44362f33e207c455d5bdf1a9181 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 29 Jun 2018 00:21:28 -0400 Subject: [PATCH] LivingEntity Hand Raised/Item Use API @@ -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 c2634f8813..b29e0c5d35 100644 +index dfbd40a997..e1972f7935 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -109,7 +109,7 @@ public abstract class EntityLiving extends Entity { @@ -18,7 +18,7 @@ index c2634f8813..b29e0c5d35 100644 protected int bo; protected int bp; private BlockPosition bG; -@@ -2899,10 +2899,12 @@ public abstract class EntityLiving extends Entity { +@@ -2900,10 +2900,12 @@ public abstract class EntityLiving extends Entity { return this.activeItem; } @@ -32,7 +32,7 @@ index c2634f8813..b29e0c5d35 100644 return this.isHandRaised() ? this.activeItem.k() - this.dm() : 0; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 513b3fac7f..8dea7d36b6 100644 +index 06cc48a1dc..0610d0d5c0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -629,5 +629,25 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/Spigot-Server-Patches/0278-Add-Early-Warning-Feature-to-WatchDog.patch b/Spigot-Server-Patches/0278-Add-Early-Warning-Feature-to-WatchDog.patch index 0c88fceab..1a39fb55b 100644 --- a/Spigot-Server-Patches/0278-Add-Early-Warning-Feature-to-WatchDog.patch +++ b/Spigot-Server-Patches/0278-Add-Early-Warning-Feature-to-WatchDog.patch @@ -1,4 +1,4 @@ -From e220aec9f0be7078d01e47a707f639aff5147bad Mon Sep 17 00:00:00 2001 +From 01e7f97e767e1390bd6c0b7d18e8c8d430029d0b Mon Sep 17 00:00:00 2001 From: miclebrick Date: Wed, 8 Aug 2018 15:30:52 -0400 Subject: [PATCH] Add Early Warning Feature to WatchDog @@ -9,7 +9,7 @@ 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 207e5d3e2..a13c8c68b 100644 +index 207e5d3e23..a13c8c68b6 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -25,6 +25,7 @@ import org.bukkit.configuration.file.YamlConfiguration; @@ -36,10 +36,10 @@ index 207e5d3e2..a13c8c68b 100644 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 46b3fcf07..e99e698c4 100644 +index 37353b29da..2acb71fa8a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -860,6 +860,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Sat, 11 Aug 2018 00:49:20 -0400 Subject: [PATCH] Detect and repair corrupt Region Files @@ -11,18 +11,18 @@ I don't know why mojang only checks for 4096, when anything less than 8192 is a But to be safe, it will attempt to back up the file. diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index 4e6288e8bb..e68f901943 100644 +index 3aeac69c26..17648c1c04 100644 --- a/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java @@ -27,13 +27,13 @@ public class RegionFile implements AutoCloseable { // Spigot end private static final byte[] a = new byte[4096]; - private final RandomAccessFile b; private RandomAccessFile getDataFile() { return this.b; } // Paper - OBFHELPER + private final RandomAccessFile b; private RandomAccessFile getDataFile() { return this.b; } // Paper - OBFHELPER // PAIL dataFile - private final int[] c = new int[1024]; - private final int[] d = new int[1024]; -+ private final int[] c = new int[1024]; private int[] offsets = c; // Paper - OBFHELPER -+ private final int[] d = new int[1024];private int[] timestamps = d; // Paper - OBFHELPER - private final List e; ++ private final int[] c = new int[1024]; private final int[] offsets = c; // Paper - OBFHELPER ++ private final int[] d = new int[1024]; private final int[] timestamps = d; // Paper - OBFHELPER + private final List e; // PAIL freeSectors public RegionFile(File file) throws IOException { this.b = new RandomAccessFile(file, "rw"); @@ -52,13 +52,13 @@ index 4e6288e8bb..e68f901943 100644 for (j = 0; j < 1024; ++j) { k = headerAsInts.get(); // Paper - this.d[j] = k; -+ if (offsets[j] != 0) this.timestamps[j] = k; // Paper - don't set timestamp if it got 0'd above due to corruption ++ if (this.offsets[j] != 0) this.timestamps[j] = k; // Paper - don't set timestamp if it got 0'd above due to corruption } this.file = file; // Spigot -@@ -306,6 +307,53 @@ public class RegionFile implements AutoCloseable { - this.b.close(); +@@ -349,6 +350,53 @@ public class RegionFile implements AutoCloseable { } + // Spigot end + // Paper start + public synchronized void deleteChunk(int j1) { diff --git a/Spigot-Server-Patches/0282-Use-a-Queue-for-Queueing-Commands.patch b/Spigot-Server-Patches/0282-Use-a-Queue-for-Queueing-Commands.patch index 252c7843e..c759c27b2 100644 --- a/Spigot-Server-Patches/0282-Use-a-Queue-for-Queueing-Commands.patch +++ b/Spigot-Server-Patches/0282-Use-a-Queue-for-Queueing-Commands.patch @@ -1,4 +1,4 @@ -From 5fb2815537295ce5488fe268c3022169bee43f12 Mon Sep 17 00:00:00 2001 +From be7d2af254d189bf2a6e546950db79d49781de94 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 12 Aug 2018 02:33:39 -0400 Subject: [PATCH] Use a Queue for Queueing Commands @@ -6,7 +6,7 @@ Subject: [PATCH] Use a Queue for Queueing Commands Lists are bad as Queues mmmkay. diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 118d90242e..6da54a64bd 100644 +index c6eb88c34b..5bc19cd081 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -43,7 +43,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -18,7 +18,7 @@ index 118d90242e..6da54a64bd 100644 private RemoteStatusListener remoteStatusListener; public final RemoteControlCommandListener remoteControlCommandListener; private RemoteControlListener remoteControlListener; -@@ -444,8 +444,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer +@@ -441,8 +441,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer public void handleCommandQueue() { MinecraftTimings.serverCommandTimer.startTiming(); // Spigot diff --git a/Spigot-Server-Patches/0284-Allow-disabling-armour-stand-ticking.patch b/Spigot-Server-Patches/0284-Allow-disabling-armour-stand-ticking.patch index 7231609ee..d8e2829a1 100644 --- a/Spigot-Server-Patches/0284-Allow-disabling-armour-stand-ticking.patch +++ b/Spigot-Server-Patches/0284-Allow-disabling-armour-stand-ticking.patch @@ -1,11 +1,11 @@ -From 9a63a21996daeb021e7501f224b43eeec8d2467b Mon Sep 17 00:00:00 2001 +From 71ad58ad5a2f615ecde1edac307a09353bac3826 Mon Sep 17 00:00:00 2001 From: kashike Date: Wed, 15 Aug 2018 01:26:09 -0700 Subject: [PATCH] Allow disabling armour stand ticking diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 09607fb44..5832c3e86 100644 +index 09607fb447..5832c3e868 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -386,4 +386,10 @@ public class PaperWorldConfig { @@ -20,7 +20,7 @@ index 09607fb44..5832c3e86 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java -index 9e7b4f6fe..627925e3b 100644 +index 9e7b4f6feb..627925e3ba 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java @@ -44,6 +44,11 @@ public class EntityArmorStand extends EntityLiving { @@ -140,10 +140,10 @@ index 9e7b4f6fe..627925e3b 100644 public Vector3f r() { diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 29eace446..2f293aa83 100644 +index e1972f7935..dbf42f882f 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2265,52 +2265,7 @@ public abstract class EntityLiving extends Entity { +@@ -2266,52 +2266,7 @@ public abstract class EntityLiving extends Entity { } } @@ -197,7 +197,7 @@ index 29eace446..2f293aa83 100644 if (this.ticksLived % 20 == 0) { this.getCombatTracker().g(); -@@ -2411,6 +2366,57 @@ public abstract class EntityLiving extends Entity { +@@ -2412,6 +2367,57 @@ public abstract class EntityLiving extends Entity { } } @@ -256,7 +256,7 @@ index 29eace446..2f293aa83 100644 float f2 = MathHelper.g(f - this.aK); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java -index 9f5c3b92e..07ce93f17 100644 +index 9f5c3b92e3..07ce93f17c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java @@ -297,5 +297,15 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand { diff --git a/Spigot-Server-Patches/0288-Optimize-Hoppers.patch b/Spigot-Server-Patches/0288-Optimize-Hoppers.patch index b3f1ab5ae..98256a7a4 100644 --- a/Spigot-Server-Patches/0288-Optimize-Hoppers.patch +++ b/Spigot-Server-Patches/0288-Optimize-Hoppers.patch @@ -1,4 +1,4 @@ -From 5b14cf5c8f6cb08ef4991880537bae8439a94343 Mon Sep 17 00:00:00 2001 +From 57e4e704f0bd0d50d54eb66b0050a85a0e7ca8a6 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 27 Apr 2016 22:09:52 -0400 Subject: [PATCH] Optimize Hoppers @@ -47,10 +47,10 @@ index c69a067ef1..1e23d77e72 100644 itemstack.d(this.C()); 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 4efcbcbad5..ae33f2e948 100644 +index 2acb71fa8a..0d690fc8e1 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1142,6 +1142,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 0; // Paper diff --git a/Spigot-Server-Patches/0298-Add-ray-tracing-methods-to-LivingEntity.patch b/Spigot-Server-Patches/0298-Add-ray-tracing-methods-to-LivingEntity.patch index b37d0acfc..27f43726e 100644 --- a/Spigot-Server-Patches/0298-Add-ray-tracing-methods-to-LivingEntity.patch +++ b/Spigot-Server-Patches/0298-Add-ray-tracing-methods-to-LivingEntity.patch @@ -1,14 +1,14 @@ -From 0f4a289817ad1677fc0d007aa5f2d8279142363d Mon Sep 17 00:00:00 2001 +From 06c4452e3e07fe002dc02aff0a6327d251746592 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Mon, 3 Sep 2018 18:20:03 -0500 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 2cbcd1e17b..6ed473c656 100644 +index dbf42f882f..b09712ca91 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -3176,6 +3176,23 @@ public abstract class EntityLiving extends Entity { +@@ -3177,6 +3177,23 @@ public abstract class EntityLiving extends Entity { this.c(enumhand == EnumHand.MAIN_HAND ? EnumItemSlot.MAINHAND : EnumItemSlot.OFFHAND); } // Paper start @@ -33,7 +33,7 @@ index 2cbcd1e17b..6ed473c656 100644 public int getShieldBlockingDelay() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 8dea7d36b6..d5c4115a85 100644 +index 0610d0d5c0..408028131b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -182,6 +182,28 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/Spigot-Server-Patches/0300-Improve-death-events.patch b/Spigot-Server-Patches/0300-Improve-death-events.patch index 56b8241f5..01bdd01e0 100644 --- a/Spigot-Server-Patches/0300-Improve-death-events.patch +++ b/Spigot-Server-Patches/0300-Improve-death-events.patch @@ -1,4 +1,4 @@ -From 5cf90690617048b1f94b303f4af011d0add5188f Mon Sep 17 00:00:00 2001 +From 5d6dc2bb82c80b978eaccdeb9e69dbf34d723805 Mon Sep 17 00:00:00 2001 From: Phoenix616 Date: Tue, 21 Aug 2018 01:39:35 +0100 Subject: [PATCH] Improve death events @@ -15,7 +15,7 @@ items and experience which is otherwise only properly possible by using internal code. diff --git a/src/main/java/net/minecraft/server/CombatTracker.java b/src/main/java/net/minecraft/server/CombatTracker.java -index 84c3ea9d0..f563a7b63 100644 +index 84c3ea9d00..f563a7b630 100644 --- a/src/main/java/net/minecraft/server/CombatTracker.java +++ b/src/main/java/net/minecraft/server/CombatTracker.java @@ -175,6 +175,7 @@ public class CombatTracker { @@ -27,7 +27,7 @@ index 84c3ea9d0..f563a7b63 100644 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 7811beb80..f9b097fd6 100644 +index 7811beb807..f9b097fd6f 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1517,6 +1517,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -47,7 +47,7 @@ index 7811beb80..f9b097fd6 100644 protected void i(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 627925e3b..e516db270 100644 +index 627925e3ba..e516db2701 100644 --- a/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java @@ -683,7 +683,8 @@ public class EntityArmorStand extends EntityLiving { @@ -61,7 +61,7 @@ index 627925e3b..e516db270 100644 } diff --git a/src/main/java/net/minecraft/server/EntityFox.java b/src/main/java/net/minecraft/server/EntityFox.java -index 85231309f..1da2f013f 100644 +index 85231309fd..97059b8239 100644 --- a/src/main/java/net/minecraft/server/EntityFox.java +++ b/src/main/java/net/minecraft/server/EntityFox.java @@ -597,15 +597,25 @@ public class EntityFox extends EntityAnimal { @@ -74,7 +74,7 @@ index 85231309f..1da2f013f 100644 + ItemStack itemstack = this.getEquipment(EnumItemSlot.MAINHAND).cloneItemStack(); // Paper + + // Paper start - Cancellable death event -+ org.bukkit.event.entity.EntityDeathEvent deathEvent = super.d(damagesource); ++ org.bukkit.event.entity.EntityDeathEvent deathEvent = super.processDeath(damagesource); + + // Below is code to drop + @@ -93,8 +93,33 @@ index 85231309f..1da2f013f 100644 } public static boolean a(EntityFox entityfox, EntityLiving entityliving) { +diff --git a/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java b/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java +index 2483cfd28a..2a988366cd 100644 +--- a/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java ++++ b/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java +@@ -55,11 +55,19 @@ public abstract class EntityHorseChestedAbstract extends EntityHorseAbstract { + this.a((IMaterial) Blocks.CHEST); + } + +- this.setCarryingChest(false); ++ //this.setCarryingChest(false); // Paper - moved to post death logic + } + + } + ++ // Paper start ++ protected void postDeathDropItems(org.bukkit.event.entity.EntityDeathEvent event) { ++ if (this.isCarryingChest() && (event == null || !event.isCancelled())) { ++ this.setCarryingChest(false); ++ } ++ } ++ // Paper end ++ + @Override + public void b(NBTTagCompound nbttagcompound) { + super.b(nbttagcompound); diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index edc25586a..37ff76486 100644 +index b09712ca91..1e53af2cce 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -85,7 +85,7 @@ public abstract class EntityLiving extends Entity { @@ -144,7 +169,7 @@ index edc25586a..37ff76486 100644 if (this.aY >= 0 && entityliving != null) { entityliving.a(this, this.aY, damagesource); } -@@ -1340,11 +1346,29 @@ public abstract class EntityLiving extends Entity { +@@ -1340,14 +1346,32 @@ public abstract class EntityLiving extends Entity { if (this.isSleeping()) { this.dy(); } @@ -175,8 +200,19 @@ index edc25586a..37ff76486 100644 + boolean flag = false; - if (entityliving instanceof EntityWither) { -@@ -1371,7 +1395,8 @@ public abstract class EntityLiving extends Entity { +- if (entityliving instanceof EntityWither) { ++ if (this.killed && entityliving instanceof EntityWither) { + if (this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) { + BlockPosition blockposition = new BlockPosition(this.locX, this.locY, this.locZ); + IBlockData iblockdata = Blocks.WITHER_ROSE.getBlockData(); +@@ -1366,12 +1390,15 @@ public abstract class EntityLiving extends Entity { + } + } + ++ if (this.killed) { // Paper + this.world.broadcastEntityEffect(this, (byte) 3); + this.setPose(EntityPose.DYING); ++ } // Paper } } @@ -186,11 +222,11 @@ index edc25586a..37ff76486 100644 Entity entity = damagesource.getEntity(); int i; -@@ -1383,18 +1408,20 @@ public abstract class EntityLiving extends Entity { - +@@ -1384,21 +1411,24 @@ public abstract class EntityLiving extends Entity { boolean flag = this.lastDamageByPlayerTime > 0; -+ org.bukkit.event.entity.EntityDeathEvent deathEvent = null; // Paper + this.cF(); // CraftBukkit - from below // PAIL ++ org.bukkit.event.entity.EntityDeathEvent deathEvent; // Paper if (this.isDropExperience() && this.world.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) { this.a(damagesource, flag); this.dropDeathLoot(damagesource, i, flag); @@ -198,20 +234,24 @@ index edc25586a..37ff76486 100644 - CraftEventFactory.callEntityDeathEvent(this, this.drops); - this.drops = new ArrayList(); + deathEvent = CraftEventFactory.callEntityDeathEvent(this, this.drops); // Paper -+ if (!deathEvent.isCancelled()) this.drops = new ArrayList(); // Paper } else { - CraftEventFactory.callEntityDeathEvent(this); + deathEvent = CraftEventFactory.callEntityDeathEvent(this); // Paper // CraftBukkit end } ++ this.postDeathDropItems(deathEvent); // Paper ++ this.drops = new ArrayList<>(); // Paper -- this.cF(); -+ if (!deathEvent.isCancelled()) this.cF();; // Paper +- // this.cF();// CraftBukkit - moved up + return deathEvent; // Paper } protected void cF() {} -@@ -1448,6 +1475,7 @@ public abstract class EntityLiving extends Entity { ++ protected void postDeathDropItems(org.bukkit.event.entity.EntityDeathEvent event) {} // Paper - method for post death logic that cannot be ran before the event is potentially cancelled + + protected void dropDeathLoot(DamageSource damagesource, int i, boolean flag) {} + +@@ -1449,6 +1479,7 @@ public abstract class EntityLiving extends Entity { return SoundEffects.ENTITY_GENERIC_HURT; } @@ -219,7 +259,7 @@ index edc25586a..37ff76486 100644 @Nullable protected SoundEffect getSoundDeath() { return SoundEffects.ENTITY_GENERIC_DEATH; -@@ -1897,10 +1925,12 @@ public abstract class EntityLiving extends Entity { +@@ -1898,10 +1929,12 @@ public abstract class EntityLiving extends Entity { } @@ -233,7 +273,7 @@ index edc25586a..37ff76486 100644 return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index dcd48d8b3..d7bc6e329 100644 +index dcd48d8b3d..d7bc6e3297 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -75,6 +75,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -284,7 +324,7 @@ index dcd48d8b3..d7bc6e329 100644 } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftSound.java b/src/main/java/org/bukkit/craftbukkit/CraftSound.java -index 73cb64e09..9f317ff2e 100644 +index 73cb64e09d..9f317ff2e8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftSound.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftSound.java @@ -806,6 +806,22 @@ public enum CraftSound { @@ -311,7 +351,7 @@ index 73cb64e09..9f317ff2e 100644 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 2c99a1e9d..e9458dc65 100644 +index 2c99a1e9df..e9458dc65f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1722,7 +1722,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -332,7 +372,7 @@ index 2c99a1e9d..e9458dc65 100644 public void injectScaledMaxHealth(Collection collection, boolean force) { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 5309a4e30..4074100c4 100644 +index 5309a4e304..4074100c44 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -736,9 +736,16 @@ public class CraftEventFactory { diff --git a/Spigot-Server-Patches/0304-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch b/Spigot-Server-Patches/0304-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch index f930520aa..cc943bcdf 100644 --- a/Spigot-Server-Patches/0304-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch +++ b/Spigot-Server-Patches/0304-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch @@ -1,4 +1,4 @@ -From 7e11e5163ca99a542547906faf603a703660a677 Mon Sep 17 00:00:00 2001 +From e89b946fd0a5f1904172eb5b4596c3f42b79afc8 Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Wed, 12 Sep 2018 18:53:55 +0300 Subject: [PATCH] Implement an API for CanPlaceOn and CanDestroy NBT values @@ -32,7 +32,7 @@ index 005ebec266..97d85f8451 100644 this.s = this::l; if (this.i.canRead() && this.i.peek() == '#') { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 704a7d91e3..d484292dd0 100644 +index 195b2e8f9a..1faadbd101 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -87,6 +87,12 @@ import org.bukkit.persistence.PersistentDataContainer; @@ -208,7 +208,7 @@ index 704a7d91e3..d484292dd0 100644 } @Override -@@ -1152,7 +1260,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1155,7 +1263,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { && (this.hideFlag == that.hideFlag) && (this.isUnbreakable() == that.isUnbreakable()) && (this.hasDamage() ? that.hasDamage() && this.damage == that.damage : !that.hasDamage()) @@ -221,7 +221,7 @@ index 704a7d91e3..d484292dd0 100644 } /** -@@ -1187,6 +1299,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1190,6 +1302,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { hash = 61 * hash + (hasDamage() ? this.damage : 0); hash = 61 * hash + (hasAttributeModifiers() ? this.attributeModifiers.hashCode() : 0); hash = 61 * hash + version; @@ -232,7 +232,7 @@ index 704a7d91e3..d484292dd0 100644 return hash; } -@@ -1210,6 +1326,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1213,6 +1329,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { clone.unbreakable = this.unbreakable; clone.damage = this.damage; clone.version = this.version; @@ -247,7 +247,7 @@ index 704a7d91e3..d484292dd0 100644 return clone; } catch (CloneNotSupportedException e) { throw new Error(e); -@@ -1267,6 +1391,24 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1270,6 +1394,24 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { builder.put(DAMAGE.BUKKIT, damage); } @@ -272,7 +272,7 @@ index 704a7d91e3..d484292dd0 100644 final Map internalTags = new HashMap(unhandledTags); serializeInternal(internalTags); if (!internalTags.isEmpty()) { -@@ -1429,7 +1571,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1432,7 +1574,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { CraftMetaArmorStand.NO_BASE_PLATE.NBT, CraftMetaArmorStand.SHOW_ARMS.NBT, CraftMetaArmorStand.SMALL.NBT, @@ -283,7 +283,7 @@ index 704a7d91e3..d484292dd0 100644 // Paper end )); } -@@ -1476,4 +1620,147 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1479,4 +1623,147 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return spigot; } // Spigot end diff --git a/Spigot-Server-Patches/0310-Optimize-Server-World-Map.patch b/Spigot-Server-Patches/0310-Optimize-Server-World-Map.patch index 590065a59..a90826884 100644 --- a/Spigot-Server-Patches/0310-Optimize-Server-World-Map.patch +++ b/Spigot-Server-Patches/0310-Optimize-Server-World-Map.patch @@ -1,4 +1,4 @@ -From 20f83dd15b487d2c37dd45bc8bb3906242f3073d Mon Sep 17 00:00:00 2001 +From 7fca1b3434f57de370ca948b5d846262a058c9bb Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 17 Sep 2018 23:37:31 -0400 Subject: [PATCH] Optimize Server World Map @@ -21,7 +21,7 @@ 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 000000000..6bb2f98b4 +index 0000000000..6bb2f98b45 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/PaperWorldMap.java @@ -0,0 +1,191 @@ @@ -217,7 +217,7 @@ index 000000000..6bb2f98b4 + } +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 150f19024..f6a979a5b 100644 +index de423de63b..a5447c6501 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -88,7 +88,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Fri, 2 Nov 2018 23:11:51 -0400 Subject: [PATCH] Optimize World Time Updates @@ -8,10 +8,10 @@ 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 3b948a0eed..7959fba8a8 100644 +index a5447c6501..aec871dd24 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1129,12 +1129,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Thu, 15 Nov 2018 13:38:37 +0000 Subject: [PATCH] force entity dismount during teleportation @@ -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 19bbcc043..75da08596 100644 +index 19bbcc043f..75da085969 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -2045,12 +2045,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -72,7 +72,7 @@ index 19bbcc043..75da08596 100644 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 8887c24a9..5d3e48ba6 100644 +index 8887c24a9b..5d3e48ba61 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -952,9 +952,11 @@ public abstract class EntityHuman extends EntityLiving { @@ -91,10 +91,10 @@ index 8887c24a9..5d3e48ba6 100644 } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 37ff76486..93ee1feb9 100644 +index 1e53af2cce..d23968a7c9 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2669,11 +2669,13 @@ public abstract class EntityLiving extends Entity { +@@ -2673,11 +2673,13 @@ public abstract class EntityLiving extends Entity { return ((Byte) this.datawatcher.get(EntityLiving.ar) & 4) != 0; } @@ -112,7 +112,7 @@ index 37ff76486..93ee1feb9 100644 this.B(entity); } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 965f1c279..0a6fdd383 100644 +index 965f1c279b..0a6fdd383f 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -1002,11 +1002,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { diff --git a/Spigot-Server-Patches/0342-Make-the-default-permission-message-configurable.patch b/Spigot-Server-Patches/0342-Make-the-default-permission-message-configurable.patch index 73bc99310..0ea1b184e 100644 --- a/Spigot-Server-Patches/0342-Make-the-default-permission-message-configurable.patch +++ b/Spigot-Server-Patches/0342-Make-the-default-permission-message-configurable.patch @@ -1,4 +1,4 @@ -From d9ac1f05ff60238411284540f4917dd04ab3b920 Mon Sep 17 00:00:00 2001 +From baf1582d76a61343a81f2fb410f50b28e5e74d46 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 18 Nov 2018 19:49:56 +0000 Subject: [PATCH] Make the default permission message configurable @@ -29,10 +29,10 @@ index 8feb0efdcd..81987e4ad9 100644 private static void savePlayerData() { savePlayerData = getBoolean("settings.save-player-data", savePlayerData); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 145de4fe6e..12dbdbf1b8 100644 +index dfa78653aa..b89486beb1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2137,6 +2137,11 @@ public final class CraftServer implements Server { +@@ -2138,6 +2138,11 @@ public final class CraftServer implements Server { return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions; } diff --git a/Spigot-Server-Patches/0354-Allow-Saving-of-Oversized-Chunks.patch b/Spigot-Server-Patches/0354-Allow-Saving-of-Oversized-Chunks.patch index ed9542a87..dab686041 100644 --- a/Spigot-Server-Patches/0354-Allow-Saving-of-Oversized-Chunks.patch +++ b/Spigot-Server-Patches/0354-Allow-Saving-of-Oversized-Chunks.patch @@ -1,4 +1,4 @@ -From 2d05bd7f3624fb882fd0eee352819bafc6876d5a Mon Sep 17 00:00:00 2001 +From a8ff3e42fb3f25826b75e3309adb27dcb4804b39 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 15 Feb 2019 01:08:19 -0500 Subject: [PATCH] Allow Saving of Oversized Chunks @@ -64,7 +64,7 @@ index b7c94fe238..80eea5dfbd 100644 public NBTTagList() {} diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index e68f901943..ed2ccebb23 100644 +index 17648c1c04..86ae53fed3 100644 --- a/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java @@ -23,7 +23,7 @@ public class RegionFile implements AutoCloseable { @@ -75,7 +75,7 @@ index e68f901943..ed2ccebb23 100644 + final File file; // Paper - private -> package // Spigot end private static final byte[] a = new byte[4096]; - private final RandomAccessFile b; private RandomAccessFile getDataFile() { return this.b; } // Paper - OBFHELPER + private final RandomAccessFile b; private RandomAccessFile getDataFile() { return this.b; } // Paper - OBFHELPER // PAIL dataFile @@ -33,6 +33,7 @@ public class RegionFile implements AutoCloseable { public RegionFile(File file) throws IOException { @@ -102,7 +102,7 @@ index e68f901943..ed2ccebb23 100644 // Spigot end this.e.set((k >> 8) + l, false); @@ -102,11 +104,11 @@ public class RegionFile implements AutoCloseable { - if (offsets[j] != 0) this.timestamps[j] = k; // Paper - don't set timestamp if it got 0'd above due to corruption + if (this.offsets[j] != 0) this.timestamps[j] = k; // Paper - don't set timestamp if it got 0'd above due to corruption } - this.file = file; // Spigot @@ -126,7 +126,7 @@ index e68f901943..ed2ccebb23 100644 } protected synchronized void a(ChunkCoordIntPair chunkcoordintpair, byte[] abyte, int i) { -@@ -201,8 +203,9 @@ public class RegionFile implements AutoCloseable { +@@ -202,8 +204,9 @@ public class RegionFile implements AutoCloseable { if (i1 >= 256) { // Spigot start @@ -137,7 +137,7 @@ index e68f901943..ed2ccebb23 100644 // Spigot end } -@@ -352,6 +355,109 @@ public class RegionFile implements AutoCloseable { +@@ -395,6 +398,109 @@ public class RegionFile implements AutoCloseable { logger.error("Error backing up corrupt file" + file.getAbsolutePath(), e); } } @@ -247,7 +247,7 @@ index e68f901943..ed2ccebb23 100644 // Paper end class ChunkBuffer extends ByteArrayOutputStream { -@@ -363,8 +469,35 @@ public class RegionFile implements AutoCloseable { +@@ -406,8 +512,35 @@ public class RegionFile implements AutoCloseable { this.b = chunkcoordintpair; } diff --git a/Spigot-Server-Patches/0364-Add-LivingEntity-getTargetEntity.patch b/Spigot-Server-Patches/0364-Add-LivingEntity-getTargetEntity.patch index ce3653102..8395f645c 100644 --- a/Spigot-Server-Patches/0364-Add-LivingEntity-getTargetEntity.patch +++ b/Spigot-Server-Patches/0364-Add-LivingEntity-getTargetEntity.patch @@ -1,4 +1,4 @@ -From 9f6a1c486a41aa4246ef8622be3e3534ab03ae3a Mon Sep 17 00:00:00 2001 +From 8f2a9a05ad3501a4821915bc0e935b370bea5418 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sat, 22 Sep 2018 00:33:08 -0500 Subject: [PATCH] Add LivingEntity#getTargetEntity @@ -66,10 +66,10 @@ index 75da085969..046e7e031c 100644 return 0.0F; } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 192a9a86d1..251afcc1bb 100644 +index d23968a7c9..31d14b19b1 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -3225,6 +3225,37 @@ public abstract class EntityLiving extends Entity { +@@ -3229,6 +3229,37 @@ public abstract class EntityLiving extends Entity { return world.rayTrace(raytrace); } @@ -120,7 +120,7 @@ index 9bf1919451..56488b78dd 100644 return !entity.isSpectator(); }; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index d5c4115a85..c4aa1945ff 100644 +index 408028131b..e0de3820f3 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -202,6 +202,33 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/Spigot-Server-Patches/0372-Server-Tick-Events.patch b/Spigot-Server-Patches/0372-Server-Tick-Events.patch index 9013ddd02..1e98c90be 100644 --- a/Spigot-Server-Patches/0372-Server-Tick-Events.patch +++ b/Spigot-Server-Patches/0372-Server-Tick-Events.patch @@ -1,4 +1,4 @@ -From 92e78367f968c250304b0d7a05343e015ff8ce44 Mon Sep 17 00:00:00 2001 +From e22bb304de24d0f80e9884d55d88b271e78d404f Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 27 Mar 2019 22:48:45 -0400 Subject: [PATCH] Server Tick Events @@ -6,10 +6,10 @@ 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 7959fba8a8..d72c02680c 100644 +index aec871dd24..35c5d38c21 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1054,6 +1054,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant -Date: Sun, 31 Mar 2019 22:02:24 -0700 -Subject: [PATCH] Allow login events to fire only after the server plugins are - enabled - -Event threads will simply block until they're ready to accept. - -diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index a8773037e5..c09e1edfd4 100644 ---- a/src/main/java/net/minecraft/server/LoginListener.java -+++ b/src/main/java/net/minecraft/server/LoginListener.java -@@ -290,6 +290,36 @@ public class LoginListener implements PacketLoginInListener { - } - } - -+ // Paper start - Delay async prelogin until plugins are ready -+ private static volatile Object blockingLogins = new Object(); -+ -+ public static void checkStartupAndBlock() { -+ final Object lock = LoginListener.blockingLogins; -+ if (lock != null) { -+ synchronized (lock) { -+ for (;;) { -+ if (LoginListener.blockingLogins == null) { -+ return; -+ } -+ try { -+ lock.wait(); -+ } catch (final InterruptedException ignore) {// handled by the if statement above -+ Thread.currentThread().interrupt(); -+ } -+ } -+ } -+ } -+ } -+ -+ public static void allowLogins() { -+ final Object lock = LoginListener.blockingLogins; -+ synchronized (lock) { -+ LoginListener.blockingLogins = null; -+ lock.notifyAll(); -+ } -+ } -+ // Paper end -+ - // Spigot start - public class LoginHandler { - -@@ -300,6 +330,7 @@ public class LoginListener implements PacketLoginInListener { - return; - } - // Paper end -+ LoginListener.checkStartupAndBlock(); // Paper - Delay async login events until plugins are ready - String playerName = i.getName(); - java.net.InetAddress address = ((java.net.InetSocketAddress) networkManager.getSocketAddress()).getAddress(); - java.util.UUID uniqueId = i.getId(); -diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 05c23a2d98..b2a9fe30d5 100644 ---- a/src/main/java/net/minecraft/server/MinecraftServer.java -+++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -471,6 +471,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Thu, 4 Apr 2019 17:55:05 -0700 Subject: [PATCH] Optimize GameRules to use LinkedHashMap diff --git a/Spigot-Server-Patches/0375-Make-region-files-more-reliable-to-write-to.patch b/Spigot-Server-Patches/0375-Make-region-files-more-reliable-to-write-to.patch deleted file mode 100644 index d3b198bb8..000000000 --- a/Spigot-Server-Patches/0375-Make-region-files-more-reliable-to-write-to.patch +++ /dev/null @@ -1,214 +0,0 @@ -From 9d94490ac2671994c06c081a116d7b11d8ef4f77 Mon Sep 17 00:00:00 2001 -From: Spottedleaf -Date: Mon, 1 Apr 2019 18:57:32 -0700 -Subject: [PATCH] Make region files more reliable to write to - -Previously we would write to header before writing our chunk data, -which opens a window for corruption (or we would overwrite entirely). -Now the saving process has been changed to follow this chain of events: - -1. We always allocate a new space to write so we do not potentially -overwrite and corrupt the current data -2. Write the chunk data first (the order of the fields in -the chunk data isn't relevant though) -3. Flush to disk (if the launch flag is used) -4. Write to the region header last -5. Flush to disk (if the launch flag is used) -6. Then we free the previous space allocated - -With this chain of events it is impossible for a chunk write to corrupt -a region file, unless the operating system has lied and we have NOT flushed -to disk. - -However server administrators are still recommended to continue performing -regular backups. - -Note that when Mojang finally decides to change their region format -to deal with oversized chunks this patch must be changed to deal with -whatever system they decide to impose. - -If the paper.flush-on-save startup flag is set to true, then the -steps 3 and 5 will make a call to sync() on the region file's fd, -effectively flushing to disk. - -We also make use of two flushes to disk per chunk save (to ensure -ordering and ensure data has gone to disk), so this will negatively -affect save performance if the startup flag is used (especially on -HDDs). - -diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index ed2ccebb23..b0ec9edf67 100644 ---- a/src/main/java/net/minecraft/server/RegionFile.java -+++ b/src/main/java/net/minecraft/server/RegionFile.java -@@ -29,7 +29,7 @@ public class RegionFile implements AutoCloseable { - private final RandomAccessFile b; private RandomAccessFile getDataFile() { return this.b; } // Paper - OBFHELPER - private final int[] c = new int[1024]; private int[] offsets = c; // Paper - OBFHELPER - private final int[] d = new int[1024];private int[] timestamps = d; // Paper - OBFHELPER -- private final List e; -+ private final List e; private List getFreeSectors() { return this.e; } // Paper - OBFHELPER - - public RegionFile(File file) throws IOException { - this.b = new RandomAccessFile(file, "rw"); -@@ -191,8 +191,8 @@ public class RegionFile implements AutoCloseable { - protected synchronized void a(ChunkCoordIntPair chunkcoordintpair, byte[] abyte, int i) { - try { - int j = this.getOffset(chunkcoordintpair); -- int k = j >> 8; -- int l = j & 255; -+ int k = j >> 8; final int oldSectorOffset = k; // Paper - store variable for later -+ int l = j & 255; final int oldSectorCount; // Paper - store variable for later - // Spigot start - if (l == 255) { - this.b.seek(k * 4096); -@@ -200,6 +200,7 @@ public class RegionFile implements AutoCloseable { - } - // Spigot end - int i1 = (i + 5) / 4096 + 1; -+ oldSectorCount = l; // Paper - store variable for later (watch out for re-assignments of l) - - if (i1 >= 256) { - // Spigot start -@@ -209,14 +210,12 @@ public class RegionFile implements AutoCloseable { - // Spigot end - } - -- if (k != 0 && l == i1) { -+ if (false && k != 0 && l == i1) { // Paper - We never want to overrite old data - this.a(k, abyte, i); - } else { - int j1; - -- for (j1 = 0; j1 < l; ++j1) { -- this.e.set(k + j1, true); -- } -+ // Paper - We do not free old sectors until we are done writing the new chunk data - - j1 = this.e.indexOf(true); - int k1 = 0; -@@ -243,13 +242,13 @@ public class RegionFile implements AutoCloseable { - - if (k1 >= i1) { - k = j1; -- this.a(chunkcoordintpair, j1 << 8 | (i1 > 255 ? 255 : i1)); // Spigot -+ //this.a(chunkcoordintpair, j1 << 8 | (i1 > 255 ? 255 : i1)); // Spigot // Paper - We only write to header after we've written chunk data - - for (l1 = 0; l1 < i1; ++l1) { - this.e.set(k + l1, false); - } - -- this.a(k, abyte, i); -+ this.writeChunk(chunkcoordintpair, j1 << 8 | (i1 > 255 ? 255 : i1), k, abyte, i); // Paper - Ensure we do not corrupt region files - } else { - this.b.seek(this.b.length()); - k = this.e.size(); -@@ -259,22 +258,27 @@ public class RegionFile implements AutoCloseable { - this.e.add(false); - } - -- this.a(k, abyte, i); -- this.a(chunkcoordintpair, k << 8 | (i1 > 255 ? 255 : i1)); // Spigot -+ this.writeChunk(chunkcoordintpair, k << 8 | (i1 > 255 ? 255 : i1), k, abyte, i); // Paper - Ensure we do not corrupt region files -+ } -+ -+ // Paper start - Now that we've written the new chunk we can free the old data -+ for (int off = 0; off < oldSectorCount; ++off) { -+ this.getFreeSectors().set(oldSectorOffset + off, true); - } -+ // Paper end - } - -- this.b(chunkcoordintpair, (int) (SystemUtils.getTimeMillis() / 1000L)); -+ // Paper - move this into writeChunkData - } catch (IOException ioexception) { - com.destroystokyo.paper.util.SneakyThrow.sneaky(ioexception); // Paper - we want the upper try/catch to retry this - } - - } - -+ private void writeChunkData(final int sectorOffset, final byte[] data, final int dataLength) throws IOException { this.a(sectorOffset, data, dataLength); } // Paper - OBFHELPER - private void a(int i, byte[] abyte, int j) throws IOException { - this.b.seek((long) (i * 4096)); -- this.b.writeInt(j + 1); -- this.b.writeByte(2); -+ this.writeIntAndByte(j + 1, (byte)2); // Paper - Avoid 4 io write calls - this.b.write(abyte, 0, j); - } - -@@ -286,24 +290,28 @@ public class RegionFile implements AutoCloseable { - return this.getOffset(chunkcoordintpair) != 0; - } - -+ private void updateChunkHeader(ChunkCoordIntPair chunkcoordintpair, final int offset) throws IOException { this.a(chunkcoordintpair, offset); } // Paper - OBFHELPER - private void a(ChunkCoordIntPair chunkcoordintpair, int i) throws IOException { - int j = this.f(chunkcoordintpair); - -- this.c[j] = i; -+ //this.c[j] = i; // Paper - move this to after the write - this.b.seek((long) (j * 4)); -- this.b.writeInt(i); -+ this.writeInt(i); // Paper - Avoid 3 io write calls -+ this.c[j] = i; // Paper - move this to after the write - } - - private int f(ChunkCoordIntPair chunkcoordintpair) { - return chunkcoordintpair.j() + chunkcoordintpair.k() * 32; - } - -+ private final void updateChunkTime(ChunkCoordIntPair chunkPos, final int time) throws IOException { this.b(chunkPos, time); } // Paper - OBFHELPER - private void b(ChunkCoordIntPair chunkcoordintpair, int i) throws IOException { - int j = this.f(chunkcoordintpair); - -- this.d[j] = i; -+ //this.d[j] = i; // Paper - move this to after the write - this.b.seek((long) (4096 + j * 4)); -- this.b.writeInt(i); -+ this.writeInt(i); // Paper - Avoid 3 io write calls -+ this.d[j] = i; // Paper - move this to after the write - } - - public void close() throws IOException { -@@ -311,6 +319,41 @@ public class RegionFile implements AutoCloseable { - } - - // Paper start -+ private static final boolean FLUSH_ON_SAVE = Boolean.getBoolean("paper.flush-on-save"); -+ private void syncRegionFile() throws IOException { -+ if (!FLUSH_ON_SAVE) { -+ return; -+ } -+ this.getDataFile().getFD().sync(); // rethrow exception as we want to avoid corrupting a regionfile -+ } -+ -+ private final java.nio.ByteBuffer scratchBuffer = java.nio.ByteBuffer.allocate(8); -+ -+ private void writeInt(final int value) throws IOException { -+ synchronized (this.scratchBuffer) { -+ this.scratchBuffer.putInt(0, value); -+ this.getDataFile().write(this.scratchBuffer.array(), 0, 4); -+ } -+ } -+ -+ // writes v1 then v2 -+ private void writeIntAndByte(final int v1, final byte v2) throws IOException { -+ synchronized (this.scratchBuffer) { -+ this.scratchBuffer.putInt(0, v1); -+ this.scratchBuffer.put(4, v2); -+ this.getDataFile().write(this.scratchBuffer.array(), 0, 5); -+ } -+ } -+ -+ private void writeChunk(final ChunkCoordIntPair chunk, final int chunkHeaderData, -+ final int chunkOffset, final byte[] chunkData, final int chunkDataLength) throws IOException { -+ this.writeChunkData(chunkOffset, chunkData, chunkDataLength); -+ this.syncRegionFile(); // Sync is required to ensure the previous data is written successfully -+ this.updateChunkTime(chunk, (int)(SystemUtils.getTimeMillis() / 1000L)); -+ this.updateChunkHeader(chunk, chunkHeaderData); -+ this.syncRegionFile(); // Ensure header changes go through -+ } -+ - public synchronized void deleteChunk(int j1) { - backup(); - int k = offsets[j1]; --- -2.22.0 - diff --git a/Spigot-Server-Patches/0377-Optimize-Captured-TileEntity-Lookup.patch b/Spigot-Server-Patches/0375-Optimize-Captured-TileEntity-Lookup.patch similarity index 95% rename from Spigot-Server-Patches/0377-Optimize-Captured-TileEntity-Lookup.patch rename to Spigot-Server-Patches/0375-Optimize-Captured-TileEntity-Lookup.patch index 7ce52a2d4..a3030d33d 100644 --- a/Spigot-Server-Patches/0377-Optimize-Captured-TileEntity-Lookup.patch +++ b/Spigot-Server-Patches/0375-Optimize-Captured-TileEntity-Lookup.patch @@ -1,4 +1,4 @@ -From 270ebf9337fc0cf70642c4c3f9518ebf8eabc804 Mon Sep 17 00:00:00 2001 +From 21758385418502c81a934bb3604ff94d733f5d85 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 6 Apr 2019 10:16:48 -0400 Subject: [PATCH] Optimize Captured TileEntity Lookup diff --git a/Spigot-Server-Patches/0378-Add-Heightmap-API.patch b/Spigot-Server-Patches/0376-Add-Heightmap-API.patch similarity index 96% rename from Spigot-Server-Patches/0378-Add-Heightmap-API.patch rename to Spigot-Server-Patches/0376-Add-Heightmap-API.patch index 74aa2bf70..5a77ddf9b 100644 --- a/Spigot-Server-Patches/0378-Add-Heightmap-API.patch +++ b/Spigot-Server-Patches/0376-Add-Heightmap-API.patch @@ -1,4 +1,4 @@ -From 9739535bc8f8b54bb6fafa476f00a60695ccf44e Mon Sep 17 00:00:00 2001 +From 8f924f033228ae4dc6f0d8f624ce93b136be4a44 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Tue, 1 Jan 2019 02:22:01 -0800 Subject: [PATCH] Add Heightmap API @@ -20,7 +20,7 @@ index dd2a9c6e59..e3b4e30e65 100644 if (i >= -30000000 && j >= -30000000 && i < 30000000 && j < 30000000) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index a08366d360..d5ef409efb 100644 +index 6bf7eded56..0d4e38d0f4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -323,6 +323,29 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/0379-Handle-bad-chunks-more-gracefully.patch b/Spigot-Server-Patches/0377-Handle-bad-chunks-more-gracefully.patch similarity index 97% rename from Spigot-Server-Patches/0379-Handle-bad-chunks-more-gracefully.patch rename to Spigot-Server-Patches/0377-Handle-bad-chunks-more-gracefully.patch index 6088e8aee..a5bc01625 100644 --- a/Spigot-Server-Patches/0379-Handle-bad-chunks-more-gracefully.patch +++ b/Spigot-Server-Patches/0377-Handle-bad-chunks-more-gracefully.patch @@ -1,4 +1,4 @@ -From 422339fc192da2fb546a62e50776af166a0accf2 Mon Sep 17 00:00:00 2001 +From 0fbd3c1b72d52dbca3781d93ab9bfa5681a3f4cb Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Mon, 15 Apr 2019 02:24:52 +0100 Subject: [PATCH] Handle bad chunks more gracefully diff --git a/Spigot-Server-Patches/0380-Mob-Spawner-API-Enhancements.patch b/Spigot-Server-Patches/0378-Mob-Spawner-API-Enhancements.patch similarity index 98% rename from Spigot-Server-Patches/0380-Mob-Spawner-API-Enhancements.patch rename to Spigot-Server-Patches/0378-Mob-Spawner-API-Enhancements.patch index 6582fa87c..8dd134dcc 100644 --- a/Spigot-Server-Patches/0380-Mob-Spawner-API-Enhancements.patch +++ b/Spigot-Server-Patches/0378-Mob-Spawner-API-Enhancements.patch @@ -1,4 +1,4 @@ -From 5c6de81d44eeefc98f4c8fab3ea3ab699366d0bf Mon Sep 17 00:00:00 2001 +From 98d05ca6b896bc5aead03a7402b365bb5f631abe Mon Sep 17 00:00:00 2001 From: William Blake Galbreath Date: Fri, 19 Apr 2019 12:41:13 -0500 Subject: [PATCH] Mob Spawner API Enhancements diff --git a/Spigot-Server-Patches/0381-Per-Player-View-Distance-API-placeholders.patch b/Spigot-Server-Patches/0379-Per-Player-View-Distance-API-placeholders.patch similarity index 97% rename from Spigot-Server-Patches/0381-Per-Player-View-Distance-API-placeholders.patch rename to Spigot-Server-Patches/0379-Per-Player-View-Distance-API-placeholders.patch index e6b403726..bd2d89da7 100644 --- a/Spigot-Server-Patches/0381-Per-Player-View-Distance-API-placeholders.patch +++ b/Spigot-Server-Patches/0379-Per-Player-View-Distance-API-placeholders.patch @@ -1,4 +1,4 @@ -From c255782aba7ac85ae14b272e5034cc48f881c430 Mon Sep 17 00:00:00 2001 +From 14bd1135ed355b728586d6237f8d7117124ccb63 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 6 May 2019 01:29:25 -0400 Subject: [PATCH] Per-Player View Distance API placeholders @@ -39,7 +39,7 @@ index 18151acd5d..8b3052b113 100644 double deltaX = this.locX - player.locX; double deltaZ = this.locZ - player.locZ; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 15c874fc82..5345233d59 100644 +index 9fa55ef6f7..e920545df1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1983,6 +1983,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0382-Async-Chunk-placeholder.patch b/Spigot-Server-Patches/0380-Async-Chunk-placeholder.patch similarity index 96% rename from Spigot-Server-Patches/0382-Async-Chunk-placeholder.patch rename to Spigot-Server-Patches/0380-Async-Chunk-placeholder.patch index 7df0c709e..03a63ff36 100644 --- a/Spigot-Server-Patches/0382-Async-Chunk-placeholder.patch +++ b/Spigot-Server-Patches/0380-Async-Chunk-placeholder.patch @@ -1,4 +1,4 @@ -From d33e8cd67df7477d532be49dfc07c136c162a375 Mon Sep 17 00:00:00 2001 +From f1a649c2b246c717099b5764f92d2545f8e1f4ba Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Mon, 6 May 2019 12:29:24 -0700 Subject: [PATCH] Async Chunk placeholder @@ -6,7 +6,7 @@ Subject: [PATCH] Async Chunk placeholder Until we figure out Mojang's ticket system. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index d114c471e..20c370cf2 100644 +index 0d4e38d0f4..74f7b046ac 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -18,6 +18,7 @@ import java.util.Objects; diff --git a/Spigot-Server-Patches/0383-Fix-CB-call-to-changed-postToMainThread-method.patch b/Spigot-Server-Patches/0381-Fix-CB-call-to-changed-postToMainThread-method.patch similarity index 88% rename from Spigot-Server-Patches/0383-Fix-CB-call-to-changed-postToMainThread-method.patch rename to Spigot-Server-Patches/0381-Fix-CB-call-to-changed-postToMainThread-method.patch index 5d5b1d79f..bbf9e3658 100644 --- a/Spigot-Server-Patches/0383-Fix-CB-call-to-changed-postToMainThread-method.patch +++ b/Spigot-Server-Patches/0381-Fix-CB-call-to-changed-postToMainThread-method.patch @@ -1,11 +1,11 @@ -From 92fc1f520adf818b763f54480751c2d48d5bed83 Mon Sep 17 00:00:00 2001 +From ac0590e2d5af6b8fa96a15894b434ddc7a3458d4 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Fri, 10 May 2019 18:38:19 +0100 Subject: [PATCH] Fix CB call to changed postToMainThread method diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 79054b4519..8d48495eb7 100644 +index 7680b88024..4187ba05bd 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -283,7 +283,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0384-Fix-sounds-when-item-frames-are-modified-MC-123450.patch b/Spigot-Server-Patches/0382-Fix-sounds-when-item-frames-are-modified-MC-123450.patch similarity index 92% rename from Spigot-Server-Patches/0384-Fix-sounds-when-item-frames-are-modified-MC-123450.patch rename to Spigot-Server-Patches/0382-Fix-sounds-when-item-frames-are-modified-MC-123450.patch index b4fed9a22..f98732a1f 100644 --- a/Spigot-Server-Patches/0384-Fix-sounds-when-item-frames-are-modified-MC-123450.patch +++ b/Spigot-Server-Patches/0382-Fix-sounds-when-item-frames-are-modified-MC-123450.patch @@ -1,4 +1,4 @@ -From 870c1db2cc3d04de45598077f3a7bb49f9d36b8a Mon Sep 17 00:00:00 2001 +From 5c0d14c68d85c4dd031f920b56997708fff20905 Mon Sep 17 00:00:00 2001 From: Phoenix616 Date: Sat, 27 Apr 2019 20:00:43 +0100 Subject: [PATCH] Fix sounds when item frames are modified (MC-123450) @@ -6,7 +6,7 @@ Subject: [PATCH] Fix sounds when item frames are modified (MC-123450) This also fixes the adding sound playing when the item frame direction is changed. diff --git a/src/main/java/net/minecraft/server/EntityItemFrame.java b/src/main/java/net/minecraft/server/EntityItemFrame.java -index 6f6837ec4..b078435c6 100644 +index 6f6837ec4d..b078435c6f 100644 --- a/src/main/java/net/minecraft/server/EntityItemFrame.java +++ b/src/main/java/net/minecraft/server/EntityItemFrame.java @@ -226,7 +226,7 @@ public class EntityItemFrame extends EntityHanging { @@ -19,7 +19,7 @@ index 6f6837ec4..b078435c6 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java -index 799036f26..9ad180d94 100644 +index 799036f268..9ad180d946 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java @@ -49,7 +49,7 @@ public class CraftItemFrame extends CraftHanging implements ItemFrame { diff --git a/Spigot-Server-Patches/0385-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch b/Spigot-Server-Patches/0383-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch similarity index 91% rename from Spigot-Server-Patches/0385-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch rename to Spigot-Server-Patches/0383-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch index 74aeca519..a1be9e7bb 100644 --- a/Spigot-Server-Patches/0385-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch +++ b/Spigot-Server-Patches/0383-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch @@ -1,4 +1,4 @@ -From a1ad9b53d37594f0d2ba28cc803cb8e44b29c474 Mon Sep 17 00:00:00 2001 +From aeef538a6f37143d4cacf2d4c66298232d6a19e4 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Mon, 13 May 2019 21:10:59 -0700 Subject: [PATCH] Fix CraftServer#isPrimaryThread and MinecraftServer @@ -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 cbc9502802..51be3f9adf 100644 +index 35c5d38c21..c70ab3caf0 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -2154,7 +2154,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Fri, 28 Sep 2018 21:49:53 -0400 Subject: [PATCH] Fix issues with entity loss due to unloaded chunks diff --git a/Spigot-Server-Patches/0387-Duplicate-UUID-Resolve-Option.patch b/Spigot-Server-Patches/0385-Duplicate-UUID-Resolve-Option.patch similarity index 99% rename from Spigot-Server-Patches/0387-Duplicate-UUID-Resolve-Option.patch rename to Spigot-Server-Patches/0385-Duplicate-UUID-Resolve-Option.patch index 4b6fe8608..3b3edd7e7 100644 --- a/Spigot-Server-Patches/0387-Duplicate-UUID-Resolve-Option.patch +++ b/Spigot-Server-Patches/0385-Duplicate-UUID-Resolve-Option.patch @@ -1,4 +1,4 @@ -From 0774260e6ddf31b3c48d62ce459633e624768a2c Mon Sep 17 00:00:00 2001 +From 8c38c2390cee11240ea12602dbbd440aeb5e0477 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 21 Jul 2018 14:27:34 -0400 Subject: [PATCH] Duplicate UUID Resolve Option diff --git a/Spigot-Server-Patches/0388-improve-CraftWorld-isChunkLoaded.patch b/Spigot-Server-Patches/0386-improve-CraftWorld-isChunkLoaded.patch similarity index 93% rename from Spigot-Server-Patches/0388-improve-CraftWorld-isChunkLoaded.patch rename to Spigot-Server-Patches/0386-improve-CraftWorld-isChunkLoaded.patch index b99550a0d..d51aca30d 100644 --- a/Spigot-Server-Patches/0388-improve-CraftWorld-isChunkLoaded.patch +++ b/Spigot-Server-Patches/0386-improve-CraftWorld-isChunkLoaded.patch @@ -1,4 +1,4 @@ -From d04d1a0616a2869cb8de91fa7f607e7c04084d16 Mon Sep 17 00:00:00 2001 +From b5079bb58d1c535dc36ee860218926d43f818f48 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Tue, 21 May 2019 02:34:04 +0100 Subject: [PATCH] improve CraftWorld#isChunkLoaded @@ -9,7 +9,7 @@ waiting for the execution queue to get to our request; We can just query the chunk status and get a response now, vs having to wait diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index cbe9d5628e..9857914325 100644 +index 74f7b046ac..f613ae1da4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -388,14 +388,13 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/0389-Configurable-Keep-Spawn-Loaded-range-per-world.patch b/Spigot-Server-Patches/0387-Configurable-Keep-Spawn-Loaded-range-per-world.patch similarity index 98% rename from Spigot-Server-Patches/0389-Configurable-Keep-Spawn-Loaded-range-per-world.patch rename to Spigot-Server-Patches/0387-Configurable-Keep-Spawn-Loaded-range-per-world.patch index e7ef3cdd4..97bc9a870 100644 --- a/Spigot-Server-Patches/0389-Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/Spigot-Server-Patches/0387-Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -1,4 +1,4 @@ -From c5d9df70d841184b48e1202c9ff00e6dbf660b45 Mon Sep 17 00:00:00 2001 +From 4848ceac96873ad5395abff0990c6e1238496749 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 13 Sep 2014 23:14:43 -0400 Subject: [PATCH] Configurable Keep Spawn Loaded range per world @@ -21,7 +21,7 @@ index d8bb13693d..de11a91af6 100644 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 51be3f9adf..380c3663a6 100644 +index c70ab3caf0..c58f6f50d3 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -577,6 +577,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Fri, 24 May 2019 07:53:16 +0100 Subject: [PATCH] Fix some generation concurrency issues diff --git a/src/main/java/net/minecraft/server/DefinedStructureManager.java b/src/main/java/net/minecraft/server/DefinedStructureManager.java -index 8ecbd945c..fec41a142 100644 +index 8ecbd945c2..fec41a142f 100644 --- a/src/main/java/net/minecraft/server/DefinedStructureManager.java +++ b/src/main/java/net/minecraft/server/DefinedStructureManager.java @@ -20,7 +20,7 @@ import org.apache.logging.log4j.Logger; @@ -18,7 +18,7 @@ index 8ecbd945c..fec41a142 100644 private final MinecraftServer d; private final java.nio.file.Path e; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index e3b4e30e6..10c149fae 100644 +index e3b4e30e65..10c149faec 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -101,6 +101,23 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose @@ -46,7 +46,7 @@ index e3b4e30e6..10c149fae 100644 public CraftWorld getWorld() { return this.world; diff --git a/src/main/java/net/minecraft/server/WorldGenStronghold.java b/src/main/java/net/minecraft/server/WorldGenStronghold.java -index ddf726867..c2188ceef 100644 +index ddf7268676..c2188ceef1 100644 --- a/src/main/java/net/minecraft/server/WorldGenStronghold.java +++ b/src/main/java/net/minecraft/server/WorldGenStronghold.java @@ -10,10 +10,12 @@ import javax.annotation.Nullable; diff --git a/Spigot-Server-Patches/0391-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch b/Spigot-Server-Patches/0389-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch similarity index 83% rename from Spigot-Server-Patches/0391-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch rename to Spigot-Server-Patches/0389-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch index 34f2815ad..b43efdb6c 100644 --- a/Spigot-Server-Patches/0391-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch +++ b/Spigot-Server-Patches/0389-MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch @@ -1,4 +1,4 @@ -From c91c9c3475b153e3322014ef463be6f2b9e3b062 Mon Sep 17 00:00:00 2001 +From 7714e202d48c4aaed00476736342817ff5ed8484 Mon Sep 17 00:00:00 2001 From: William Blake Galbreath Date: Mon, 27 May 2019 17:35:39 -0500 Subject: [PATCH] MC-114618 - Fix EntityAreaEffectCloud from going negative @@ -6,10 +6,10 @@ Subject: [PATCH] MC-114618 - Fix EntityAreaEffectCloud from going negative diff --git a/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java b/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java -index 91b434aff6..8ebf85dc6b 100644 +index 3a8e105336..fe527aba52 100644 --- a/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java +++ b/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java -@@ -163,6 +163,12 @@ public class EntityAreaEffectCloud extends Entity { +@@ -175,6 +175,12 @@ public class EntityAreaEffectCloud extends Entity { super.tick(); boolean flag = this.l(); float f = this.getRadius(); diff --git a/Spigot-Server-Patches/0392-ChunkMapDistance-CME.patch b/Spigot-Server-Patches/0390-ChunkMapDistance-CME.patch similarity index 97% rename from Spigot-Server-Patches/0392-ChunkMapDistance-CME.patch rename to Spigot-Server-Patches/0390-ChunkMapDistance-CME.patch index 9d9620e78..cd2097813 100644 --- a/Spigot-Server-Patches/0392-ChunkMapDistance-CME.patch +++ b/Spigot-Server-Patches/0390-ChunkMapDistance-CME.patch @@ -1,4 +1,4 @@ -From d91280b404da585a708ada87cd172dd832ab2364 Mon Sep 17 00:00:00 2001 +From a80c7dd8d8dde293eabadf950661cc3f5b5d4fca Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Wed, 29 May 2019 04:01:22 +0100 Subject: [PATCH] ChunkMapDistance CME diff --git a/Spigot-Server-Patches/0393-Actually-Limit-Natural-Spawns-To-Limit.patch b/Spigot-Server-Patches/0391-Actually-Limit-Natural-Spawns-To-Limit.patch similarity index 97% rename from Spigot-Server-Patches/0393-Actually-Limit-Natural-Spawns-To-Limit.patch rename to Spigot-Server-Patches/0391-Actually-Limit-Natural-Spawns-To-Limit.patch index 259366ec5..03ee7aaf8 100644 --- a/Spigot-Server-Patches/0393-Actually-Limit-Natural-Spawns-To-Limit.patch +++ b/Spigot-Server-Patches/0391-Actually-Limit-Natural-Spawns-To-Limit.patch @@ -1,14 +1,14 @@ -From 8dccf6997c9352637853343a52abcdd7a96950e5 Mon Sep 17 00:00:00 2001 +From cfd6e121847944f05ffba9e6650966f15db044a6 Mon Sep 17 00:00:00 2001 From: kickash32 Date: Sun, 2 Jun 2019 01:22:02 -0400 Subject: [PATCH] Actually-Limit-Natural-Spawns-To-Limit diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index a58cfc14bb..26216fe72c 100644 +index 0ce2d6d0fb..d30da20435 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -444,8 +444,12 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -452,8 +452,12 @@ public class ChunkProviderServer extends IChunkProvider { if (enumcreaturetype != EnumCreatureType.MISC && (!enumcreaturetype.c() || this.allowAnimals) && (enumcreaturetype.c() || this.allowMonsters) && (!enumcreaturetype.d() || flag2)) { int k1 = limit * l / ChunkProviderServer.b; // CraftBukkit - use per-world limits diff --git a/Spigot-Server-Patches/0394-Implement-CraftBlockSoundGroup.patch b/Spigot-Server-Patches/0392-Implement-CraftBlockSoundGroup.patch similarity index 98% rename from Spigot-Server-Patches/0394-Implement-CraftBlockSoundGroup.patch rename to Spigot-Server-Patches/0392-Implement-CraftBlockSoundGroup.patch index f1b4f49ef..40aaa361d 100644 --- a/Spigot-Server-Patches/0394-Implement-CraftBlockSoundGroup.patch +++ b/Spigot-Server-Patches/0392-Implement-CraftBlockSoundGroup.patch @@ -1,4 +1,4 @@ -From c7ca2c14f74f080cd47fa9831cea2e0d04f78c33 Mon Sep 17 00:00:00 2001 +From 282879b099576a7f5851f2306a9bfac9b6ac6f23 Mon Sep 17 00:00:00 2001 From: simpleauthority Date: Tue, 28 May 2019 03:48:51 -0700 Subject: [PATCH] Implement CraftBlockSoundGroup diff --git a/Spigot-Server-Patches/0395-Chunk-debug-command.patch b/Spigot-Server-Patches/0393-Chunk-debug-command.patch similarity index 99% rename from Spigot-Server-Patches/0395-Chunk-debug-command.patch rename to Spigot-Server-Patches/0393-Chunk-debug-command.patch index f4b4a0898..00f62b300 100644 --- a/Spigot-Server-Patches/0395-Chunk-debug-command.patch +++ b/Spigot-Server-Patches/0393-Chunk-debug-command.patch @@ -1,4 +1,4 @@ -From 44adb27104789a1f6739d9c6ef7ccf378c45bc6f Mon Sep 17 00:00:00 2001 +From 9867b160e76f323ac2623bae1440a178adb502f1 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sat, 1 Jun 2019 13:00:55 -0700 Subject: [PATCH] Chunk debug command @@ -185,7 +185,7 @@ index 391726d99c..8db92edc36 100644 * Ported from MinecraftForge - author: LexManos - License: LGPLv2.1 */ diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 21032fa943..220cd197fa 100644 +index d30da20435..cb78e14a05 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -22,7 +22,7 @@ import org.apache.logging.log4j.Logger; @@ -412,7 +412,7 @@ index 7407c1a564..14a176d61d 100644 private int dirtyCount; private int r; diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 8470bf693d..60bd3a63e7 100644 +index 67d011745f..493770bf68 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -57,7 +57,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -434,7 +434,7 @@ index 8470bf693d..60bd3a63e7 100644 private final DefinedStructureManager definedStructureManager; private final File x; diff --git a/src/main/java/net/minecraft/server/Ticket.java b/src/main/java/net/minecraft/server/Ticket.java -index c23a366b2c..e53cbd418b 100644 +index 0430ca5353..badbe6c19d 100644 --- a/src/main/java/net/minecraft/server/Ticket.java +++ b/src/main/java/net/minecraft/server/Ticket.java @@ -6,8 +6,8 @@ public final class Ticket implements Comparable> { diff --git a/Spigot-Server-Patches/0396-incremental-chunk-saving.patch b/Spigot-Server-Patches/0394-incremental-chunk-saving.patch similarity index 96% rename from Spigot-Server-Patches/0396-incremental-chunk-saving.patch rename to Spigot-Server-Patches/0394-incremental-chunk-saving.patch index 99eed2200..728d7b280 100644 --- a/Spigot-Server-Patches/0396-incremental-chunk-saving.patch +++ b/Spigot-Server-Patches/0394-incremental-chunk-saving.patch @@ -1,11 +1,11 @@ -From cffcc434581178122d9cae2f3ac04815131d0840 Mon Sep 17 00:00:00 2001 +From 24b13d1473de60e0424b5a62f4f92ffc471ebfc7 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 9 Jun 2019 03:53:22 +0100 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 de11a91af..4d3c6c6b4 100644 +index de11a91af6..4d3c6c6b47 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -489,4 +489,19 @@ public class PaperWorldConfig { @@ -29,7 +29,7 @@ index de11a91af..4d3c6c6b4 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index ee8f80174..2003522d9 100644 +index ee8f801745..2003522d96 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -42,7 +42,7 @@ public class Chunk implements IChunkAccess { @@ -42,7 +42,7 @@ index ee8f80174..2003522d9 100644 private long t; @Nullable diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 9765eaf24..5fabfe87c 100644 +index cb78e14a05..ca5963b11a 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -335,6 +335,15 @@ public class ChunkProviderServer extends IChunkProvider { @@ -60,9 +60,9 @@ index 9765eaf24..5fabfe87c 100644 + @Override public void close() throws IOException { - this.save(true); + // CraftBukkit start diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 380c3663a..6eef4592a 100644 +index c58f6f50d3..2293360407 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -165,6 +165,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 100) { // Spigot diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 493770bf6..2be6fa0f0 100644 +index 493770bf68..2be6fa0f07 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -297,6 +297,36 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -147,7 +147,7 @@ index 493770bf6..2be6fa0f0 100644 if (flag) { List list = (List) this.visibleChunks.values().stream().filter(PlayerChunk::hasBeenLoaded).peek(PlayerChunk::m).collect(Collectors.toList()); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 1003ea50d..4148325a2 100644 +index 1003ea50d3..4148325a26 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -756,11 +756,44 @@ public class WorldServer extends World { diff --git a/Spigot-Server-Patches/0397-Catch-exceptions-from-dispenser-entity-spawns.patch b/Spigot-Server-Patches/0395-Catch-exceptions-from-dispenser-entity-spawns.patch similarity index 95% rename from Spigot-Server-Patches/0397-Catch-exceptions-from-dispenser-entity-spawns.patch rename to Spigot-Server-Patches/0395-Catch-exceptions-from-dispenser-entity-spawns.patch index 6987d42c8..81a1790f7 100644 --- a/Spigot-Server-Patches/0397-Catch-exceptions-from-dispenser-entity-spawns.patch +++ b/Spigot-Server-Patches/0395-Catch-exceptions-from-dispenser-entity-spawns.patch @@ -1,4 +1,4 @@ -From 4597e8c878afc739c30b9432335581ef98c1f252 Mon Sep 17 00:00:00 2001 +From 44d0cac4322b4f99b41506189e942406b720ffaf Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Mon, 10 Jun 2019 09:36:40 +0100 Subject: [PATCH] Catch exceptions from dispenser entity spawns diff --git a/Spigot-Server-Patches/0398-Fix-World-isChunkGenerated-calls.patch b/Spigot-Server-Patches/0396-Fix-World-isChunkGenerated-calls.patch similarity index 95% rename from Spigot-Server-Patches/0398-Fix-World-isChunkGenerated-calls.patch rename to Spigot-Server-Patches/0396-Fix-World-isChunkGenerated-calls.patch index e34fe8318..9e4bdb401 100644 --- a/Spigot-Server-Patches/0398-Fix-World-isChunkGenerated-calls.patch +++ b/Spigot-Server-Patches/0396-Fix-World-isChunkGenerated-calls.patch @@ -1,4 +1,4 @@ -From 3315876ab63c039fb2e795aae0fa079824cecd0e Mon Sep 17 00:00:00 2001 +From a281cd55109105f08246f47bb9517a48feab713a Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sat, 15 Jun 2019 08:54:33 -0700 Subject: [PATCH] Fix World#isChunkGenerated calls @@ -8,7 +8,7 @@ This patch also adds a chunk status cache on region files (note that its only purpose is to cache the status on DISK) diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 5fabfe87c..2c6a164f0 100644 +index ca5963b11a..3894b04342 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -28,7 +28,7 @@ public class ChunkProviderServer extends IChunkProvider { @@ -43,7 +43,7 @@ index 5fabfe87c..2c6a164f0 100644 @Nullable diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index e778c2e85..73f93e494 100644 +index e778c2e857..73f93e4948 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -410,6 +410,17 @@ public class ChunkRegionLoader { @@ -65,7 +65,7 @@ index e778c2e85..73f93e494 100644 if (nbttagcompound != null) { ChunkStatus chunkstatus = ChunkStatus.a(nbttagcompound.getCompound("Level").getString("Status")); diff --git a/src/main/java/net/minecraft/server/ChunkStatus.java b/src/main/java/net/minecraft/server/ChunkStatus.java -index dd1822d6f..e324989b4 100644 +index dd1822d6ff..e324989b46 100644 --- a/src/main/java/net/minecraft/server/ChunkStatus.java +++ b/src/main/java/net/minecraft/server/ChunkStatus.java @@ -176,6 +176,7 @@ public class ChunkStatus { @@ -95,7 +95,7 @@ index dd1822d6f..e324989b4 100644 return (ChunkStatus) IRegistry.CHUNK_STATUS.get(MinecraftKey.a(s)); } diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 14a176d61..98590e233 100644 +index 14a176d61d..98590e233a 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java @@ -70,6 +70,19 @@ public class PlayerChunk { @@ -119,7 +119,7 @@ index 14a176d61..98590e233 100644 public CompletableFuture> getStatusFutureUnchecked(ChunkStatus chunkstatus) { diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 2be6fa0f0..bdadbd436 100644 +index 2be6fa0f07..bdadbd436e 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -891,11 +891,61 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -187,12 +187,12 @@ index 2be6fa0f0..bdadbd436 100644 boolean isOutsideOfRange(ChunkCoordIntPair chunkcoordintpair) { // Spigot start diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index b0ec9edf6..41f1e15cb 100644 +index 86ae53fed3..e6e412b7c1 100644 --- a/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java @@ -31,6 +31,30 @@ public class RegionFile implements AutoCloseable { - private final int[] d = new int[1024];private int[] timestamps = d; // Paper - OBFHELPER - private final List e; private List getFreeSectors() { return this.e; } // Paper - OBFHELPER + private final int[] d = new int[1024]; private final int[] timestamps = d; // Paper - OBFHELPER + private final List e; // PAIL freeSectors + // Paper start - Cache chunk status + private final ChunkStatus[] statuses = new ChunkStatus[32 * 32]; @@ -221,7 +221,7 @@ index b0ec9edf6..41f1e15cb 100644 public RegionFile(File file) throws IOException { this.b = new RandomAccessFile(file, "rw"); this.file = file; // Spigot // Paper - We need this earlier -@@ -286,6 +310,7 @@ public class RegionFile implements AutoCloseable { +@@ -291,6 +315,7 @@ public class RegionFile implements AutoCloseable { return this.c[this.f(chunkcoordintpair)]; } @@ -229,15 +229,15 @@ index b0ec9edf6..41f1e15cb 100644 public boolean d(ChunkCoordIntPair chunkcoordintpair) { return this.getOffset(chunkcoordintpair) != 0; } -@@ -300,6 +325,7 @@ public class RegionFile implements AutoCloseable { - this.c[j] = i; // Paper - move this to after the write +@@ -304,6 +329,7 @@ public class RegionFile implements AutoCloseable { + this.c[j] = i; // Spigot - move this to after the write } + private final int getChunkLocation(ChunkCoordIntPair chunkcoordintpair) { return this.f(chunkcoordintpair); } // Paper - OBFHELPER private int f(ChunkCoordIntPair chunkcoordintpair) { return chunkcoordintpair.j() + chunkcoordintpair.k() * 32; } -@@ -315,6 +341,7 @@ public class RegionFile implements AutoCloseable { +@@ -318,6 +344,7 @@ public class RegionFile implements AutoCloseable { } public void close() throws IOException { @@ -246,7 +246,7 @@ index b0ec9edf6..41f1e15cb 100644 } diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java -index 6f34d8aea..d2b328945 100644 +index 6f34d8aea0..d2b3289450 100644 --- a/src/main/java/net/minecraft/server/RegionFileCache.java +++ b/src/main/java/net/minecraft/server/RegionFileCache.java @@ -47,6 +47,12 @@ public abstract class RegionFileCache implements AutoCloseable { @@ -279,7 +279,7 @@ index 6f34d8aea..d2b328945 100644 printOversizedLog("ChunkTooLarge even after reduction. Trying in overzealous mode.", regionfile.file, chunkX, chunkZ); // Eek, major fail. We have retry logic, so reduce threshholds and fall back diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index acf151a25..a2b6c3c94 100644 +index ceb256222f..21f1530138 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -393,8 +393,22 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/0399-Show-blockstate-location-if-we-failed-to-read-it.patch b/Spigot-Server-Patches/0397-Show-blockstate-location-if-we-failed-to-read-it.patch similarity index 95% rename from Spigot-Server-Patches/0399-Show-blockstate-location-if-we-failed-to-read-it.patch rename to Spigot-Server-Patches/0397-Show-blockstate-location-if-we-failed-to-read-it.patch index 753152806..2be332627 100644 --- a/Spigot-Server-Patches/0399-Show-blockstate-location-if-we-failed-to-read-it.patch +++ b/Spigot-Server-Patches/0397-Show-blockstate-location-if-we-failed-to-read-it.patch @@ -1,4 +1,4 @@ -From ea7b4ced04c403a37b00158512027f35f0892d3f Mon Sep 17 00:00:00 2001 +From d06b36e7d5bd3ef23b800fce2c461581d1d8c0b2 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sat, 15 Jun 2019 10:28:25 -0700 Subject: [PATCH] Show blockstate location if we failed to read it diff --git a/Spigot-Server-Patches/0400-Log-other-thread-in-DataPaletteBlock-lock-failure.patch b/Spigot-Server-Patches/0398-Log-other-thread-in-DataPaletteBlock-lock-failure.patch similarity index 97% rename from Spigot-Server-Patches/0400-Log-other-thread-in-DataPaletteBlock-lock-failure.patch rename to Spigot-Server-Patches/0398-Log-other-thread-in-DataPaletteBlock-lock-failure.patch index 84f2d8f82..58d5711f7 100644 --- a/Spigot-Server-Patches/0400-Log-other-thread-in-DataPaletteBlock-lock-failure.patch +++ b/Spigot-Server-Patches/0398-Log-other-thread-in-DataPaletteBlock-lock-failure.patch @@ -1,4 +1,4 @@ -From 77b5bfcb86df30c3e0bbcaf5dd5746eed768f9fa Mon Sep 17 00:00:00 2001 +From 3aa0ab156ffd994ad737bc2f76af3d7475c8a9b0 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Fri, 21 Jun 2019 14:42:48 -0700 Subject: [PATCH] Log other thread in DataPaletteBlock lock failure diff --git a/Spigot-Server-Patches/0401-Use-ChunkStatus-cache-when-saving-protochunks.patch b/Spigot-Server-Patches/0399-Use-ChunkStatus-cache-when-saving-protochunks.patch similarity index 92% rename from Spigot-Server-Patches/0401-Use-ChunkStatus-cache-when-saving-protochunks.patch rename to Spigot-Server-Patches/0399-Use-ChunkStatus-cache-when-saving-protochunks.patch index 0dbaf4963..d0047077a 100644 --- a/Spigot-Server-Patches/0401-Use-ChunkStatus-cache-when-saving-protochunks.patch +++ b/Spigot-Server-Patches/0399-Use-ChunkStatus-cache-when-saving-protochunks.patch @@ -1,4 +1,4 @@ -From c37c254f623531a867bcac6b5cb7cbb1d48b60da Mon Sep 17 00:00:00 2001 +From ced736fc443de0c3b20f67e4781b14aa63ecf6f9 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sat, 22 Jun 2019 04:20:47 -0700 Subject: [PATCH] Use ChunkStatus cache when saving protochunks @@ -7,7 +7,7 @@ The cache should contain the chunk status when saving. If not it will load it. diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index bdadbd436..fbbd4d5dd 100644 +index bdadbd436e..fbbd4d5dd0 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -768,8 +768,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { diff --git a/Spigot-Server-Patches/0402-Anti-Xray.patch b/Spigot-Server-Patches/0400-Anti-Xray.patch similarity index 99% rename from Spigot-Server-Patches/0402-Anti-Xray.patch rename to Spigot-Server-Patches/0400-Anti-Xray.patch index b3c669dd6..190d906a3 100644 --- a/Spigot-Server-Patches/0402-Anti-Xray.patch +++ b/Spigot-Server-Patches/0400-Anti-Xray.patch @@ -1,11 +1,11 @@ -From b953a9e663b95822621257afde5f98387acffdb9 Mon Sep 17 00:00:00 2001 +From 30e17b2ad5a927f202ccb708ab7d6d251db6b5eb Mon Sep 17 00:00:00 2001 From: stonar96 Date: Mon, 20 Aug 2018 03:03:58 +0200 Subject: [PATCH] Anti-Xray diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 81987e4ad..5942c3438 100644 +index 81987e4ad9..5942c3438e 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -71,8 +71,8 @@ public class PaperConfig { @@ -20,7 +20,7 @@ index 81987e4ad..5942c3438 100644 } diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 4d3c6c6b4..929f5c303 100644 +index 4d3c6c6b47..929f5c3031 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -1,7 +1,11 @@ @@ -81,7 +81,7 @@ index 4d3c6c6b4..929f5c303 100644 } diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockController.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockController.java new file mode 100644 -index 000000000..f7e376ce6 +index 0000000000..f7e376ce6a --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockController.java @@ -0,0 +1,46 @@ @@ -133,7 +133,7 @@ index 000000000..f7e376ce6 +} 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 000000000..23626bef3 +index 0000000000..23626bef3a --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java @@ -0,0 +1,782 @@ @@ -921,7 +921,7 @@ index 000000000..23626bef3 +} diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfo.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfo.java new file mode 100644 -index 000000000..a68bace35 +index 0000000000..a68bace353 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfo.java @@ -0,0 +1,81 @@ @@ -1008,7 +1008,7 @@ index 000000000..a68bace35 +} diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfoAntiXray.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfoAntiXray.java new file mode 100644 -index 000000000..067dfb2f1 +index 0000000000..067dfb2f14 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfoAntiXray.java @@ -0,0 +1,31 @@ @@ -1045,7 +1045,7 @@ index 000000000..067dfb2f1 +} diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java new file mode 100644 -index 000000000..cc586827a +index 0000000000..cc586827aa --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java @@ -0,0 +1,56 @@ @@ -1107,7 +1107,7 @@ index 000000000..cc586827a +} diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java new file mode 100644 -index 000000000..37093419c +index 0000000000..37093419cf --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java @@ -0,0 +1,84 @@ @@ -1196,7 +1196,7 @@ index 000000000..37093419c + } +} diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 2003522d9..d604f96c1 100644 +index 2003522d96..d604f96c16 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -315,7 +315,7 @@ public class Chunk implements IChunkAccess { @@ -1209,7 +1209,7 @@ index 2003522d9..d604f96c1 100644 } diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 73f93e494..a02807411 100644 +index 73f93e4948..a028074112 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -74,7 +74,7 @@ public class ChunkRegionLoader { @@ -1231,7 +1231,7 @@ index 73f93e494..a02807411 100644 object = protochunk; protochunk.a(abiomebase); diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java -index ca2bf8b77..584b3e639 100644 +index ca2bf8b770..584b3e6393 100644 --- a/src/main/java/net/minecraft/server/ChunkSection.java +++ b/src/main/java/net/minecraft/server/ChunkSection.java @@ -6,21 +6,31 @@ public class ChunkSection { @@ -1270,7 +1270,7 @@ index ca2bf8b77..584b3e639 100644 public IBlockData getType(int i, int j, int k) { diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java -index 1e2bca1e0..8fba1e2f3 100644 +index 1e2bca1e04..8fba1e2f3d 100644 --- a/src/main/java/net/minecraft/server/DataPaletteBlock.java +++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java @@ -3,6 +3,7 @@ package net.minecraft.server; @@ -1392,7 +1392,7 @@ index 1e2bca1e0..8fba1e2f3 100644 if (this.h == this.b) { diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index e156804f7..96a785af2 100644 +index e156804f7a..96a785af27 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -42,7 +42,7 @@ public class NetworkManager extends SimpleChannelInboundHandler> { @@ -1455,7 +1455,7 @@ index e156804f7..96a785af2 100644 public void a() { this.o(); diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java -index ef71a1feb..483317608 100644 +index ef71a1feb3..483317608c 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java @@ -1,5 +1,6 @@ @@ -1548,7 +1548,7 @@ index ef71a1feb..483317608 100644 } diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 98590e233..af934ef8b 100644 +index 98590e233a..af934ef8bc 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java @@ -176,6 +176,11 @@ public class PlayerChunk { @@ -1573,7 +1573,7 @@ index 98590e233..af934ef8b 100644 this.a(new PacketPlayOutMultiBlockChange(this.dirtyCount, this.dirtyBlocks, chunk), false); diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index fbbd4d5dd..fd0d2b6e6 100644 +index fbbd4d5dd0..fd0d2b6e67 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -539,7 +539,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -1595,7 +1595,7 @@ index fbbd4d5dd..fd0d2b6e6 100644 } diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java -index 1c79890e3..e5e9de542 100644 +index 1c79890e3f..e5e9de542b 100644 --- a/src/main/java/net/minecraft/server/PlayerInteractManager.java +++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java @@ -253,6 +253,8 @@ public class PlayerInteractManager { @@ -1608,7 +1608,7 @@ index 1c79890e3..e5e9de542 100644 public void a(BlockPosition blockposition, PacketPlayInBlockDig.EnumPlayerDigType packetplayinblockdig_enumplayerdigtype) { diff --git a/src/main/java/net/minecraft/server/ProtoChunk.java b/src/main/java/net/minecraft/server/ProtoChunk.java -index 6bdd7dda0..7bad12eb0 100644 +index 6bdd7dda04..7bad12eb00 100644 --- a/src/main/java/net/minecraft/server/ProtoChunk.java +++ b/src/main/java/net/minecraft/server/ProtoChunk.java @@ -44,16 +44,28 @@ public class ProtoChunk implements IChunkAccess { @@ -1651,7 +1651,7 @@ index 6bdd7dda0..7bad12eb0 100644 return this.j[i]; diff --git a/src/main/java/net/minecraft/server/TicketType.java b/src/main/java/net/minecraft/server/TicketType.java -index 157ca6a7e..9c114d2d3 100644 +index 157ca6a7e6..9c114d2d37 100644 --- a/src/main/java/net/minecraft/server/TicketType.java +++ b/src/main/java/net/minecraft/server/TicketType.java @@ -21,6 +21,7 @@ public class TicketType { @@ -1663,7 +1663,7 @@ index 157ca6a7e..9c114d2d3 100644 public static TicketType a(String s, Comparator comparator) { return new TicketType<>(s, comparator, 0L); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 10c149fae..ab98c7b79 100644 +index 10c149faec..ab98c7b796 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; @@ -1700,7 +1700,7 @@ index 10c149fae..ab98c7b79 100644 if (iblockdata1 == null) { // CraftBukkit start - remove blockstate if failed diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java -index 7772d5900..4570ed999 100644 +index 7772d59005..4570ed9991 100644 --- a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java +++ b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java @@ -21,9 +21,11 @@ public final class CraftChunkData implements ChunkGenerator.ChunkData { diff --git a/Spigot-Server-Patches/0403-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch b/Spigot-Server-Patches/0401-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch similarity index 95% rename from Spigot-Server-Patches/0403-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch rename to Spigot-Server-Patches/0401-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch index d50d55d02..aab8b7716 100644 --- a/Spigot-Server-Patches/0403-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch +++ b/Spigot-Server-Patches/0401-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch @@ -1,4 +1,4 @@ -From 5e472e2806995e8cf0cb95ec7452ebde738dd3d8 Mon Sep 17 00:00:00 2001 +From bd8d126fa7f77f55f6e29c10fcc77390f250e282 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 24 Mar 2019 01:01:32 -0400 Subject: [PATCH] Only count Natural Spawned mobs towards natural spawn mob @@ -17,7 +17,7 @@ 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 929f5c303..ff520d9e8 100644 +index 929f5c3031..ff520d9e86 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -509,6 +509,16 @@ public class PaperWorldConfig { @@ -38,7 +38,7 @@ index 929f5c303..ff520d9e8 100644 public boolean asynchronous; public EngineMode engineMode; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 4148325a2..7faa5dd84 100644 +index 4148325a26..7faa5dd84a 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -899,6 +899,13 @@ public class WorldServer extends World { diff --git a/Spigot-Server-Patches/0404-Use-getChunkIfLoadedImmediately-in-places.patch b/Spigot-Server-Patches/0402-Use-getChunkIfLoadedImmediately-in-places.patch similarity index 98% rename from Spigot-Server-Patches/0404-Use-getChunkIfLoadedImmediately-in-places.patch rename to Spigot-Server-Patches/0402-Use-getChunkIfLoadedImmediately-in-places.patch index eb4519293..21d507697 100644 --- a/Spigot-Server-Patches/0404-Use-getChunkIfLoadedImmediately-in-places.patch +++ b/Spigot-Server-Patches/0402-Use-getChunkIfLoadedImmediately-in-places.patch @@ -1,4 +1,4 @@ -From 88cb7775e487f94a1bdda8f8722f4a0404965ca4 Mon Sep 17 00:00:00 2001 +From 15ae33fdf438a0d55998add482f6964989fd98fa Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Mon, 8 Jul 2019 00:13:36 -0700 Subject: [PATCH] Use getChunkIfLoadedImmediately in places @@ -21,7 +21,7 @@ index 55c73ffcaa..e8def7f812 100644 // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 8d48495eb7..9cf6cc53f4 100644 +index 4187ba05bd..e7b8b2e992 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -981,7 +981,7 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/Spigot-Server-Patches/0405-Configurable-projectile-relative-velocity.patch b/Spigot-Server-Patches/0403-Configurable-projectile-relative-velocity.patch similarity index 97% rename from Spigot-Server-Patches/0405-Configurable-projectile-relative-velocity.patch rename to Spigot-Server-Patches/0403-Configurable-projectile-relative-velocity.patch index 1d811151f..8550a75de 100644 --- a/Spigot-Server-Patches/0405-Configurable-projectile-relative-velocity.patch +++ b/Spigot-Server-Patches/0403-Configurable-projectile-relative-velocity.patch @@ -1,4 +1,4 @@ -From d8c12019140334bf58354a929f9681fd457f6c66 Mon Sep 17 00:00:00 2001 +From d96a4efc6bb4e9f5337a315866a58004213d3c6b Mon Sep 17 00:00:00 2001 From: Lucavon Date: Tue, 23 Jul 2019 20:29:20 -0500 Subject: [PATCH] Configurable projectile relative velocity @@ -39,7 +39,7 @@ index ff520d9e86..318a470eea 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java -index af0f5cb00f..25ddaae482 100644 +index a9575d310b..5f3e1ccb4e 100644 --- a/src/main/java/net/minecraft/server/EntityArrow.java +++ b/src/main/java/net/minecraft/server/EntityArrow.java @@ -85,7 +85,7 @@ public abstract class EntityArrow extends Entity implements IProjectile { diff --git a/Spigot-Server-Patches/0406-Mark-entities-as-being-ticked-when-notifying-navigat.patch b/Spigot-Server-Patches/0404-Mark-entities-as-being-ticked-when-notifying-navigat.patch similarity index 90% rename from Spigot-Server-Patches/0406-Mark-entities-as-being-ticked-when-notifying-navigat.patch rename to Spigot-Server-Patches/0404-Mark-entities-as-being-ticked-when-notifying-navigat.patch index 1050ca400..70926cefc 100644 --- a/Spigot-Server-Patches/0406-Mark-entities-as-being-ticked-when-notifying-navigat.patch +++ b/Spigot-Server-Patches/0404-Mark-entities-as-being-ticked-when-notifying-navigat.patch @@ -1,11 +1,11 @@ -From e932d77aab4de7670f848d83f8e50e53eae4513a Mon Sep 17 00:00:00 2001 +From 57c0b62fe62dee94a1677e7882991f2f86b3536e Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 28 Jul 2019 00:51:11 +0100 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 7faa5dd84..451ad4f32 100644 +index 7faa5dd84a..451ad4f32b 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -1311,6 +1311,7 @@ public class WorldServer extends World { diff --git a/Spigot-Server-Patches/0407-offset-item-frame-ticking.patch b/Spigot-Server-Patches/0405-offset-item-frame-ticking.patch similarity index 88% rename from Spigot-Server-Patches/0407-offset-item-frame-ticking.patch rename to Spigot-Server-Patches/0405-offset-item-frame-ticking.patch index 23a3da2bf..4766f205d 100644 --- a/Spigot-Server-Patches/0407-offset-item-frame-ticking.patch +++ b/Spigot-Server-Patches/0405-offset-item-frame-ticking.patch @@ -1,11 +1,11 @@ -From 45d31e0fb763a4fdc9d96a959d88bff6877ccb50 Mon Sep 17 00:00:00 2001 +From 6571748607bac393655db682f7cb6621e8bac280 Mon Sep 17 00:00:00 2001 From: kickash32 Date: Tue, 30 Jul 2019 03:17:16 +0500 Subject: [PATCH] offset item frame ticking diff --git a/src/main/java/net/minecraft/server/EntityHanging.java b/src/main/java/net/minecraft/server/EntityHanging.java -index 3b282a18a..636a0bc4e 100644 +index 3b282a18a2..2b4a849f48 100644 --- a/src/main/java/net/minecraft/server/EntityHanging.java +++ b/src/main/java/net/minecraft/server/EntityHanging.java @@ -15,7 +15,7 @@ public abstract class EntityHanging extends Entity { diff --git a/Spigot-Server-Patches/0406-Preserve-old-flush-on-save-flag-for-reliable-regionf.patch b/Spigot-Server-Patches/0406-Preserve-old-flush-on-save-flag-for-reliable-regionf.patch new file mode 100644 index 000000000..8acc58656 --- /dev/null +++ b/Spigot-Server-Patches/0406-Preserve-old-flush-on-save-flag-for-reliable-regionf.patch @@ -0,0 +1,23 @@ +From 0739db695afc0dc5c7e9f6dbe6289075455cadee Mon Sep 17 00:00:00 2001 +From: Spottedleaf +Date: Mon, 5 Aug 2019 08:24:01 -0700 +Subject: [PATCH] Preserve old flush on save flag for reliable regionfiles + +Originally this patch was in paper + +diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java +index e6e412b7c1..b4c191d538 100644 +--- a/src/main/java/net/minecraft/server/RegionFile.java ++++ b/src/main/java/net/minecraft/server/RegionFile.java +@@ -349,7 +349,7 @@ public class RegionFile implements AutoCloseable { + } + + // Spigot start - Make region files reliable +- private static final boolean FLUSH_ON_SAVE = Boolean.getBoolean("spigot.flush-on-save"); ++ private static final boolean FLUSH_ON_SAVE = Boolean.getBoolean("spigot.flush-on-save") || Boolean.getBoolean("paper.flush-on-save"); // Paper - preserve old flag + private void syncRegionFile() throws IOException { + if (!FLUSH_ON_SAVE) { + return; +-- +2.22.0 + diff --git a/Spigot-Server-Patches/0406-fixup-Optimize-TileEntity-Ticking.patch b/Spigot-Server-Patches/0406-fixup-Optimize-TileEntity-Ticking.patch deleted file mode 100644 index 61ec419ef..000000000 --- a/Spigot-Server-Patches/0406-fixup-Optimize-TileEntity-Ticking.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 6f1992e5ac2e92994e9dae8a36bb25a9044bbcb2 Mon Sep 17 00:00:00 2001 -From: Spottedleaf -Date: Tue, 23 Jul 2019 21:11:30 -0700 -Subject: [PATCH] fixup! Optimize TileEntity Ticking - - -diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java -index 6c10f0eb89..4aa56e50e8 100644 ---- a/src/main/java/net/minecraft/server/TileEntityChest.java -+++ b/src/main/java/net/minecraft/server/TileEntityChest.java -@@ -114,7 +114,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic - int j = this.position.getY(); - int k = this.position.getZ(); - -- this.viewingCount = a(this.world, this, this.j, i, j, k, this.viewingCount); -+ //this.viewingCount = a(this.world, this, this.j, i, j, k, this.viewingCount); // Paper - check is faulty given our logic is called before active container set - this.b = this.a; - float f = 0.1F; - --- -2.22.0 - diff --git a/work/Bukkit b/work/Bukkit index 3d9d2efce..bde198c9e 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 3d9d2efcea61cf3dba713aa989ae7a362db68458 +Subproject commit bde198c9e927cc58b4773dc343825f15f7a8add6 diff --git a/work/CraftBukkit b/work/CraftBukkit index 3e7b3862c..1ec1b05e2 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 3e7b3862c7d1c718a47d1d5e54de8e3ea5845bbf +Subproject commit 1ec1b05e2a808326e9acbfcc3ffbdbdb4d4328c7 diff --git a/work/Spigot b/work/Spigot index 1981d553d..e5b1b5dbb 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 1981d553d1119cd80acb63db4d5612bc16179cb4 +Subproject commit e5b1b5dbb1c8546af20b21db92bd07a0029d4030