diff --git a/Bukkit b/Bukkit index 66daa8a96c..4a47cf3e83 160000 --- a/Bukkit +++ b/Bukkit @@ -1 +1 @@ -Subproject commit 66daa8a96c81c7c041215f02eae2f452ef512047 +Subproject commit 4a47cf3e83dce057525d4204549ee60d4ba59e66 diff --git a/Bukkit-Patches/0001-POM-Changes.patch b/Bukkit-Patches/0001-POM-Changes.patch index d0770aea7a..614a1b353a 100644 --- a/Bukkit-Patches/0001-POM-Changes.patch +++ b/Bukkit-Patches/0001-POM-Changes.patch @@ -1,11 +1,11 @@ -From 0ab1f6df9fbd63d6057dd0939c3e1b537297ee85 Mon Sep 17 00:00:00 2001 +From beab590a7013a5a335792c7dea8fc8569c304be5 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 2 Jun 2013 10:36:24 +1000 Subject: [PATCH] POM Changes diff --git a/pom.xml b/pom.xml -index 50f9bae..fb303e2 100644 +index a14b55e..b2f4efb 100644 --- a/pom.xml +++ b/pom.xml @@ -1,43 +1,23 @@ @@ -23,7 +23,7 @@ index 50f9bae..fb303e2 100644 + + org.spigotmc + spigot-api - 1.7.2-R0.4-SNAPSHOT + 1.7.5-R0.1-SNAPSHOT - Bukkit - http://www.bukkit.org + Spigot-API @@ -65,5 +65,5 @@ index 50f9bae..fb303e2 100644 -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/Bukkit-Patches/0002-Measure-Timings-Duration.patch b/Bukkit-Patches/0002-Measure-Timings-Duration.patch index fbbfa1a847..146e16e2c5 100644 --- a/Bukkit-Patches/0002-Measure-Timings-Duration.patch +++ b/Bukkit-Patches/0002-Measure-Timings-Duration.patch @@ -1,4 +1,4 @@ -From febc38ac8c7a2acfef1892d6aede6b8f3515bb11 Mon Sep 17 00:00:00 2001 +From 1f6a76a0f4b393f20dbca3ccfc8521fef61d9832 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 2 Jun 2013 10:42:57 +1000 Subject: [PATCH] Measure Timings Duration @@ -37,10 +37,10 @@ index 05cfcb0..c2874f1 100644 if (separate) sender.sendMessage("Names written to " + names.getPath()); } catch (IOException e) { diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -index 787dcfe..b870ecd 100644 +index d2fe422..1d51908 100644 --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -@@ -280,6 +280,7 @@ public final class SimplePluginManager implements PluginManager { +@@ -295,6 +295,7 @@ public final class SimplePluginManager implements PluginManager { } } @@ -49,5 +49,5 @@ index 787dcfe..b870ecd 100644 } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/Bukkit-Patches/0004-Enchanced-Timings.patch b/Bukkit-Patches/0004-Enchanced-Timings.patch index c4254f553b..e1e12b77ce 100644 --- a/Bukkit-Patches/0004-Enchanced-Timings.patch +++ b/Bukkit-Patches/0004-Enchanced-Timings.patch @@ -1,4 +1,4 @@ -From 1a874bc9cc0a9f5802e8b410ee6cf188794e4967 Mon Sep 17 00:00:00 2001 +From 10a9ecc0525f696d36f969090d5393b0c29c151d Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 2 Jun 2013 11:17:05 +1000 Subject: [PATCH] Enchanced Timings @@ -167,10 +167,10 @@ index e09234c..ab2c65e 100644 /** diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -index 57681dc..075695c 100644 +index b178c0d..a1639f8 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -@@ -323,7 +323,7 @@ public final class JavaPluginLoader implements PluginLoader { +@@ -297,7 +297,7 @@ public final class JavaPluginLoader implements PluginLoader { } } }; @@ -373,5 +373,5 @@ index b206b1f..01b62fb 100644 Listener listener = new Listener() {}; EventExecutor executor = new EventExecutor() { -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit b/CraftBukkit index 85f5776df2..cd49afd547 160000 --- a/CraftBukkit +++ b/CraftBukkit @@ -1 +1 @@ -Subproject commit 85f5776df2a9c827565e799f150ae8a197086a98 +Subproject commit cd49afd5475ad7723e77311b6de99eb3037b22db diff --git a/CraftBukkit-Patches/0001-POM-Changes.patch b/CraftBukkit-Patches/0001-POM-Changes.patch index 92d7784db3..67e632385d 100644 --- a/CraftBukkit-Patches/0001-POM-Changes.patch +++ b/CraftBukkit-Patches/0001-POM-Changes.patch @@ -1,11 +1,11 @@ -From 068c237f30a7efb3a384d5f9d74de9f11066d9b7 Mon Sep 17 00:00:00 2001 +From 4448339ef7ba6e331100c7f58a95e427f14f32ef Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 2 Jul 2013 13:07:39 +1000 Subject: [PATCH] POM Changes diff --git a/pom.xml b/pom.xml -index b9bbeef..a3e555c 100644 +index 9f81af0..c8285e0 100644 --- a/pom.xml +++ b/pom.xml @@ -1,12 +1,20 @@ @@ -25,7 +25,7 @@ index b9bbeef..a3e555c 100644 + org.spigotmc + spigot jar - 1.7.2-R0.4-SNAPSHOT + 1.7.5-R0.1-SNAPSHOT - CraftBukkit - http://www.bukkit.org + Spigot @@ -142,10 +142,10 @@ index b9bbeef..a3e555c 100644 package diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index e6c8575..e33af61 100644 +index 04f8a69..7aedef4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -303,7 +303,7 @@ public final class CraftServer implements Server { +@@ -304,7 +304,7 @@ public final class CraftServer implements Server { loadIcon(); updater = new AutoUpdater(new BukkitDLUpdaterService(configuration.getString("auto-updater.host")), getLogger(), configuration.getString("auto-updater.preferred-channel")); @@ -168,5 +168,5 @@ index f905d17..9304637 100644 if (stream != null) { -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0002-mc-dev-imports.patch b/CraftBukkit-Patches/0002-mc-dev-imports.patch index 0ec142da4c..327d30b744 100644 --- a/CraftBukkit-Patches/0002-mc-dev-imports.patch +++ b/CraftBukkit-Patches/0002-mc-dev-imports.patch @@ -1,4 +1,4 @@ -From a7f103fcbb778d58ff85a1897bfa9ea3f1b01405 Mon Sep 17 00:00:00 2001 +From 796630458aee1aab9b870fece5ead790d7f0274b Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 1 Dec 2013 15:10:48 +1100 Subject: [PATCH] mc-dev imports @@ -491,10 +491,10 @@ index 0000000..3287d77 +} diff --git a/src/main/java/net/minecraft/server/BlockFlowerPot.java b/src/main/java/net/minecraft/server/BlockFlowerPot.java new file mode 100644 -index 0000000..ef909f7 +index 0000000..ca6f4f0 --- /dev/null +++ b/src/main/java/net/minecraft/server/BlockFlowerPot.java -@@ -0,0 +1,195 @@ +@@ -0,0 +1,186 @@ +package net.minecraft.server; + +import java.util.Random; @@ -529,12 +529,12 @@ index 0000000..ef909f7 + ItemStack itemstack = entityhuman.inventory.getItemInHand(); + + if (itemstack != null && itemstack.getItem() instanceof ItemBlock) { -+ if (world.getData(i, j, k) != 0) { -+ return false; -+ } else { -+ TileEntityFlowerPot tileentityflowerpot = this.e(world, i, j, k); ++ TileEntityFlowerPot tileentityflowerpot = this.e(world, i, j, k); + -+ if (tileentityflowerpot != null) { ++ if (tileentityflowerpot != null) { ++ if (tileentityflowerpot.a() != null) { ++ return false; ++ } else { + Block block = Block.a(itemstack.getItem()); + + if (!this.a(block, itemstack.getData())) { @@ -552,9 +552,9 @@ index 0000000..ef909f7 + + return true; + } -+ } else { -+ return false; + } ++ } else { ++ return false; + } + } else { + return false; @@ -582,15 +582,6 @@ index 0000000..ef909f7 + } + } + -+ public void dropNaturally(World world, int i, int j, int k, int l, float f, int i1) { -+ super.dropNaturally(world, i, j, k, l, f, i1); -+ TileEntityFlowerPot tileentityflowerpot = this.e(world, i, j, k); -+ -+ if (tileentityflowerpot != null && tileentityflowerpot.a() != null) { -+ this.a(world, i, j, k, new ItemStack(tileentityflowerpot.a(), 1, tileentityflowerpot.b())); -+ } -+ } -+ + public void remove(World world, int i, int j, int k, Block block, int l) { + TileEntityFlowerPot tileentityflowerpot = this.e(world, i, j, k); + @@ -692,7 +683,7 @@ index 0000000..ef909f7 +} diff --git a/src/main/java/net/minecraft/server/BlockTNT.java b/src/main/java/net/minecraft/server/BlockTNT.java new file mode 100644 -index 0000000..6d5090b +index 0000000..e943676 --- /dev/null +++ b/src/main/java/net/minecraft/server/BlockTNT.java @@ -0,0 +1,80 @@ @@ -751,10 +742,10 @@ index 0000000..6d5090b + } + + public boolean interact(World world, int i, int j, int k, EntityHuman entityhuman, int l, float f, float f1, float f2) { -+ if (entityhuman.bD() != null && entityhuman.bD().getItem() == Items.FLINT_AND_STEEL) { ++ if (entityhuman.bE() != null && entityhuman.bE().getItem() == Items.FLINT_AND_STEEL) { + this.a(world, i, j, k, 1, entityhuman); + world.setAir(i, j, k); -+ entityhuman.bD().damage(1, entityhuman); ++ entityhuman.bE().damage(1, entityhuman); + return true; + } else { + return super.interact(world, i, j, k, entityhuman, l, f, f1, f2); @@ -778,10 +769,10 @@ index 0000000..6d5090b +} diff --git a/src/main/java/net/minecraft/server/CommandDispatcher.java b/src/main/java/net/minecraft/server/CommandDispatcher.java new file mode 100644 -index 0000000..e63f17c +index 0000000..4c21643 --- /dev/null +++ b/src/main/java/net/minecraft/server/CommandDispatcher.java -@@ -0,0 +1,93 @@ +@@ -0,0 +1,94 @@ +package net.minecraft.server; + +import java.util.Iterator; @@ -820,7 +811,7 @@ index 0000000..e63f17c + this.a(new CommandSetBlock()); + this.a(new CommandTestForBlock()); + this.a(new CommandTellRaw()); -+ if (MinecraftServer.getServer().V()) { ++ if (MinecraftServer.getServer().W()) { + this.a(new CommandOp()); + this.a(new CommandDeop()); + this.a(new CommandStop()); @@ -836,6 +827,7 @@ index 0000000..e63f17c + this.a(new CommandList()); + this.a(new CommandWhitelist()); + this.a(new CommandIdleTimeout()); ++ this.a(new CommandNetstat()); + } else { + this.a(new CommandPublish()); + } @@ -843,7 +835,7 @@ index 0000000..e63f17c + CommandAbstract.a((ICommandDispatcher) this); + } + -+ public void a(ICommandListener icommandlistener, int i, String s, Object... aobject) { ++ public void a(ICommandListener icommandlistener, ICommand icommand, int i, String s, Object... aobject) { + boolean flag = true; + + if (icommandlistener instanceof CommandBlockListenerAbstract && !MinecraftServer.getServer().worldServer[0].getGameRules().getBoolean("commandBlockOutput")) { @@ -852,15 +844,15 @@ index 0000000..e63f17c + + ChatMessage chatmessage = new ChatMessage("chat.type.admin", new Object[] { icommandlistener.getName(), new ChatMessage(s, aobject)}); + -+ chatmessage.b().setColor(EnumChatFormat.GRAY); -+ chatmessage.b().setItalic(Boolean.valueOf(true)); ++ chatmessage.getChatModifier().setColor(EnumChatFormat.GRAY); ++ chatmessage.getChatModifier().setItalic(Boolean.valueOf(true)); + if (flag) { + Iterator iterator = MinecraftServer.getServer().getPlayerList().players.iterator(); + + while (iterator.hasNext()) { + EntityPlayer entityplayer = (EntityPlayer) iterator.next(); + -+ if (entityplayer != icommandlistener && MinecraftServer.getServer().getPlayerList().isOp(entityplayer.getName())) { ++ if (entityplayer != icommandlistener && MinecraftServer.getServer().getPlayerList().isOp(entityplayer.getName()) && icommand.canUse(entityplayer) && (!(icommandlistener instanceof RemoteControlCommandListener) || MinecraftServer.getServer().m())) { + entityplayer.sendMessage(chatmessage); + } + } @@ -1971,7 +1963,7 @@ index 0000000..900ed68 +} diff --git a/src/main/java/net/minecraft/server/ServerConnection.java b/src/main/java/net/minecraft/server/ServerConnection.java new file mode 100644 -index 0000000..3691094 +index 0000000..c2194af --- /dev/null +++ b/src/main/java/net/minecraft/server/ServerConnection.java @@ -0,0 +1,102 @@ @@ -2035,7 +2027,7 @@ index 0000000..3691094 + while (iterator.hasNext()) { + NetworkManager networkmanager = (NetworkManager) iterator.next(); + -+ if (!networkmanager.d()) { ++ if (!networkmanager.isConnected()) { + iterator.remove(); + if (networkmanager.f() != null) { + networkmanager.getPacketListener().a(networkmanager.f()); @@ -2079,7 +2071,7 @@ index 0000000..3691094 +} diff --git a/src/main/java/net/minecraft/server/ServerConnectionChannel.java b/src/main/java/net/minecraft/server/ServerConnectionChannel.java new file mode 100644 -index 0000000..fb95be4 +index 0000000..d7d93a0 --- /dev/null +++ b/src/main/java/net/minecraft/server/ServerConnectionChannel.java @@ -0,0 +1,37 @@ @@ -2112,7 +2104,7 @@ index 0000000..fb95be4 + ; + } + -+ channel.pipeline().addLast("timeout", new ReadTimeoutHandler(30)).addLast("legacy_query", new LegacyPingHandler(this.a)).addLast("splitter", new PacketSplitter()).addLast("decoder", new PacketDecoder()).addLast("prepender", new PacketPrepender()).addLast("encoder", new PacketEncoder()); ++ channel.pipeline().addLast("timeout", new ReadTimeoutHandler(30)).addLast("legacy_query", new LegacyPingHandler(this.a)).addLast("splitter", new PacketSplitter()).addLast("decoder", new PacketDecoder(NetworkManager.h)).addLast("prepender", new PacketPrepender()).addLast("encoder", new PacketEncoder(NetworkManager.h)); + NetworkManager networkmanager = new NetworkManager(false); + + ServerConnection.a(this.a).add(networkmanager); @@ -2122,10 +2114,10 @@ index 0000000..fb95be4 +} diff --git a/src/main/java/net/minecraft/server/ServerStatisticManager.java b/src/main/java/net/minecraft/server/ServerStatisticManager.java new file mode 100644 -index 0000000..2f980cb +index 0000000..0becb94 --- /dev/null +++ b/src/main/java/net/minecraft/server/ServerStatisticManager.java -@@ -0,0 +1,201 @@ +@@ -0,0 +1,202 @@ +package net.minecraft.server; + +import java.io.File; @@ -2183,14 +2175,14 @@ index 0000000..2f980cb + } + } + -+ public void a(EntityHuman entityhuman, Statistic statistic, int i) { -+ int j = statistic.d() ? this.a(statistic) : 0; ++ public void setStatistic(EntityHuman entityhuman, Statistic statistic, int i) { ++ int j = statistic.d() ? this.getStatisticValue(statistic) : 0; + -+ super.a(entityhuman, statistic, i); ++ super.setStatistic(entityhuman, statistic, i); + this.e.add(statistic); + if (statistic.d() && j == 0 && i > 0) { + this.g = true; -+ if (this.c.ar()) { ++ if (this.c.as()) { + this.c.getPlayerList().sendMessage(new ChatMessage("chat.type.achievement", new Object[] { entityhuman.getScoreboardDisplayName(), statistic.j()})); + } + } @@ -2216,7 +2208,7 @@ index 0000000..2f980cb + + while (iterator.hasNext()) { + Entry entry = (Entry) iterator.next(); -+ Statistic statistic = StatisticList.a((String) entry.getKey()); ++ Statistic statistic = StatisticList.getStatistic((String) entry.getKey()); + + if (statistic != null) { + StatisticWrapper statisticwrapper = new StatisticWrapper(); @@ -2235,6 +2227,7 @@ index 0000000..2f980cb + Constructor constructor = statistic.l().getConstructor(new Class[0]); + IJsonStatistic ijsonstatistic = (IJsonStatistic) constructor.newInstance(new Object[0]); + ++ ijsonstatistic.a(jsonobject1.get("progress")); + statisticwrapper.a(ijsonstatistic); + } catch (Throwable throwable) { + b.warn("Invalid statistic progress in " + this.d, throwable); @@ -2270,9 +2263,9 @@ index 0000000..2f980cb + b.warn("Couldn\'t save statistic " + ((Statistic) entry.getKey()).e() + ": error serializing progress", throwable); + } + -+ jsonobject.add(((Statistic) entry.getKey()).e, jsonobject1); ++ jsonobject.add(((Statistic) entry.getKey()).name, jsonobject1); + } else { -+ jsonobject.addProperty(((Statistic) entry.getKey()).e, Integer.valueOf(((StatisticWrapper) entry.getValue()).a())); ++ jsonobject.addProperty(((Statistic) entry.getKey()).name, Integer.valueOf(((StatisticWrapper) entry.getValue()).a())); + } + } + @@ -2290,7 +2283,7 @@ index 0000000..2f980cb + } + + public void a(EntityPlayer entityplayer) { -+ int i = this.c.aj(); ++ int i = this.c.ak(); + HashMap hashmap = Maps.newHashMap(); + + if (this.g || i - this.f > 300) { @@ -2300,14 +2293,14 @@ index 0000000..2f980cb + while (iterator.hasNext()) { + Statistic statistic = (Statistic) iterator.next(); + -+ hashmap.put(statistic, Integer.valueOf(this.a(statistic))); ++ hashmap.put(statistic, Integer.valueOf(this.getStatisticValue(statistic))); + } + } + + entityplayer.playerConnection.sendPacket(new PacketPlayOutStatistic(hashmap)); + } + -+ public void b(EntityPlayer entityplayer) { ++ public void updateStatistics(EntityPlayer entityplayer) { + HashMap hashmap = Maps.newHashMap(); + Iterator iterator = AchievementList.e.iterator(); + @@ -2315,7 +2308,7 @@ index 0000000..2f980cb + Achievement achievement = (Achievement) iterator.next(); + + if (this.a(achievement)) { -+ hashmap.put(achievement, Integer.valueOf(this.a((Statistic) achievement))); ++ hashmap.put(achievement, Integer.valueOf(this.getStatisticValue(achievement))); + this.e.remove(achievement); + } + } @@ -2329,10 +2322,10 @@ index 0000000..2f980cb +} diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java new file mode 100644 -index 0000000..1eb87ae +index 0000000..97308d0 --- /dev/null +++ b/src/main/java/net/minecraft/server/StructureGenerator.java -@@ -0,0 +1,217 @@ +@@ -0,0 +1,219 @@ +package net.minecraft.server; + +import java.util.HashMap; @@ -2533,7 +2526,9 @@ index 0000000..1eb87ae + int j = nbttagcompound1.getInt("ChunkZ"); + StructureStart structurestart = WorldGenFactory.a(nbttagcompound1, world); + -+ this.d.put(Long.valueOf(ChunkCoordIntPair.a(i, j)), structurestart); ++ if (structurestart != null) { ++ this.d.put(Long.valueOf(ChunkCoordIntPair.a(i, j)), structurestart); ++ } + } + } + } @@ -2708,5 +2703,5 @@ index 0000000..c0db754 + } +} -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0003-Skeleton-API-Implementations.patch b/CraftBukkit-Patches/0003-Skeleton-API-Implementations.patch index 6435dc2020..ebb8566baa 100644 --- a/CraftBukkit-Patches/0003-Skeleton-API-Implementations.patch +++ b/CraftBukkit-Patches/0003-Skeleton-API-Implementations.patch @@ -1,11 +1,11 @@ -From f0d4c7aafa4fd50151977532530e35b70a88d2fe Mon Sep 17 00:00:00 2001 +From 8bba02b152cd01cec04b8d95b96dbc3c357760ea Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 2 Jun 2013 15:10:56 +1000 Subject: [PATCH] Skeleton API Implementations diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 2c1fbb5..965d860 100644 +index a4ede34..d9fbd00 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -1280,4 +1280,14 @@ public class CraftWorld implements World { @@ -24,7 +24,7 @@ index 2c1fbb5..965d860 100644 + // Spigot end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java -index 4c319a7..328c73f 100644 +index 4f8d47d..09e7223 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java @@ -71,4 +71,15 @@ public class CraftArrow extends AbstractProjectile implements Arrow { @@ -64,12 +64,12 @@ index fe0f200..e026c1f 100644 + // Spigot end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 60b0435..573f9a5 100644 +index da574e0..b045cb9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1252,4 +1252,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } - collection.add(new AttributeModifiable(getHandle().bc(), (new AttributeRanged("generic.maxHealth", scaledHealth ? healthScale : getMaxHealth(), 0.0D, Float.MAX_VALUE)).a("Max Health").a(true))); + collection.add(new AttributeModifiable(getHandle().bb(), (new AttributeRanged("generic.maxHealth", scaledHealth ? healthScale : getMaxHealth(), 0.0D, Float.MAX_VALUE)).a("Max Health").a(true))); } + + // Spigot start @@ -84,5 +84,5 @@ index 60b0435..573f9a5 100644 + // Spigot end } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0004-Spigot-Configuration.patch b/CraftBukkit-Patches/0004-Spigot-Configuration.patch index e56a1fd119..4df8984249 100644 --- a/CraftBukkit-Patches/0004-Spigot-Configuration.patch +++ b/CraftBukkit-Patches/0004-Spigot-Configuration.patch @@ -1,15 +1,15 @@ -From e93ba24d7e89f1a942518b90ae962db720e0a48b Mon Sep 17 00:00:00 2001 +From 3424b3f7065054cdd942eb6ad56d86eab89e672a Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 7 Jul 2013 09:32:53 +1000 Subject: [PATCH] Spigot Configuration diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index 30ce5f4..c9bb3a6 100644 +index 1b05fbf..7946703 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -109,6 +109,11 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer - if (this.J() < 0) { + if (this.K() < 0) { this.setPort(this.propertyManager.getInt("server-port", 25565)); } + // Spigot start @@ -34,10 +34,10 @@ index 30ce5f4..c9bb3a6 100644 if (!this.getOnlineMode()) { h.warn("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!"); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 4a42bb4..5f12d2e 100644 +index 2f514b5..96a3eb8 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -107,6 +107,7 @@ public abstract class World implements IBlockAccess { +@@ -106,6 +106,7 @@ public abstract class World implements IBlockAccess { int lastXAccessed = Integer.MIN_VALUE; int lastZAccessed = Integer.MIN_VALUE; final Object chunkLock = new Object(); @@ -45,7 +45,7 @@ index 4a42bb4..5f12d2e 100644 public CraftWorld getWorld() { return this.world; -@@ -118,6 +119,7 @@ public abstract class World implements IBlockAccess { +@@ -117,6 +118,7 @@ public abstract class World implements IBlockAccess { // Changed signature - added gen and env public World(IDataManager idatamanager, String s, WorldSettings worldsettings, WorldProvider worldprovider, MethodProfiler methodprofiler, ChunkGenerator gen, org.bukkit.World.Environment env) { @@ -54,10 +54,10 @@ index 4a42bb4..5f12d2e 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 e33af61..4d46178 100644 +index 7aedef4..50a27fb 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -309,8 +309,10 @@ public final class CraftServer implements Server { +@@ -310,8 +310,10 @@ public final class CraftServer implements Server { updater.getOnUpdate().addAll(configuration.getStringList("auto-updater.on-update")); updater.check(serverVersion); @@ -70,7 +70,7 @@ index e33af61..4d46178 100644 } public boolean getCommandBlockOverride(String command) { -@@ -723,6 +725,7 @@ public final class CraftServer implements Server { +@@ -726,6 +728,7 @@ public final class CraftServer implements Server { playerList.getIPBans().load(); playerList.getNameBans().load(); @@ -78,7 +78,7 @@ index e33af61..4d46178 100644 for (WorldServer world : console.worlds) { world.difficulty = difficulty; world.setSpawnFlags(monsters, animals); -@@ -737,11 +740,14 @@ public final class CraftServer implements Server { +@@ -740,11 +743,14 @@ public final class CraftServer implements Server { } else { world.ticksPerMonsterSpawns = this.getTicksPerMonsterSpawns(); } @@ -297,5 +297,5 @@ index 0000000..961ddb4 + } +} -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0005-Better-Chunk-Tick-Selection.patch b/CraftBukkit-Patches/0005-Better-Chunk-Tick-Selection.patch index 7765f60130..f9c5fc1296 100644 --- a/CraftBukkit-Patches/0005-Better-Chunk-Tick-Selection.patch +++ b/CraftBukkit-Patches/0005-Better-Chunk-Tick-Selection.patch @@ -1,24 +1,24 @@ -From 7ef1e71a186d42b87ba3245cbf5199604594ebc7 Mon Sep 17 00:00:00 2001 +From 8fe65d8a9c999b2ebca1f63634de6a03d83d2f39 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 11 Jun 2013 12:56:02 +1000 Subject: [PATCH] Better Chunk Tick Selection diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 5f12d2e..069db6a 100644 +index 96a3eb8..9dc2d73 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -61,7 +61,7 @@ public abstract class World implements IBlockAccess { +@@ -60,7 +60,7 @@ public abstract class World implements IBlockAccess { public Scoreboard scoreboard = new Scoreboard(); // CraftBukkit - protected -> public public boolean isStatic; // CraftBukkit start - public, longhashset - protected LongHashSet chunkTickList = new LongHashSet(); + // protected LongHashSet chunkTickList = new LongHashSet(); // Spigot - private int L; + private int K; public boolean allowMonsters; public boolean allowAnimals; -@@ -76,6 +76,30 @@ public abstract class World implements IBlockAccess { - private boolean N; +@@ -75,6 +75,30 @@ public abstract class World implements IBlockAccess { + private boolean M; int[] I; + // Spigot start @@ -48,7 +48,7 @@ index 5f12d2e..069db6a 100644 public BiomeBase getBiome(int i, int j) { if (this.isLoaded(i, 0, j)) { Chunk chunk = this.getChunkAtWorldCoords(i, j); -@@ -125,6 +149,11 @@ public abstract class World implements IBlockAccess { +@@ -124,6 +148,11 @@ public abstract class World implements IBlockAccess { this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit this.ticksPerMonsterSpawns = this.getServer().getTicksPerMonsterSpawns(); // CraftBukkit // CraftBukkit end @@ -58,11 +58,11 @@ index 5f12d2e..069db6a 100644 + this.chunkTickList.setAutoCompactionFactor( 0 ); + // Spigot end - this.L = this.random.nextInt(12000); + this.K = this.random.nextInt(12000); this.allowMonsters = true; -@@ -1913,24 +1942,44 @@ public abstract class World implements IBlockAccess { - int j; +@@ -1914,24 +1943,44 @@ public abstract class World implements IBlockAccess { int k; + int l; + // Spigot start + int optimalChunks = spigotConfig.chunksPerTick; @@ -83,18 +83,18 @@ index 5f12d2e..069db6a 100644 entityhuman = (EntityHuman) this.players.get(i); j = MathHelper.floor(entityhuman.locX / 16.0D); k = MathHelper.floor(entityhuman.locZ / 16.0D); - byte b0 = 7; + l = this.p(); -- for (int l = -b0; l <= b0; ++l) { -- for (int i1 = -b0; i1 <= b0; ++i1) { +- for (int i1 = -l; i1 <= l; ++i1) { +- for (int j1 = -l; j1 <= l; ++j1) { - // CraftBukkit start - Don't tick chunks queued for unload - ChunkProviderServer chunkProviderServer = ((WorldServer) entityhuman.world).chunkProviderServer; -- if (chunkProviderServer.unloadQueue.contains(l + j, i1 + k)) { +- if (chunkProviderServer.unloadQueue.contains(i1 + j, j1 + k)) { - continue; - } - // CraftBukkit end - -- this.chunkTickList.add(org.bukkit.craftbukkit.util.LongHash.toLong(l + j, i1 + k)); // CraftBukkit +- this.chunkTickList.add(org.bukkit.craftbukkit.util.LongHash.toLong(i1 + j, j1 + k)); // CraftBukkit + // Spigot start - Always update the chunk the player is on + long key = chunkToKey( j, k ); + int existingPlayers = Math.max( 0, chunkTickList.get( key ) ); // filter out -1 @@ -116,7 +116,7 @@ index 5f12d2e..069db6a 100644 this.methodProfiler.b(); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index b9b967f..3a8856d 100644 +index 4e0861e..acb0be1 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -306,10 +306,20 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate @@ -185,5 +185,5 @@ index 961ddb4..90a227f 100644 + } } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0006-Crop-Growth-Rates.patch b/CraftBukkit-Patches/0006-Crop-Growth-Rates.patch index 99a2e510d0..adc762bcef 100644 --- a/CraftBukkit-Patches/0006-Crop-Growth-Rates.patch +++ b/CraftBukkit-Patches/0006-Crop-Growth-Rates.patch @@ -1,11 +1,11 @@ -From dea7b29300a40eb45392df388b7e7c2c49e098ce Mon Sep 17 00:00:00 2001 +From 8a5eb17b5a35a0b462a4538921f84c529fc5ae20 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 17:17:20 +1000 Subject: [PATCH] Crop Growth Rates diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index dca832f..ad4e3a2 100644 +index 14c00c5..51f8279 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java @@ -804,4 +804,16 @@ public class Block { @@ -26,7 +26,7 @@ index dca832f..ad4e3a2 100644 + // Spigot end } diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java -index 421af04..183fb43 100644 +index 57eb59d..6778cae 100644 --- a/src/main/java/net/minecraft/server/BlockCactus.java +++ b/src/main/java/net/minecraft/server/BlockCactus.java @@ -23,7 +23,7 @@ public class BlockCactus extends Block { @@ -55,10 +55,10 @@ index 942d6ab..c46879c 100644 } } diff --git a/src/main/java/net/minecraft/server/BlockGrass.java b/src/main/java/net/minecraft/server/BlockGrass.java -index 7b78579..bdf3172 100644 +index bf14bbb..638ff49 100644 --- a/src/main/java/net/minecraft/server/BlockGrass.java +++ b/src/main/java/net/minecraft/server/BlockGrass.java -@@ -37,7 +37,8 @@ public class BlockGrass extends Block implements IBlockFragilePlantElement { +@@ -38,7 +38,8 @@ public class BlockGrass extends Block implements IBlockFragilePlantElement { } // CraftBukkit end } else if (world.getLightLevel(i, j + 1, k) >= 9) { @@ -69,7 +69,7 @@ index 7b78579..bdf3172 100644 int j1 = j + random.nextInt(5) - 3; int k1 = k + random.nextInt(3) - 1; diff --git a/src/main/java/net/minecraft/server/BlockMushroom.java b/src/main/java/net/minecraft/server/BlockMushroom.java -index 54a399f..4cab3eb 100644 +index 75fe4c0..adb90b6 100644 --- a/src/main/java/net/minecraft/server/BlockMushroom.java +++ b/src/main/java/net/minecraft/server/BlockMushroom.java @@ -23,7 +23,7 @@ public class BlockMushroom extends BlockPlant implements IBlockFragilePlantEleme @@ -82,10 +82,10 @@ index 54a399f..4cab3eb 100644 int l = 5; diff --git a/src/main/java/net/minecraft/server/BlockMycel.java b/src/main/java/net/minecraft/server/BlockMycel.java -index 6ac6d94..a401f65 100644 +index a01a6e6..2854bbc 100644 --- a/src/main/java/net/minecraft/server/BlockMycel.java +++ b/src/main/java/net/minecraft/server/BlockMycel.java -@@ -32,7 +32,8 @@ public class BlockMycel extends Block { +@@ -33,7 +33,8 @@ public class BlockMycel extends Block { } // CraftBukkit end } else if (world.getLightLevel(i, j + 1, k) >= 9) { @@ -175,5 +175,5 @@ index 90a227f..7e79ba5 100644 + } } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0008-Merge-tweaks-and-configuration.patch b/CraftBukkit-Patches/0008-Merge-tweaks-and-configuration.patch index a7265553ba..d411d81623 100644 --- a/CraftBukkit-Patches/0008-Merge-tweaks-and-configuration.patch +++ b/CraftBukkit-Patches/0008-Merge-tweaks-and-configuration.patch @@ -1,4 +1,4 @@ -From d5dbd54e27e10e47e7efa1537a9e90d322d79762 Mon Sep 17 00:00:00 2001 +From 518136605c7088117a448666a234b09d6e40b60f Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Mar 2013 09:46:33 +1100 Subject: [PATCH] Merge tweaks and configuration @@ -6,7 +6,7 @@ Subject: [PATCH] Merge tweaks and configuration This allows the merging of Experience orbs, as well as the configuration of the merge radius of items. Additionally it refactors the merge algorithm to be a better experience for players. diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index bbcf674..08b9ac8 100644 +index 8343ac9..95beb11 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -117,7 +117,10 @@ public class EntityItem extends Entity { @@ -41,10 +41,10 @@ index bbcf674..08b9ac8 100644 } } else { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 069db6a..164d268 100644 +index 9dc2d73..d023889 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -934,6 +934,23 @@ public abstract class World implements IBlockAccess { +@@ -931,6 +931,23 @@ public abstract class World implements IBlockAccess { // Not all projectiles extend EntityProjectile, so check for Bukkit interface instead event = CraftEventFactory.callProjectileLaunchEvent(entity); } @@ -92,5 +92,5 @@ index 7e79ba5..1545a61 100644 + } } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0010-Async-Operation-Catching.patch b/CraftBukkit-Patches/0010-Async-Operation-Catching.patch index 056fd22851..4648867248 100644 --- a/CraftBukkit-Patches/0010-Async-Operation-Catching.patch +++ b/CraftBukkit-Patches/0010-Async-Operation-Catching.patch @@ -1,4 +1,4 @@ -From ac2e43846d8af2209154832a747057ea92c06360 Mon Sep 17 00:00:00 2001 +From ddf36039c168fa7bc9a3453246096353cf3bd7e8 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 7 Mar 2013 20:12:46 +1100 Subject: [PATCH] Async Operation Catching @@ -6,7 +6,7 @@ Subject: [PATCH] Async Operation Catching Catch and throw an exception when a potentially unsafe operation occurs on a thread other than the main server thread. diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index ad4e3a2..c063ca1 100644 +index 51f8279..cbd6f1d 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java @@ -433,9 +433,13 @@ public class Block { @@ -26,7 +26,7 @@ index ad4e3a2..c063ca1 100644 public int a(Random random) { return 1; diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java -index 7447e42..97d0bbb 100644 +index af440b9..b169df4 100644 --- a/src/main/java/net/minecraft/server/EntityTracker.java +++ b/src/main/java/net/minecraft/server/EntityTracker.java @@ -91,6 +91,7 @@ public class EntityTracker { @@ -46,7 +46,7 @@ index 7447e42..97d0bbb 100644 EntityPlayer entityplayer = (EntityPlayer) entity; Iterator iterator = this.c.iterator(); diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java -index 9f818cf..8052ea6 100644 +index c148c4d..cd52d7c 100644 --- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java +++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java @@ -299,6 +299,7 @@ public class EntityTrackerEntry { @@ -64,12 +64,12 @@ index 9f818cf..8052ea6 100644 + if (Thread.currentThread() != MinecraftServer.getServer().primaryThread) throw new IllegalStateException("Asynchronous player tracker clear!"); // Spigot if (this.trackedPlayers.contains(entityplayer)) { this.trackedPlayers.remove(entityplayer); - entityplayer.removeQueue.add(Integer.valueOf(this.tracker.getId())); + entityplayer.d(this.tracker); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 164d268..e26ba96 100644 +index d023889..1ed1e27 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -903,6 +903,7 @@ public abstract class World implements IBlockAccess { +@@ -900,6 +900,7 @@ public abstract class World implements IBlockAccess { } public boolean addEntity(Entity entity, SpawnReason spawnReason) { // Changed signature, added SpawnReason @@ -77,7 +77,7 @@ index 164d268..e26ba96 100644 if (entity == null) return false; // CraftBukkit end -@@ -1009,6 +1010,7 @@ public abstract class World implements IBlockAccess { +@@ -1006,6 +1007,7 @@ public abstract class World implements IBlockAccess { } public void removeEntity(Entity entity) { @@ -85,7 +85,7 @@ index 164d268..e26ba96 100644 entity.die(); if (entity instanceof EntityHuman) { this.players.remove(entity); -@@ -2388,6 +2390,7 @@ public abstract class World implements IBlockAccess { +@@ -2390,6 +2392,7 @@ public abstract class World implements IBlockAccess { } public void a(List list) { @@ -94,7 +94,7 @@ index 164d268..e26ba96 100644 // this.entityList.addAll(list); Entity entity = null; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 965d860..57dd4e7 100644 +index d9fbd00..89cc715 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -159,6 +159,7 @@ public class CraftWorld implements World { @@ -122,7 +122,7 @@ index 965d860..57dd4e7 100644 if (generate) { // Use the default variant of loadChunk when generate == true. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 573f9a5..bf3c9db 100644 +index b045cb9..07c8a2c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -231,6 +231,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -146,5 +146,5 @@ index 84091a4..2f30d66 100644 scoreboards.add(scoreboard); return scoreboard; -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0011-View-Distance.patch b/CraftBukkit-Patches/0011-View-Distance.patch index e32952b4b3..f84e2412b8 100644 --- a/CraftBukkit-Patches/0011-View-Distance.patch +++ b/CraftBukkit-Patches/0011-View-Distance.patch @@ -1,4 +1,4 @@ -From 6a58e4e8573a8e73b0e8e729aeefa77d45e40460 Mon Sep 17 00:00:00 2001 +From b91e5c3c9cede186bb62220412d219e11635edd3 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Mar 2013 09:52:41 +1100 Subject: [PATCH] View Distance @@ -6,27 +6,30 @@ Subject: [PATCH] View Distance This commit allows the user to select per world view distances, and view distances below 3. Be wary of the issues selecting a view distance of 1 or 2 may cause! diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 4e0398c..ae4ca63 100644 +index 90776db..cc1b095 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -24,7 +24,7 @@ public class PlayerChunkMap { - public PlayerChunkMap(WorldServer worldserver, int i) { - if (i > 15) { - throw new IllegalArgumentException("Too big view radius!"); -- } else if (i < 3) { -+ } else if (i < 1) { - throw new IllegalArgumentException("Too small view radius!"); - } else { - this.f = i; +@@ -26,9 +26,9 @@ public class PlayerChunkMap { + private final int[][] i = new int[][] { { 1, 0}, { 0, 1}, { -1, 0}, { 0, -1}}; + private boolean wasNotEmpty; // CraftBukkit - add field + +- public PlayerChunkMap(WorldServer worldserver) { ++ public PlayerChunkMap(WorldServer worldserver, int viewDistance /* Spigot */) { + this.world = worldserver; +- this.a(worldserver.getMinecraftServer().getPlayerList().o()); ++ this.a(viewDistance); // Spigot + } + + public WorldServer a() { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 3a8856d..a0e4ade 100644 +index acb0be1..0c24d9a 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -54,7 +54,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate // CraftBukkit end this.server = minecraftserver; this.tracker = new EntityTracker(this); -- this.manager = new PlayerChunkMap(this, minecraftserver.getPlayerList().o()); +- this.manager = new PlayerChunkMap(this); + this.manager = new PlayerChunkMap(this, spigotConfig.viewDistance); // Spigot if (this.entitiesById == null) { this.entitiesById = new IntHashMap(); @@ -48,5 +51,5 @@ index 1545a61..6cc3a91 100644 + } } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0013-Sync-Free-Chunk-Reference-Cache.patch b/CraftBukkit-Patches/0013-Sync-Free-Chunk-Reference-Cache.patch index 524fc10159..7d695ed3fb 100644 --- a/CraftBukkit-Patches/0013-Sync-Free-Chunk-Reference-Cache.patch +++ b/CraftBukkit-Patches/0013-Sync-Free-Chunk-Reference-Cache.patch @@ -1,14 +1,14 @@ -From 169447a7a0e925513abad8881724e627b6e0f4a1 Mon Sep 17 00:00:00 2001 +From e35b3899f68a3f8d2563a5c31d4d4370d57c0e54 Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Wed, 16 Jan 2013 15:27:22 -0600 Subject: [PATCH] Sync Free Chunk Reference Cache diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index e26ba96..3d7aa71 100644 +index 1ed1e27..d2679dc 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -292,20 +292,18 @@ public abstract class World implements IBlockAccess { +@@ -291,20 +291,18 @@ public abstract class World implements IBlockAccess { return this.getChunkAt(i >> 4, j >> 4); } @@ -38,5 +38,5 @@ index e26ba96..3d7aa71 100644 public boolean setTypeAndData(int i, int j, int k, Block block, int l, int i1) { if (i >= -30000000 && k >= -30000000 && i < 30000000 && k < 30000000) { -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0014-Improved-Timings-System.patch b/CraftBukkit-Patches/0014-Improved-Timings-System.patch index c2ff2056de..5f6b54c0b6 100644 --- a/CraftBukkit-Patches/0014-Improved-Timings-System.patch +++ b/CraftBukkit-Patches/0014-Improved-Timings-System.patch @@ -1,4 +1,4 @@ -From 83cc70ebbad10d6e03feab85177ce37e5dda3ff0 Mon Sep 17 00:00:00 2001 +From 27707ff83ec487195342dfbc2aef269f265be531 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 10 Jan 2013 00:18:11 -0500 Subject: [PATCH] Improved Timings System @@ -6,10 +6,10 @@ Subject: [PATCH] Improved Timings System Tracks nearly every point of minecraft internals and plugin events to give a good quick overview on what is causing TPS loss. diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index bf60f4e..9ccc057 100644 +index 5b3c821..7f19bec 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -124,6 +124,7 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -132,6 +132,7 @@ public class ChunkProviderServer implements IChunkProvider { boolean newChunk = false; if (chunk == null) { @@ -17,7 +17,7 @@ index bf60f4e..9ccc057 100644 chunk = this.loadChunk(i, j); if (chunk == null) { if (this.chunkProvider == null) { -@@ -159,6 +160,7 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -167,6 +168,7 @@ public class ChunkProviderServer implements IChunkProvider { } // CraftBukkit end chunk.a(this, this, i, j); @@ -26,7 +26,7 @@ index bf60f4e..9ccc057 100644 return chunk; diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index f74d937..ff07aa7 100644 +index 9d933cb..491ef6b 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -14,6 +14,7 @@ import org.bukkit.block.BlockFace; @@ -37,7 +37,7 @@ index f74d937..ff07aa7 100644 import org.bukkit.event.entity.EntityCombustByEntityEvent; import org.bukkit.event.painting.PaintingBreakByEntityEvent; import org.bukkit.event.vehicle.VehicleBlockCollisionEvent; -@@ -111,6 +112,8 @@ public abstract class Entity { +@@ -112,6 +113,8 @@ public abstract class Entity { public boolean valid; // CraftBukkit public org.bukkit.projectiles.ProjectileSource projectileSource; // CraftBukkit - For projectiles only @@ -46,36 +46,29 @@ index f74d937..ff07aa7 100644 public int getId() { return this.id; } -@@ -424,6 +427,8 @@ public abstract class Entity { +@@ -424,7 +427,8 @@ public abstract class Entity { + if (d0 == 0 && d1 == 0 && d2 == 0 && this.vehicle == null && this.passenger == null) { return; } - // CraftBukkit end -+ +- // CraftBukkit end ++ // CraftBukkit end + org.bukkit.craftbukkit.SpigotTimings.entityMoveTimer.startTiming(); // Spigot - if (this.Y) { + if (this.X) { this.boundingBox.d(d0, d1, d2); this.locX = (this.boundingBox.a + this.boundingBox.d) / 2.0D; -@@ -732,6 +737,7 @@ public abstract class Entity { +@@ -733,6 +737,7 @@ public abstract class Entity { this.world.methodProfiler.b(); } + org.bukkit.craftbukkit.SpigotTimings.entityMoveTimer.stopTiming(); // Spigot } - protected String H() { + protected String G() { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 6a01982..2519af6 100644 +index 6788c5d..8f61474 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -10,7 +10,6 @@ import java.util.ArrayList; - import java.util.Arrays; - import java.util.Collections; - import java.util.Date; --import java.util.Iterator; - import java.util.List; - import java.util.Random; - import java.util.UUID; -@@ -36,6 +35,7 @@ import jline.console.ConsoleReader; +@@ -36,6 +36,7 @@ import jline.console.ConsoleReader; import joptsimple.OptionSet; import org.bukkit.World.Environment; @@ -83,23 +76,23 @@ index 6a01982..2519af6 100644 import org.bukkit.craftbukkit.util.Waitable; import org.bukkit.event.server.RemoteServerCommandEvent; import org.bukkit.event.world.WorldSaveEvent; -@@ -531,6 +531,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo - protected void s() {} +@@ -535,6 +536,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo + protected void t() {} - protected void t() throws ExceptionWorldConflict { // CraftBukkit - added throws + protected void u() throws ExceptionWorldConflict { // CraftBukkit - added throws + SpigotTimings.serverTickTimer.startTiming(); // Spigot long i = System.nanoTime(); - AxisAlignedBB.a().a(); -@@ -583,6 +584,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo - public void u() { + ++this.ticks; +@@ -586,6 +588,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo + public void v() { this.methodProfiler.a("levels"); + SpigotTimings.schedulerTimer.startTiming(); // Spigot // CraftBukkit start this.server.getScheduler().mainThreadHeartbeat(this.ticks); -@@ -591,7 +593,10 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo +@@ -594,7 +597,10 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo processQueue.remove().run(); } @@ -110,7 +103,7 @@ index 6a01982..2519af6 100644 // Send time updates to everyone, it will get the right time from the world the player is in. if (this.ticks % 20 == 0) { -@@ -643,7 +648,9 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo +@@ -645,7 +651,9 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo this.methodProfiler.b(); this.methodProfiler.a("tracker"); @@ -120,12 +113,12 @@ index 6a01982..2519af6 100644 this.methodProfiler.b(); this.methodProfiler.b(); // } // CraftBukkit -@@ -652,16 +659,24 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo +@@ -654,16 +662,24 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo } this.methodProfiler.c("connection"); + SpigotTimings.connectionTimer.startTiming(); // Spigot - this.ag().c(); + this.ah().c(); + SpigotTimings.connectionTimer.stopTiming(); // Spigot this.methodProfiler.c("players"); + SpigotTimings.playerListTimer.startTiming(); // Spigot @@ -146,7 +139,7 @@ index 6a01982..2519af6 100644 public boolean getAllowNether() { diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 3e8517c..333a23f 100644 +index 10c2ee7..22c75f9 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -937,6 +937,7 @@ public class PlayerConnection implements PacketPlayInListener { @@ -154,7 +147,7 @@ index 3e8517c..333a23f 100644 private void handleCommand(String s) { + org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.startTiming(); // Spigot - // CraftBukkit start + // CraftBukkit start - whole method CraftPlayer player = this.getPlayer(); @@ -944,19 +945,23 @@ public class PlayerConnection implements PacketPlayInListener { @@ -166,7 +159,7 @@ index 3e8517c..333a23f 100644 } try { - this.c.info(event.getPlayer().getName() + " issued server command: " + event.getMessage()); // CraftBukkit + this.c.info(event.getPlayer().getName() + " issued server command: " + event.getMessage()); if (this.server.dispatchCommand(event.getPlayer(), event.getMessage().substring(1))) { + org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.stopTiming(); // Spigot return; @@ -182,7 +175,7 @@ index 3e8517c..333a23f 100644 // CraftBukkit end } diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 811f1a4..3de32fe 100644 +index 2a3d647..78e17d7 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -7,10 +7,12 @@ import java.util.concurrent.Callable; @@ -199,7 +192,7 @@ index 811f1a4..3de32fe 100644 private static Map i = new HashMap(); private static Map j = new HashMap(); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 3d7aa71..e64658d 100644 +index d2679dc..7360dfc 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -14,6 +14,7 @@ import java.util.concurrent.Callable; @@ -210,7 +203,7 @@ index 3d7aa71..e64658d 100644 import org.bukkit.generator.ChunkGenerator; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.CraftWorld; -@@ -133,6 +134,8 @@ public abstract class World implements IBlockAccess { +@@ -132,6 +133,8 @@ public abstract class World implements IBlockAccess { final Object chunkLock = new Object(); public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot @@ -219,7 +212,7 @@ index 3d7aa71..e64658d 100644 public CraftWorld getWorld() { return this.world; } -@@ -212,6 +215,7 @@ public abstract class World implements IBlockAccess { +@@ -211,6 +214,7 @@ public abstract class World implements IBlockAccess { this.a(); this.getServer().addWorld(this.world); // CraftBukkit @@ -227,7 +220,7 @@ index 3d7aa71..e64658d 100644 } protected abstract IChunkProvider j(); -@@ -1239,6 +1243,7 @@ public abstract class World implements IBlockAccess { +@@ -1236,6 +1240,7 @@ public abstract class World implements IBlockAccess { this.f.clear(); this.methodProfiler.c("regular"); @@ -235,7 +228,7 @@ index 3d7aa71..e64658d 100644 // CraftBukkit start - Use field for loop variable for (this.tickPosition = 0; this.tickPosition < this.entityList.size(); ++this.tickPosition) { entity = (Entity) this.entityList.get(this.tickPosition); -@@ -1262,7 +1267,9 @@ public abstract class World implements IBlockAccess { +@@ -1259,7 +1264,9 @@ public abstract class World implements IBlockAccess { this.methodProfiler.a("tick"); if (!entity.dead) { try { @@ -245,17 +238,17 @@ index 3d7aa71..e64658d 100644 } catch (Throwable throwable1) { crashreport = CrashReport.a(throwable1, "Ticking entity"); crashreportsystemdetails = crashreport.a("Entity being ticked"); -@@ -1287,7 +1294,9 @@ public abstract class World implements IBlockAccess { +@@ -1284,7 +1291,9 @@ public abstract class World implements IBlockAccess { this.methodProfiler.b(); } + timings.entityTick.stopTiming(); // Spigot this.methodProfiler.c("blockEntities"); + timings.tileEntityTick.startTiming(); // Spigot - this.N = true; + this.M = true; Iterator iterator = this.tileEntityList.iterator(); -@@ -1302,8 +1311,11 @@ public abstract class World implements IBlockAccess { +@@ -1299,8 +1308,11 @@ public abstract class World implements IBlockAccess { if (!tileentity.r() && tileentity.o() && this.isLoaded(tileentity.x, tileentity.y, tileentity.z)) { try { @@ -267,16 +260,16 @@ index 3d7aa71..e64658d 100644 crashreport = CrashReport.a(throwable2, "Ticking block entity"); crashreportsystemdetails = crashreport.a("Block entity being ticked"); tileentity.a(crashreportsystemdetails); -@@ -1323,6 +1335,8 @@ public abstract class World implements IBlockAccess { +@@ -1320,6 +1332,8 @@ public abstract class World implements IBlockAccess { } } + timings.tileEntityTick.stopTiming(); // Spigot + timings.tileEntityPending.startTiming(); // Spigot - this.N = false; + this.M = false; if (!this.b.isEmpty()) { this.tileEntityList.removeAll(this.b); -@@ -1361,6 +1375,7 @@ public abstract class World implements IBlockAccess { +@@ -1358,6 +1372,7 @@ public abstract class World implements IBlockAccess { this.a.clear(); } @@ -284,15 +277,15 @@ index 3d7aa71..e64658d 100644 this.methodProfiler.b(); this.methodProfiler.b(); } -@@ -1383,6 +1398,7 @@ public abstract class World implements IBlockAccess { +@@ -1380,6 +1395,7 @@ public abstract class World implements IBlockAccess { byte b0 = 32; if (!flag || this.b(i - b0, 0, j - b0, i + b0, 0, j + b0)) { + entity.tickTimer.startTiming(); // Spigot - entity.T = entity.locX; - entity.U = entity.locY; - entity.V = entity.locZ; -@@ -1444,6 +1460,7 @@ public abstract class World implements IBlockAccess { + entity.S = entity.locX; + entity.T = entity.locY; + entity.U = entity.locZ; +@@ -1441,6 +1457,7 @@ public abstract class World implements IBlockAccess { entity.passenger = null; } } @@ -301,25 +294,24 @@ index 3d7aa71..e64658d 100644 } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index a0e4ade..9672508 100644 +index 0c24d9a..6307686 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -184,10 +184,12 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate +@@ -184,10 +184,13 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate // CraftBukkit start - Only call spawner if we have players online and the world allows for mobs or animals long time = this.worldData.getTime(); if (this.getGameRules().getBoolean("doMobSpawning") && (this.allowMonsters || this.allowAnimals) && (this instanceof WorldServer && this.players.size() > 0)) { + timings.mobSpawn.startTiming(); // Spigot this.R.spawnEntities(this, this.allowMonsters && (this.ticksPerMonsterSpawns != 0 && time % this.ticksPerMonsterSpawns == 0L), this.allowAnimals && (this.ticksPerAnimalSpawns != 0 && time % this.ticksPerAnimalSpawns == 0L), this.worldData.getTime() % 400L == 0L); -- // CraftBukkit end + timings.mobSpawn.stopTiming(); // Spigot + // CraftBukkit end } -- -+ // CraftBukkit end + + timings.doChunkUnload.startTiming(); // Spigot this.methodProfiler.c("chunkSource"); this.chunkProvider.unloadChunks(); int j = this.a(1.0F); -@@ -201,21 +203,36 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate +@@ -201,21 +204,36 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate this.worldData.setDayTime(this.worldData.getDayTime() + 1L); } @@ -547,5 +539,5 @@ index 55db3ff..7d294c0 100644 } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0015-Fix-Mob-Spawning-Relative-to-View-Distance.patch b/CraftBukkit-Patches/0015-Fix-Mob-Spawning-Relative-to-View-Distance.patch index 76faa90507..14fbdb5231 100644 --- a/CraftBukkit-Patches/0015-Fix-Mob-Spawning-Relative-to-View-Distance.patch +++ b/CraftBukkit-Patches/0015-Fix-Mob-Spawning-Relative-to-View-Distance.patch @@ -1,11 +1,11 @@ -From 612cd6c0fdb1c4a0a7e1e3ad04b099554eecda7c Mon Sep 17 00:00:00 2001 +From f6c1507a30e34eb031e40ad1d813f57370afc577 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 17:29:54 +1000 Subject: [PATCH] Fix Mob Spawning Relative to View Distance diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index bc3dd41..10efeef 100644 +index 771eab3..0110120 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -40,6 +40,7 @@ public class Chunk { @@ -17,8 +17,8 @@ index bc3dd41..10efeef 100644 public Chunk(World world, int i, int j) { this.sections = new ChunkSection[16]; @@ -612,6 +613,22 @@ public class Chunk { - entity.aj = k; - entity.ak = this.locZ; + entity.ai = k; + entity.aj = this.locZ; this.entitySlices[k].add(entity); + // Spigot start - increment creature type count + // Keep this synced up with World.a(Class) @@ -63,7 +63,7 @@ index bc3dd41..10efeef 100644 public boolean d(int i, int j, int k) { diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index f514b78..3f0dd70 100644 +index 2ef15d2..23d6611 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -27,6 +27,23 @@ public final class SpawnerCreature { @@ -117,7 +117,7 @@ index f514b78..3f0dd70 100644 label110: - while (iterator.hasNext()) { + while (iterator.hasNext() && (moblimit > 0)) { // Spigot - while more allowed - // CraftBukkit start + // CraftBukkit start = use LongHash and LongObjectHashMap long key = ((Long) iterator.next()).longValue(); @@ -160,6 +184,13 @@ public final class SpawnerCreature { @@ -131,7 +131,7 @@ index f514b78..3f0dd70 100644 + continue label110; + } + // Spigot end - if (j2 >= entityinsentient.bz()) { + if (j2 >= entityinsentient.bB()) { continue label110; } diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java @@ -151,5 +151,5 @@ index 6cc3a91..46249d7 100644 + } } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0016-Handle-Null-Tile-Entities.patch b/CraftBukkit-Patches/0016-Handle-Null-Tile-Entities.patch index ccfec56c22..42439ef284 100644 --- a/CraftBukkit-Patches/0016-Handle-Null-Tile-Entities.patch +++ b/CraftBukkit-Patches/0016-Handle-Null-Tile-Entities.patch @@ -1,14 +1,14 @@ -From fe83054f2999951673b07d23e2b94f468999e801 Mon Sep 17 00:00:00 2001 +From d7110a904d1cd3aa8579a8156c932aa411ec8159 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 3 Feb 2013 09:20:19 +1100 Subject: [PATCH] Handle Null Tile Entities diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index e64658d..99345a1 100644 +index 7360dfc..9b3f3e5 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1302,6 +1302,13 @@ public abstract class World implements IBlockAccess { +@@ -1299,6 +1299,13 @@ public abstract class World implements IBlockAccess { while (iterator.hasNext()) { TileEntity tileentity = (TileEntity) iterator.next(); @@ -23,5 +23,5 @@ index e64658d..99345a1 100644 ChunkProviderServer chunkProviderServer = ((WorldServer) this).chunkProviderServer; if (chunkProviderServer.unloadQueue.contains(tileentity.x >> 4, tileentity.z >> 4)) { -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0017-Entity-Activation-Range.patch b/CraftBukkit-Patches/0017-Entity-Activation-Range.patch index f911843925..6851f793e6 100644 --- a/CraftBukkit-Patches/0017-Entity-Activation-Range.patch +++ b/CraftBukkit-Patches/0017-Entity-Activation-Range.patch @@ -1,4 +1,4 @@ -From 58c5ce437abf82cbde87209dc095c6574c9e6d9c Mon Sep 17 00:00:00 2001 +From 41e82cb66847e6ecbcd1406cb621eb2bdcbb4a3d Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 3 Feb 2013 05:10:21 -0500 Subject: [PATCH] Entity Activation Range @@ -9,10 +9,10 @@ This will drastically cut down on tick timings for entities that are not in rang This change can have dramatic impact on gameplay if configured too low. Balance according to your servers desired gameplay. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index ff07aa7..adf20d9 100644 +index 491ef6b..4bcd57e 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -88,7 +88,7 @@ public abstract class Entity { +@@ -89,7 +89,7 @@ public abstract class Entity { public int ticksLived; public int maxFireTicks; public int fireTicks; // CraftBukkit - private -> public @@ -21,7 +21,7 @@ index ff07aa7..adf20d9 100644 public int noDamageTicks; private boolean justCreated; protected boolean fireProof; -@@ -112,7 +112,13 @@ public abstract class Entity { +@@ -113,7 +113,13 @@ public abstract class Entity { public boolean valid; // CraftBukkit public org.bukkit.projectiles.ProjectileSource projectileSource; // CraftBukkit - For projectiles only @@ -35,7 +35,7 @@ index ff07aa7..adf20d9 100644 public int getId() { return this.id; -@@ -139,7 +145,12 @@ public abstract class Entity { +@@ -140,7 +146,12 @@ public abstract class Entity { this.setPosition(0.0D, 0.0D, 0.0D); if (world != null) { this.dimension = world.worldProvider.dimension; @@ -85,7 +85,7 @@ index 36ed831..7ddca48 100644 super(world); } diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java -index 5887ee8..367bcc9 100644 +index b263d82..c33d564 100644 --- a/src/main/java/net/minecraft/server/EntityArrow.java +++ b/src/main/java/net/minecraft/server/EntityArrow.java @@ -15,7 +15,7 @@ public class EntityArrow extends Entity implements IProjectile { @@ -98,7 +98,7 @@ index 5887ee8..367bcc9 100644 public int shake; public Entity shooter; diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 7211da8..d06ec7b 100644 +index af5deb9..57157ef 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -78,6 +78,13 @@ public abstract class EntityLiving extends Entity { @@ -116,10 +116,10 @@ index 7211da8..d06ec7b 100644 public EntityLiving(World world) { super(world); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 99345a1..58eacd2 100644 +index 9b3f3e5..a2ca914 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1243,6 +1243,7 @@ public abstract class World implements IBlockAccess { +@@ -1240,6 +1240,7 @@ public abstract class World implements IBlockAccess { this.f.clear(); this.methodProfiler.c("regular"); @@ -127,7 +127,7 @@ index 99345a1..58eacd2 100644 timings.entityTick.startTiming(); // Spigot // CraftBukkit start - Use field for loop variable for (this.tickPosition = 0; this.tickPosition < this.entityList.size(); ++this.tickPosition) { -@@ -1404,7 +1405,11 @@ public abstract class World implements IBlockAccess { +@@ -1401,7 +1402,11 @@ public abstract class World implements IBlockAccess { int j = MathHelper.floor(entity.locZ); byte b0 = 32; @@ -138,8 +138,8 @@ index 99345a1..58eacd2 100644 + entity.inactiveTick(); + } else { entity.tickTimer.startTiming(); // Spigot - entity.T = entity.locX; - entity.U = entity.locY; + entity.S = entity.locX; + entity.T = entity.locY; diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java index 8340c13..541dfe4 100644 --- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java @@ -156,7 +156,7 @@ index 8340c13..541dfe4 100644 public static final HashMap pluginTaskTimingMap = new HashMap(); diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java new file mode 100644 -index 0000000..db4c927 +index 0000000..06284ad --- /dev/null +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -0,0 +1,296 @@ @@ -403,7 +403,7 @@ index 0000000..db4c927 + if ( entity instanceof EntityAnimal ) + { + EntityAnimal animal = (EntityAnimal) entity; -+ if ( animal.isBaby() || animal.cc() /*love*/ ) ++ if ( animal.isBaby() || animal.ce() /*love*/ ) + { + return true; + } @@ -477,5 +477,5 @@ index 46249d7..ed2836a 100644 + } } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0019-PlayerItemDamageEvent.patch b/CraftBukkit-Patches/0019-PlayerItemDamageEvent.patch index d66995e4db..a5efe0274e 100644 --- a/CraftBukkit-Patches/0019-PlayerItemDamageEvent.patch +++ b/CraftBukkit-Patches/0019-PlayerItemDamageEvent.patch @@ -1,11 +1,11 @@ -From 5f0a6329491a0166813080c81bbb90ddfe99d6c7 Mon Sep 17 00:00:00 2001 +From 2cdc63b515cf2e42955c527486bcf5f781e3e42e Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 4 Mar 2013 18:45:52 +1100 Subject: [PATCH] PlayerItemDamageEvent diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index b308e03..f32322e 100644 +index 791467b..cc18816 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -176,7 +176,13 @@ public final class ItemStack { @@ -44,11 +44,11 @@ index b308e03..f32322e 100644 public void damage(int i, EntityLiving entityliving) { if (!(entityliving instanceof EntityHuman) || !((EntityHuman) entityliving).abilities.canInstantlyBuild) { if (this.g()) { -- if (this.isDamaged(i, entityliving.aI())) { -+ if (this.isDamaged(i, entityliving.aI(), entityliving)) { +- if (this.isDamaged(i, entityliving.aH())) { ++ if (this.isDamaged(i, entityliving.aH(), entityliving)) { entityliving.a(this); --this.count; if (entityliving instanceof EntityHuman) { -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0020-Faster-UUID-for-entities.patch b/CraftBukkit-Patches/0020-Faster-UUID-for-entities.patch index c132abcea5..5e293a4794 100644 --- a/CraftBukkit-Patches/0020-Faster-UUID-for-entities.patch +++ b/CraftBukkit-Patches/0020-Faster-UUID-for-entities.patch @@ -1,4 +1,4 @@ -From 2607242de7af3f5c8bcc3f643c7817c8b4c41683 Mon Sep 17 00:00:00 2001 +From 84be7d864739993024f6a017e154ec711057fbda Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 17 Mar 2013 19:02:50 +1100 Subject: [PATCH] Faster UUID for entities @@ -6,18 +6,18 @@ Subject: [PATCH] Faster UUID for entities It is overkill to create a new SecureRandom on each entity create and then use it to make a new Entity ID for every entity instance created. Instead we will just use a pseudo random UUID based off the random instance we already have. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index adf20d9..43fee78 100644 +index 4bcd57e..621f593 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -139,7 +139,7 @@ public abstract class Entity { +@@ -140,7 +140,7 @@ public abstract class Entity { this.random = new Random(); this.maxFireTicks = 1; this.justCreated = true; - this.uniqueID = UUID.randomUUID(); + this.uniqueID = new UUID(random.nextLong(), random.nextLong()); // Spigot - this.at = EnumEntitySize.SIZE_2; + this.as = EnumEntitySize.SIZE_2; this.world = world; this.setPosition(0.0D, 0.0D, 0.0D); -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0024-Enable-Improved-Ping-Sending.patch b/CraftBukkit-Patches/0024-Enable-Improved-Ping-Sending.patch index b2de73b9af..b68caf0b84 100644 --- a/CraftBukkit-Patches/0024-Enable-Improved-Ping-Sending.patch +++ b/CraftBukkit-Patches/0024-Enable-Improved-Ping-Sending.patch @@ -1,14 +1,14 @@ -From a73d0e968d95897084264e10a5b57e20226b88c0 Mon Sep 17 00:00:00 2001 +From 32b6c581167f920505e53027652b245c09997ba1 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 24 Feb 2013 20:45:20 +1100 Subject: [PATCH] Enable Improved Ping Sending diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 1dee8b2..4945955 100644 +index d90ddb7..35284cf 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -62,6 +62,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -61,6 +61,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public int newTotalExp = 0; public boolean keepLevel = false; public double maxHealthCache; @@ -17,7 +17,7 @@ index 1dee8b2..4945955 100644 public EntityPlayer(MinecraftServer minecraftserver, WorldServer worldserver, GameProfile gameprofile, PlayerInteractManager playerinteractmanager) { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 4383275..fa3e65c 100644 +index 1943dbf..9f31630 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -775,6 +775,25 @@ public abstract class PlayerList { @@ -47,5 +47,5 @@ index 4383275..fa3e65c 100644 public void sendAll(Packet packet) { -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0026-Close-Unloaded-Save-Files.patch b/CraftBukkit-Patches/0026-Close-Unloaded-Save-Files.patch index 2dd0632f54..47609eec98 100644 --- a/CraftBukkit-Patches/0026-Close-Unloaded-Save-Files.patch +++ b/CraftBukkit-Patches/0026-Close-Unloaded-Save-Files.patch @@ -1,4 +1,4 @@ -From 44507e4be847adb34ed737e42b870c86dac70706 Mon Sep 17 00:00:00 2001 +From eed8542d3e773f54d133cafe8170190d428e03f1 Mon Sep 17 00:00:00 2001 From: Antony Riley Date: Wed, 27 Mar 2013 01:41:54 +0200 Subject: [PATCH] Close Unloaded Save Files @@ -18,10 +18,10 @@ index 900ed68..829f4a3 100644 public static synchronized RegionFile a(File file1, int i, int j) { File file2 = new File(file1, "region"); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 4d46178..2d46aca 100644 +index 50a27fb..7fdab7d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -83,6 +83,8 @@ import net.minecraft.server.MinecraftServer; +@@ -84,6 +84,8 @@ import net.minecraft.server.MinecraftServer; import net.minecraft.server.MobEffectList; import net.minecraft.server.PropertyManager; import net.minecraft.server.ServerCommand; @@ -30,7 +30,7 @@ index 4d46178..2d46aca 100644 import net.minecraft.server.ServerNBTManager; import net.minecraft.server.WorldLoaderServer; import net.minecraft.server.WorldManager; -@@ -993,6 +995,30 @@ public final class CraftServer implements Server { +@@ -996,6 +998,30 @@ public final class CraftServer implements Server { worlds.remove(world.getName().toLowerCase()); console.worlds.remove(console.worlds.indexOf(handle)); @@ -62,5 +62,5 @@ index 4d46178..2d46aca 100644 } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0030-Hopper-Cooldowns.patch b/CraftBukkit-Patches/0030-Hopper-Cooldowns.patch index 011ee700a8..424b42fa82 100644 --- a/CraftBukkit-Patches/0030-Hopper-Cooldowns.patch +++ b/CraftBukkit-Patches/0030-Hopper-Cooldowns.patch @@ -1,16 +1,16 @@ -From 6fb97ec7f1afb39d11913faae8462d268e2542ff Mon Sep 17 00:00:00 2001 +From 2103d841de6a2f21e9a850e70eb5b286131281c2 Mon Sep 17 00:00:00 2001 From: erocs Date: Sun, 8 Sep 2013 12:06:15 -0700 Subject: [PATCH] Hopper Cooldowns diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java -index 730eb78..a68b748 100644 +index 563d9c8..a19863a 100644 --- a/src/main/java/net/minecraft/server/TileEntityHopper.java +++ b/src/main/java/net/minecraft/server/TileEntityHopper.java -@@ -182,12 +182,17 @@ public class TileEntityHopper extends TileEntity implements IHopper { +@@ -189,12 +189,18 @@ public class TileEntityHopper extends TileEntity implements IHopper { + } - flag = suckInItems(this) || flag; if (flag) { - this.c(8); + this.c(world.spigotConfig.hopperTransfer); // Spigot @@ -18,7 +18,7 @@ index 730eb78..a68b748 100644 return true; } } -- + + // Spigot start + if ( !this.j() ) + { @@ -28,16 +28,16 @@ index 730eb78..a68b748 100644 return false; } else { return false; -@@ -218,7 +223,7 @@ public class TileEntityHopper extends TileEntity implements IHopper { - this.getWorld().getServer().getPluginManager().callEvent(event); - if (event.isCancelled()) { - this.setItem(i, itemstack); -- this.c(8); // Delay hopper checks -+ this.c(world.spigotConfig.hopperTransfer); // Spigot - return false; - } - ItemStack itemstack1 = addItem(iinventory, CraftItemStack.asNMSCopy(event.getItem()), Facing.OPPOSITE_FACING[BlockHopper.b(this.p())]); -@@ -299,9 +304,9 @@ public class TileEntityHopper extends TileEntity implements IHopper { +@@ -260,7 +266,7 @@ public class TileEntityHopper extends TileEntity implements IHopper { + this.getWorld().getServer().getPluginManager().callEvent(event); + if (event.isCancelled()) { + this.setItem(i, itemstack); +- this.c(8); // Delay hopper checks ++ this.c(world.spigotConfig.hopperTransfer); // Spigot + return false; + } + ItemStack itemstack1 = addItem(iinventory, CraftItemStack.asNMSCopy(event.getItem()), i); +@@ -396,9 +402,9 @@ public class TileEntityHopper extends TileEntity implements IHopper { iinventory.setItem(i, itemstack1); if (ihopper instanceof TileEntityHopper) { @@ -49,7 +49,7 @@ index 730eb78..a68b748 100644 } return false; -@@ -405,7 +410,7 @@ public class TileEntityHopper extends TileEntity implements IHopper { +@@ -502,7 +508,7 @@ public class TileEntityHopper extends TileEntity implements IHopper { if (flag) { if (iinventory instanceof TileEntityHopper) { @@ -81,5 +81,5 @@ index 6421bf2..827e6f9 100644 + } } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0034-Do-Not-Search-for-Offline-Players.patch b/CraftBukkit-Patches/0034-Do-Not-Search-for-Offline-Players.patch index a485e85e7b..854bf55e3f 100644 --- a/CraftBukkit-Patches/0034-Do-Not-Search-for-Offline-Players.patch +++ b/CraftBukkit-Patches/0034-Do-Not-Search-for-Offline-Players.patch @@ -1,4 +1,4 @@ -From 22adabeeb54ee7a3b3a635d14119c7f3fbd6c47a Mon Sep 17 00:00:00 2001 +From f844d7a723829b91571c73c1fbe2f26aa2815a34 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 16 Jun 2013 08:20:26 +1000 Subject: [PATCH] Do Not Search for Offline Players @@ -6,10 +6,10 @@ Subject: [PATCH] Do Not Search for Offline Players By default we do not want to search as this leads to massive load times for plugins wanting to do mass data lookups. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 2d46aca..c3e6f82 100644 +index 7fdab7d..5db2f0a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1277,7 +1277,7 @@ public final class CraftServer implements Server { +@@ -1280,7 +1280,7 @@ public final class CraftServer implements Server { } public OfflinePlayer getOfflinePlayer(String name) { @@ -19,5 +19,5 @@ index 2d46aca..c3e6f82 100644 public OfflinePlayer getOfflinePlayer(String name, boolean search) { -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0035-Allow-Disabling-of-Command-Logging.patch b/CraftBukkit-Patches/0035-Allow-Disabling-of-Command-Logging.patch index 742211a1e2..0ffd8ccadd 100644 --- a/CraftBukkit-Patches/0035-Allow-Disabling-of-Command-Logging.patch +++ b/CraftBukkit-Patches/0035-Allow-Disabling-of-Command-Logging.patch @@ -1,22 +1,22 @@ -From 65a0ce134a86a9d9212ebe55910cd1bc52e974bd Mon Sep 17 00:00:00 2001 +From 0267e9dfadcdbca946f5b4e72ccd55c1aec8f691 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 18:01:29 +1000 Subject: [PATCH] Allow Disabling of Command Logging diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 333a23f..b281201 100644 +index 22c75f9..ed28dbc 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -950,7 +950,12 @@ public class PlayerConnection implements PacketPlayInListener { } try { -- this.c.info(event.getPlayer().getName() + " issued server command: " + event.getMessage()); // CraftBukkit +- this.c.info(event.getPlayer().getName() + " issued server command: " + event.getMessage()); + // Spigot Start + if ( org.spigotmc.SpigotConfig.logCommands ) + { -+ this.c.info(event.getPlayer().getName() + " issued server command: " + event.getMessage()); // CraftBukkit ++ this.c.info(event.getPlayer().getName() + " issued server command: " + event.getMessage()); + } + // Spigot end if (this.server.dispatchCommand(event.getPlayer(), event.getMessage().substring(1))) { @@ -38,5 +38,5 @@ index 9aaa09a..4d15f8b 100644 + } } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0036-Allow-Disabling-of-Command-TabComplete.patch b/CraftBukkit-Patches/0036-Allow-Disabling-of-Command-TabComplete.patch index 985753091a..8be2c6d698 100644 --- a/CraftBukkit-Patches/0036-Allow-Disabling-of-Command-TabComplete.patch +++ b/CraftBukkit-Patches/0036-Allow-Disabling-of-Command-TabComplete.patch @@ -1,14 +1,14 @@ -From 0f3df2d03d8f697bc2899cb2eb048622589b997f Mon Sep 17 00:00:00 2001 +From fce8bc23f6616f6facd4085435fc8abfecfecc0d Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 18:05:54 +1000 Subject: [PATCH] Allow Disabling of Command TabComplete diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c3e6f82..a48fbe9 100644 +index 5db2f0a..420e6e8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1554,6 +1554,13 @@ public final class CraftServer implements Server { +@@ -1557,6 +1557,13 @@ public final class CraftServer implements Server { } public List tabCompleteCommand(Player player, String message) { @@ -38,5 +38,5 @@ index 4d15f8b..8764045 100644 + } } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0037-Configurable-Messages.patch b/CraftBukkit-Patches/0037-Configurable-Messages.patch index e2ff074a6b..2c8632acfb 100644 --- a/CraftBukkit-Patches/0037-Configurable-Messages.patch +++ b/CraftBukkit-Patches/0037-Configurable-Messages.patch @@ -1,29 +1,29 @@ -From 1826349b5c9ab932a73f386e92645fab326e5f2b Mon Sep 17 00:00:00 2001 +From 1929ca5d2796b16a152090ee693b0638134aa7cd Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 21 Jun 2013 19:21:58 +1000 Subject: [PATCH] Configurable Messages diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java -index 54ecbdf..ff7b3d3 100644 +index e5992f8..b80a760 100644 --- a/src/main/java/net/minecraft/server/HandshakeListener.java +++ b/src/main/java/net/minecraft/server/HandshakeListener.java @@ -64,11 +64,11 @@ public class HandshakeListener implements PacketHandshakingInListener { // CraftBukkit end if (packethandshakinginsetprotocol.d() > 4) { -- chatcomponenttext = new ChatComponentText("Outdated server! I\'m still on 1.7.2"); +- chatcomponenttext = new ChatComponentText("Outdated server! I\'m still on 1.7.5"); + chatcomponenttext = new ChatComponentText( org.spigotmc.SpigotConfig.outdatedServerMessage ); // Spigot this.b.handle(new PacketLoginOutDisconnect(chatcomponenttext), new GenericFutureListener[0]); - this.b.a((IChatBaseComponent) chatcomponenttext); + this.b.close(chatcomponenttext); } else if (packethandshakinginsetprotocol.d() < 4) { -- chatcomponenttext = new ChatComponentText("Outdated client! Please use 1.7.2"); +- chatcomponenttext = new ChatComponentText("Outdated client! Please use 1.7.5"); + chatcomponenttext = new ChatComponentText( org.spigotmc.SpigotConfig.outdatedClientMessage ); // Spigot this.b.handle(new PacketLoginOutDisconnect(chatcomponenttext), new GenericFutureListener[0]); - this.b.a((IChatBaseComponent) chatcomponenttext); + this.b.close(chatcomponenttext); } else { diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index b6a3d2b..9d116e5 100644 +index 6454f8f..6fe8ca5 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -335,7 +335,7 @@ public abstract class PlayerList { @@ -45,10 +45,10 @@ index b6a3d2b..9d116e5 100644 } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index a48fbe9..b9a72d8 100644 +index 420e6e8..9a8d2c2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -688,11 +688,7 @@ public final class CraftServer implements Server { +@@ -691,11 +691,7 @@ public final class CraftServer implements Server { return true; } @@ -103,5 +103,5 @@ index 8764045..0ab2ec3 100644 + } } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0038-Allow-Disabling-of-Random-Lighting-Updates.patch b/CraftBukkit-Patches/0038-Allow-Disabling-of-Random-Lighting-Updates.patch index 758f464fcb..76561bf1f5 100644 --- a/CraftBukkit-Patches/0038-Allow-Disabling-of-Random-Lighting-Updates.patch +++ b/CraftBukkit-Patches/0038-Allow-Disabling-of-Random-Lighting-Updates.patch @@ -1,11 +1,11 @@ -From cbea036f18bb91b2a39867c7cac7aa37115d69a2 Mon Sep 17 00:00:00 2001 +From 14c0ba34a998a347295f5d340a007c12032a4e7d Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 22 Jun 2013 16:12:02 +1000 Subject: [PATCH] Allow Disabling of Random Lighting Updates diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 10efeef..2fd6a43 100644 +index 0110120..96974b4 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -906,7 +906,7 @@ public class Chunk { @@ -18,10 +18,10 @@ index 10efeef..2fd6a43 100644 } } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 58eacd2..0eeed14 100644 +index a2ca914..8311844 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -2034,7 +2034,7 @@ public abstract class World implements IBlockAccess { +@@ -2035,7 +2035,7 @@ public abstract class World implements IBlockAccess { } this.methodProfiler.a("playerCheckLight"); @@ -47,5 +47,5 @@ index 827e6f9..adebd03 100644 + } } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0041-Disallow-Interaction-With-Self.patch b/CraftBukkit-Patches/0041-Disallow-Interaction-With-Self.patch index 8776cc4487..3d30db5e39 100644 --- a/CraftBukkit-Patches/0041-Disallow-Interaction-With-Self.patch +++ b/CraftBukkit-Patches/0041-Disallow-Interaction-With-Self.patch @@ -1,11 +1,11 @@ -From 39e2b5b8545a4774bef3fcbc716a95b97dd6a6ae Mon Sep 17 00:00:00 2001 +From 576164d98c3061031a24fddbdda055240a769897 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 28 Jun 2013 19:52:54 +1000 Subject: [PATCH] Disallow Interaction With Self diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index b281201..e9652a5 100644 +index ed28dbc..6949979 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1057,6 +1057,13 @@ public class PlayerConnection implements PacketPlayInListener { @@ -20,8 +20,8 @@ index b281201..e9652a5 100644 + } + // Spigot End - this.player.w(); + this.player.v(); if (entity != null) { -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0045-Entity-ticking-chunk-caching.patch b/CraftBukkit-Patches/0045-Entity-ticking-chunk-caching.patch index 202610b61b..6005934203 100644 --- a/CraftBukkit-Patches/0045-Entity-ticking-chunk-caching.patch +++ b/CraftBukkit-Patches/0045-Entity-ticking-chunk-caching.patch @@ -1,4 +1,4 @@ -From 74ec77bc8eb2e4ed29c5fddf1038eb1815b4e657 Mon Sep 17 00:00:00 2001 +From c1f0b16592ef1cbc634bd31b5ccb09204caf4396 Mon Sep 17 00:00:00 2001 From: Ammar Askar Date: Tue, 16 Jul 2013 03:32:32 +0500 Subject: [PATCH] Entity ticking chunk caching @@ -6,10 +6,10 @@ Subject: [PATCH] Entity ticking chunk caching Cache known loaded chunks so we avoid making a potentially expensive contains call for every single entity in exchange for some simple arithmetic. Best case scenario, this cuts down contains call to once per chunk, worst case it adds on some simple arithmetic operations diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 0eeed14..5fb3fbf 100644 +index 8311844..835baf5 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1188,6 +1188,7 @@ public abstract class World implements IBlockAccess { +@@ -1185,6 +1185,7 @@ public abstract class World implements IBlockAccess { CrashReport crashreport; CrashReportSystemDetails crashreportsystemdetails; @@ -17,7 +17,7 @@ index 0eeed14..5fb3fbf 100644 for (i = 0; i < this.i.size(); ++i) { entity = (Entity) this.i.get(i); // CraftBukkit start - Fixed an NPE, don't process entities in chunks queued for unload -@@ -1196,10 +1197,15 @@ public abstract class World implements IBlockAccess { +@@ -1193,10 +1194,15 @@ public abstract class World implements IBlockAccess { } ChunkProviderServer chunkProviderServer = ((WorldServer) this).chunkProviderServer; @@ -35,7 +35,7 @@ index 0eeed14..5fb3fbf 100644 try { ++entity.ticksLived; -@@ -1220,6 +1226,7 @@ public abstract class World implements IBlockAccess { +@@ -1217,6 +1223,7 @@ public abstract class World implements IBlockAccess { this.i.remove(i--); } } @@ -43,7 +43,7 @@ index 0eeed14..5fb3fbf 100644 this.methodProfiler.c("remove"); this.entityList.removeAll(this.f); -@@ -1251,10 +1258,15 @@ public abstract class World implements IBlockAccess { +@@ -1248,10 +1255,15 @@ public abstract class World implements IBlockAccess { // Don't tick entities in chunks queued for unload ChunkProviderServer chunkProviderServer = ((WorldServer) this).chunkProviderServer; @@ -62,5 +62,5 @@ index 0eeed14..5fb3fbf 100644 if (entity.vehicle != null) { if (!entity.vehicle.dead && entity.vehicle.passenger == entity) { -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0047-Player-Collision-API.patch b/CraftBukkit-Patches/0047-Player-Collision-API.patch index cf292611a1..f7d0908d75 100644 --- a/CraftBukkit-Patches/0047-Player-Collision-API.patch +++ b/CraftBukkit-Patches/0047-Player-Collision-API.patch @@ -1,11 +1,11 @@ -From 066b4360e37e5c8378666d381bcec559c4a2cb34 Mon Sep 17 00:00:00 2001 +From 2c62c137eb219eb4e1250e4bbda2dd91c4ec4cc2 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 3 Aug 2013 19:27:07 +1000 Subject: [PATCH] Player Collision API diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 7442943..f034d30 100644 +index bf20cad..6b20005 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -430,7 +430,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen @@ -18,11 +18,11 @@ index 7442943..f034d30 100644 Entity entity = (Entity) list.get(i); diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index d06ec7b..35b2f75 100644 +index 57157ef..c04ff95 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -1485,7 +1485,7 @@ public abstract class EntityLiving extends Entity { - protected void bo() { +@@ -1490,7 +1490,7 @@ public abstract class EntityLiving extends Entity { + protected void bn() { List list = this.world.getEntities(this, this.boundingBox.grow(0.20000000298023224D, 0.0D, 0.20000000298023224D)); - if (list != null && !list.isEmpty()) { @@ -31,10 +31,10 @@ index d06ec7b..35b2f75 100644 Entity entity = (Entity) list.get(i); diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 4945955..ab39926 100644 +index 35284cf..e8756ed 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -64,6 +64,21 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -63,6 +63,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public double maxHealthCache; public int lastPing = -1; // Spigot // CraftBukkit end @@ -46,18 +46,12 @@ index 4945955..ab39926 100644 + { + return this.collidesWithEntities && super.R(); + } -+ -+ @Override -+ public boolean S() -+ { -+ return this.collidesWithEntities && super.S(); -+ } + // Spigot end public EntityPlayer(MinecraftServer minecraftserver, WorldServer worldserver, GameProfile gameprofile, PlayerInteractManager playerinteractmanager) { super(worldserver, gameprofile); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index bf3c9db..afbc3d8 100644 +index 07c8a2c..296e20a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1257,6 +1257,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -75,11 +69,11 @@ index bf3c9db..afbc3d8 100644 + public void setCollidesWithEntities(boolean collides) + { + getHandle().collidesWithEntities = collides; -+ getHandle().l = collides; // First boolean of Entity ++ getHandle().k = collides; // First boolean of Entity + } }; public Player.Spigot spigot() -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0048-Fully-Disable-Snooper-When-Not-Required.patch b/CraftBukkit-Patches/0048-Fully-Disable-Snooper-When-Not-Required.patch index 3279de05c6..e3efbb0115 100644 --- a/CraftBukkit-Patches/0048-Fully-Disable-Snooper-When-Not-Required.patch +++ b/CraftBukkit-Patches/0048-Fully-Disable-Snooper-When-Not-Required.patch @@ -1,14 +1,14 @@ -From d04d999897b38e9b3304ba3b14fe82709c09225b Mon Sep 17 00:00:00 2001 +From d6dc3315938064c049a396ee9927e530128fbd3e Mon Sep 17 00:00:00 2001 From: agentk20 Date: Sat, 3 Aug 2013 19:28:48 +1000 Subject: [PATCH] Fully Disable Snooper When Not Required diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 2519af6..b082ad2 100644 +index 8f61474..f9cbe47 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -569,11 +569,11 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo +@@ -573,11 +573,11 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo this.f[this.ticks % 100] = System.nanoTime() - i; this.methodProfiler.b(); this.methodProfiler.a("snooper"); @@ -23,5 +23,5 @@ index 2519af6..b082ad2 100644 } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0052-Call-EntityChangeBlockEvent-for-Fire-Arrows-hitting-.patch b/CraftBukkit-Patches/0052-Call-EntityChangeBlockEvent-for-Fire-Arrows-hitting-.patch index b866c0a182..0fb7ebc436 100644 --- a/CraftBukkit-Patches/0052-Call-EntityChangeBlockEvent-for-Fire-Arrows-hitting-.patch +++ b/CraftBukkit-Patches/0052-Call-EntityChangeBlockEvent-for-Fire-Arrows-hitting-.patch @@ -1,4 +1,4 @@ -From f98053858adbb802d61d1705dbf8fca9eccd2c13 Mon Sep 17 00:00:00 2001 +From 86bd60d04387192040cab0800891c2e08bd28f40 Mon Sep 17 00:00:00 2001 From: BlackHole Date: Tue, 16 Jul 2013 22:34:50 +0200 Subject: [PATCH] Call EntityChangeBlockEvent for Fire Arrows hitting TNT @@ -6,17 +6,17 @@ Subject: [PATCH] Call EntityChangeBlockEvent for Fire Arrows hitting TNT Adds BUKKIT-4355 diff --git a/src/main/java/net/minecraft/server/BlockTNT.java b/src/main/java/net/minecraft/server/BlockTNT.java -index 6d5090b..50e2fa0 100644 +index e943676..7320a88 100644 --- a/src/main/java/net/minecraft/server/BlockTNT.java +++ b/src/main/java/net/minecraft/server/BlockTNT.java @@ -54,7 +54,7 @@ public class BlockTNT extends Block { public boolean interact(World world, int i, int j, int k, EntityHuman entityhuman, int l, float f, float f1, float f2) { - if (entityhuman.bD() != null && entityhuman.bD().getItem() == Items.FLINT_AND_STEEL) { + if (entityhuman.bE() != null && entityhuman.bE().getItem() == Items.FLINT_AND_STEEL) { - this.a(world, i, j, k, 1, entityhuman); + this.a(world, i, j, k, 1, (EntityLiving) entityhuman); // Spigot - Fix decompile error! world.setAir(i, j, k); - entityhuman.bD().damage(1, entityhuman); + entityhuman.bE().damage(1, entityhuman); return true; @@ -68,6 +68,11 @@ public class BlockTNT extends Block { EntityArrow entityarrow = (EntityArrow) entity; @@ -31,5 +31,5 @@ index 6d5090b..50e2fa0 100644 world.setAir(i, j, k); } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0054-Item-Despawn-Rate.patch b/CraftBukkit-Patches/0054-Item-Despawn-Rate.patch index 71fc59e4ff..3528854670 100644 --- a/CraftBukkit-Patches/0054-Item-Despawn-Rate.patch +++ b/CraftBukkit-Patches/0054-Item-Despawn-Rate.patch @@ -1,11 +1,11 @@ -From e5bbed4570854ea51ac8d114fe16320e314ebeee Mon Sep 17 00:00:00 2001 +From 19123d8bf2c9f08c6b05a00832502c7d17814324 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 22 Sep 2013 19:10:53 +1000 Subject: [PATCH] Item Despawn Rate diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java -index 08b9ac8..8ea7abc 100644 +index 95beb11..0f1bcc7 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -104,7 +104,7 @@ public class EntityItem extends Entity { @@ -14,7 +14,7 @@ index 08b9ac8..8ea7abc 100644 // ++this.age; // CraftBukkit - Moved up - if (!this.world.isStatic && this.age >= 6000) { + if (!this.world.isStatic && this.age >= world.spigotConfig.itemDespawnRate) { // Spigot - // CraftBukkit start + // CraftBukkit start - fire ItemDespawnEvent if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) { this.age = 0; diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java @@ -34,5 +34,5 @@ index 9586c44..82d59e7 100644 + } } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0055-Don-t-Special-Case-X-Move-Value.patch b/CraftBukkit-Patches/0055-Don-t-Special-Case-X-Move-Value.patch index d602246046..b2e7a1f7ab 100644 --- a/CraftBukkit-Patches/0055-Don-t-Special-Case-X-Move-Value.patch +++ b/CraftBukkit-Patches/0055-Don-t-Special-Case-X-Move-Value.patch @@ -1,11 +1,11 @@ -From 1fc9ac1a53680072ca65f97d44621f559a285ddb Mon Sep 17 00:00:00 2001 +From c26229532d77b6504a398fd25e2a6c41721f4b42 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 6 Oct 2013 17:36:28 +1100 Subject: [PATCH] Don't Special Case X Move Value diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index e9652a5..58e0e41 100644 +index 6949979..dd41222 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -105,6 +105,7 @@ public class PlayerConnection implements PacketPlayInListener { @@ -18,7 +18,7 @@ index e9652a5..58e0e41 100644 Long lastPacket; @@ -201,6 +202,18 @@ public class PlayerConnection implements PacketPlayInListener { - // CraftBukkit start + // CraftBukkit start - fire PlayerMoveEvent Player player = this.getPlayer(); + // Spigot Start + if ( !hasMoved ) @@ -45,5 +45,5 @@ index e9652a5..58e0e41 100644 this.server.getPluginManager().callEvent(event); -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0056-Implement-respawn-API.patch b/CraftBukkit-Patches/0056-Implement-respawn-API.patch index 0c5288f250..5caa3f6f21 100644 --- a/CraftBukkit-Patches/0056-Implement-respawn-API.patch +++ b/CraftBukkit-Patches/0056-Implement-respawn-API.patch @@ -1,16 +1,16 @@ -From 5fb37487fae01f9d7786273cdd8ed756132e5b52 Mon Sep 17 00:00:00 2001 +From b79b05d49d9a71fc566f8d8de36b604395813867 Mon Sep 17 00:00:00 2001 From: ninja- Date: Tue, 8 Oct 2013 14:34:49 +0200 Subject: [PATCH] Implement respawn API. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 2a13ab2..1b902b2 100644 +index 962880b..d5903b7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1270,6 +1270,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { getHandle().collidesWithEntities = collides; - getHandle().l = collides; // First boolean of Entity + getHandle().k = collides; // First boolean of Entity } + + @Override @@ -25,5 +25,5 @@ index 2a13ab2..1b902b2 100644 public Player.Spigot spigot() -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0058-Arrow-Despawn-Rate.patch b/CraftBukkit-Patches/0058-Arrow-Despawn-Rate.patch index af50e4264d..c4effa3237 100644 --- a/CraftBukkit-Patches/0058-Arrow-Despawn-Rate.patch +++ b/CraftBukkit-Patches/0058-Arrow-Despawn-Rate.patch @@ -1,19 +1,19 @@ -From 91b962a71617a20ba7ea6bcddad4e31b02cf2a02 Mon Sep 17 00:00:00 2001 +From 94a7de9719a61ecadeb59c6825520552576b59b7 Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 14 Oct 2013 19:20:10 +1100 Subject: [PATCH] Arrow Despawn Rate diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java -index 367bcc9..7c9780a 100644 +index c33d564..c0633a4 100644 --- a/src/main/java/net/minecraft/server/EntityArrow.java +++ b/src/main/java/net/minecraft/server/EntityArrow.java @@ -144,7 +144,7 @@ public class EntityArrow extends Entity implements IProjectile { if (block == this.g && i == this.h) { - ++this.j; -- if (this.j == 1200) { -+ if (this.j == world.spigotConfig.arrowDespawnRate) { // Spigot + ++this.at; +- if (this.at == 1200) { ++ if (this.at == world.spigotConfig.arrowDespawnRate) { this.die(); } } else { @@ -34,5 +34,5 @@ index 82d59e7..2ec047c 100644 + } } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0059-Watchdog-Thread.patch b/CraftBukkit-Patches/0059-Watchdog-Thread.patch index e71b5dc837..3935bb33d6 100644 --- a/CraftBukkit-Patches/0059-Watchdog-Thread.patch +++ b/CraftBukkit-Patches/0059-Watchdog-Thread.patch @@ -1,14 +1,14 @@ -From 087a9d5ec0df8f70d0c0d9d5cf2f34d3cd59d37a Mon Sep 17 00:00:00 2001 +From 8316892609dcb021aeb85d249d76a8a350cb42dd Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 23 Feb 2013 12:33:20 +1100 Subject: [PATCH] Watchdog Thread. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index b082ad2..1e83999 100644 +index f9cbe47..2407ab2 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -485,6 +485,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo +@@ -488,6 +488,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo this.a(crashreport); } finally { try { @@ -16,7 +16,7 @@ index b082ad2..1e83999 100644 this.stop(); this.isStopped = true; } catch (Throwable throwable1) { -@@ -675,6 +676,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo +@@ -678,6 +679,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo SpigotTimings.tickablesTimer.stopTiming(); // Spigot this.methodProfiler.b(); @@ -290,5 +290,5 @@ index 0000000..de08ad6 + } +} -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0061-BungeeCord-Support.patch b/CraftBukkit-Patches/0061-BungeeCord-Support.patch index c61ac35ebc..a071e27878 100644 --- a/CraftBukkit-Patches/0061-BungeeCord-Support.patch +++ b/CraftBukkit-Patches/0061-BungeeCord-Support.patch @@ -1,4 +1,4 @@ -From 8efc549832c3ed150b6427738460301fce938ab5 Mon Sep 17 00:00:00 2001 +From 801e2763278c04fdae00d5c825364fcc11d39ce9 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 1 Dec 2013 18:18:41 +1100 Subject: [PATCH] BungeeCord Support @@ -6,11 +6,11 @@ Subject: [PATCH] BungeeCord Support Provides support for IP forwarding via BungeeCord. diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java -index ff7b3d3..0215891 100644 +index b80a760..42539b4 100644 --- a/src/main/java/net/minecraft/server/HandshakeListener.java +++ b/src/main/java/net/minecraft/server/HandshakeListener.java @@ -73,6 +73,22 @@ public class HandshakeListener implements PacketHandshakingInListener { - this.b.a((IChatBaseComponent) chatcomponenttext); + this.b.close(chatcomponenttext); } else { this.b.a((PacketListener) (new LoginListener(this.a, this.b))); + // Spigot Start @@ -18,13 +18,13 @@ index ff7b3d3..0215891 100644 + String[] split = packethandshakinginsetprotocol.b.split("\00"); + if ( split.length == 3 ) { + packethandshakinginsetprotocol.b = split[0]; -+ b.l = new java.net.InetSocketAddress(split[1], ((java.net.InetSocketAddress) b.getSocketAddress()).getPort()); ++ b.n = new java.net.InetSocketAddress(split[1], ((java.net.InetSocketAddress) b.getSocketAddress()).getPort()); + b.spoofedUUID = split[2]; + } else + { + chatcomponenttext = new ChatComponentText("If you wish to use IP forwarding, please enable it in your BungeeCord config as well!"); + this.b.handle(new PacketLoginOutDisconnect(chatcomponenttext), new GenericFutureListener[0]); -+ this.b.a(chatcomponenttext); ++ this.b.close(chatcomponenttext); + return; + } + } @@ -33,7 +33,7 @@ index ff7b3d3..0215891 100644 } break; diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index 6beac82..aa06e92 100644 +index dddd9aa..efba029 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java @@ -61,9 +61,18 @@ public class LoginListener implements PacketLoginInListener { @@ -57,35 +57,35 @@ index 6beac82..aa06e92 100644 + // Spigot End } - // CraftBukkit start + // CraftBukkit start - fire PlayerLoginEvent diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java -index 8f829bb..6b2fbb9 100644 +index 9ff1694..f6cca80 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java -@@ -34,7 +34,8 @@ public class NetworkManager extends SimpleChannelInboundHandler { - private final Queue i = Queues.newConcurrentLinkedQueue(); - private final Queue j = Queues.newConcurrentLinkedQueue(); - private Channel k; -- private SocketAddress l; -+ public SocketAddress l; // Spigot +@@ -36,7 +36,8 @@ public class NetworkManager extends SimpleChannelInboundHandler { + private final Queue k = Queues.newConcurrentLinkedQueue(); + private final Queue l = Queues.newConcurrentLinkedQueue(); + private Channel m; +- private SocketAddress n; ++ public SocketAddress n; // Spigot + public String spoofedUUID; // Spigot - private PacketListener m; - private EnumProtocol n; - private IChatBaseComponent o; -@@ -195,4 +196,11 @@ public class NetworkManager extends SimpleChannelInboundHandler { + private PacketListener o; + private EnumProtocol p; + private IChatBaseComponent q; +@@ -196,4 +197,11 @@ public class NetworkManager extends SimpleChannelInboundHandler { static Channel a(NetworkManager networkmanager) { - return networkmanager.k; + return networkmanager.m; } + + // Spigot Start + public SocketAddress getRawAddress() + { -+ return this.k.remoteAddress(); ++ return this.m.remoteAddress(); + } + // Spigot End } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 1b902b2..a85b08e 100644 +index d5903b7..3b626be 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1259,6 +1259,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -101,6 +101,27 @@ index 1b902b2..a85b08e 100644 public boolean getCollidesWithEntities() { return getHandle().collidesWithEntities; +diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java +index a8840c9..922981e 100644 +--- a/src/main/java/org/spigotmc/RestartCommand.java ++++ b/src/main/java/org/spigotmc/RestartCommand.java +@@ -44,7 +44,6 @@ public class RestartCommand extends Command + for ( EntityPlayer p : (List< EntityPlayer>) MinecraftServer.getServer().getPlayerList().players ) + { + p.playerConnection.disconnect(SpigotConfig.restartMessage); +- p.playerConnection.networkManager.d(); + } + // Give the socket a chance to send the packets + try +@@ -54,7 +53,7 @@ public class RestartCommand extends Command + { + } + // Close the socket so we can rebind with the new process +- MinecraftServer.getServer().ag().b(); ++ MinecraftServer.getServer().ah().b(); + + // Give time for it to kick in + try diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java index 2ea1be7..08bd5ba 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java @@ -121,5 +142,5 @@ index 2ea1be7..08bd5ba 100644 + } } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0062-Clear-Flower-Pot-on-Drop.patch b/CraftBukkit-Patches/0062-Clear-Flower-Pot-on-Drop.patch index ab0be20289..db47f4e274 100644 --- a/CraftBukkit-Patches/0062-Clear-Flower-Pot-on-Drop.patch +++ b/CraftBukkit-Patches/0062-Clear-Flower-Pot-on-Drop.patch @@ -1,22 +1,14 @@ -From 0749941d3890d4578ac97462a0477c9543c6760b Mon Sep 17 00:00:00 2001 +From 12f40424d9f22422e3ccabdd0738611b07f1cd38 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 3 Dec 2013 11:07:48 +1100 Subject: [PATCH] Clear Flower Pot on Drop diff --git a/src/main/java/net/minecraft/server/BlockFlowerPot.java b/src/main/java/net/minecraft/server/BlockFlowerPot.java -index ef909f7..734dcb4 100644 +index ca6f4f0..0fa90b4 100644 --- a/src/main/java/net/minecraft/server/BlockFlowerPot.java +++ b/src/main/java/net/minecraft/server/BlockFlowerPot.java -@@ -91,6 +91,7 @@ public class BlockFlowerPot extends BlockContainer { - - if (tileentityflowerpot != null && tileentityflowerpot.a() != null) { - this.a(world, i, j, k, new ItemStack(tileentityflowerpot.a(), 1, tileentityflowerpot.b())); -+ tileentityflowerpot.a( null, 0 ); // Spigot - } - } - -@@ -99,6 +100,7 @@ public class BlockFlowerPot extends BlockContainer { +@@ -90,6 +90,7 @@ public class BlockFlowerPot extends BlockContainer { if (tileentityflowerpot != null && tileentityflowerpot.a() != null) { this.a(world, i, j, k, new ItemStack(tileentityflowerpot.a(), 1, tileentityflowerpot.b())); @@ -25,5 +17,5 @@ index ef909f7..734dcb4 100644 super.remove(world, i, j, k, block, l); -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0067-Orebfuscator.patch b/CraftBukkit-Patches/0067-Orebfuscator.patch index ae377954d7..a06c400017 100644 --- a/CraftBukkit-Patches/0067-Orebfuscator.patch +++ b/CraftBukkit-Patches/0067-Orebfuscator.patch @@ -1,11 +1,11 @@ -From 12b26878b74809fdc31849a62af13bb96247362f Mon Sep 17 00:00:00 2001 +From 709f06163f0640d423ef0a76b7a045a1eb7aeda7 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 16 May 2013 18:51:05 +1000 Subject: [PATCH] Orebfuscator diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java -index 991a765..e15840b 100644 +index bc51217..8335e89 100644 --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java @@ -86,6 +86,7 @@ public class EntityFallingBlock extends Entity { @@ -25,7 +25,7 @@ index 991a765..e15840b 100644 if (this.id instanceof BlockFalling) { ((BlockFalling) this.id).a(this.world, i, j, k, this.data); diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java -index 39e5b5b..d2587c1 100644 +index d6ac728..229b296 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java @@ -239,6 +239,7 @@ public class Explosion { @@ -103,7 +103,7 @@ index bf3a139..30bf8a7 100644 Deflater deflater = localDeflater.get(); deflater.reset(); diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java -index bceba7b..c963fac 100644 +index 2db45ad..97fe53c 100644 --- a/src/main/java/net/minecraft/server/PlayerInteractManager.java +++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java @@ -173,6 +173,7 @@ public class PlayerInteractManager { @@ -115,10 +115,10 @@ index bceba7b..c963fac 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 5fb3fbf..3f47a76 100644 +index 835baf5..7e2c574 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -471,6 +471,7 @@ public abstract class World implements IBlockAccess { +@@ -470,6 +470,7 @@ public abstract class World implements IBlockAccess { this.e(i, j + 1, k, block); this.e(i, j, k - 1, block); this.e(i, j, k + 1, block); @@ -383,5 +383,5 @@ index 2ec047c..2c0501d 100644 + } } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0069-Allow-Disabling-Zombie-Villager-Aggression.patch b/CraftBukkit-Patches/0069-Allow-Disabling-Zombie-Villager-Aggression.patch index 3dea30167e..7ad748e052 100644 --- a/CraftBukkit-Patches/0069-Allow-Disabling-Zombie-Villager-Aggression.patch +++ b/CraftBukkit-Patches/0069-Allow-Disabling-Zombie-Villager-Aggression.patch @@ -1,4 +1,4 @@ -From 75f910760c30f1cbf270b14f39f59d76330c3d22 Mon Sep 17 00:00:00 2001 +From 853278fac155fac09fa20c063d57dd482ad9b270 Mon Sep 17 00:00:00 2001 From: Dylan Xaldin Date: Thu, 12 Dec 2013 18:05:03 -0600 Subject: [PATCH] Allow Disabling Zombie Villager Aggression @@ -6,10 +6,10 @@ Subject: [PATCH] Allow Disabling Zombie Villager Aggression Ability to configure if Zombies will be aggressive towards Villagers. diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 6c6e03e..5c8b0a8 100644 +index b751d01..902ecdf 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java -@@ -26,7 +26,7 @@ public class EntityZombie extends EntityMonster { +@@ -28,7 +28,7 @@ public class EntityZombie extends EntityMonster { this.getNavigation().b(true); this.goalSelector.a(0, new PathfinderGoalFloat(this)); this.goalSelector.a(2, new PathfinderGoalMeleeAttack(this, EntityHuman.class, 1.0D, false)); @@ -18,7 +18,7 @@ index 6c6e03e..5c8b0a8 100644 this.goalSelector.a(5, new PathfinderGoalMoveTowardsRestriction(this, 1.0D)); this.goalSelector.a(6, new PathfinderGoalMoveThroughVillage(this, 1.0D, false)); this.goalSelector.a(7, new PathfinderGoalRandomStroll(this, 1.0D)); -@@ -34,7 +34,7 @@ public class EntityZombie extends EntityMonster { +@@ -36,7 +36,7 @@ public class EntityZombie extends EntityMonster { this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this)); this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, true)); this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget(this, EntityHuman.class, 0, true)); @@ -44,5 +44,5 @@ index 2c0501d..042280d 100644 + } } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0070-Configurable-Amount-of-Netty-Threads.patch b/CraftBukkit-Patches/0070-Configurable-Amount-of-Netty-Threads.patch index e7efc99815..0710849e32 100644 --- a/CraftBukkit-Patches/0070-Configurable-Amount-of-Netty-Threads.patch +++ b/CraftBukkit-Patches/0070-Configurable-Amount-of-Netty-Threads.patch @@ -1,4 +1,4 @@ -From 7818de038076bd8bb1b44dc3fb2359ef59935ae3 Mon Sep 17 00:00:00 2001 +From 3fb9cd50fbf94768db176c008993ed705b40401f Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 13 Dec 2013 11:58:58 +1100 Subject: [PATCH] Configurable Amount of Netty Threads @@ -6,10 +6,10 @@ Subject: [PATCH] Configurable Amount of Netty Threads This brings back the option that the Spigot version of netty saw. By default Netty will try and use cores*2 threads, however if running multiple servers on the same machine, this can be too many threads. Additionally some people have 16 core servers. If 32 Netty threads are allowed in this setup, then the lock contention, and thus blocking between threads becomes much greater, leading to decreased performance. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 1e83999..94da13d 100644 +index 2407ab2..41a690b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -51,7 +51,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo +@@ -52,7 +52,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo private final List m = new ArrayList(); private final ICommandHandler n; public final MethodProfiler methodProfiler = new MethodProfiler(); @@ -18,7 +18,7 @@ index 1e83999..94da13d 100644 private final ServerPing p = new ServerPing(); private final Random q = new Random(); private String serverIp; -@@ -106,7 +106,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo +@@ -107,7 +107,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo i = this; this.c = proxy; // this.universe = file1; // CraftBukkit @@ -27,15 +27,15 @@ index 1e83999..94da13d 100644 this.n = new CommandDispatcher(); // this.convertable = new WorldLoaderServer(file1); // CraftBukkit - moved to DedicatedServer.init this.S = (new YggdrasilAuthenticationService(proxy, UUID.randomUUID().toString())).createMinecraftSessionService(); -@@ -1227,7 +1227,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo +@@ -1230,7 +1230,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo } - public ServerConnection ag() { + public ServerConnection ah() { - return this.o; + return ( this.o ) == null ? this.o = new ServerConnection( this ) : this.o; // Spigot } - public boolean ai() { + public boolean aj() { diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java index 08bd5ba..cfddd28 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java @@ -53,5 +53,5 @@ index 08bd5ba..cfddd28 100644 + } } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0072-Fire-PreLogin-Events-in-Offline-Mode.patch b/CraftBukkit-Patches/0072-Fire-PreLogin-Events-in-Offline-Mode.patch index 9b4e81cf56..26f6134ab2 100644 --- a/CraftBukkit-Patches/0072-Fire-PreLogin-Events-in-Offline-Mode.patch +++ b/CraftBukkit-Patches/0072-Fire-PreLogin-Events-in-Offline-Mode.patch @@ -1,16 +1,16 @@ -From 62c97feaeddb9eaceebfe726ec48857c522d2702 Mon Sep 17 00:00:00 2001 +From 1895a51bc8ae18591ad19bde12d5a6dbfc597d87 Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 18 Dec 2013 13:32:10 +1100 Subject: [PATCH] Fire PreLogin Events in Offline Mode diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java -index aa06e92..fa80b74 100644 +index efba029..6f35aa0 100644 --- a/src/main/java/net/minecraft/server/LoginListener.java +++ b/src/main/java/net/minecraft/server/LoginListener.java @@ -108,7 +108,7 @@ public class LoginListener implements PacketLoginInListener { this.g = EnumProtocolState.KEY; - this.networkManager.handle(new PacketLoginOutEncryptionBegin(this.j, this.server.I().getPublic(), this.e), new GenericFutureListener[0]); + this.networkManager.handle(new PacketLoginOutEncryptionBegin(this.j, this.server.J().getPublic(), this.e), new GenericFutureListener[0]); } else { - this.g = EnumProtocolState.READY_TO_ACCEPT; + (new ThreadPlayerLookupUUID(this, "User Authenticator #" + b.incrementAndGet())).start(); // Spigot @@ -18,10 +18,10 @@ index aa06e92..fa80b74 100644 } diff --git a/src/main/java/net/minecraft/server/ThreadPlayerLookupUUID.java b/src/main/java/net/minecraft/server/ThreadPlayerLookupUUID.java -index cc96775..ea8c269 100644 +index f48ce53..2723fb8 100644 --- a/src/main/java/net/minecraft/server/ThreadPlayerLookupUUID.java +++ b/src/main/java/net/minecraft/server/ThreadPlayerLookupUUID.java -@@ -22,47 +22,21 @@ class ThreadPlayerLookupUUID extends Thread { +@@ -22,47 +22,20 @@ class ThreadPlayerLookupUUID extends Thread { public void run() { try { @@ -32,13 +32,13 @@ index cc96775..ea8c269 100644 + LoginListener.a(this.a, EnumProtocolState.READY_TO_ACCEPT); + return; + } -+ // Spigot End - String s = (new BigInteger(MinecraftEncryption.a(LoginListener.a(this.a), LoginListener.b(this.a).I().getPublic(), LoginListener.c(this.a)))).toString(16); - - LoginListener.a(this.a, LoginListener.b(this.a).as().hasJoinedServer(new GameProfile((String) null, LoginListener.d(this.a).getName()), s)); ++ // Spigot End + String s = (new BigInteger(MinecraftEncryption.a(LoginListener.a(this.a), LoginListener.b(this.a).J().getPublic(), LoginListener.c(this.a)))).toString(16); +- + LoginListener.a(this.a, LoginListener.b(this.a).at().hasJoinedServer(new GameProfile((String) null, LoginListener.d(this.a).getName()), s)); if (LoginListener.d(this.a) != null) { -- // CraftBukkit start -- if (!this.a.networkManager.d()) { +- // CraftBukkit start - fire PlayerPreLoginEvent +- if (!this.a.networkManager.isConnected()) { - return; - } - @@ -80,15 +80,15 @@ index cc96775..ea8c269 100644 LoginListener.e().info("UUID of player " + LoginListener.d(this.a).getName() + " is " + LoginListener.d(this.a).getId()); LoginListener.a(this.a, EnumProtocolState.READY_TO_ACCEPT); } else { -@@ -79,4 +53,44 @@ class ThreadPlayerLookupUUID extends Thread { +@@ -79,4 +52,44 @@ class ThreadPlayerLookupUUID extends Thread { // CraftBukkit end } } + + private void fireLoginEvents() throws Exception + { -+ // CraftBukkit start -+ if (!this.a.networkManager.d()) { ++ // CraftBukkit start - fire PlayerPreLoginEvent ++ if (!this.a.networkManager.isConnected()) { + return; + } + @@ -126,5 +126,5 @@ index cc96775..ea8c269 100644 + } } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0073-Log-Cause-of-Unexpected-Exceptions.patch b/CraftBukkit-Patches/0073-Log-Cause-of-Unexpected-Exceptions.patch index 71b75dbeba..be166f5ba1 100644 --- a/CraftBukkit-Patches/0073-Log-Cause-of-Unexpected-Exceptions.patch +++ b/CraftBukkit-Patches/0073-Log-Cause-of-Unexpected-Exceptions.patch @@ -1,14 +1,14 @@ -From 4e7392a98e098006e2ef6ec9c50f8483b9e46728 Mon Sep 17 00:00:00 2001 +From b22dd330c76784f8a11abdca89a9c1f3be167d72 Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 18 Dec 2013 13:39:14 +1100 Subject: [PATCH] Log Cause of Unexpected Exceptions diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 94da13d..3f04557 100644 +index 41a690b..9970208 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -466,6 +466,12 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo +@@ -469,6 +469,12 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo } } catch (Throwable throwable) { h.error("Encountered an unexpected exception", throwable); @@ -22,5 +22,5 @@ index 94da13d..3f04557 100644 if (throwable instanceof ReportedException) { -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0077-More-Efficient-GetCubes.patch b/CraftBukkit-Patches/0077-More-Efficient-GetCubes.patch index 1de7ff0567..ee6e1c995d 100644 --- a/CraftBukkit-Patches/0077-More-Efficient-GetCubes.patch +++ b/CraftBukkit-Patches/0077-More-Efficient-GetCubes.patch @@ -1,14 +1,14 @@ -From 3bf9e644c463466cc076b011a112a995526bf416 Mon Sep 17 00:00:00 2001 +From 87af500446f76b4bfbe97c8254c5ac4601547b95 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 11 Jun 2013 12:17:37 +1000 Subject: [PATCH] More Efficient GetCubes diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 3f47a76..6ec7f5a 100644 +index 7e2c574..b355d00 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1053,23 +1053,42 @@ public abstract class World implements IBlockAccess { +@@ -1050,23 +1050,42 @@ public abstract class World implements IBlockAccess { int i1 = MathHelper.floor(axisalignedbb.c); int j1 = MathHelper.floor(axisalignedbb.f + 1.0D); @@ -50,11 +50,11 @@ index 3f47a76..6ec7f5a 100644 + Block block = chunk.getType(x - cx, y, z - cz ); + if ( block != null ) + { -+ block.a( this, x, y, z, axisalignedbb, this.M, entity ); ++ block.a( this, x, y, z, axisalignedbb, this.L, entity ); + } } - -- block.a(this, k1, i2, l1, axisalignedbb, this.M, entity); +- block.a(this, k1, i2, l1, axisalignedbb, this.L, entity); } } } @@ -64,5 +64,5 @@ index 3f47a76..6ec7f5a 100644 double d0 = 0.25D; List list = this.getEntities(entity, axisalignedbb.grow(d0, d0, d0)); -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0078-Add-Option-to-Nerf-Mobs-from-Spawner-s.patch b/CraftBukkit-Patches/0078-Add-Option-to-Nerf-Mobs-from-Spawner-s.patch index ad5d075972..2203043970 100644 --- a/CraftBukkit-Patches/0078-Add-Option-to-Nerf-Mobs-from-Spawner-s.patch +++ b/CraftBukkit-Patches/0078-Add-Option-to-Nerf-Mobs-from-Spawner-s.patch @@ -1,14 +1,14 @@ -From c3d006675b1d029166adab0f271edac2863eed43 Mon Sep 17 00:00:00 2001 +From ef4e63ebdb82d9d3bd57c6aab14b36cb1aef2810 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 2 Feb 2014 16:55:46 +0000 Subject: [PATCH] Add Option to Nerf Mobs from Spawner's diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 5826b50..69331ff 100644 +index 27b0a25..0ec07c2 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -117,6 +117,7 @@ public abstract class Entity { +@@ -118,6 +118,7 @@ public abstract class Entity { public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final boolean defaultActivationState; public long activatedTick = 0; @@ -17,7 +17,7 @@ index 5826b50..69331ff 100644 // Spigot end diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 885a0ef..639354b 100644 +index c8b6234..c8a4dc0 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -417,6 +417,12 @@ public abstract class EntityInsentient extends EntityLiving { @@ -34,7 +34,7 @@ index 885a0ef..639354b 100644 this.bq.a(); this.world.methodProfiler.b(); diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java -index bb6b3d5..20d9094 100644 +index b97ac4b..23f09f7 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java @@ -136,6 +136,12 @@ public abstract class MobSpawnerAbstract { @@ -80,5 +80,5 @@ index 042280d..558e9cd 100644 + } } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0081-Add-Late-Bind-Option.patch b/CraftBukkit-Patches/0081-Add-Late-Bind-Option.patch index 3ee81a0cae..9075b4c79b 100644 --- a/CraftBukkit-Patches/0081-Add-Late-Bind-Option.patch +++ b/CraftBukkit-Patches/0081-Add-Late-Bind-Option.patch @@ -1,4 +1,4 @@ -From 1b5963ba99c0a14dab58c11b058986ed15f21e9d Mon Sep 17 00:00:00 2001 +From b2a1a9e6f482c69b791f4a6d4dac0ef3f3504e89 Mon Sep 17 00:00:00 2001 From: slide23 Date: Fri, 20 Dec 2013 20:15:33 -0600 Subject: [PATCH] Add Late Bind Option @@ -6,17 +6,15 @@ Subject: [PATCH] Add Late Bind Option Add late-bind config option to delay binding until loading is done. diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -old mode 100644 -new mode 100755 -index c9bb3a6..8ec6474 +index 7946703..e91d53f 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -119,13 +119,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer this.a(MinecraftEncryption.b()); - h.info("Starting Minecraft server on " + (this.getServerIp().length() == 0 ? "*" : this.getServerIp()) + ":" + this.J()); + h.info("Starting Minecraft server on " + (this.getServerIp().length() == 0 ? "*" : this.getServerIp()) + ":" + this.K()); - try { -- this.ag().a(inetaddress, this.J()); +- this.ah().a(inetaddress, this.K()); - } catch (Throwable ioexception) { // CraftBukkit - IOException -> Throwable - h.warn("**** FAILED TO BIND TO PORT!"); - h.warn("The exception was: {}", new Object[] { ioexception.toString()}); @@ -24,7 +22,7 @@ index c9bb3a6..8ec6474 - return false; + if (!org.spigotmc.SpigotConfig.lateBind) { + try { -+ this.ag().a(inetaddress, this.J()); ++ this.ah().a(inetaddress, this.K()); + } catch (Throwable ioexception) { // CraftBukkit - IOException -> Throwable + h.warn("**** FAILED TO BIND TO PORT!"); + h.warn("The exception was: {}", new Object[] { ioexception.toString()}); @@ -41,7 +39,7 @@ index c9bb3a6..8ec6474 + + if (org.spigotmc.SpigotConfig.lateBind) { + try { -+ this.ag().a(inetaddress, this.J()); ++ this.ah().a(inetaddress, this.K()); + } catch (Throwable ioexception) { // CraftBukkit - IOException -> Throwable + h.warn("**** FAILED TO BIND TO PORT!"); + h.warn("The exception was: {}", new Object[] { ioexception.toString()}); @@ -68,5 +66,5 @@ index cfddd28..69306cb 100644 + } } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0082-Update-Chest-Animation-when-Cancelling-Event.patch b/CraftBukkit-Patches/0082-Update-Chest-Animation-when-Cancelling-Event.patch index 853d681f0e..bdb6f7b945 100644 --- a/CraftBukkit-Patches/0082-Update-Chest-Animation-when-Cancelling-Event.patch +++ b/CraftBukkit-Patches/0082-Update-Chest-Animation-when-Cancelling-Event.patch @@ -1,4 +1,4 @@ -From 4d2763697f3831eee1381c9ac5690c25ba50712b Mon Sep 17 00:00:00 2001 +From ef95f91c929c37c03bc09d142936b802d471e007 Mon Sep 17 00:00:00 2001 From: bloodshot Date: Mon, 6 Jan 2014 16:29:51 -0500 Subject: [PATCH] Update Chest Animation when Cancelling Event @@ -13,10 +13,10 @@ More info can be found here https://bukkit.atlassian.net/browse/BUKKIT-1440 diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index ab39926..550ef44 100644 +index e8756ed..b8c3540 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -629,7 +629,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -622,7 +622,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { // CraftBukkit start - Inventory open hook Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerChest(this.inventory, iinventory)); @@ -28,7 +28,7 @@ index ab39926..550ef44 100644 // CraftBukkit end this.nextContainerCounter(); -@@ -642,7 +645,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -635,7 +638,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public void openHopper(TileEntityHopper tileentityhopper) { // CraftBukkit start - Inventory open hook Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerHopper(this.inventory, tileentityhopper)); @@ -40,7 +40,7 @@ index ab39926..550ef44 100644 // CraftBukkit end this.nextContainerCounter(); -@@ -655,7 +661,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -648,7 +654,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public void openMinecartHopper(EntityMinecartHopper entityminecarthopper) { // CraftBukkit start - Inventory open hook Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerHopper(this.inventory, entityminecarthopper)); @@ -52,7 +52,7 @@ index ab39926..550ef44 100644 // CraftBukkit end this.nextContainerCounter(); -@@ -668,7 +677,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -661,7 +670,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public void openFurnace(TileEntityFurnace tileentityfurnace) { // CraftBukkit start - Inventory open hook Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerFurnace(this.inventory, tileentityfurnace)); @@ -64,7 +64,7 @@ index ab39926..550ef44 100644 // CraftBukkit end this.nextContainerCounter(); -@@ -681,7 +693,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -674,7 +686,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public void openDispenser(TileEntityDispenser tileentitydispenser) { // CraftBukkit start - Inventory open hook Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerDispenser(this.inventory, tileentitydispenser)); @@ -76,7 +76,7 @@ index ab39926..550ef44 100644 // CraftBukkit end this.nextContainerCounter(); -@@ -694,7 +709,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -687,7 +702,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public void openBrewingStand(TileEntityBrewingStand tileentitybrewingstand) { // CraftBukkit start - Inventory open hook Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerBrewingStand(this.inventory, tileentitybrewingstand)); @@ -88,7 +88,7 @@ index ab39926..550ef44 100644 // CraftBukkit end this.nextContainerCounter(); -@@ -707,7 +725,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -700,7 +718,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public void openBeacon(TileEntityBeacon tileentitybeacon) { // CraftBukkit start - Inventory open hook Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerBeacon(this.inventory, tileentitybeacon)); @@ -100,7 +100,7 @@ index ab39926..550ef44 100644 // CraftBukkit end this.nextContainerCounter(); -@@ -748,7 +769,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -743,7 +764,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { public void openHorseInventory(EntityHorse entityhorse, IInventory iinventory) { // CraftBukkit start - Inventory open hook Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerHorse(this.inventory, iinventory, entityhorse)); @@ -113,5 +113,5 @@ index ab39926..550ef44 100644 if (this.activeContainer != this.defaultContainer) { -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0084-Allow-statistics-to-be-disabled-forced.patch b/CraftBukkit-Patches/0084-Allow-statistics-to-be-disabled-forced.patch index 696ef80b61..9a905faecd 100644 --- a/CraftBukkit-Patches/0084-Allow-statistics-to-be-disabled-forced.patch +++ b/CraftBukkit-Patches/0084-Allow-statistics-to-be-disabled-forced.patch @@ -1,11 +1,11 @@ -From cc9fe7c36fb75ad75e4a7ffeea8a31c963b037b6 Mon Sep 17 00:00:00 2001 +From d8d5882a6243d30cbc331101926fd05c55e43e68 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Tue, 7 Jan 2014 15:56:26 +0000 Subject: [PATCH] Allow statistics to be disabled/forced diff --git a/src/main/java/net/minecraft/server/ServerStatisticManager.java b/src/main/java/net/minecraft/server/ServerStatisticManager.java -index 2f980cb..3f78728 100644 +index 0becb94..b868d08 100644 --- a/src/main/java/net/minecraft/server/ServerStatisticManager.java +++ b/src/main/java/net/minecraft/server/ServerStatisticManager.java @@ -32,6 +32,14 @@ public class ServerStatisticManager extends StatisticManager { @@ -17,7 +17,7 @@ index 2f980cb..3f78728 100644 + { + StatisticWrapper wrapper = new StatisticWrapper(); + wrapper.a( org.spigotmc.SpigotConfig.forcedStats.get( name ) ); -+ a.put( StatisticList.a( name ), wrapper ); ++ a.put( StatisticList.getStatistic( name ), wrapper ); + } + // Spigot end } @@ -34,11 +34,11 @@ index 2f980cb..3f78728 100644 @@ -56,6 +65,7 @@ public class ServerStatisticManager extends StatisticManager { } - public void a(EntityHuman entityhuman, Statistic statistic, int i) { + public void setStatistic(EntityHuman entityhuman, Statistic statistic, int i) { + if ( org.spigotmc.SpigotConfig.disableStatSaving ) return; // Spigot - int j = statistic.d() ? this.a(statistic) : 0; + int j = statistic.d() ? this.getStatisticValue(statistic) : 0; - super.a(entityhuman, statistic, i); + super.setStatistic(entityhuman, statistic, i); diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java index 69306cb..eaafc2d 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java @@ -90,5 +90,5 @@ index 69306cb..eaafc2d 100644 + } } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0087-Try-and-Debug-Crash-Reports-Crashing.patch b/CraftBukkit-Patches/0087-Try-and-Debug-Crash-Reports-Crashing.patch index f49ee5bfa7..377a34d4d3 100644 --- a/CraftBukkit-Patches/0087-Try-and-Debug-Crash-Reports-Crashing.patch +++ b/CraftBukkit-Patches/0087-Try-and-Debug-Crash-Reports-Crashing.patch @@ -1,14 +1,14 @@ -From 4096010abf00acf584300b57c24323b75f9173e5 Mon Sep 17 00:00:00 2001 +From 51b1cf05d2a290cdda7149222d85015d8c621404 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 12 Jan 2014 20:56:41 +1100 Subject: [PATCH] Try and Debug Crash Reports Crashing diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 3f04557..7616d7b 100644 +index 9970208..531029f 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -640,7 +640,13 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo +@@ -643,7 +643,13 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo try { worldserver.doTick(); } catch (Throwable throwable) { @@ -22,7 +22,7 @@ index 3f04557..7616d7b 100644 worldserver.a(crashreport); throw new ReportedException(crashreport); } -@@ -648,7 +654,13 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo +@@ -651,7 +657,13 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo try { worldserver.tickEntities(); } catch (Throwable throwable1) { @@ -37,5 +37,5 @@ index 3f04557..7616d7b 100644 throw new ReportedException(crashreport); } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0088-Replace-AutoSave-Mechanism.patch b/CraftBukkit-Patches/0088-Replace-AutoSave-Mechanism.patch index adf195c1c7..560082fdff 100644 --- a/CraftBukkit-Patches/0088-Replace-AutoSave-Mechanism.patch +++ b/CraftBukkit-Patches/0088-Replace-AutoSave-Mechanism.patch @@ -1,4 +1,4 @@ -From 538517612eb7012390604e378c00f40242910a28 Mon Sep 17 00:00:00 2001 +From 1718ec0e918db8a2093caa5c4483589c3a4258d9 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 12 Jan 2014 21:07:18 +1100 Subject: [PATCH] Replace AutoSave Mechanism @@ -6,10 +6,10 @@ Subject: [PATCH] Replace AutoSave Mechanism The problem here is that MinecraftServer.save(..), will attempt to sleep whilst all pending chunks are written to disk, however due to various and complicated bugs, it will wait for an incorrect amount of chunks, which may cause it to sleep for an overly long amount of time. Instead we will mimic the save-all command in its behaviour, which is both safe and performant. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 7616d7b..588ce0a 100644 +index 531029f..1b7f65e 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -568,7 +568,16 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo +@@ -572,7 +572,16 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo if ((this.autosavePeriod > 0) && ((this.ticks % this.autosavePeriod) == 0)) { // CraftBukkit this.methodProfiler.a("save"); this.t.savePlayers(); @@ -28,5 +28,5 @@ index 7616d7b..588ce0a 100644 } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0091-Support-non-prefixed-URLs.patch b/CraftBukkit-Patches/0091-Support-non-prefixed-URLs.patch index 4c1ca3d841..1ac57128c4 100644 --- a/CraftBukkit-Patches/0091-Support-non-prefixed-URLs.patch +++ b/CraftBukkit-Patches/0091-Support-non-prefixed-URLs.patch @@ -1,11 +1,11 @@ -From 97fd03acfad7a213ebf5c6f96264c9ae177451bf Mon Sep 17 00:00:00 2001 +From cf7c5f8a401cfc2d888f819689ed2b354def7944 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Sat, 18 Jan 2014 19:32:42 +0000 Subject: [PATCH] Support non-prefixed URLs diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java -index 66368f4..f4de71c 100644 +index 2b57bf8..a3de612 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java @@ -19,7 +19,7 @@ import com.google.common.collect.ImmutableMap.Builder; @@ -24,9 +24,9 @@ index 66368f4..f4de71c 100644 + if ( !( match.startsWith( "http://" ) || match.startsWith( "https://" ) ) ) { + match = "http://" + match; + } - modifier.a(new ChatClickable(EnumClickAction.OPEN_URL, match)); // Should be setChatClickable + modifier.setChatClickable(new ChatClickable(EnumClickAction.OPEN_URL, match)); appendNewComponent(matcher.end(groupId)); - modifier.a((ChatClickable) null); + modifier.setChatClickable((ChatClickable) null); @@ -96,7 +99,7 @@ public final class CraftChatMessage { appendNewComponent(message.length()); } @@ -37,5 +37,5 @@ index 66368f4..f4de71c 100644 private void appendNewComponent(int index) { -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0096-Highly-Optimized-Tick-Loop.patch b/CraftBukkit-Patches/0096-Highly-Optimized-Tick-Loop.patch index c57c19bd1d..87f931a35a 100644 --- a/CraftBukkit-Patches/0096-Highly-Optimized-Tick-Loop.patch +++ b/CraftBukkit-Patches/0096-Highly-Optimized-Tick-Loop.patch @@ -1,14 +1,14 @@ -From f3ce30c5d5beb328ac7c6070d6c9520d85730ca0 Mon Sep 17 00:00:00 2001 +From fe0feeb70937b2f8d2cf5c34da2de99c9e99ec02 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 25 Jan 2014 14:08:35 +1100 Subject: [PATCH] Highly Optimized Tick Loop diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 588ce0a..5a83c45 100644 +index 1b7f65e..6d7d52f 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -101,6 +101,12 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo +@@ -102,6 +102,12 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo public java.util.Queue processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; // CraftBukkit end @@ -21,7 +21,7 @@ index 588ce0a..5a83c45 100644 public MinecraftServer(OptionSet options, Proxy proxy) { // CraftBukkit - signature file -> OptionSet i = this; -@@ -419,6 +425,13 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo +@@ -422,6 +428,13 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo this.isRunning = false; } @@ -35,27 +35,22 @@ index 588ce0a..5a83c45 100644 public void run() { try { if (this.init()) { -@@ -429,38 +442,34 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo - this.p.setServerInfo(new ServerPingServerData("1.7.2", 4)); +@@ -432,38 +445,35 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo + this.p.setServerInfo(new ServerPingServerData("1.7.5", 4)); this.a(this.p); + // Spigot start + Arrays.fill( recentTps, 20 ); + long lastTick = System.nanoTime(), catchupTime = 0, curTime, wait, tickSection = lastTick; while (this.isRunning) { -- long k = ap(); +- long k = aq(); - long l = k - i; - - if (l > 2000L && i - this.O >= 15000L) { - if (this.server.getWarnOnOverload()) // CraftBukkit - Added option to suppress warning messages - h.warn("Can\'t keep up! Did the system time change, or is the server overloaded? Running {}ms behind, skipping {} tick(s)", new Object[] { Long.valueOf(l), Long.valueOf(l / 50L)}); - l = 2000L; -- this.O = i; -- } -- -- if (l < 0L) { -- h.warn("Time ran backwards! Did the system time change?"); -- l = 0L; + this.O = i; + curTime = System.nanoTime(); + wait = TICK_TIME - (curTime - lastTick) - catchupTime; + if (wait > 0) { @@ -66,16 +61,21 @@ index 588ce0a..5a83c45 100644 + catchupTime = Math.min(1000000000, Math.abs(wait)); } +- if (l < 0L) { +- h.warn("Time ran backwards! Did the system time change?"); +- l = 0L; +- } +- - j += l; - i = k; - if (this.worlds.get(0).everyoneDeeplySleeping()) { // CraftBukkit -- this.t(); +- this.u(); - j = 0L; - } else { - while (j > 50L) { - MinecraftServer.currentTick = (int) (System.currentTimeMillis() / 50); // CraftBukkit - j -= 50L; -- this.t(); +- this.u(); - } + if ( MinecraftServer.currentTick++ % SAMPLE_INTERVAL == 0 ) + { @@ -87,7 +87,7 @@ index 588ce0a..5a83c45 100644 } + lastTick = curTime; -- Thread.sleep(1L); +- Thread.sleep(Math.max(1L, 50L - j)); + this.t(); this.N = true; } @@ -161,5 +161,5 @@ index 0000000..2b8343d + } +} -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0100-Allow-Configuring-Chunks-per-Packet.patch b/CraftBukkit-Patches/0100-Allow-Configuring-Chunks-per-Packet.patch index 18eeb2d8ba..cdbd7309d6 100644 --- a/CraftBukkit-Patches/0100-Allow-Configuring-Chunks-per-Packet.patch +++ b/CraftBukkit-Patches/0100-Allow-Configuring-Chunks-per-Packet.patch @@ -1,14 +1,14 @@ -From 23f2f99278ea1d941d24be0c40c0c75a0eb25603 Mon Sep 17 00:00:00 2001 +From 920472922c16c6e762e3fe48c102cd3f4e17aba1 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 28 Jan 2014 20:35:35 +1100 Subject: [PATCH] Allow Configuring Chunks per Packet diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 550ef44..9b853a9 100644 +index b8c3540..f01d798 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java -@@ -210,7 +210,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -202,7 +202,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { Chunk chunk; @@ -34,5 +34,5 @@ index ffdb33e..1290829 100644 + } } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0101-Implement-Locale-Getter-for-Players.patch b/CraftBukkit-Patches/0101-Implement-Locale-Getter-for-Players.patch index 21fb56aff7..bd247501fc 100644 --- a/CraftBukkit-Patches/0101-Implement-Locale-Getter-for-Players.patch +++ b/CraftBukkit-Patches/0101-Implement-Locale-Getter-for-Players.patch @@ -1,24 +1,24 @@ -From dc9a69046656a4ddcc8d03f70b1c25c84895b099 Mon Sep 17 00:00:00 2001 +From c7ec7ec185c3fb466f1a4e4b6de3d44104663d2b Mon Sep 17 00:00:00 2001 From: Smove Date: Sat, 1 Feb 2014 18:12:16 +1100 Subject: [PATCH] Implement Locale Getter for Players diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index 9b853a9..95dbeb9 100644 +index f01d798..3785bc5 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -30,7 +30,7 @@ import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; public class EntityPlayer extends EntityHuman implements ICrafting { - private static final Logger bM = LogManager.getLogger(); + private static final Logger bL = LogManager.getLogger(); - private String locale = "en_US"; + public String locale = "en_US"; // Spigot public PlayerConnection playerConnection; public final MinecraftServer server; public final PlayerInteractManager playerInteractManager; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 6cec65a..1f685e1 100644 +index db10d5f..cb1346d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1335,6 +1335,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/CraftBukkit-Patches/0102-Cap-Entity-Collisions.patch b/CraftBukkit-Patches/0102-Cap-Entity-Collisions.patch index 28a3f75068..7f0f702269 100644 --- a/CraftBukkit-Patches/0102-Cap-Entity-Collisions.patch +++ b/CraftBukkit-Patches/0102-Cap-Entity-Collisions.patch @@ -1,4 +1,4 @@ -From 30fb5b96bffa2427581a8544d73ea1960b076cf8 Mon Sep 17 00:00:00 2001 +From 21601386ee449ed1a1cf00959ee6ea63f6049c37 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 31 Jan 2014 11:18:34 -0500 Subject: [PATCH] Cap Entity Collisions @@ -7,7 +7,7 @@ Limit a single entity to colliding a max of configurable times per tick. This will alleviate issues where living entities are hoarded in 1x1 pens. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 69331ff..4d09fdb 100644 +index 0ec07c2..c049cd8 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1021,6 +1021,7 @@ public abstract class Entity { @@ -19,10 +19,10 @@ index 69331ff..4d09fdb 100644 if (entity.passenger != this && entity.vehicle != this) { double d0 = entity.locX - this.locX; diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 35b2f75..ab28bd3 100644 +index c04ff95..7ec500e 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -1486,7 +1486,9 @@ public abstract class EntityLiving extends Entity { +@@ -1491,7 +1491,9 @@ public abstract class EntityLiving extends Entity { List list = this.world.getEntities(this, this.boundingBox.grow(0.20000000298023224D, 0.0D, 0.20000000298023224D)); if (this.R() && list != null && !list.isEmpty()) { // Spigot: Add this.R() condition @@ -32,13 +32,13 @@ index 35b2f75..ab28bd3 100644 Entity entity = (Entity) list.get(i); // TODO better check now? -@@ -1497,9 +1499,12 @@ public abstract class EntityLiving extends Entity { +@@ -1502,9 +1504,12 @@ public abstract class EntityLiving extends Entity { // CraftBukkit end - if (entity.S()) { + if (entity.R()) { + entity.numCollisions++; // Spigot + numCollisions++; // Spigot - this.n(entity); + this.o(entity); } } + numCollisions = 0; // Spigot @@ -62,5 +62,5 @@ index 1290829..b12a086 100644 + } } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0105-Add-Option-to-Silence-CommandBlock-Console.patch b/CraftBukkit-Patches/0105-Add-Option-to-Silence-CommandBlock-Console.patch index bdb6808d13..fbd2b95f00 100644 --- a/CraftBukkit-Patches/0105-Add-Option-to-Silence-CommandBlock-Console.patch +++ b/CraftBukkit-Patches/0105-Add-Option-to-Silence-CommandBlock-Console.patch @@ -1,14 +1,14 @@ -From 646f29d621734f3b8d429332d5c9d8b4b130cdea Mon Sep 17 00:00:00 2001 +From 04234e66e787b65eb2f03b64bf6242a20bc620c2 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 9 Feb 2014 14:39:01 +1100 Subject: [PATCH] Add Option to Silence CommandBlock Console diff --git a/src/main/java/net/minecraft/server/CommandDispatcher.java b/src/main/java/net/minecraft/server/CommandDispatcher.java -index e63f17c..e2389d4 100644 +index 4c21643..4e4f001 100644 --- a/src/main/java/net/minecraft/server/CommandDispatcher.java +++ b/src/main/java/net/minecraft/server/CommandDispatcher.java -@@ -82,7 +82,7 @@ public class CommandDispatcher extends CommandHandler implements ICommandDispatc +@@ -83,7 +83,7 @@ public class CommandDispatcher extends CommandHandler implements ICommandDispatc } } @@ -33,5 +33,5 @@ index 8da3cc9..7cba69f 100644 + } } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0107-Allow-Disabling-Creative-Item-Filter.patch b/CraftBukkit-Patches/0107-Allow-Disabling-Creative-Item-Filter.patch index 097bfb45b9..7defc3d38e 100644 --- a/CraftBukkit-Patches/0107-Allow-Disabling-Creative-Item-Filter.patch +++ b/CraftBukkit-Patches/0107-Allow-Disabling-Creative-Item-Filter.patch @@ -1,15 +1,15 @@ -From 1a55a32c6d00234f360f9bc887dafb9fb90bd310 Mon Sep 17 00:00:00 2001 +From 1af355c62609dbdb96ea0a2def182843748a7a8f Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 12 Feb 2014 18:18:01 +1100 Subject: [PATCH] Allow Disabling Creative Item Filter diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 692432b..25cc14b 100644 +index d79a0a4..60d0f54 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1501,7 +1501,7 @@ public class PlayerConnection implements PacketPlayInListener { - ItemStack itemstack = packetplayinsetcreativeslot.d(); + ItemStack itemstack = packetplayinsetcreativeslot.getItemStack(); boolean flag1 = packetplayinsetcreativeslot.c() >= 1 && packetplayinsetcreativeslot.c() < 36 + PlayerInventory.getHotbarSize(); // CraftBukkit - Add invalidItems check - boolean flag2 = itemstack == null || itemstack.getItem() != null && !invalidItems.contains(Item.b(itemstack.getItem())); @@ -33,5 +33,5 @@ index 7cba69f..7589246 100644 + } } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0109-Allow-vanilla-commands-to-be-the-main-version-of-a-c.patch b/CraftBukkit-Patches/0109-Allow-vanilla-commands-to-be-the-main-version-of-a-c.patch index 46293ca3f3..b0722f3686 100644 --- a/CraftBukkit-Patches/0109-Allow-vanilla-commands-to-be-the-main-version-of-a-c.patch +++ b/CraftBukkit-Patches/0109-Allow-vanilla-commands-to-be-the-main-version-of-a-c.patch @@ -1,14 +1,14 @@ -From 0b9feb94e08439f535f6a8bb1bed84ae28748938 Mon Sep 17 00:00:00 2001 +From 46d4a89c6e759170ea5806af0b0b1557d8135ea1 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Wed, 12 Feb 2014 20:44:14 +0000 Subject: [PATCH] Allow vanilla commands to be the main version of a command diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index b9a72d8..931cae7 100644 +index 9a8d2c2..a388ec7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -117,6 +117,7 @@ import org.bukkit.command.CommandSender; +@@ -118,6 +118,7 @@ import org.bukkit.command.CommandSender; import org.bukkit.command.ConsoleCommandSender; import org.bukkit.command.PluginCommand; import org.bukkit.command.SimpleCommandMap; @@ -16,7 +16,7 @@ index b9a72d8..931cae7 100644 import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.configuration.serialization.ConfigurationSerialization; -@@ -381,8 +382,11 @@ public final class CraftServer implements Server { +@@ -382,8 +383,11 @@ public final class CraftServer implements Server { } if (type == PluginLoadOrder.POSTWORLD) { @@ -29,7 +29,7 @@ index b9a72d8..931cae7 100644 commandMap.registerServerAliases(); loadCustomPermissions(); DefaultPermissions.registerCorePermissions(); -@@ -394,49 +398,62 @@ public final class CraftServer implements Server { +@@ -395,51 +399,64 @@ public final class CraftServer implements Server { pluginManager.disablePlugins(); } @@ -75,7 +75,6 @@ index b9a72d8..931cae7 100644 - commandMap.register("minecraft", new VanillaCommandWrapper(new CommandWeather(), "/weather [duration in seconds]")); - commandMap.register("minecraft", new VanillaCommandWrapper(new CommandWhitelist(), "/whitelist (add|remove) \n/whitelist (on|off|list|reload)")); - commandMap.register("minecraft", new VanillaCommandWrapper(new CommandXp(), "/xp [player]\n/xp L [player]")); -- } + // Spigot start + private void tryRegister(VanillaCommandWrapper commandWrapper, boolean first) { + if (org.spigotmc.SpigotConfig.replaceCommands.contains( commandWrapper.getName() ) ) { @@ -130,7 +129,10 @@ index b9a72d8..931cae7 100644 + tryRegister( new VanillaCommandWrapper( new CommandWeather(), "/weather [duration in seconds]" ), first ); + tryRegister( new VanillaCommandWrapper( new CommandWhitelist(), "/whitelist (add|remove) \n/whitelist (on|off|list|reload)" ), first ); + tryRegister( new VanillaCommandWrapper( new CommandXp(), "/xp [player]\n/xp L [player]" ), first ); -+ } + // This is what is in the lang file, I swear. +- commandMap.register("minecraft", new VanillaCommandWrapper(new CommandNetstat(), "/list")); ++ tryRegister( new VanillaCommandWrapper(new CommandNetstat(), "/list"), first ); + } + // Spigot end private void loadPlugin(Plugin plugin) { @@ -168,5 +170,5 @@ index 7589246..df70756 100644 + } } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0110-Unfinalize-the-isDisconnected-method-by-bukkit.patch b/CraftBukkit-Patches/0110-Unfinalize-the-isDisconnected-method-by-bukkit.patch index db6552d78e..7567efbb69 100644 --- a/CraftBukkit-Patches/0110-Unfinalize-the-isDisconnected-method-by-bukkit.patch +++ b/CraftBukkit-Patches/0110-Unfinalize-the-isDisconnected-method-by-bukkit.patch @@ -1,4 +1,4 @@ -From 1822e8d5553dc378cc35bba0982a8489935e8730 Mon Sep 17 00:00:00 2001 +From 1014e7b0cb8a6166b14ed4343d6bfda56fb14cd4 Mon Sep 17 00:00:00 2001 From: hcherndon Date: Sat, 15 Feb 2014 01:51:20 -0600 Subject: [PATCH] Unfinalize the isDisconnected() method by bukkit. @@ -6,10 +6,10 @@ Subject: [PATCH] Unfinalize the isDisconnected() method by bukkit. This would literally mean the world to me. You have no idea how much this method being final is fucking me over right now. (Working with NPC's and what not.) diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 25cc14b..f84df92 100644 +index 60d0f54..3d03320 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -1858,7 +1858,7 @@ public class PlayerConnection implements PacketPlayInListener { +@@ -1892,7 +1892,7 @@ public class PlayerConnection implements PacketPlayInListener { } // CraftBukkit start - Add "isDisconnected" method @@ -19,5 +19,5 @@ index 25cc14b..f84df92 100644 } // CraftBukkit end -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0111-Implement-Silenceable-Lightning-API.patch b/CraftBukkit-Patches/0111-Implement-Silenceable-Lightning-API.patch index 199d21af35..997be3fa1f 100644 --- a/CraftBukkit-Patches/0111-Implement-Silenceable-Lightning-API.patch +++ b/CraftBukkit-Patches/0111-Implement-Silenceable-Lightning-API.patch @@ -1,11 +1,11 @@ -From b6888ce08f9ff41399c4672b2fe3c586f84d6d94 Mon Sep 17 00:00:00 2001 +From 95af34d7340d8772be99a89e33791d100b12c8e0 Mon Sep 17 00:00:00 2001 From: drXor Date: Sun, 23 Feb 2014 16:16:59 -0400 Subject: [PATCH] Implement Silenceable Lightning API diff --git a/src/main/java/net/minecraft/server/EntityLightning.java b/src/main/java/net/minecraft/server/EntityLightning.java -index 36923bb..ae8753f 100644 +index 2fd88c0..35806d1 100644 --- a/src/main/java/net/minecraft/server/EntityLightning.java +++ b/src/main/java/net/minecraft/server/EntityLightning.java @@ -13,6 +13,8 @@ public class EntityLightning extends EntityWeather { @@ -17,7 +17,7 @@ index 36923bb..ae8753f 100644 public EntityLightning(World world, double d0, double d1, double d2) { this(world, d0, d1, d2, false); } -@@ -61,9 +63,17 @@ public class EntityLightning extends EntityWeather { +@@ -60,9 +62,17 @@ public class EntityLightning extends EntityWeather { } } @@ -37,7 +37,7 @@ index 36923bb..ae8753f 100644 this.world.makeSound(this.locX, this.locY, this.locZ, "random.explode", 2.0F, 0.5F + this.random.nextFloat() * 0.2F); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 948e81d..ab87519 100644 +index 363d8e2..466c687 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -1326,6 +1326,22 @@ public class CraftWorld implements World { @@ -101,5 +101,5 @@ index 64e346d..be4f10f 100644 + // Spigot end } -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0112-Normalize-spaces-on-when-reading-a-chat-packet.patch b/CraftBukkit-Patches/0112-Normalize-spaces-on-when-reading-a-chat-packet.patch index 834edbeb1a..f1a73b6dc5 100644 --- a/CraftBukkit-Patches/0112-Normalize-spaces-on-when-reading-a-chat-packet.patch +++ b/CraftBukkit-Patches/0112-Normalize-spaces-on-when-reading-a-chat-packet.patch @@ -1,4 +1,4 @@ -From e10f60e4889d51aa7a45c581927aed5d83ec4483 Mon Sep 17 00:00:00 2001 +From 467530c9aef6f5c2ef1a059f05a0cb3b4f7e301b Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Wed, 26 Feb 2014 14:45:22 +0000 Subject: [PATCH] Normalize spaces on when reading a chat packet @@ -18,11 +18,11 @@ index d419f0f..b26c290 100644 public void b(PacketDataSerializer packetdataserializer) throws IOException { // CraftBukkit - added throws diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index f84df92..b68cd97 100644 +index 3d03320..5dd2a0a 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -791,7 +791,7 @@ public class PlayerConnection implements PacketPlayInListener { - this.player.w(); + this.player.v(); String s = packetplayinchat.c(); - s = StringUtils.normalizeSpace(s); @@ -31,5 +31,5 @@ index f84df92..b68cd97 100644 for (int i = 0; i < s.length(); ++i) { if (!SharedConstants.isAllowedChatCharacter(s.charAt(i))) { -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0114-Prevent-hoppers-from-loading-chunks.patch b/CraftBukkit-Patches/0114-Prevent-hoppers-from-loading-chunks.patch index ef0a30f2e5..b517888de6 100644 --- a/CraftBukkit-Patches/0114-Prevent-hoppers-from-loading-chunks.patch +++ b/CraftBukkit-Patches/0114-Prevent-hoppers-from-loading-chunks.patch @@ -1,14 +1,14 @@ -From ceb43a7556e5eefba0bd62be41378afc33aebf0c Mon Sep 17 00:00:00 2001 +From c754a26dda63eab9bc55e6153e0b347c956dbeeb Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Wed, 5 Mar 2014 20:27:27 +0000 Subject: [PATCH] Prevent hoppers from loading chunks diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java -index a68b748..fc0d2b3 100644 +index a19863a..8ace84f 100644 --- a/src/main/java/net/minecraft/server/TileEntityHopper.java +++ b/src/main/java/net/minecraft/server/TileEntityHopper.java -@@ -442,6 +442,7 @@ public class TileEntityHopper extends TileEntity implements IHopper { +@@ -540,6 +540,7 @@ public class TileEntityHopper extends TileEntity implements IHopper { int i = MathHelper.floor(d0); int j = MathHelper.floor(d1); int k = MathHelper.floor(d2); @@ -17,5 +17,5 @@ index a68b748..fc0d2b3 100644 if (tileentity != null && tileentity instanceof IInventory) { -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0115-Guard-Entity-List.patch b/CraftBukkit-Patches/0115-Guard-Entity-List.patch index 95c36e5297..76cb13b5af 100644 --- a/CraftBukkit-Patches/0115-Guard-Entity-List.patch +++ b/CraftBukkit-Patches/0115-Guard-Entity-List.patch @@ -1,11 +1,11 @@ -From ea504844d0e1ee7f15c957dbac0a81cfc1a9dc73 Mon Sep 17 00:00:00 2001 +From 17538979839edcf3f31226b8216a08ba6faad631 Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 10 Mar 2014 09:03:28 +1100 Subject: [PATCH] Guard Entity List diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 6ec7f5a..d0d9ea9 100644 +index b355d00..cf2245e 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -29,7 +29,32 @@ import org.bukkit.event.weather.ThunderChangeEvent; @@ -42,7 +42,7 @@ index 6ec7f5a..d0d9ea9 100644 protected List f = new ArrayList(); public Set tileEntityList = new HashSet(); // CraftBukkit - ArrayList -> HashSet private List a = new ArrayList(); -@@ -78,6 +103,7 @@ public abstract class World implements IBlockAccess { +@@ -77,6 +102,7 @@ public abstract class World implements IBlockAccess { int[] I; // Spigot start @@ -50,7 +50,7 @@ index 6ec7f5a..d0d9ea9 100644 protected final gnu.trove.map.hash.TLongShortHashMap chunkTickList; protected float growthOdds = 100; protected float modifiedOdds = 100; -@@ -1272,6 +1298,7 @@ public abstract class World implements IBlockAccess { +@@ -1269,6 +1295,7 @@ public abstract class World implements IBlockAccess { org.spigotmc.ActivationRange.activateEntities(this); // Spigot timings.entityTick.startTiming(); // Spigot @@ -58,7 +58,7 @@ index 6ec7f5a..d0d9ea9 100644 // CraftBukkit start - Use field for loop variable for (this.tickPosition = 0; this.tickPosition < this.entityList.size(); ++this.tickPosition) { entity = (Entity) this.entityList.get(this.tickPosition); -@@ -1320,12 +1347,15 @@ public abstract class World implements IBlockAccess { +@@ -1317,12 +1344,15 @@ public abstract class World implements IBlockAccess { this.getChunkAt(j, k).b(entity); } @@ -75,5 +75,5 @@ index 6ec7f5a..d0d9ea9 100644 timings.entityTick.stopTiming(); // Spigot this.methodProfiler.c("blockEntities"); -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0116-Fix-ConcurrentModificationException-while-being-idle.patch b/CraftBukkit-Patches/0116-Fix-ConcurrentModificationException-while-being-idle.patch index 51fac9c79b..07d5d983a7 100644 --- a/CraftBukkit-Patches/0116-Fix-ConcurrentModificationException-while-being-idle.patch +++ b/CraftBukkit-Patches/0116-Fix-ConcurrentModificationException-while-being-idle.patch @@ -1,4 +1,4 @@ -From 6a1f414ca1faf1148d0a2d0db1916ff043b3a834 Mon Sep 17 00:00:00 2001 +From 97ded54c11639e45156c76c29d36cfbbd1610dc5 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Tue, 14 Jan 2014 20:11:25 +0000 Subject: [PATCH] Fix ConcurrentModificationException while being idle kicked @@ -6,18 +6,18 @@ Subject: [PATCH] Fix ConcurrentModificationException while being idle kicked diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index d0d9ea9..97486db 100644 +index cf2245e..8aa11c2 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1045,23 +1045,24 @@ public abstract class World implements IBlockAccess { +@@ -1042,23 +1042,24 @@ public abstract class World implements IBlockAccess { this.players.remove(entity); this.everyoneSleeping(); } - -- int i = entity.ai; -- int j = entity.ak; +- int i = entity.ah; +- int j = entity.aj; - -- if (entity.ah && this.isChunkLoaded(i, j)) { +- if (entity.ag && this.isChunkLoaded(i, j)) { - this.getChunkAt(i, j).b(entity); - } - @@ -28,9 +28,9 @@ index d0d9ea9..97486db 100644 - this.tickPosition--; + // Spigot start + if (!guardEntityList) { // It will get removed after the tick if we are ticking -+ int i = entity.ai; -+ int j = entity.ak; -+ if (entity.ah && this.isChunkLoaded(i, j)) { ++ int i = entity.ah; ++ int j = entity.aj; ++ if (entity.ag && this.isChunkLoaded(i, j)) { + this.getChunkAt(i, j).b(entity); } - this.entityList.remove(index); diff --git a/CraftBukkit-Patches/0118-Optimize-Player-Lookup.patch b/CraftBukkit-Patches/0118-Optimize-Player-Lookup.patch index 71e11ddcc7..0b43cf4059 100644 --- a/CraftBukkit-Patches/0118-Optimize-Player-Lookup.patch +++ b/CraftBukkit-Patches/0118-Optimize-Player-Lookup.patch @@ -1,4 +1,4 @@ -From 503e6bf3b59942ce08eabe10e0f6ece396c06514 Mon Sep 17 00:00:00 2001 +From 634e80d14c3e6eac422e23b0b94402fbb8add174 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 15 Mar 2014 14:34:03 +1100 Subject: [PATCH] Optimize Player Lookup @@ -6,7 +6,7 @@ Subject: [PATCH] Optimize Player Lookup Optimize player lookup and various player operations. We mainly do this by keeping a map instead of iterating through all players. We also speed up the duplicate login check and a few other checks by simply checking for one matching player. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 2ff1e19..9a1ea8c 100644 +index 2afea17..aef80bd 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -56,6 +56,25 @@ public abstract class PlayerList { @@ -48,7 +48,7 @@ index 2ff1e19..9a1ea8c 100644 worldserver.getPlayerChunkMap().removePlayer(entityplayer); this.players.remove(entityplayer); + removePlayer( entityplayer ); // Spigot - this.k.remove(entityplayer.getName()); + this.j.remove(entityplayer.getName()); ChunkIOExecutor.adjustPoolSize(this.getPlayerCount()); // CraftBukkit @@ -370,23 +391,14 @@ public abstract class PlayerList { @@ -126,10 +126,10 @@ index 36bcfef..55df803 100644 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 931cae7..c6f473f 100644 +index a388ec7..c7f1c95 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -500,6 +500,13 @@ public final class CraftServer implements Server { +@@ -503,6 +503,13 @@ public final class CraftServer implements Server { public Player getPlayer(final String name) { Validate.notNull(name, "Name cannot be null"); @@ -143,7 +143,7 @@ index 931cae7..c6f473f 100644 Player[] players = getOnlinePlayers(); Player found = null; -@@ -521,15 +528,10 @@ public final class CraftServer implements Server { +@@ -524,15 +531,10 @@ public final class CraftServer implements Server { public Player getPlayerExact(String name) { Validate.notNull(name, "Name cannot be null"); @@ -164,7 +164,7 @@ index 931cae7..c6f473f 100644 public int broadcastMessage(String message) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 9b0672b..93d733b 100644 +index fa51a4c..0895491 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -94,13 +94,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -183,5 +183,5 @@ index 9b0672b..93d733b 100644 public InetSocketAddress getAddress() { -- -1.8.3.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0119-Descriptive-kick-reasons-instead-of-Nope.patch b/CraftBukkit-Patches/0119-Descriptive-kick-reasons-instead-of-Nope.patch index fe86a84960..88260bc8de 100644 --- a/CraftBukkit-Patches/0119-Descriptive-kick-reasons-instead-of-Nope.patch +++ b/CraftBukkit-Patches/0119-Descriptive-kick-reasons-instead-of-Nope.patch @@ -1,14 +1,14 @@ -From 03bfe7469ed1b2d35847d1c3dc2bf5a9720eb2be Mon Sep 17 00:00:00 2001 +From 696041a1d9b08bc6f169cf4e743362ed05e3be5d Mon Sep 17 00:00:00 2001 From: drXor Date: Sat, 15 Mar 2014 01:30:05 -0400 Subject: [PATCH] Descriptive kick reasons instead of Nope! diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 4d09fdb..2bacea0 100644 +index c049cd8..37a9cae 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -217,7 +217,7 @@ public abstract class Entity { +@@ -218,7 +218,7 @@ public abstract class Entity { if ((f == Float.POSITIVE_INFINITY) || (f == Float.NEGATIVE_INFINITY)) { if (this instanceof EntityPlayer) { this.world.getServer().getLogger().warning(((CraftPlayer) this.getBukkitEntity()).getName() + " was caught trying to crash the server with an invalid yaw"); @@ -17,7 +17,7 @@ index 4d09fdb..2bacea0 100644 } f = 0; } -@@ -230,7 +230,7 @@ public abstract class Entity { +@@ -231,7 +231,7 @@ public abstract class Entity { if ((f1 == Float.POSITIVE_INFINITY) || (f1 == Float.NEGATIVE_INFINITY)) { if (this instanceof EntityPlayer) { this.world.getServer().getLogger().warning(((CraftPlayer) this.getBukkitEntity()).getName() + " was caught trying to crash the server with an invalid pitch"); @@ -27,7 +27,7 @@ index 4d09fdb..2bacea0 100644 f1 = 0; } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index b68cd97..f6bcccb 100644 +index 5dd2a0a..9649ba6 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -183,7 +183,7 @@ public class PlayerConnection implements PacketPlayInListener { @@ -40,7 +40,7 @@ index b68cd97..f6bcccb 100644 } // CraftBukkit end @@ -777,7 +777,7 @@ public class PlayerConnection implements PacketPlayInListener { - this.player.w(); + this.player.v(); } else { c.warn(this.player.getName() + " tried to set an invalid carried item"); - this.disconnect("Nope!"); // CraftBukkit @@ -49,5 +49,5 @@ index b68cd97..f6bcccb 100644 } -- -1.8.4.2 +1.8.5.2.msysgit.0 diff --git a/CraftBukkit-Patches/0121-Remove-the-lastChunkAccessed-if-it-is-unloaded.patch b/CraftBukkit-Patches/0121-Remove-the-lastChunkAccessed-if-it-is-unloaded.patch index 7685e1022e..7822aff60d 100644 --- a/CraftBukkit-Patches/0121-Remove-the-lastChunkAccessed-if-it-is-unloaded.patch +++ b/CraftBukkit-Patches/0121-Remove-the-lastChunkAccessed-if-it-is-unloaded.patch @@ -1,4 +1,4 @@ -From 2c68ddcb2ac529bdd2476720d924e5e09e588b7c Mon Sep 17 00:00:00 2001 +From e903a62a93d1db04232d902a7de96e40953609bb Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Tue, 18 Mar 2014 09:49:30 +0000 Subject: [PATCH] Remove the lastChunkAccessed if it is unloaded. @@ -6,10 +6,10 @@ Subject: [PATCH] Remove the lastChunkAccessed if it is unloaded. This fixes an issue where a chunk would be unloaded but remain in lastChunkAccessed meaning calls on getChunkAt could return a chunk that is no longer loaded, this caused an issue where the chunk could be reloaded whilst in use reverting any block changes. This caused findEndPortal to return null even after createEndPortal which would crash the server trying to teleport to a null location. diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 9ccc057..3614cb0 100644 +index 7f19bec..a9ef533 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -307,6 +307,13 @@ public class ChunkProviderServer implements IChunkProvider { +@@ -315,6 +315,13 @@ public class ChunkProviderServer implements IChunkProvider { long chunkcoordinates = this.unloadQueue.popFirst(); Chunk chunk = this.chunks.get(chunkcoordinates); if (chunk == null) continue; @@ -24,10 +24,10 @@ index 9ccc057..3614cb0 100644 ChunkUnloadEvent event = new ChunkUnloadEvent(chunk.bukkitChunk); server.getPluginManager().callEvent(event); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 97486db..02dd02e 100644 +index 8aa11c2..26c97af 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -154,7 +154,7 @@ public abstract class World implements IBlockAccess { +@@ -153,7 +153,7 @@ public abstract class World implements IBlockAccess { public boolean pvpMode; public boolean keepSpawnInMemory = true; public ChunkGenerator generator; @@ -37,7 +37,7 @@ index 97486db..02dd02e 100644 int lastZAccessed = Integer.MIN_VALUE; final Object chunkLock = new Object(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index ab87519..545ae96 100644 +index 466c687..a7393db 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -187,6 +187,14 @@ public class CraftWorld implements World {