From 503d0a4dbb51858c87ee13b18d2845fdabdeba17 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 2 Jul 2014 20:47:25 -0500 Subject: [PATCH] Move our config options out of spigot.yml and into paper.yml --- .../0002-PaperSpigot-config-files.patch | 285 ++++++++++++++++++ ...l-hopper-owners-crashing-the-server.patch} | 2 +- ...ow-undead-horse-types-to-be-leashed.patch} | 30 +- ...eport-passenger-vehicle-with-player.patch} | 2 +- ...Invisible-players-don-t-have-rights.patch} | 6 +- .../0007-Add-getFloat-method-to-configs.patch | 47 --- ...007-Configurable-squid-spawn-ranges.patch} | 28 +- ...e-damage-multiplier-for-PvP-blocking.patch | 22 +- ...ctus-and-reed-natural-growth-heights.patch | 34 +-- ...figurable-baby-zombie-movement-speed.patch | 24 +- ...ger-multiplier-for-player-sprint-jum.patch | 28 +- ...13-Inverted-Daylight-Detector-Toggle.patch | 22 +- ...0015-Ability-to-disable-asynccatcher.patch | 47 +++ ...0016-Ability-to-disable-asynccatcher.patch | 40 --- ...tch => 0016-Fix-redstone-lag-issues.patch} | 2 +- ...020-Configurable-fishing-time-ranges.patch | 30 +- 16 files changed, 444 insertions(+), 205 deletions(-) create mode 100644 CraftBukkit-Patches/0002-PaperSpigot-config-files.patch rename CraftBukkit-Patches/{0002-Prevent-null-hopper-owners-crashing-the-server.patch => 0003-Prevent-null-hopper-owners-crashing-the-server.patch} (96%) rename CraftBukkit-Patches/{0003-Allow-undead-horse-types-to-be-leashed.patch => 0004-Allow-undead-horse-types-to-be-leashed.patch} (59%) rename CraftBukkit-Patches/{0004-Teleport-passenger-vehicle-with-player.patch => 0005-Teleport-passenger-vehicle-with-player.patch} (98%) rename CraftBukkit-Patches/{0005-Invisible-players-don-t-have-rights.patch => 0006-Invisible-players-don-t-have-rights.patch} (95%) delete mode 100644 CraftBukkit-Patches/0007-Add-getFloat-method-to-configs.patch rename CraftBukkit-Patches/{0006-Configurable-squid-spawn-ranges.patch => 0007-Configurable-squid-spawn-ranges.patch} (54%) create mode 100644 CraftBukkit-Patches/0015-Ability-to-disable-asynccatcher.patch delete mode 100644 CraftBukkit-Patches/0016-Ability-to-disable-asynccatcher.patch rename CraftBukkit-Patches/{0015-Fix-redstone-lag-issues.patch => 0016-Fix-redstone-lag-issues.patch} (94%) diff --git a/CraftBukkit-Patches/0002-PaperSpigot-config-files.patch b/CraftBukkit-Patches/0002-PaperSpigot-config-files.patch new file mode 100644 index 000000000..5758e2329 --- /dev/null +++ b/CraftBukkit-Patches/0002-PaperSpigot-config-files.patch @@ -0,0 +1,285 @@ +From 00702f0bae4a4aa9e7cec4bc18346646a5be8477 Mon Sep 17 00:00:00 2001 +From: Zach Brown +Date: Wed, 2 Jul 2014 22:26:16 -0500 +Subject: [PATCH] PaperSpigot config files + + +diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java +index 62d5847..a11d45a 100644 +--- a/src/main/java/net/minecraft/server/DedicatedServer.java ++++ b/src/main/java/net/minecraft/server/DedicatedServer.java +@@ -114,6 +114,10 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer + org.spigotmc.SpigotConfig.init(); + org.spigotmc.SpigotConfig.registerCommands(); + // Spigot end ++ // PaperSpigot start ++ org.github.paperspigot.PaperSpigotConfig.init(); ++ org.github.paperspigot.PaperSpigotConfig.registerCommands(); ++ // PaperSpigot end + + i.info("Generating keypair"); + this.a(MinecraftEncryption.b()); +diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java +index cb6efc0..a0a1dd1 100644 +--- a/src/main/java/net/minecraft/server/World.java ++++ b/src/main/java/net/minecraft/server/World.java +@@ -197,6 +197,7 @@ public abstract class World implements IBlockAccess { + public boolean keepSpawnInMemory = true; + public ChunkGenerator generator; + public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot ++ public final org.github.paperspigot.PaperSpigotWorldConfig paperSpigotConfig; // PaperSpigot + + public final SpigotTimings.WorldTimingsHandler timings; // Spigot + +@@ -215,6 +216,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) { + this.spigotConfig = new org.spigotmc.SpigotWorldConfig( s ); // Spigot ++ this.paperSpigotConfig = new org.github.paperspigot.PaperSpigotWorldConfig( s ); // PaperSpigot + this.generator = gen; + 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 40a9eb3..db7484a 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +@@ -815,6 +815,7 @@ public final class CraftServer implements Server { + } + + org.spigotmc.SpigotConfig.init(); // Spigot ++ org.github.paperspigot.PaperSpigotConfig.init(); // PaperSpigot + for (WorldServer world : console.worlds) { + world.difficulty = difficulty; + world.setSpawnFlags(monsters, animals); +@@ -830,12 +831,14 @@ public final class CraftServer implements Server { + world.ticksPerMonsterSpawns = this.getTicksPerMonsterSpawns(); + } + world.spigotConfig.init(); // Spigot ++ world.paperSpigotConfig.init(); // PaperSpigot + } + + pluginManager.clearPlugins(); + commandMap.clearCommands(); + resetRecipes(); + org.spigotmc.SpigotConfig.registerCommands(); // Spigot ++ org.github.paperspigot.PaperSpigotConfig.registerCommands(); // PaperSpigot + + overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*"); + +diff --git a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java +new file mode 100644 +index 0000000..5d309da +--- /dev/null ++++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java +@@ -0,0 +1,123 @@ ++package org.github.paperspigot; ++ ++import com.google.common.base.Throwables; ++import java.io.File; ++import java.io.IOException; ++import java.lang.reflect.InvocationTargetException; ++import java.lang.reflect.Method; ++import java.lang.reflect.Modifier; ++import java.util.HashMap; ++import java.util.List; ++import java.util.Map; ++import java.util.logging.Level; ++import net.minecraft.server.MinecraftServer; ++import org.bukkit.Bukkit; ++import org.bukkit.command.Command; ++import org.bukkit.configuration.file.YamlConfiguration; ++ ++public class PaperSpigotConfig ++{ ++ ++ private static final File CONFIG_FILE = new File( "paper.yml" ); ++ private static final String HEADER = "This is the main configuration file for PaperSpigot.\n" ++ + "As you can see, there's tons to configure. Some options may impact gameplay, so use\n" ++ + "with caution, and make sure you know what each option does before configuring.\n" ++ + "\n" ++ + "If you need help with the configuration or have any questions related to PaperSpigot,\n" ++ + "join us at the IRC.\n" ++ + "\n" ++ + "IRC: #paperspigot @ irc.spi.gt ( http://irc.spi.gt/iris/?channels=PaperSpigot )\n"; ++ /*========================================================================*/ ++ static YamlConfiguration config; ++ static int version; ++ static Map commands; ++ /*========================================================================*/ ++ ++ public static void init() ++ { ++ config = YamlConfiguration.loadConfiguration( CONFIG_FILE ); ++ config.options().header( HEADER ); ++ config.options().copyDefaults( true ); ++ ++ commands = new HashMap(); ++ ++ version = getInt( "config-version", 6 ); ++ set( "config-version", 6 ); ++ readConfig( PaperSpigotConfig.class, null ); ++ } ++ ++ public static void registerCommands() ++ { ++ for ( Map.Entry entry : commands.entrySet() ) ++ { ++ MinecraftServer.getServer().server.getCommandMap().register( entry.getKey(), "PaperSpigot", entry.getValue() ); ++ } ++ } ++ ++ static void readConfig(Class clazz, Object instance) ++ { ++ for ( Method method : clazz.getDeclaredMethods() ) ++ { ++ if ( Modifier.isPrivate( method.getModifiers() ) ) ++ { ++ if ( method.getParameterTypes().length == 0 && method.getReturnType() == Void.TYPE ) ++ { ++ try ++ { ++ method.setAccessible( true ); ++ method.invoke( instance ); ++ } catch ( InvocationTargetException ex ) ++ { ++ Throwables.propagate( ex.getCause() ); ++ } catch ( Exception ex ) ++ { ++ Bukkit.getLogger().log( Level.SEVERE, "Error invoking " + method, ex ); ++ } ++ } ++ } ++ } ++ ++ try ++ { ++ config.save( CONFIG_FILE ); ++ } catch ( IOException ex ) ++ { ++ Bukkit.getLogger().log( Level.SEVERE, "Could not save " + CONFIG_FILE, ex ); ++ } ++ } ++ ++ private static void set(String path, Object val) ++ { ++ config.set( path, val ); ++ } ++ ++ private static boolean getBoolean(String path, boolean def) ++ { ++ config.addDefault( path, def ); ++ return config.getBoolean( path, config.getBoolean( path ) ); ++ } ++ ++ private static float getFloat(String path, int def) ++ { ++ config.addDefault( path, def ); ++ return config.getFloat( path, config.getFloat( path ) ); ++ } ++ ++ private static int getInt(String path, int def) ++ { ++ config.addDefault( path, def ); ++ return config.getInt( path, config.getInt( path ) ); ++ } ++ ++ private static List getList(String path, T def) ++ { ++ config.addDefault( path, def ); ++ return (List) config.getList( path, config.getList( path ) ); ++ } ++ ++ private static String getString(String path, String def) ++ { ++ config.addDefault( path, def ); ++ return config.getString( path, config.getString( path ) ); ++ } ++} +\ No newline at end of file +diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +new file mode 100644 +index 0000000..95298f3 +--- /dev/null ++++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +@@ -0,0 +1,77 @@ ++package org.github.paperspigot; ++ ++import java.util.List; ++import org.bukkit.Bukkit; ++import org.bukkit.configuration.file.YamlConfiguration; ++ ++public class PaperSpigotWorldConfig ++{ ++ ++ private final String worldName; ++ private final YamlConfiguration config; ++ private boolean verbose; ++ ++ public PaperSpigotWorldConfig(String worldName) ++ { ++ this.worldName = worldName; ++ this.config = PaperSpigotConfig.config; ++ init(); ++ } ++ ++ public void init() ++ { ++ this.verbose = getBoolean( "verbose", true ); ++ ++ log( "-------- World Settings For [" + worldName + "] --------" ); ++ PaperSpigotConfig.readConfig( PaperSpigotWorldConfig.class, this ); ++ } ++ ++ private void log(String s) ++ { ++ if ( verbose ) ++ { ++ Bukkit.getLogger().info( s ); ++ } ++ } ++ ++ private void set(String path, Object val) ++ { ++ config.set( "world-settings.default." + path, val ); ++ } ++ ++ private boolean getBoolean(String path, boolean def) ++ { ++ config.addDefault( "world-settings.default." + path, def ); ++ return config.getBoolean( "world-settings." + worldName + "." + path, config.getBoolean( "world-settings.default." + path ) ); ++ } ++ ++ private double getDouble(String path, double def) ++ { ++ config.addDefault( "world-settings.default." + path, def ); ++ return config.getDouble( "world-settings." + worldName + "." + path, config.getDouble( "world-settings.default." + path ) ); ++ } ++ ++ private int getInt(String path, int def) ++ { ++ config.addDefault( "world-settings.default." + path, def ); ++ return config.getInt( "world-settings." + worldName + "." + path, config.getInt( "world-settings.default." + path ) ); ++ } ++ ++ private float getFloat(String path, float def) ++ { ++ config.addDefault( "world-settings.default." + path, def ); ++ return config.getFloat( "world-settings." + worldName + "." + path, config.getFloat( "world-settings.default." + path ) ); ++ } ++ ++ private List getList(String path, T def) ++ { ++ config.addDefault( "world-settings.default." + path, def ); ++ return (List) config.getList( "world-settings." + worldName + "." + path, config.getList( "world-settings.default." + path ) ); ++ } ++ ++ private String getString(String path, String def) ++ { ++ config.addDefault( "world-settings.default." + path, def ); ++ return config.getString( "world-settings." + worldName + "." + path, config.getString( "world-settings.default." + path ) ); ++ } ++} +\ No newline at end of file +-- +1.9.1 + diff --git a/CraftBukkit-Patches/0002-Prevent-null-hopper-owners-crashing-the-server.patch b/CraftBukkit-Patches/0003-Prevent-null-hopper-owners-crashing-the-server.patch similarity index 96% rename from CraftBukkit-Patches/0002-Prevent-null-hopper-owners-crashing-the-server.patch rename to CraftBukkit-Patches/0003-Prevent-null-hopper-owners-crashing-the-server.patch index 38bfdbae1..45fa34ddf 100644 --- a/CraftBukkit-Patches/0002-Prevent-null-hopper-owners-crashing-the-server.patch +++ b/CraftBukkit-Patches/0003-Prevent-null-hopper-owners-crashing-the-server.patch @@ -1,4 +1,4 @@ -From 8d6838044492d45dd084529a225da4c2cf9b8791 Mon Sep 17 00:00:00 2001 +From d3ac50de254102713cf758ecb7f0db8ae3d1f7cf Mon Sep 17 00:00:00 2001 From: Suddenly Date: Tue, 27 May 2014 14:00:41 +0100 Subject: [PATCH] Prevent null hopper owners crashing the server diff --git a/CraftBukkit-Patches/0003-Allow-undead-horse-types-to-be-leashed.patch b/CraftBukkit-Patches/0004-Allow-undead-horse-types-to-be-leashed.patch similarity index 59% rename from CraftBukkit-Patches/0003-Allow-undead-horse-types-to-be-leashed.patch rename to CraftBukkit-Patches/0004-Allow-undead-horse-types-to-be-leashed.patch index 4903a3288..2805dbb62 100644 --- a/CraftBukkit-Patches/0003-Allow-undead-horse-types-to-be-leashed.patch +++ b/CraftBukkit-Patches/0004-Allow-undead-horse-types-to-be-leashed.patch @@ -1,18 +1,18 @@ -From e68eda97f02a4f7e595977de5259eb89eb4f6dbd Mon Sep 17 00:00:00 2001 +From 0690a27be201fcc940f79ed5ad636953a4a11b11 Mon Sep 17 00:00:00 2001 From: Zach Brown -Date: Tue, 24 Jun 2014 07:32:04 -0500 +Date: Wed, 2 Jul 2014 22:33:09 -0500 Subject: [PATCH] Allow undead horse types to be leashed diff --git a/src/main/java/net/minecraft/server/EntityHorse.java b/src/main/java/net/minecraft/server/EntityHorse.java -index 76bde8c..2b783e5 100644 +index 76bde8c..dee187c 100644 --- a/src/main/java/net/minecraft/server/EntityHorse.java +++ b/src/main/java/net/minecraft/server/EntityHorse.java @@ -5,6 +5,8 @@ import java.util.List; import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason; // CraftBukkit -+import org.spigotmc.SpigotWorldConfig; // PaperSpigot ++import org.github.paperspigot.PaperSpigotWorldConfig; // PaperSpigot + public class EntityHorse extends EntityAnimal implements IInventoryListener { @@ -23,7 +23,7 @@ index 76bde8c..2b783e5 100644 public boolean bM() { - return !this.cE() && super.bM(); + // PaperSpigot start - configurable undead horse leashing -+ if (SpigotWorldConfig.allowUndeadHorseLeashing) { ++ if (PaperSpigotWorldConfig.allowUndeadHorseLeashing) { + return super.bM(); + } else { + return !this.cE() && super.bM(); @@ -32,22 +32,24 @@ index 76bde8c..2b783e5 100644 } protected void o(float f) { -diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index a81b7c9..b3015bb 100644 ---- a/src/main/java/org/spigotmc/SpigotWorldConfig.java -+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -317,4 +317,11 @@ public class SpigotWorldConfig - { - witherSpawnSoundRadius = getInt( "wither-spawn-sound-radius", 0 ); +diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +index 95298f3..1eb5e47 100644 +--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java ++++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +@@ -74,4 +74,11 @@ public class PaperSpigotWorldConfig + config.addDefault( "world-settings.default." + path, def ); + return config.getString( "world-settings." + worldName + "." + path, config.getString( "world-settings.default." + path ) ); } +-} +\ No newline at end of file + + public static boolean allowUndeadHorseLeashing; + private void allowUndeadHorseLeashing() + { -+ allowUndeadHorseLeashing = getBoolean( "allow-undead-horse-leashing", true); ++ allowUndeadHorseLeashing = getBoolean( "allow-undead-horse-leashing", true ); + log( "Allow undead horse types to be leashed: " + allowUndeadHorseLeashing ); + } - } ++} -- 1.9.1 diff --git a/CraftBukkit-Patches/0004-Teleport-passenger-vehicle-with-player.patch b/CraftBukkit-Patches/0005-Teleport-passenger-vehicle-with-player.patch similarity index 98% rename from CraftBukkit-Patches/0004-Teleport-passenger-vehicle-with-player.patch rename to CraftBukkit-Patches/0005-Teleport-passenger-vehicle-with-player.patch index 7dc87becd..4047494ee 100644 --- a/CraftBukkit-Patches/0004-Teleport-passenger-vehicle-with-player.patch +++ b/CraftBukkit-Patches/0005-Teleport-passenger-vehicle-with-player.patch @@ -1,4 +1,4 @@ -From f163857be5f8d4f0247074e67a45b6f47f5d84f2 Mon Sep 17 00:00:00 2001 +From 13c49b793dc7f89df0dbadf47cd8adc1e50233ed Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 17 May 2014 02:12:39 -0500 Subject: [PATCH] Teleport passenger/vehicle with player diff --git a/CraftBukkit-Patches/0005-Invisible-players-don-t-have-rights.patch b/CraftBukkit-Patches/0006-Invisible-players-don-t-have-rights.patch similarity index 95% rename from CraftBukkit-Patches/0005-Invisible-players-don-t-have-rights.patch rename to CraftBukkit-Patches/0006-Invisible-players-don-t-have-rights.patch index e0f258cce..d4b9bb44f 100644 --- a/CraftBukkit-Patches/0005-Invisible-players-don-t-have-rights.patch +++ b/CraftBukkit-Patches/0006-Invisible-players-don-t-have-rights.patch @@ -1,4 +1,4 @@ -From 1854692678903221be3d08d66f448b47b1d9311f Mon Sep 17 00:00:00 2001 +From 0bc497f464ddd1f2cf96ebbb7451ca0f022a2bc5 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sun, 18 May 2014 16:35:38 -0500 Subject: [PATCH] Invisible players don't have rights @@ -34,7 +34,7 @@ index 13903e9..b311508 100644 org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this); // CraftBukkit - Call event diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index cb6efc0..f3f48b4 100644 +index a0a1dd1..3dc8cc7 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; @@ -45,7 +45,7 @@ index cb6efc0..f3f48b4 100644 import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.craftbukkit.util.LongHashSet; import org.bukkit.craftbukkit.SpigotTimings; // Spigot -@@ -1663,6 +1664,15 @@ public abstract class World implements IBlockAccess { +@@ -1665,6 +1666,15 @@ public abstract class World implements IBlockAccess { for (int i = 0; i < list.size(); ++i) { Entity entity1 = (Entity) list.get(i); diff --git a/CraftBukkit-Patches/0007-Add-getFloat-method-to-configs.patch b/CraftBukkit-Patches/0007-Add-getFloat-method-to-configs.patch deleted file mode 100644 index 4d6fb3625..000000000 --- a/CraftBukkit-Patches/0007-Add-getFloat-method-to-configs.patch +++ /dev/null @@ -1,47 +0,0 @@ -From b9b862aedb0d9a26c58bc9e42c49b813299d6337 Mon Sep 17 00:00:00 2001 -From: Zach Brown -Date: Mon, 19 May 2014 21:08:44 -0500 -Subject: [PATCH] Add getFloat method to configs - - -diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 7c9b298..1e30d4d 100644 ---- a/src/main/java/org/spigotmc/SpigotConfig.java -+++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -120,6 +120,14 @@ public class SpigotConfig - return config.getBoolean( path, config.getBoolean( path ) ); - } - -+ // PaperSpigot start - Add getFloat -+ private static float getFloat(String path, float def) -+ { -+ config.addDefault( path, def ); -+ return config.getFloat( path, config.getFloat( path ) ); -+ } -+ // PaperSpigot end -+ - private static int getInt(String path, int def) - { - config.addDefault( path, def ); -diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 55914bf..5abecfd 100644 ---- a/src/main/java/org/spigotmc/SpigotWorldConfig.java -+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -52,6 +52,14 @@ public class SpigotWorldConfig - return config.getDouble( "world-settings." + worldName + "." + path, config.getDouble( "world-settings.default." + path ) ); - } - -+ // PaperSpigot start - Add getFloat -+ private float getFloat(String path, float def) -+ { -+ config.addDefault( "world-settings.default." + path, def ); -+ return config.getFloat( "world-settings." + worldName + "." + path, config.getFloat( "world-settings.default." + path ) ); -+ } -+ // PaperSpigot end -+ - private int getInt(String path, int def) - { - config.addDefault( "world-settings.default." + path, def ); --- -1.9.1 - diff --git a/CraftBukkit-Patches/0006-Configurable-squid-spawn-ranges.patch b/CraftBukkit-Patches/0007-Configurable-squid-spawn-ranges.patch similarity index 54% rename from CraftBukkit-Patches/0006-Configurable-squid-spawn-ranges.patch rename to CraftBukkit-Patches/0007-Configurable-squid-spawn-ranges.patch index 7bf747c5c..b3523b383 100644 --- a/CraftBukkit-Patches/0006-Configurable-squid-spawn-ranges.patch +++ b/CraftBukkit-Patches/0007-Configurable-squid-spawn-ranges.patch @@ -1,18 +1,18 @@ -From 37a993f71e3fb84bb873012982895af12dbd29eb Mon Sep 17 00:00:00 2001 +From 5561158e96616efbf02948081039b7059a9987e0 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 19 May 2014 19:30:58 -0500 Subject: [PATCH] Configurable squid spawn ranges diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java -index 493b3d8..1282544 100644 +index 493b3d8..129f306 100644 --- a/src/main/java/net/minecraft/server/EntitySquid.java +++ b/src/main/java/net/minecraft/server/EntitySquid.java @@ -2,6 +2,8 @@ package net.minecraft.server; import org.bukkit.craftbukkit.TrigMath; // CraftBukkit -+import org.spigotmc.SpigotWorldConfig; // PaperSpigot ++import org.github.paperspigot.PaperSpigotWorldConfig; // PaperSpigot + public class EntitySquid extends EntityWaterAnimal { @@ -22,17 +22,18 @@ index 493b3d8..1282544 100644 public boolean canSpawn() { - return this.locY > 45.0D && this.locY < 63.0D && super.canSpawn(); -+ return this.locY > SpigotWorldConfig.squidMinSpawnHeight && this.locY < SpigotWorldConfig.squidMaxSpawnHeight && super.canSpawn(); // PaperSpigot - Configurable squid spawn height range ++ return this.locY > PaperSpigotWorldConfig.squidMinSpawnHeight && this.locY < PaperSpigotWorldConfig.squidMaxSpawnHeight && super.canSpawn(); // PaperSpigot - Configurable squid spawn height range } } -diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index b3015bb..55914bf 100644 ---- a/src/main/java/org/spigotmc/SpigotWorldConfig.java -+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -206,6 +206,14 @@ public class SpigotWorldConfig - log( "Hopper Transfer: " + hopperTransfer + " Hopper Check: " + hopperCheck + " Hopper Amount: " + hopperAmount ); +diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +index 1eb5e47..dc8c581 100644 +--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java ++++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +@@ -81,4 +81,12 @@ public class PaperSpigotWorldConfig + allowUndeadHorseLeashing = getBoolean( "allow-undead-horse-leashing", true ); + log( "Allow undead horse types to be leashed: " + allowUndeadHorseLeashing ); } - ++ + public static double squidMinSpawnHeight; + public static double squidMaxSpawnHeight; + private void squidSpawnHeight() @@ -40,10 +41,7 @@ index b3015bb..55914bf 100644 + squidMinSpawnHeight = getDouble( "squid-spawn-height.minimum", 45.0D ); + squidMaxSpawnHeight = getDouble( "squid-spawn-height.maximum", 63.0D ); + } -+ - public boolean randomLightUpdates; - private void lightUpdates() - { + } -- 1.9.1 diff --git a/CraftBukkit-Patches/0008-Configurable-damage-multiplier-for-PvP-blocking.patch b/CraftBukkit-Patches/0008-Configurable-damage-multiplier-for-PvP-blocking.patch index 27bd801b0..a830db204 100644 --- a/CraftBukkit-Patches/0008-Configurable-damage-multiplier-for-PvP-blocking.patch +++ b/CraftBukkit-Patches/0008-Configurable-damage-multiplier-for-PvP-blocking.patch @@ -1,18 +1,18 @@ -From 066bebc34a5e98872c03aa1d671cca61322cbd3e Mon Sep 17 00:00:00 2001 +From 1fe3879c6a6f418f4fdfde6a90d901911594e75a Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 24 Jun 2014 07:39:37 -0500 Subject: [PATCH] Configurable damage multiplier for PvP blocking diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 408c514..27e8938 100644 +index 408c514..eb123ff 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -20,6 +20,8 @@ import org.bukkit.event.player.PlayerDropItemEvent; import org.bukkit.event.player.PlayerItemConsumeEvent; // CraftBukkit end -+import org.spigotmc.SpigotWorldConfig; // PaperSpigot ++import org.github.paperspigot.PaperSpigotWorldConfig; // PaperSpigot + public abstract class EntityHuman extends EntityLiving implements ICommandListener { @@ -22,17 +22,17 @@ index 408c514..27e8938 100644 if (!this.isInvulnerable()) { if (!damagesource.ignoresArmor() && this.isBlocking() && f > 0.0F) { - f = (1.0F + f) * 0.5F; -+ f = (1.0F + f) * SpigotWorldConfig.playerBlockingDamageMultiplier; // PaperSpigot - Configurable PvP blocking damage multiplier ++ f = (1.0F + f) * PaperSpigotWorldConfig.playerBlockingDamageMultiplier; // PaperSpigot - Configurable PvP blocking damage multiplier } f = this.b(damagesource, f); -diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 5abecfd..c253a1b 100644 ---- a/src/main/java/org/spigotmc/SpigotWorldConfig.java -+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -340,4 +340,10 @@ public class SpigotWorldConfig - allowUndeadHorseLeashing = getBoolean( "allow-undead-horse-leashing", true); - log( "Allow undead horse types to be leashed: " + allowUndeadHorseLeashing ); +diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +index dc8c581..9f2c3dc 100644 +--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java ++++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +@@ -89,4 +89,10 @@ public class PaperSpigotWorldConfig + squidMinSpawnHeight = getDouble( "squid-spawn-height.minimum", 45.0D ); + squidMaxSpawnHeight = getDouble( "squid-spawn-height.maximum", 63.0D ); } + + public static float playerBlockingDamageMultiplier; diff --git a/CraftBukkit-Patches/0009-Configurable-cactus-and-reed-natural-growth-heights.patch b/CraftBukkit-Patches/0009-Configurable-cactus-and-reed-natural-growth-heights.patch index b3d7c2281..0ef27974e 100644 --- a/CraftBukkit-Patches/0009-Configurable-cactus-and-reed-natural-growth-heights.patch +++ b/CraftBukkit-Patches/0009-Configurable-cactus-and-reed-natural-growth-heights.patch @@ -1,18 +1,18 @@ -From 3bdde40036b6b182e64b4e97e3007313fae0d96a Mon Sep 17 00:00:00 2001 +From 4a4bbb0cb896d1d224da7e5b319061ecf14fdfce Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 24 Jun 2014 07:44:59 -0500 Subject: [PATCH] Configurable cactus and reed natural growth heights diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java -index f55e531..7c3e426 100644 +index f55e531..cc16f1d 100644 --- a/src/main/java/net/minecraft/server/BlockCactus.java +++ b/src/main/java/net/minecraft/server/BlockCactus.java @@ -4,6 +4,8 @@ import java.util.Random; import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit -+import org.spigotmc.SpigotWorldConfig; // PaperSpigot ++import org.github.paperspigot.PaperSpigotWorldConfig; // PaperSpigot + public class BlockCactus extends Block { @@ -22,18 +22,18 @@ index f55e531..7c3e426 100644 } - if (l < 3) { -+ if (l < SpigotWorldConfig.cactusMaxHeight) { // PaperSpigot - Configurable natural growth heights ++ if (l < PaperSpigotWorldConfig.cactusMaxHeight) { // PaperSpigot - Configurable natural growth heights int i1 = world.getData(i, j, k); if (i1 >= (byte) range(3, (world.growthOdds / world.spigotConfig.cactusModifier * 15) + 0.5F, 15)) { // Spigot diff --git a/src/main/java/net/minecraft/server/BlockReed.java b/src/main/java/net/minecraft/server/BlockReed.java -index 6c04ad2..d41c2fe 100644 +index 6c04ad2..9d638fe 100644 --- a/src/main/java/net/minecraft/server/BlockReed.java +++ b/src/main/java/net/minecraft/server/BlockReed.java @@ -1,5 +1,7 @@ package net.minecraft.server; -+import org.spigotmc.SpigotWorldConfig; // PaperSpigot ++import org.github.paperspigot.PaperSpigotWorldConfig; // PaperSpigot + import java.util.Random; @@ -43,18 +43,19 @@ index 6c04ad2..d41c2fe 100644 } - if (l < 3) { -+ if (l < SpigotWorldConfig.reedMaxHeight) { // PaperSpigot - Configurable natural growth heights ++ if (l < PaperSpigotWorldConfig.reedMaxHeight) { // PaperSpigot - Configurable natural growth heights int i1 = world.getData(i, j, k); if (i1 >= (byte) range(3, (world.growthOdds / world.spigotConfig.caneModifier * 15) + 0.5F, 15)) { // Spigot -diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index c253a1b..48ae578 100644 ---- a/src/main/java/org/spigotmc/SpigotWorldConfig.java -+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -222,6 +222,14 @@ public class SpigotWorldConfig - squidMaxSpawnHeight = getDouble( "squid-spawn-height.maximum", 63.0D ); +diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +index 9f2c3dc..27be0a8 100644 +--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java ++++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +@@ -95,4 +95,12 @@ public class PaperSpigotWorldConfig + { + playerBlockingDamageMultiplier = getFloat( "player-blocking-damage-multiplier", 0.5F ); } - ++ + public static int cactusMaxHeight; + public static int reedMaxHeight; + private void blockGrowthHeight() @@ -62,10 +63,7 @@ index c253a1b..48ae578 100644 + cactusMaxHeight = getInt( "max-growth-height.cactus", 3 ); + reedMaxHeight = getInt ( "max-growth-height.reeds", 3 ); + } -+ - public boolean randomLightUpdates; - private void lightUpdates() - { + } -- 1.9.1 diff --git a/CraftBukkit-Patches/0010-Configurable-baby-zombie-movement-speed.patch b/CraftBukkit-Patches/0010-Configurable-baby-zombie-movement-speed.patch index ec463120b..dddf00a7d 100644 --- a/CraftBukkit-Patches/0010-Configurable-baby-zombie-movement-speed.patch +++ b/CraftBukkit-Patches/0010-Configurable-baby-zombie-movement-speed.patch @@ -1,39 +1,39 @@ -From 347bab8975bf4d615060df418ca3c90d15681583 Mon Sep 17 00:00:00 2001 +From 2c96e2400eb7acaba33dedba40d03ee418e731ad Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 21 May 2014 15:35:12 -0500 Subject: [PATCH] Configurable baby zombie movement speed diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java -index 6cb5b14..66dd5fa 100644 +index 6cb5b14..44d523c 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java @@ -13,11 +13,13 @@ import org.bukkit.event.entity.EntityCombustEvent; import org.bukkit.event.entity.EntityTargetEvent; //CraftBukkit end -+import org.spigotmc.SpigotWorldConfig; // PaperSpigot ++import org.github.paperspigot.PaperSpigotWorldConfig; // PaperSpigot + public class EntityZombie extends EntityMonster { protected static final IAttribute bp = (new AttributeRanged("zombie.spawnReinforcements", 0.0D, 0.0D, 1.0D)).a("Spawn Reinforcements Chance"); private static final UUID bq = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836"); - private static final AttributeModifier br = new AttributeModifier(bq, "Baby speed boost", 0.5D, 1); -+ private static final AttributeModifier br = new AttributeModifier(bq, "Baby speed boost", SpigotWorldConfig.babyZombieMovementSpeed, 1); // PaperSpigot - Make baby zombie movement speed configurable ++ private static final AttributeModifier br = new AttributeModifier(bq, "Baby speed boost", PaperSpigotWorldConfig.babyZombieMovementSpeed, 1); // PaperSpigot - Make baby zombie movement speed configurable private final PathfinderGoalBreakDoor bs = new PathfinderGoalBreakDoor(this); private int bt; private boolean bu = false; -diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 48ae578..f818eca 100644 ---- a/src/main/java/org/spigotmc/SpigotWorldConfig.java -+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -354,4 +354,10 @@ public class SpigotWorldConfig - { - playerBlockingDamageMultiplier = getFloat( "player-blocking-damage-multiplier", 0.5F ); +diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +index 27be0a8..29863cd 100644 +--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java ++++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +@@ -103,4 +103,10 @@ public class PaperSpigotWorldConfig + cactusMaxHeight = getInt( "max-growth-height.cactus", 3 ); + reedMaxHeight = getInt ( "max-growth-height.reeds", 3 ); } + + public static double babyZombieMovementSpeed; -+ private void setBabyZombieMovementSpeed() ++ private void babyZombieMovementSpeed() + { + babyZombieMovementSpeed = getDouble( "baby-zombie-movement-speed", 0.5D ); + } diff --git a/CraftBukkit-Patches/0012-Configurable-hunger-multiplier-for-player-sprint-jum.patch b/CraftBukkit-Patches/0012-Configurable-hunger-multiplier-for-player-sprint-jum.patch index c10482075..8be0b1239 100644 --- a/CraftBukkit-Patches/0012-Configurable-hunger-multiplier-for-player-sprint-jum.patch +++ b/CraftBukkit-Patches/0012-Configurable-hunger-multiplier-for-player-sprint-jum.patch @@ -1,11 +1,11 @@ -From b1322fcbf7d370dd8290bc6080640cd22ceb7a40 Mon Sep 17 00:00:00 2001 +From 30265e6a9f36221e235337b9a8c0217761a9c379 Mon Sep 17 00:00:00 2001 From: gsand Date: Tue, 15 Apr 2014 18:00:02 -0700 Subject: [PATCH] Configurable hunger multiplier for player sprint jumping diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index 27e8938..5619179 100644 +index eb123ff..296bb2d 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -1256,7 +1256,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen @@ -13,27 +13,25 @@ index 27e8938..5619179 100644 this.a(StatisticList.r, 1); if (this.isSprinting()) { - this.a(0.8F); -+ this.a( SpigotWorldConfig.playerSprintJumpingHungerMultiplier ); // PaperSpigot - Configurable hunger multiplier for player sprint jumping ++ this.a(PaperSpigotWorldConfig.playerSprintJumpingHungerMultiplier); // PaperSpigot - Configurable hunger multiplier for player sprint jumping } else { this.a(0.2F); } -diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index f818eca..ecf7381 100644 ---- a/src/main/java/org/spigotmc/SpigotWorldConfig.java -+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -355,6 +355,12 @@ public class SpigotWorldConfig - playerBlockingDamageMultiplier = getFloat( "player-blocking-damage-multiplier", 0.5F ); +diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +index 014aee3..28181f2 100644 +--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java ++++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +@@ -110,4 +110,10 @@ public class PaperSpigotWorldConfig + { + babyZombieMovementSpeed = getDouble( "baby-zombie-movement-speed", 0.5D ); } - ++ + public static float playerSprintJumpingHungerMultiplier; -+ private void setPlayerSprintJumpingHungerMultiplier() ++ private void playerSprintJumpingHungerMultiplier() + { + playerSprintJumpingHungerMultiplier = getFloat( "player-sprint-jumping-hunger-multiplier", 0.8F ); + } -+ - public static double babyZombieMovementSpeed; - private void setBabyZombieMovementSpeed() - { + } -- 1.9.1 diff --git a/CraftBukkit-Patches/0013-Inverted-Daylight-Detector-Toggle.patch b/CraftBukkit-Patches/0013-Inverted-Daylight-Detector-Toggle.patch index b39bb95b5..32502ab73 100644 --- a/CraftBukkit-Patches/0013-Inverted-Daylight-Detector-Toggle.patch +++ b/CraftBukkit-Patches/0013-Inverted-Daylight-Detector-Toggle.patch @@ -1,17 +1,17 @@ -From 6313ae5947261f6c23337186e362fb860e34d839 Mon Sep 17 00:00:00 2001 +From 0ccf48e94c8a61875c2277840204509f95e65e02 Mon Sep 17 00:00:00 2001 From: gsand Date: Tue, 24 Jun 2014 08:01:42 -0500 Subject: [PATCH] Inverted Daylight Detector Toggle diff --git a/src/main/java/net/minecraft/server/BlockDaylightDetector.java b/src/main/java/net/minecraft/server/BlockDaylightDetector.java -index 96e9c37..ceda7d4 100644 +index 96e9c37..dc84635 100644 --- a/src/main/java/net/minecraft/server/BlockDaylightDetector.java +++ b/src/main/java/net/minecraft/server/BlockDaylightDetector.java @@ -1,5 +1,7 @@ package net.minecraft.server; -+import org.spigotmc.SpigotWorldConfig; // PaperSpigot ++import org.github.paperspigot.PaperSpigotWorldConfig; // PaperSpigot + import java.util.Random; @@ -25,7 +25,7 @@ index 96e9c37..ceda7d4 100644 - i1 = 0; - } + // PaperSpigot start - Inverted Daylight Detectors -+ if (SpigotWorldConfig.InvertedDaylightDetectors) { ++ if (PaperSpigotWorldConfig.InvertedDaylightDetectors) { + i1 = Math.round((float) i1 * MathHelper.cos(f) * -1 + 15); + if (i1 < 10) { + i1 = 0; @@ -50,19 +50,19 @@ index 96e9c37..ceda7d4 100644 if (l != i1) { i1 = org.bukkit.craftbukkit.event.CraftEventFactory.callRedstoneChange(world, i, j, k, l, i1).getNewCurrent(); // CraftBukkit - Call BlockRedstoneEvent -diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index ecf7381..4faa4c7 100644 ---- a/src/main/java/org/spigotmc/SpigotWorldConfig.java -+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -366,4 +366,11 @@ public class SpigotWorldConfig +diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +index f761c96..a05d5a4 100644 +--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java ++++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +@@ -115,4 +115,11 @@ public class PaperSpigotWorldConfig { - babyZombieMovementSpeed = getDouble( "baby-zombie-movement-speed", 0.5D ); + playerSprintJumpingHungerMultiplier = getFloat( "player-sprint-jumping-hunger-multiplier", 0.8F ); } + + public static boolean InvertedDaylightDetectors; + private void InvertedDaylightDetectors() + { -+ InvertedDaylightDetectors = getBoolean( "inverted-daylight-detectors", false); ++ InvertedDaylightDetectors = getBoolean( "inverted-daylight-detectors", false ); + log( "Inverted Redstone Lamps: " + InvertedDaylightDetectors ); + } } diff --git a/CraftBukkit-Patches/0015-Ability-to-disable-asynccatcher.patch b/CraftBukkit-Patches/0015-Ability-to-disable-asynccatcher.patch new file mode 100644 index 000000000..c553c3bf2 --- /dev/null +++ b/CraftBukkit-Patches/0015-Ability-to-disable-asynccatcher.patch @@ -0,0 +1,47 @@ +From be690aa73e8c1d647493a5ff8b52005009bb5ee6 Mon Sep 17 00:00:00 2001 +From: Zach Brown +Date: Wed, 2 Jul 2014 22:34:04 -0500 +Subject: [PATCH] Ability to disable asynccatcher + + +diff --git a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java +index 5d309da..5cb3f91 100644 +--- a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java ++++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java +@@ -120,4 +120,13 @@ public class PaperSpigotConfig + config.addDefault( path, def ); + return config.getString( path, config.getString( path ) ); + } +-} +\ No newline at end of file ++ ++ public static boolean asyncCatcherFeature; ++ private static void asyncCatcherFeature() ++ { ++ asyncCatcherFeature = getBoolean( "settings.async-plugin-bad-magic-catcher", true ); ++ if ( !asyncCatcherFeature ) { ++ Bukkit.getLogger().log( Level.INFO, "Disabling async plugin bad ju-ju catcher, this might be bad depending on your plugins" ); ++ } ++ } ++} +diff --git a/src/main/java/org/spigotmc/AsyncCatcher.java b/src/main/java/org/spigotmc/AsyncCatcher.java +index 4b3aa85..c4312db 100644 +--- a/src/main/java/org/spigotmc/AsyncCatcher.java ++++ b/src/main/java/org/spigotmc/AsyncCatcher.java +@@ -1,11 +1,12 @@ + package org.spigotmc; + + import net.minecraft.server.MinecraftServer; ++import org.github.paperspigot.PaperSpigotConfig; // PaperSpigot + + public class AsyncCatcher + { + +- public static boolean enabled = true; ++ public static boolean enabled = PaperSpigotConfig.asyncCatcherFeature; // PaperSpigot - AsyncCatcher override feature + + public static void catchOp(String reason) + { +-- +1.9.1 + diff --git a/CraftBukkit-Patches/0016-Ability-to-disable-asynccatcher.patch b/CraftBukkit-Patches/0016-Ability-to-disable-asynccatcher.patch deleted file mode 100644 index 5cadb9696..000000000 --- a/CraftBukkit-Patches/0016-Ability-to-disable-asynccatcher.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 3e58805306125c2d22a2944f4d8b08bfbeccc188 Mon Sep 17 00:00:00 2001 -From: Zach Brown -Date: Sat, 14 Jun 2014 22:39:58 -0500 -Subject: [PATCH] Ability to disable asynccatcher - - -diff --git a/src/main/java/org/spigotmc/AsyncCatcher.java b/src/main/java/org/spigotmc/AsyncCatcher.java -index 4b3aa85..4c78409 100644 ---- a/src/main/java/org/spigotmc/AsyncCatcher.java -+++ b/src/main/java/org/spigotmc/AsyncCatcher.java -@@ -5,7 +5,7 @@ import net.minecraft.server.MinecraftServer; - public class AsyncCatcher - { - -- public static boolean enabled = true; -+ public static boolean enabled = SpigotConfig.asyncCatcherFeature; // PaperSpigot - AsyncCatcher override feature - - public static void catchOp(String reason) - { -diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java -index 1e30d4d..22f39bd 100644 ---- a/src/main/java/org/spigotmc/SpigotConfig.java -+++ b/src/main/java/org/spigotmc/SpigotConfig.java -@@ -324,4 +324,13 @@ public class SpigotConfig - { - intCacheLimit = getInt( "settings.int-cache-limit", 1024 ); - } -+ -+ public static boolean asyncCatcherFeature; -+ private static void asyncCatcherFeature() -+ { -+ asyncCatcherFeature = getBoolean( "settings.async-plugin-bad-magic-catcher", true ); -+ if ( !asyncCatcherFeature ) { -+ Bukkit.getLogger().log( Level.INFO, "Disabling async plugin bad ju-ju catcher, this might be bad depending on your plugins" ); -+ } -+ } - } --- -1.9.1 - diff --git a/CraftBukkit-Patches/0015-Fix-redstone-lag-issues.patch b/CraftBukkit-Patches/0016-Fix-redstone-lag-issues.patch similarity index 94% rename from CraftBukkit-Patches/0015-Fix-redstone-lag-issues.patch rename to CraftBukkit-Patches/0016-Fix-redstone-lag-issues.patch index cdd80c266..50cf46d59 100644 --- a/CraftBukkit-Patches/0015-Fix-redstone-lag-issues.patch +++ b/CraftBukkit-Patches/0016-Fix-redstone-lag-issues.patch @@ -1,4 +1,4 @@ -From dd92931656ac17892ee656db91e484a24e6309f0 Mon Sep 17 00:00:00 2001 +From eecbef5691460565f960096f86e8c4c3274cc841 Mon Sep 17 00:00:00 2001 From: Iceee Date: Thu, 12 Jun 2014 13:37:35 -0500 Subject: [PATCH] Fix redstone lag issues diff --git a/CraftBukkit-Patches/0020-Configurable-fishing-time-ranges.patch b/CraftBukkit-Patches/0020-Configurable-fishing-time-ranges.patch index a07f633c5..b513e400f 100644 --- a/CraftBukkit-Patches/0020-Configurable-fishing-time-ranges.patch +++ b/CraftBukkit-Patches/0020-Configurable-fishing-time-ranges.patch @@ -1,18 +1,18 @@ -From 2d42162a4b2397f6c90082122f0ef5696e394f77 Mon Sep 17 00:00:00 2001 +From 40baf8c57ef779e199e0e88dbb51b3ddbcaf0f4e Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sun, 29 Jun 2014 13:22:09 -0500 Subject: [PATCH] Configurable fishing time ranges diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java -index 0763dd1..0ad1dd9 100644 +index 0763dd1..acabaf6 100644 --- a/src/main/java/net/minecraft/server/EntityFishingHook.java +++ b/src/main/java/net/minecraft/server/EntityFishingHook.java @@ -10,6 +10,8 @@ import org.bukkit.entity.Fish; import org.bukkit.event.player.PlayerFishEvent; // CraftBukkit end -+import org.spigotmc.SpigotWorldConfig; // PaperSpigot ++import org.github.paperspigot.PaperSpigotWorldConfig; // PaperSpigot + public class EntityFishingHook extends Entity { @@ -22,29 +22,27 @@ index 0763dd1..0ad1dd9 100644 } } else { - this.ay = MathHelper.nextInt(this.random, 100, 900); -+ this.ay = MathHelper.nextInt(this.random, SpigotWorldConfig.fishingMinTicks, SpigotWorldConfig.fishingMaxTicks); // PaperSpigot - configurable fishing time range ++ this.ay = MathHelper.nextInt(this.random, PaperSpigotWorldConfig.fishingMinTicks, PaperSpigotWorldConfig.fishingMaxTicks); // PaperSpigot - configurable fishing time range this.ay -= EnchantmentManager.getLureEnchantmentLevel(this.owner) * 20 * 5; } } -diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 4faa4c7..c0ba707 100644 ---- a/src/main/java/org/spigotmc/SpigotWorldConfig.java -+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java -@@ -230,6 +230,14 @@ public class SpigotWorldConfig - reedMaxHeight = getInt ( "max-growth-height.reeds", 3 ); +diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +index a05d5a4..154498d 100644 +--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java ++++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +@@ -122,4 +122,12 @@ public class PaperSpigotWorldConfig + InvertedDaylightDetectors = getBoolean( "inverted-daylight-detectors", false ); + log( "Inverted Redstone Lamps: " + InvertedDaylightDetectors ); } - ++ + public static int fishingMinTicks = 100; + public static int fishingMaxTicks = 900; -+ private void fishingRange() ++ private void fishingTickRange() + { + fishingMinTicks = getInt( "fishing-time-range.MinimumTicks", fishingMinTicks ); + fishingMaxTicks = getInt( "fishing-time-range.MaximumTicks", fishingMaxTicks ); + } -+ - public boolean randomLightUpdates; - private void lightUpdates() - { + } -- 1.9.1