diff --git a/Bukkit-Patches/0002-Spigot-Timings.patch b/Bukkit-Patches/0002-Spigot-Timings.patch index 1a8f448f8f..c936c83a85 100644 --- a/Bukkit-Patches/0002-Spigot-Timings.patch +++ b/Bukkit-Patches/0002-Spigot-Timings.patch @@ -1,4 +1,4 @@ -From 8436d82f19ccc283c93fa2a2a2df7621437dd5ae Mon Sep 17 00:00:00 2001 +From ab1bf3d9c222ecff67093988fa4c00009986f871 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 2 Jun 2013 10:42:57 +1000 Subject: [PATCH] Spigot Timings @@ -8,7 +8,7 @@ Adds performance tracking timings all around the Minecraft Server, and improves Plugins can track their own timings with CustomTimingsHandler diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 1eaf92d..7b25817 100644 +index 1eaf92d..cc071c6 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -301,6 +301,7 @@ public final class Bukkit { @@ -19,6 +19,36 @@ index 1eaf92d..7b25817 100644 } /** +@@ -747,4 +748,9 @@ public final class Bukkit { + public static UnsafeValues getUnsafe() { + return server.getUnsafe(); + } ++ ++ public static Server.Spigot spigot() ++ { ++ return server.spigot(); ++ } + } +diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java +index e14e9f1..573b33b 100644 +--- a/src/main/java/org/bukkit/Server.java ++++ b/src/main/java/org/bukkit/Server.java +@@ -916,4 +916,15 @@ public interface Server extends PluginMessageRecipient { + */ + @Deprecated + UnsafeValues getUnsafe(); ++ ++ public class Spigot ++ { ++ ++ public org.bukkit.configuration.file.YamlConfiguration getConfig() ++ { ++ throw new UnsupportedOperationException( "Not supported yet." ); ++ } ++ } ++ ++ Spigot spigot(); + } diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java index 87c33d9..31e4f66 100644 --- a/src/main/java/org/bukkit/command/Command.java @@ -68,10 +98,10 @@ index d75380c..f15b95d 100644 } diff --git a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java b/src/main/java/org/bukkit/command/defaults/TimingsCommand.java -index 05cfcb0..22926d6 100644 +index 05cfcb0..7907021 100644 --- a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java +++ b/src/main/java/org/bukkit/command/defaults/TimingsCommand.java -@@ -19,23 +19,97 @@ import org.bukkit.util.StringUtil; +@@ -19,23 +19,101 @@ import org.bukkit.util.StringUtil; import com.google.common.collect.ImmutableList; @@ -142,6 +172,10 @@ index 05cfcb0..22926d6 100644 + CustomTimingsHandler.printTimings(fileTimings); + fileTimings.println( "Sample time " + sampleTime + " (" + sampleTime / 1E9 + "s)" ); + ++ fileTimings.println( "" ); ++ fileTimings.println( Bukkit.spigot().getConfig().saveToString() ); ++ fileTimings.println( "" ); ++ + if ( paste ) + { + new PasteThread( sender, bout ).start(); @@ -173,7 +207,7 @@ index 05cfcb0..22926d6 100644 if (!sender.getServer().getPluginManager().useTimings()) { sender.sendMessage("Please enable timings by setting \"settings.plugin-profiling\" to true in bukkit.yml"); return true; -@@ -118,4 +192,55 @@ public class TimingsCommand extends BukkitCommand { +@@ -118,4 +196,55 @@ public class TimingsCommand extends BukkitCommand { } return ImmutableList.of(); } diff --git a/Bukkit-Patches/0030-Added-isUnbreakable-and-setUnbreakable-to-ItemMeta.patch b/Bukkit-Patches/0030-Added-isUnbreakable-and-setUnbreakable-to-ItemMeta.patch new file mode 100644 index 0000000000..7e96971756 --- /dev/null +++ b/Bukkit-Patches/0030-Added-isUnbreakable-and-setUnbreakable-to-ItemMeta.patch @@ -0,0 +1,48 @@ +From f5d98cb5c1e4609b3ff4f3eae09e1cf97792d6fa Mon Sep 17 00:00:00 2001 +From: libraryaddict +Date: Fri, 22 Aug 2014 05:31:04 -0400 +Subject: [PATCH] Added isUnbreakable and setUnbreakable to ItemMeta + + +diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java +index 397ba11..9ae3e4c 100644 +--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java ++++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java +@@ -124,6 +124,34 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable { + */ + boolean hasConflictingEnchant(Enchantment ench); + ++ // Spigot start ++ public class Spigot ++ { ++ ++ /** ++ * Sets the unbreakable tag ++ * ++ * @param unbreakable true if set unbreakable ++ */ ++ public void setUnbreakable(boolean unbreakable) ++ { ++ throw new UnsupportedOperationException( "Not supported yet." ); ++ } ++ ++ /** ++ * Return if the unbreakable tag is true ++ * ++ * @return true if the unbreakable tag is true ++ */ ++ public boolean isUnbreakable() ++ { ++ throw new UnsupportedOperationException( "Not supported yet." ); ++ } ++ } ++ ++ Spigot spigot(); ++ // Spigot end ++ + @SuppressWarnings("javadoc") + ItemMeta clone(); + } +-- +1.9.1 + diff --git a/CraftBukkit-Patches/0003-Skeleton-API-Implementations.patch b/CraftBukkit-Patches/0003-Skeleton-API-Implementations.patch index 74ade727d9..7160388ec4 100644 --- a/CraftBukkit-Patches/0003-Skeleton-API-Implementations.patch +++ b/CraftBukkit-Patches/0003-Skeleton-API-Implementations.patch @@ -1,10 +1,29 @@ -From be8a0e8c5faf4bfda4034f4b9994e496d08cd159 Mon Sep 17 00:00:00 2001 +From c62ed982d5f63622bbb66073f7cd9ef1e06db535 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 2 Jun 2013 15:10:56 +1000 Subject: [PATCH] Skeleton API Implementations This contains the basic, empty implementations for some Spigot-API extensions. They are included early in the patching progress so that compilation will still succeed midway despite the APIs only being provided by subsequent patches. +diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +index eb0b342..1fb4eeb 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +@@ -1768,4 +1768,14 @@ public final class CraftServer implements Server { + public UnsafeValues getUnsafe() { + return CraftMagicNumbers.INSTANCE; + } ++ ++ private final Spigot spigot = new Spigot() ++ { ++ ++ }; ++ ++ public Spigot spigot() ++ { ++ return spigot; ++ } + } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index f4dec5b..7112c77 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -82,6 +101,27 @@ index bbf310b..da0c78e 100644 + { + return spigot; + } ++ // Spigot end + } +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +index c9738c4..32d4a67 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +@@ -665,4 +665,16 @@ class CraftMetaItem implements ItemMeta, Repairable { + public final String toString() { + return SerializableMeta.classMap.get(getClass()) + "_META:" + serialize(); // TODO: cry + } ++ ++ // Spigot start ++ private final Spigot spigot = new Spigot() ++ { ++ }; ++ ++ @Override ++ public Spigot spigot() ++ { ++ return spigot; ++ } + // Spigot end } -- diff --git a/CraftBukkit-Patches/0005-Spigot-Configuration.patch b/CraftBukkit-Patches/0005-Spigot-Configuration.patch index da098abcb5..1ba001ceaf 100644 --- a/CraftBukkit-Patches/0005-Spigot-Configuration.patch +++ b/CraftBukkit-Patches/0005-Spigot-Configuration.patch @@ -1,4 +1,4 @@ -From b0b019f1d567c0c730eff3b2ee36d5a39577caa2 Mon Sep 17 00:00:00 2001 +From 64b60c2a33fa65f80cf068f9ade86387259c0bba Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 7 Jul 2013 09:32:53 +1000 Subject: [PATCH] Spigot Configuration @@ -55,7 +55,7 @@ index 08c506c..12c613c 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 eb0b342..d997b48 100644 +index 1fb4eeb..9d45f34 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -323,8 +323,10 @@ public final class CraftServer implements Server { @@ -96,7 +96,7 @@ index eb0b342..d997b48 100644 int pollCount = 0; diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java new file mode 100644 -index 0000000..14c1ab1 +index 0000000..8ae9862 --- /dev/null +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -0,0 +1,138 @@ @@ -134,7 +134,7 @@ index 0000000..14c1ab1 + + "IRC: #spigot @ irc.spi.gt ( http://www.spigotmc.org/pages/irc/ )\n" + + "Forums: http://www.spigotmc.org/\n"; + /*========================================================================*/ -+ static YamlConfiguration config; ++ public static YamlConfiguration config; + static int version; + static Map commands; + /*========================================================================*/ @@ -158,8 +158,8 @@ index 0000000..14c1ab1 + + commands = new HashMap(); + -+ version = getInt( "config-version", 6 ); -+ set( "config-version", 6 ); ++ version = getInt( "config-version", 7 ); ++ set( "config-version", 7 ); + readConfig( SpigotConfig.class, null ); + } + diff --git a/CraftBukkit-Patches/0013-Spigot-Timings.patch b/CraftBukkit-Patches/0013-Spigot-Timings.patch index 8b4c6b7f3e..2c3c0d012f 100644 --- a/CraftBukkit-Patches/0013-Spigot-Timings.patch +++ b/CraftBukkit-Patches/0013-Spigot-Timings.patch @@ -1,4 +1,4 @@ -From 9abee8e0c381e92a3bc16558af2bf3beb47c6c61 Mon Sep 17 00:00:00 2001 +From 8df0254fd23f072d9cc05fc57b2c26de3c80da6f Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 10 Jan 2013 00:18:11 -0500 Subject: [PATCH] Spigot Timings @@ -364,7 +364,7 @@ index 998de35..0a15416 100644 this.methodProfiler.b(); } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index c240020..9596da2 100644 +index 3a98439..69004ea 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -941,6 +941,8 @@ public class PlayerConnection implements PacketPlayInListener { @@ -574,6 +574,22 @@ index 8f25a15..d93eb8b 100644 } public BiomeMeta a(EnumCreatureType enumcreaturetype, int i, int j, int k) { +diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +index 9d45f34..01de2fd 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +@@ -1778,6 +1778,11 @@ public final class CraftServer implements Server { + private final Spigot spigot = new Spigot() + { + ++ @Override ++ public YamlConfiguration getConfig() ++ { ++ return org.spigotmc.SpigotConfig.config; ++ } + }; + + public Spigot spigot() diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index c76c3d3..28aa997 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/CraftBukkit-Patches/0146-Better-item-validation.patch b/CraftBukkit-Patches/0146-Better-item-validation.patch index 974060b919..4bfb9d5a15 100644 --- a/CraftBukkit-Patches/0146-Better-item-validation.patch +++ b/CraftBukkit-Patches/0146-Better-item-validation.patch @@ -1,9 +1,53 @@ -From 9fb3a495d25e376af9ecfaac0843ba6e339cc7d8 Mon Sep 17 00:00:00 2001 +From 79e19a02fa34f4ad5f2e2d9446ca55fd8720bbed Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Wed, 2 Jul 2014 23:35:51 +0100 Subject: [PATCH] Better item validation +diff --git a/src/main/java/net/minecraft/server/DataWatcher.java b/src/main/java/net/minecraft/server/DataWatcher.java +index e368514..395d054 100644 +--- a/src/main/java/net/minecraft/server/DataWatcher.java ++++ b/src/main/java/net/minecraft/server/DataWatcher.java +@@ -149,6 +149,17 @@ public class DataWatcher { + arraylist = new ArrayList(); + } + ++ // Spigot start - copy ItemStacks to prevent ConcurrentModificationExceptions ++ if ( watchableobject.b() instanceof ItemStack ) ++ { ++ watchableobject = new WatchableObject( ++ watchableobject.c(), ++ watchableobject.a(), ++ ( (ItemStack) watchableobject.b() ).cloneItemStack() ++ ); ++ } ++ // Spigot end ++ + arraylist.add(watchableobject); + } + } +@@ -180,6 +191,21 @@ public class DataWatcher { + this.f.readLock().lock(); + + arraylist.addAll(this.dataValues.valueCollection()); // Spigot ++ // Spigot start - copy ItemStacks to prevent ConcurrentModificationExceptions ++ for ( int i = 0; i < arraylist.size(); i++ ) ++ { ++ WatchableObject watchableobject = (WatchableObject) arraylist.get( i ); ++ if ( watchableobject.b() instanceof ItemStack ) ++ { ++ watchableobject = new WatchableObject( ++ watchableobject.c(), ++ watchableobject.a(), ++ ( (ItemStack) watchableobject.b() ).cloneItemStack() ++ ); ++ arraylist.set( i, watchableobject ); ++ } ++ } ++ // Spigot end + + this.f.readLock().unlock(); + return arraylist; diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java index a5be533..e4df5b3 100644 --- a/src/main/java/net/minecraft/server/PacketDataSerializer.java @@ -58,7 +102,7 @@ index 1cf8fce..bdc6364 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index c9738c4..ec37524 100644 +index 32d4a67..53c3f6c 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -36,6 +36,10 @@ import com.google.common.base.Strings; diff --git a/CraftBukkit-Patches/0176-Added-isUnbreakable-and-setUnbreakable-to-ItemMeta.patch b/CraftBukkit-Patches/0176-Added-isUnbreakable-and-setUnbreakable-to-ItemMeta.patch new file mode 100644 index 0000000000..9c3dcaceec --- /dev/null +++ b/CraftBukkit-Patches/0176-Added-isUnbreakable-and-setUnbreakable-to-ItemMeta.patch @@ -0,0 +1,130 @@ +From 3c80c2ee11b3d14fee29c43455ee7433bc740ff5 Mon Sep 17 00:00:00 2001 +From: libraryaddict +Date: Fri, 22 Aug 2014 05:35:16 -0400 +Subject: [PATCH] Added isUnbreakable and setUnbreakable to ItemMeta + + +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +index 7a1536f..f7a7adc 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +@@ -201,6 +201,7 @@ class CraftMetaItem implements ItemMeta, Repairable { + static final ItemMetaKey ATTRIBUTES_UUID_HIGH = new ItemMetaKey("UUIDMost"); + @Specific(Specific.To.NBT) + static final ItemMetaKey ATTRIBUTES_UUID_LOW = new ItemMetaKey("UUIDLeast"); ++ static final ItemMetaKey UNBREAKABLE = new ItemMetaKey("Unbreakable"); // Spigot + + private String displayName; + private List lore; +@@ -226,6 +227,7 @@ class CraftMetaItem implements ItemMeta, Repairable { + + this.repairCost = meta.repairCost; + this.attributes = meta.attributes; ++ spigot.setUnbreakable( meta.spigot.isUnbreakable() ); // Spigot + } + + CraftMetaItem(NBTTagCompound tag) { +@@ -418,6 +420,12 @@ class CraftMetaItem implements ItemMeta, Repairable { + } else { + attributes = null; + } ++ // Spigot start ++ if ( tag.hasKey( UNBREAKABLE.NBT ) ) ++ { ++ spigot.setUnbreakable( tag.getBoolean( UNBREAKABLE.NBT ) ); ++ } ++ // Spigot end + } + + static Map buildEnchantments(NBTTagCompound tag, ItemMetaKey key) { +@@ -458,6 +466,13 @@ class CraftMetaItem implements ItemMeta, Repairable { + } + + attributes = null; ++ // Spigot start ++ Boolean unbreakable = SerializableMeta.getObject( Boolean.class, map, UNBREAKABLE.BUKKIT, true ); ++ if ( unbreakable != null ) ++ { ++ spigot.setUnbreakable( unbreakable ); ++ } ++ // Spigot end + } + + static Map buildEnchantments(Map map, ItemMetaKey key) { +@@ -490,6 +505,13 @@ class CraftMetaItem implements ItemMeta, Repairable { + + applyEnchantments(enchantments, itemTag, ENCHANTMENTS); + ++ // Spigot start ++ if ( spigot.isUnbreakable() ) ++ { ++ itemTag.setBoolean( UNBREAKABLE.NBT, true ); ++ } ++ // Spigot end ++ + if (hasRepairCost()) { + itemTag.setInt(REPAIR.NBT, repairCost); + } +@@ -548,7 +570,7 @@ class CraftMetaItem implements ItemMeta, Repairable { + + @Overridden + boolean isEmpty() { +- return !(hasDisplayName() || hasEnchants() || hasLore() || hasAttributes() || hasRepairCost()); ++ return !(hasDisplayName() || hasEnchants() || hasLore() || hasAttributes() || hasRepairCost() || spigot.isUnbreakable()); // Spigot + } + + public String getDisplayName() { +@@ -672,7 +694,7 @@ class CraftMetaItem implements ItemMeta, Repairable { + && (this.hasEnchants() ? that.hasEnchants() && this.enchantments.equals(that.enchantments) : !that.hasEnchants()) + && (this.hasLore() ? that.hasLore() && this.lore.equals(that.lore) : !that.hasLore()) + && (this.hasAttributes() ? that.hasAttributes() && this.attributes.equals(that.attributes) : !that.hasAttributes()) +- && (this.hasRepairCost() ? that.hasRepairCost() && this.repairCost == that.repairCost : !that.hasRepairCost()); ++ && (this.hasRepairCost() ? that.hasRepairCost() && this.repairCost == that.repairCost : !that.hasRepairCost()) && this.spigot.isUnbreakable() == that.spigot.isUnbreakable(); // Spigot + } + + /** +@@ -698,6 +720,7 @@ class CraftMetaItem implements ItemMeta, Repairable { + hash = 61 * hash + (hasEnchants() ? this.enchantments.hashCode() : 0); + hash = 61 * hash + (hasAttributes() ? this.attributes.hashCode() : 0); + hash = 61 * hash + (hasRepairCost() ? this.repairCost : 0); ++ hash = 61 * hash + (spigot.isUnbreakable() ? 1231 : 1237); // Spigot + return hash; + } + +@@ -741,6 +764,13 @@ class CraftMetaItem implements ItemMeta, Repairable { + builder.put(REPAIR.BUKKIT, repairCost); + } + ++ // Spigot start ++ if ( spigot.isUnbreakable() ) ++ { ++ builder.put( UNBREAKABLE.BUKKIT, true ); ++ } ++ // Spigot end ++ + return builder; + } + +@@ -803,6 +833,19 @@ class CraftMetaItem implements ItemMeta, Repairable { + // Spigot start + private final Spigot spigot = new Spigot() + { ++ private boolean unbreakable; ++ ++ @Override ++ public void setUnbreakable(boolean setUnbreakable) ++ { ++ unbreakable = setUnbreakable; ++ } ++ ++ @Override ++ public boolean isUnbreakable() ++ { ++ return unbreakable; ++ } + }; + + @Override +-- +1.9.1 + diff --git a/CraftBukkit-Patches/0177-Configurable-Hanging-Tick.patch b/CraftBukkit-Patches/0177-Configurable-Hanging-Tick.patch new file mode 100644 index 0000000000..f7394479e0 --- /dev/null +++ b/CraftBukkit-Patches/0177-Configurable-Hanging-Tick.patch @@ -0,0 +1,37 @@ +From 4ab2de78028f2bfb974d46f49ba0c2cc27e020d8 Mon Sep 17 00:00:00 2001 +From: drXor +Date: Sat, 9 Aug 2014 13:56:51 -0400 +Subject: [PATCH] Configurable Hanging Tick + + +diff --git a/src/main/java/net/minecraft/server/EntityHanging.java b/src/main/java/net/minecraft/server/EntityHanging.java +index eec465b..106a15b 100644 +--- a/src/main/java/net/minecraft/server/EntityHanging.java ++++ b/src/main/java/net/minecraft/server/EntityHanging.java +@@ -102,7 +102,7 @@ public abstract class EntityHanging extends Entity { + this.lastX = this.locX; + this.lastY = this.locY; + this.lastZ = this.locZ; +- if (this.e++ == 100 && !this.world.isStatic) { ++ if (this.e++ == this.world.spigotConfig.hangingTickFrequency && !this.world.isStatic) { // Spigot - 100 -> this.world.spigotConfig.hangingTickFrequency + this.e = 0; + if (!this.dead && !this.survives()) { + // CraftBukkit start - fire break events +diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java +index 5e3dbf9..854ba6d 100644 +--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java ++++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java +@@ -349,4 +349,10 @@ public class SpigotWorldConfig + maxTntTicksPerTick = getInt( "max-tnt-per-tick", 100 ); + log( "Max TNT Explosions: " + maxTntTicksPerTick ); + } ++ ++ public int hangingTickFrequency; ++ private void hangingTickFrequency() ++ { ++ hangingTickFrequency = getInt( "hanging-tick-frequency", 100 ); ++ } + } +-- +1.9.1 + diff --git a/Spigot-API-Patches/0003-Stop-using-spigot-s-website-for-timings.patch b/Spigot-API-Patches/0003-Stop-using-spigot-s-website-for-timings.patch index 462fbfb6ec..27677b9e26 100644 --- a/Spigot-API-Patches/0003-Stop-using-spigot-s-website-for-timings.patch +++ b/Spigot-API-Patches/0003-Stop-using-spigot-s-website-for-timings.patch @@ -1,4 +1,4 @@ -From be2044b8ee40fa5f69689f00f61a6345d13afbc0 Mon Sep 17 00:00:00 2001 +From 26bc003c330544b2ff61c6ab19aa2f45030d1917 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 28 Jul 2014 03:26:50 -0500 Subject: [PATCH] Stop using spigot's website for timings @@ -6,10 +6,10 @@ Subject: [PATCH] Stop using spigot's website for timings There's no reason to do so at all, the fact that it just exists as a redirect is both odd and unnecessary diff --git a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java b/src/main/java/org/bukkit/command/defaults/TimingsCommand.java -index 22926d6..77e846e 100644 +index 7907021..94ce5dc 100644 --- a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java +++ b/src/main/java/org/bukkit/command/defaults/TimingsCommand.java -@@ -90,7 +90,7 @@ public class TimingsCommand extends BukkitCommand { +@@ -94,7 +94,7 @@ public class TimingsCommand extends BukkitCommand { } sender.sendMessage("Timings written to " + timings.getPath()); @@ -18,7 +18,7 @@ index 22926d6..77e846e 100644 } catch (IOException e) { } finally { -@@ -234,7 +234,7 @@ public class TimingsCommand extends BukkitCommand { +@@ -238,7 +238,7 @@ public class TimingsCommand extends BukkitCommand { String location = con.getHeaderField( "Location" ); String pasteID = location.substring( "http://paste.ubuntu.com/".length(), location.length() - 1 ); diff --git a/Spigot-Server-Patches/0031-Configurable-hanging-tick.patch b/Spigot-Server-Patches/0031-Configurable-hanging-tick.patch deleted file mode 100644 index cda76fa0a3..0000000000 --- a/Spigot-Server-Patches/0031-Configurable-hanging-tick.patch +++ /dev/null @@ -1,38 +0,0 @@ -From b376680ab8cd0bd29566e11b7879db8b6cc83fed Mon Sep 17 00:00:00 2001 -From: drXor -Date: Sat, 9 Aug 2014 17:24:20 -0500 -Subject: [PATCH] Configurable hanging tick - - -diff --git a/src/main/java/net/minecraft/server/EntityHanging.java b/src/main/java/net/minecraft/server/EntityHanging.java -index eec465b..3b6d152 100644 ---- a/src/main/java/net/minecraft/server/EntityHanging.java -+++ b/src/main/java/net/minecraft/server/EntityHanging.java -@@ -102,7 +102,7 @@ public abstract class EntityHanging extends Entity { - this.lastX = this.locX; - this.lastY = this.locY; - this.lastZ = this.locZ; -- if (this.e++ == 100 && !this.world.isStatic) { -+ if (this.e++ == this.world.paperSpigotConfig.hangingTickFrequency && !this.world.isStatic) { // PaperSpigot - 100 -> this.world.paperSpigotConfig.hangingTickFrequency - this.e = 0; - if (!this.dead && !this.survives()) { - // CraftBukkit start - fire break events -diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java -index ce3fb73..552a53c 100644 ---- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java -+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java -@@ -171,4 +171,11 @@ public class PaperSpigotWorldConfig - waterOverLavaFlowSpeed = getInt( "water-over-lava-flow-speed", 5 ); - log( "Water over lava flow speed: " + waterOverLavaFlowSpeed); - } -+ -+ public int hangingTickFrequency; -+ private void hangingTickSpeed() -+ { -+ hangingTickFrequency = getInt( "hanging-tick-frequency", 100); -+ log( "Hanging entities tick frequency: " + hangingTickFrequency); -+ } - } --- -1.9.1 - diff --git a/Spigot-Server-Patches/0032-Show-PaperSpigot-in-client-crashes-server-lists-and-.patch b/Spigot-Server-Patches/0031-Show-PaperSpigot-in-client-crashes-server-lists-and-.patch similarity index 93% rename from Spigot-Server-Patches/0032-Show-PaperSpigot-in-client-crashes-server-lists-and-.patch rename to Spigot-Server-Patches/0031-Show-PaperSpigot-in-client-crashes-server-lists-and-.patch index 9fd04faf95..02b36e5be2 100644 --- a/Spigot-Server-Patches/0032-Show-PaperSpigot-in-client-crashes-server-lists-and-.patch +++ b/Spigot-Server-Patches/0031-Show-PaperSpigot-in-client-crashes-server-lists-and-.patch @@ -1,4 +1,4 @@ -From 593eb666fbbc94ad31d0fa8edc1b396609c57817 Mon Sep 17 00:00:00 2001 +From 5c5e8954b5e7d29be492b59ddbdc182739df6133 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 19 Aug 2014 14:21:37 -0500 Subject: [PATCH] Show 'PaperSpigot' in client crashes, server lists, and diff --git a/Spigot-Server-Patches/0033-RIP-metrics.patch b/Spigot-Server-Patches/0032-RIP-metrics.patch similarity index 99% rename from Spigot-Server-Patches/0033-RIP-metrics.patch rename to Spigot-Server-Patches/0032-RIP-metrics.patch index e3db0a4c73..885ee19293 100644 --- a/Spigot-Server-Patches/0033-RIP-metrics.patch +++ b/Spigot-Server-Patches/0032-RIP-metrics.patch @@ -1,4 +1,4 @@ -From 8054c4bd0e8f23cb928f3668364a3a356e6c600b Mon Sep 17 00:00:00 2001 +From dd86a4e2b6efc65d344357aa91d81245346fb0d7 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 19 Aug 2014 14:25:40 -0500 Subject: [PATCH] RIP metrics @@ -657,7 +657,7 @@ index d9c3b63..0000000 -} \ No newline at end of file diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 919c83c..3b43e0f 100644 +index 3d089dc..211fb6e 100644 --- a/src/main/java/org/spigotmc/SpigotConfig.java +++ b/src/main/java/org/spigotmc/SpigotConfig.java @@ -48,7 +48,6 @@ public class SpigotConfig diff --git a/Spigot-Server-Patches/0034-Remove-invalid-mob-spawner-tile-entities.patch b/Spigot-Server-Patches/0033-Remove-invalid-mob-spawner-tile-entities.patch similarity index 85% rename from Spigot-Server-Patches/0034-Remove-invalid-mob-spawner-tile-entities.patch rename to Spigot-Server-Patches/0033-Remove-invalid-mob-spawner-tile-entities.patch index 8ab7491a64..266f53824d 100644 --- a/Spigot-Server-Patches/0034-Remove-invalid-mob-spawner-tile-entities.patch +++ b/Spigot-Server-Patches/0033-Remove-invalid-mob-spawner-tile-entities.patch @@ -1,4 +1,4 @@ -From 26a71dce3043888ddf32b404a9e01d11513b9e79 Mon Sep 17 00:00:00 2001 +From 4e8f6f02b5c941a718f1a60e31a198e3ac717cad Mon Sep 17 00:00:00 2001 From: Byteflux Date: Tue, 19 Aug 2014 14:51:28 -0500 Subject: [PATCH] Remove invalid mob spawner tile entities @@ -21,12 +21,12 @@ index 0423ee9..9454d4f 100644 } else { System.out.println("Attempted to place a tile entity (" + tileentity + ") at " + tileentity.x + "," + tileentity.y + "," + tileentity.z diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java -index 552a53c..b6757ac 100644 +index ce3fb73..753bdda 100644 --- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java -@@ -178,4 +178,11 @@ public class PaperSpigotWorldConfig - hangingTickFrequency = getInt( "hanging-tick-frequency", 100); - log( "Hanging entities tick frequency: " + hangingTickFrequency); +@@ -171,4 +171,11 @@ public class PaperSpigotWorldConfig + waterOverLavaFlowSpeed = getInt( "water-over-lava-flow-speed", 5 ); + log( "Water over lava flow speed: " + waterOverLavaFlowSpeed); } + + public boolean removeInvalidMobSpawnerTEs; diff --git a/Spigot-Server-Patches/0035-Optimize-TileEntity-Ticking.patch b/Spigot-Server-Patches/0034-Optimize-TileEntity-Ticking.patch similarity index 100% rename from Spigot-Server-Patches/0035-Optimize-TileEntity-Ticking.patch rename to Spigot-Server-Patches/0034-Optimize-TileEntity-Ticking.patch diff --git a/Spigot-Server-Patches/0036-Move-sound-handling-out-of-the-chest-tick-loop.patch b/Spigot-Server-Patches/0035-Move-sound-handling-out-of-the-chest-tick-loop.patch similarity index 100% rename from Spigot-Server-Patches/0036-Move-sound-handling-out-of-the-chest-tick-loop.patch rename to Spigot-Server-Patches/0035-Move-sound-handling-out-of-the-chest-tick-loop.patch