diff --git a/CraftBukkit-Patches/0001-Spigot-changes.patch b/CraftBukkit-Patches/0001-Spigot-changes.patch index 73db77496b..6f73be0ab4 100644 --- a/CraftBukkit-Patches/0001-Spigot-changes.patch +++ b/CraftBukkit-Patches/0001-Spigot-changes.patch @@ -1,6 +1,6 @@ -From 1f766e4a465e4eed65061fd7a908ea22e8c0d6fa Mon Sep 17 00:00:00 2001 +From 47c9f07d091d4669fd669569ee924ba083c19b21 Mon Sep 17 00:00:00 2001 From: md_5 -Date: Tue, 22 Jan 2013 15:56:54 +1100 +Date: Tue, 29 Jan 2013 16:51:35 +1100 Subject: [PATCH] Spigot changes. --- @@ -24,7 +24,6 @@ Subject: [PATCH] Spigot changes. .../java/net/minecraft/server/MinecraftServer.java | 51 +-- .../net/minecraft/server/PlayerConnection.java | 18 +- src/main/java/net/minecraft/server/PlayerList.java | 10 +- - .../java/net/minecraft/server/SpawnerCreature.java | 23 +- .../net/minecraft/server/ThreadLoginVerifier.java | 23 + src/main/java/net/minecraft/server/World.java | 200 ++++++++- .../java/net/minecraft/server/WorldServer.java | 122 +++++- @@ -44,7 +43,7 @@ Subject: [PATCH] Spigot changes. .../org/bukkit/craftbukkit/util/TimedThread.java | 37 ++ .../bukkit/craftbukkit/util/WatchdogThread.java | 88 ++++ src/main/resources/configurations/bukkit.yml | 30 ++ - 40 files changed, 1444 insertions(+), 137 deletions(-) + 39 files changed, 1424 insertions(+), 134 deletions(-) create mode 100644 src/main/java/org/bukkit/craftbukkit/Spigot.java create mode 100644 src/main/java/org/bukkit/craftbukkit/command/RestartCommand.java create mode 100644 src/main/java/org/bukkit/craftbukkit/command/TicksPerSecondCommand.java @@ -613,72 +612,6 @@ index f669a00..dee6579 100644 } } -diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 9b3e262..61721c4 100644 ---- a/src/main/java/net/minecraft/server/SpawnerCreature.java -+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java -@@ -16,6 +16,7 @@ public final class SpawnerCreature { - - private static LongObjectHashMap b = new LongObjectHashMap(); // CraftBukkit - HashMap -> LongObjectHashMap - protected static final Class[] a = new Class[] { EntitySpider.class, EntityZombie.class, EntitySkeleton.class}; -+ private static byte spawnRadius = 0; // Spigot - - protected static ChunkPosition getRandomPosition(World world, int i, int j) { - Chunk chunk = world.getChunkAt(i, j); -@@ -34,13 +35,21 @@ public final class SpawnerCreature { - - int i; - int j; -+ // Spigot start - limit radius to spawn distance (chunks aren't loaded) -+ if (spawnRadius == 0) { -+ spawnRadius = (byte) worldserver.getServer().getViewDistance(); -+ if (spawnRadius > 8) { -+ spawnRadius = 8; -+ } -+ } -+ // Spigot end - - for (i = 0; i < worldserver.players.size(); ++i) { - EntityHuman entityhuman = (EntityHuman) worldserver.players.get(i); - int k = MathHelper.floor(entityhuman.locX / 16.0D); - - j = MathHelper.floor(entityhuman.locZ / 16.0D); -- byte b0 = 8; -+ byte b0 = spawnRadius; // Spigot - replace 8 with view distance constrained value - - for (int l = -b0; l <= b0; ++l) { - for (int i1 = -b0; i1 <= b0; ++i1) { -@@ -88,13 +97,15 @@ public final class SpawnerCreature { - if (limit == 0) { - continue; - } -+ int mobcnt = 0; - // CraftBukkit end - -- if ((!enumcreaturetype.d() || flag1) && (enumcreaturetype.d() || flag) && (!enumcreaturetype.e() || flag2) && worldserver.a(enumcreaturetype.a()) <= limit * b.size() / 256) { // CraftBukkit - use per-world limits -+ if ((!enumcreaturetype.d() || flag1) && (enumcreaturetype.d() || flag) && (!enumcreaturetype.e() || flag2) && (mobcnt = worldserver.a(enumcreaturetype.a())) <= limit * b.size() / 256) { // CraftBukkit - use per-world limits - Iterator iterator = b.keySet().iterator(); - -+ int moblimit = (limit * b.size() / 256) - mobcnt + 1; // CraftBukkit - up to 1 more than limit - label110: -- while (iterator.hasNext()) { -+ while (iterator.hasNext() && (moblimit > 0)) { // Spigot - while more allowed - // CraftBukkit start - long key = ((Long) iterator.next()).longValue(); - -@@ -158,6 +169,12 @@ public final class SpawnerCreature { - a(entityliving, worldserver, f, f1, f2); - worldserver.addEntity(entityliving, SpawnReason.NATURAL); - // CraftBukkit end -+ // Spigot start -+ moblimit--; -+ if (moblimit <= 0) { // If we're past limit, stop spawn -+ continue label110; -+ } -+ // Spigot end - if (j2 >= entityliving.bv()) { - continue label110; - } diff --git a/src/main/java/net/minecraft/server/ThreadLoginVerifier.java b/src/main/java/net/minecraft/server/ThreadLoginVerifier.java index 0686ba0..58d30eb 100644 --- a/src/main/java/net/minecraft/server/ThreadLoginVerifier.java diff --git a/CraftBukkit-Patches/0012-Add-OldChunkLoader-from-mc-dev-for-diff-visibility.patch b/CraftBukkit-Patches/0011-Add-OldChunkLoader-from-mc-dev-for-diff-visibility.patch similarity index 98% rename from CraftBukkit-Patches/0012-Add-OldChunkLoader-from-mc-dev-for-diff-visibility.patch rename to CraftBukkit-Patches/0011-Add-OldChunkLoader-from-mc-dev-for-diff-visibility.patch index ef16b570b5..c114d21bd6 100644 --- a/CraftBukkit-Patches/0012-Add-OldChunkLoader-from-mc-dev-for-diff-visibility.patch +++ b/CraftBukkit-Patches/0011-Add-OldChunkLoader-from-mc-dev-for-diff-visibility.patch @@ -1,4 +1,4 @@ -From 929f3cb5c059f90180b7a3a71fb2079c99baa133 Mon Sep 17 00:00:00 2001 +From c88bb483e5104872c4492f006b107625f9c91939 Mon Sep 17 00:00:00 2001 From: Agaricus Date: Sun, 13 Jan 2013 03:41:38 -0800 Subject: [PATCH] Add OldChunkLoader from mc-dev for diff visibility diff --git a/CraftBukkit-Patches/0011-Fix-mob-spawn-radius-setting-so-that-its-actually-us.patch b/CraftBukkit-Patches/0011-Fix-mob-spawn-radius-setting-so-that-its-actually-us.patch deleted file mode 100644 index 5b7daafb02..0000000000 --- a/CraftBukkit-Patches/0011-Fix-mob-spawn-radius-setting-so-that-its-actually-us.patch +++ /dev/null @@ -1,28 +0,0 @@ -From c7e9f844a4bee1592da4705c09028546a546d426 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Fri, 11 Jan 2013 14:54:51 -0500 -Subject: [PATCH] Fix mob-spawn-radius setting so that its actually used... - ---- - src/main/java/net/minecraft/server/SpawnerCreature.java | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index 61721c4..124b143 100644 ---- a/src/main/java/net/minecraft/server/SpawnerCreature.java -+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java -@@ -37,7 +37,10 @@ public final class SpawnerCreature { - int j; - // Spigot start - limit radius to spawn distance (chunks aren't loaded) - if (spawnRadius == 0) { -- spawnRadius = (byte) worldserver.getServer().getViewDistance(); -+ spawnRadius = (byte) worldserver.getWorld().mobSpawnRange; -+ if (spawnRadius > (byte) worldserver.getServer().getViewDistance()) { -+ spawnRadius = (byte) worldserver.getServer().getViewDistance(); -+ } - if (spawnRadius > 8) { - spawnRadius = 8; - } --- -1.8.1-rc2 - diff --git a/CraftBukkit-Patches/0013-Fix-mcRegion-to-Anvil-conversion.patch b/CraftBukkit-Patches/0012-Fix-mcRegion-to-Anvil-conversion.patch similarity index 95% rename from CraftBukkit-Patches/0013-Fix-mcRegion-to-Anvil-conversion.patch rename to CraftBukkit-Patches/0012-Fix-mcRegion-to-Anvil-conversion.patch index ec1e814e53..6176319f29 100644 --- a/CraftBukkit-Patches/0013-Fix-mcRegion-to-Anvil-conversion.patch +++ b/CraftBukkit-Patches/0012-Fix-mcRegion-to-Anvil-conversion.patch @@ -1,4 +1,4 @@ -From 2de29f11f996690e92c275f9fcd0eabcb84972bf Mon Sep 17 00:00:00 2001 +From 6d940cd4bc4a1b7ba8e918f25711e916274adb4d Mon Sep 17 00:00:00 2001 From: Agaricus Date: Sun, 13 Jan 2013 03:49:07 -0800 Subject: [PATCH] Fix mcRegion-to-Anvil conversion diff --git a/CraftBukkit-Patches/0014-Update-pom-with-Spigot-specific-info.patch b/CraftBukkit-Patches/0013-Update-pom-with-Spigot-specific-info.patch similarity index 97% rename from CraftBukkit-Patches/0014-Update-pom-with-Spigot-specific-info.patch rename to CraftBukkit-Patches/0013-Update-pom-with-Spigot-specific-info.patch index 9db20307e6..60b36b8cb2 100644 --- a/CraftBukkit-Patches/0014-Update-pom-with-Spigot-specific-info.patch +++ b/CraftBukkit-Patches/0013-Update-pom-with-Spigot-specific-info.patch @@ -1,4 +1,4 @@ -From 820fbd7ead50871bf254add75d4e8cd68d9a40a5 Mon Sep 17 00:00:00 2001 +From 85c87e793adf22f192b06945bdb404e2bc51c5b0 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 15 Jan 2013 11:48:54 +1100 Subject: [PATCH] Update pom with Spigot specific info. diff --git a/CraftBukkit-Patches/0015-Update-versioning-check-to-correctly-resolve-api-ver.patch b/CraftBukkit-Patches/0014-Update-versioning-check-to-correctly-resolve-api-ver.patch similarity index 94% rename from CraftBukkit-Patches/0015-Update-versioning-check-to-correctly-resolve-api-ver.patch rename to CraftBukkit-Patches/0014-Update-versioning-check-to-correctly-resolve-api-ver.patch index 5362a2cfa1..14e450dc88 100644 --- a/CraftBukkit-Patches/0015-Update-versioning-check-to-correctly-resolve-api-ver.patch +++ b/CraftBukkit-Patches/0014-Update-versioning-check-to-correctly-resolve-api-ver.patch @@ -1,4 +1,4 @@ -From f3facbff6ce361fb4ab59d3814ce384f8b2a636b Mon Sep 17 00:00:00 2001 +From eb2fad1de55d855c05ec5c64610ddaa1f050951d Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 15 Jan 2013 15:05:02 +1100 Subject: [PATCH] Update versioning check to correctly resolve api version. diff --git a/CraftBukkit-Patches/0016-Optimize-packet-used-to-unload-chunks-for-the-client.patch b/CraftBukkit-Patches/0015-Optimize-packet-used-to-unload-chunks-for-the-client.patch similarity index 97% rename from CraftBukkit-Patches/0016-Optimize-packet-used-to-unload-chunks-for-the-client.patch rename to CraftBukkit-Patches/0015-Optimize-packet-used-to-unload-chunks-for-the-client.patch index 44ef163fd6..a0a5aa1c88 100644 --- a/CraftBukkit-Patches/0016-Optimize-packet-used-to-unload-chunks-for-the-client.patch +++ b/CraftBukkit-Patches/0015-Optimize-packet-used-to-unload-chunks-for-the-client.patch @@ -1,4 +1,4 @@ -From 665d2d79c486bf4d8ee4efe98ef0810f96b43c8c Mon Sep 17 00:00:00 2001 +From 2c5bbb8b0dca630b5035d88335f810d39d065eb6 Mon Sep 17 00:00:00 2001 From: Ammar Askar Date: Fri, 18 Jan 2013 16:20:01 +0500 Subject: [PATCH] Optimize packet used to unload chunks for the client diff --git a/CraftBukkit-Patches/0017-Skip-entity.move-if-we-are-not-moving-anywhere.patch b/CraftBukkit-Patches/0016-Skip-entity.move-if-we-are-not-moving-anywhere.patch similarity index 89% rename from CraftBukkit-Patches/0017-Skip-entity.move-if-we-are-not-moving-anywhere.patch rename to CraftBukkit-Patches/0016-Skip-entity.move-if-we-are-not-moving-anywhere.patch index bb1d87f25a..a99dbd4e6b 100644 --- a/CraftBukkit-Patches/0017-Skip-entity.move-if-we-are-not-moving-anywhere.patch +++ b/CraftBukkit-Patches/0016-Skip-entity.move-if-we-are-not-moving-anywhere.patch @@ -1,4 +1,4 @@ -From f783c54e66aff8a835da46d1849af4d2157e8818 Mon Sep 17 00:00:00 2001 +From 824fbe25325c37bae8a2667d7344b922bc73d086 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 19 Jan 2013 01:11:30 -0500 Subject: [PATCH] Skip entity.move() if we are not moving anywhere. @@ -8,7 +8,7 @@ Subject: [PATCH] Skip entity.move() if we are not moving anywhere. 1 file changed, 1 insertion(+) diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index e1d611e..83f7ae8 100644 +index dffa97f..066143c 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -423,6 +423,7 @@ public abstract class Entity { diff --git a/CraftBukkit-Patches/0018-Alternate-sync-free-but-safe-chunk-reference-cache.patch b/CraftBukkit-Patches/0017-Alternate-sync-free-but-safe-chunk-reference-cache.patch similarity index 95% rename from CraftBukkit-Patches/0018-Alternate-sync-free-but-safe-chunk-reference-cache.patch rename to CraftBukkit-Patches/0017-Alternate-sync-free-but-safe-chunk-reference-cache.patch index 73d36b51be..f54b7c5051 100644 --- a/CraftBukkit-Patches/0018-Alternate-sync-free-but-safe-chunk-reference-cache.patch +++ b/CraftBukkit-Patches/0017-Alternate-sync-free-but-safe-chunk-reference-cache.patch @@ -1,4 +1,4 @@ -From 3b1fe146746b93011b0a7bab56281160f6461cd1 Mon Sep 17 00:00:00 2001 +From 3db9355f95b3286195da752818eed63e3312ec0c Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Wed, 16 Jan 2013 15:27:22 -0600 Subject: [PATCH] Alternate, sync-free-but-safe chunk reference cache diff --git a/CraftBukkit-Patches/0019-Add-Custom-Timings-to-various-points.patch b/CraftBukkit-Patches/0018-Add-Custom-Timings-to-various-points.patch similarity index 99% rename from CraftBukkit-Patches/0019-Add-Custom-Timings-to-various-points.patch rename to CraftBukkit-Patches/0018-Add-Custom-Timings-to-various-points.patch index 29dbe3c543..d7ff4bb783 100644 --- a/CraftBukkit-Patches/0019-Add-Custom-Timings-to-various-points.patch +++ b/CraftBukkit-Patches/0018-Add-Custom-Timings-to-various-points.patch @@ -1,4 +1,4 @@ -From 8de0c8dfd462f4023fb85beb91afe4cf33d7ab30 Mon Sep 17 00:00:00 2001 +From 944da35dce1c28a62ac3b019ae791d2ce20b6648 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 10 Jan 2013 00:18:11 -0500 Subject: [PATCH] Add Custom Timings to various points diff --git a/CraftBukkit-Patches/0020-Better-more-flexible-itemstack-merging.patch b/CraftBukkit-Patches/0019-Better-more-flexible-itemstack-merging.patch similarity index 98% rename from CraftBukkit-Patches/0020-Better-more-flexible-itemstack-merging.patch rename to CraftBukkit-Patches/0019-Better-more-flexible-itemstack-merging.patch index 18be194e60..07b134091a 100644 --- a/CraftBukkit-Patches/0020-Better-more-flexible-itemstack-merging.patch +++ b/CraftBukkit-Patches/0019-Better-more-flexible-itemstack-merging.patch @@ -1,4 +1,4 @@ -From 36b9793a096db8f3a5f726b8792ddd1315a88081 Mon Sep 17 00:00:00 2001 +From 1bb40d4b3fc5159e7c8e07b826d2f2009bbcf4d8 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 25 Jan 2013 18:24:54 +1100 Subject: [PATCH] Better + more flexible itemstack merging diff --git a/CraftBukkit-Patches/0021-Add-oreobfuscator-for-Spigot.patch b/CraftBukkit-Patches/0020-Add-oreobfuscator-for-Spigot.patch similarity index 99% rename from CraftBukkit-Patches/0021-Add-oreobfuscator-for-Spigot.patch rename to CraftBukkit-Patches/0020-Add-oreobfuscator-for-Spigot.patch index 27967e6a2c..eecaf45846 100644 --- a/CraftBukkit-Patches/0021-Add-oreobfuscator-for-Spigot.patch +++ b/CraftBukkit-Patches/0020-Add-oreobfuscator-for-Spigot.patch @@ -1,4 +1,4 @@ -From 79ce6e3a28a745cd7a16498149dc6b66204b211a Mon Sep 17 00:00:00 2001 +From 116b25dc302af3d7059ee7fc101a570d19362a5f Mon Sep 17 00:00:00 2001 From: lishid Date: Mon, 21 Jan 2013 16:59:04 +1100 Subject: [PATCH] Add oreobfuscator for Spigot. diff --git a/CraftBukkit-Patches/0022-Reduce-number-of-LivingEntity-collision-checks.patch b/CraftBukkit-Patches/0021-Reduce-number-of-LivingEntity-collision-checks.patch similarity index 95% rename from CraftBukkit-Patches/0022-Reduce-number-of-LivingEntity-collision-checks.patch rename to CraftBukkit-Patches/0021-Reduce-number-of-LivingEntity-collision-checks.patch index 97fe728823..ad3cdadac5 100644 --- a/CraftBukkit-Patches/0022-Reduce-number-of-LivingEntity-collision-checks.patch +++ b/CraftBukkit-Patches/0021-Reduce-number-of-LivingEntity-collision-checks.patch @@ -1,4 +1,4 @@ -From 21495bd89ab6753951d9ca3ac2532d94404ab53e Mon Sep 17 00:00:00 2001 +From f40330caff1f37825408461fed04b25c91a3a87b Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 18 Jan 2013 19:31:14 -0500 Subject: [PATCH] Reduce number of LivingEntity collision checks. diff --git a/CraftBukkit-Patches/0023-Track-Xray-timings.patch b/CraftBukkit-Patches/0022-Track-Xray-timings.patch similarity index 97% rename from CraftBukkit-Patches/0023-Track-Xray-timings.patch rename to CraftBukkit-Patches/0022-Track-Xray-timings.patch index d05fefa3b1..e593da6424 100644 --- a/CraftBukkit-Patches/0023-Track-Xray-timings.patch +++ b/CraftBukkit-Patches/0022-Track-Xray-timings.patch @@ -1,4 +1,4 @@ -From a92dd621c34cdca2b5c4ceb27ea92dec45129bba Mon Sep 17 00:00:00 2001 +From b9f3f54e97394c1e2ebeea5add889e9445d073dc Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 25 Jan 2013 13:15:42 +1100 Subject: [PATCH] Track Xray timings.