diff --git a/Spigot-Server-Patches/Ability-to-disable-asynccatcher.patch b/Spigot-Server-Patches/Ability-to-disable-asynccatcher.patch index 21455e1b8d..917326fd89 100644 --- a/Spigot-Server-Patches/Ability-to-disable-asynccatcher.patch +++ b/Spigot-Server-Patches/Ability-to-disable-asynccatcher.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Zach Brown <1254957+zachbr@users.noreply.github.com> -Date: Sat, 12 Jul 2014 19:37:16 -0500 +Date: Tue, 5 Aug 2014 17:39:04 -0500 Subject: [PATCH] Ability to disable asynccatcher @@ -9,16 +9,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java +++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java @@ -0,0 +0,0 @@ public class PaperSpigotConfig - config.addDefault( path, def ); - return config.getString( path, config.getString( path ) ); + { + babyZombieMovementSpeed = getDouble( "settings.baby-zombie-movement-speed", 0.5D); // Player moves at 0.1F, for reference } + + 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" ); ++ if (!asyncCatcherFeature) { ++ Bukkit.getLogger().log( Level.INFO, "Disabling async plugin bad ju-ju catcher, this may be bad depending on your plugins" ); + } + } } @@ -26,17 +26,12 @@ diff --git a/src/main/java/org/spigotmc/AsyncCatcher.java b/src/main/java/org/sp index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/spigotmc/AsyncCatcher.java +++ b/src/main/java/org/spigotmc/AsyncCatcher.java -@@ -0,0 +0,0 @@ - package org.spigotmc; - - import net.minecraft.server.MinecraftServer; -+import org.github.paperspigot.PaperSpigotConfig; // PaperSpigot - +@@ -0,0 +0,0 @@ import net.minecraft.server.MinecraftServer; public class AsyncCatcher { - public static boolean enabled = true; -+ public static boolean enabled = PaperSpigotConfig.asyncCatcherFeature; // PaperSpigot - AsyncCatcher override feature ++ public static boolean enabled = org.github.paperspigot.PaperSpigotConfig.asyncCatcherFeature; // PaperSpigot - Allow disabling of AsyncCatcher from PaperSpigotConfig public static void catchOp(String reason) { diff --git a/Spigot-Server-Patches/Add-configurable-despawn-distances-for-living-entiti.patch b/Spigot-Server-Patches/Add-configurable-despawn-distances-for-living-entiti.patch index 1933919339..31f7d5b990 100644 --- a/Spigot-Server-Patches/Add-configurable-despawn-distances-for-living-entiti.patch +++ b/Spigot-Server-Patches/Add-configurable-despawn-distances-for-living-entiti.patch @@ -30,8 +30,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java @@ -0,0 +0,0 @@ public class PaperSpigotWorldConfig - playerExhaustionAttack = getFloat( "player-exhaustion.attack", 0.3F ); - playerExhaustionRegeneration = getFloat( "player-exhaustion.regeneration", 3.0F ); + fishingMinTicks = getInt( "fishing-time-range.MinimumTicks", 100 ); + fishingMaxTicks = getInt( "fishing-time-range.MaximumTicks", 900 ); } + + public Integer softDespawnDistance; diff --git a/Spigot-Server-Patches/Allow-undead-horse-types-to-be-leashed.patch b/Spigot-Server-Patches/Allow-undead-horse-types-to-be-leashed.patch index 3efdfec651..8aa1884f2e 100644 --- a/Spigot-Server-Patches/Allow-undead-horse-types-to-be-leashed.patch +++ b/Spigot-Server-Patches/Allow-undead-horse-types-to-be-leashed.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Zach Brown <1254957+zachbr@users.noreply.github.com> -Date: Sat, 12 Jul 2014 19:36:18 -0500 +Date: Tue, 5 Aug 2014 16:10:44 -0500 Subject: [PATCH] Allow undead horse types to be leashed @@ -8,22 +8,13 @@ diff --git a/src/main/java/net/minecraft/server/EntityHorse.java b/src/main/java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/EntityHorse.java +++ b/src/main/java/net/minecraft/server/EntityHorse.java -@@ -0,0 +0,0 @@ import java.util.List; - - import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason; // CraftBukkit - -+import org.github.paperspigot.PaperSpigotWorldConfig; // PaperSpigot -+ - public class EntityHorse extends EntityAnimal implements IInventoryListener { - - private static final IEntitySelector bu = new EntitySelectorHorse(); @@ -0,0 +0,0 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener { } public boolean bM() { - return !this.cE() && super.bM(); -+ // PaperSpigot start - configurable undead horse leashing -+ if (PaperSpigotWorldConfig.allowUndeadHorseLeashing) { ++ // PaperSpigot start - Configurable undead horse leashing ++ if (this.world.paperSpigotConfig.allowUndeadHorseLeashing) { + return super.bM(); + } else { + return !this.cE() && super.bM(); @@ -41,7 +32,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return config.getString( "world-settings." + worldName + "." + path, config.getString( "world-settings.default." + path ) ); } + -+ public static boolean allowUndeadHorseLeashing; ++ public boolean allowUndeadHorseLeashing; + private void allowUndeadHorseLeashing() + { + allowUndeadHorseLeashing = getBoolean( "allow-undead-horse-leashing", true ); diff --git a/Spigot-Server-Patches/Configurable-baby-zombie-movement-speed.patch b/Spigot-Server-Patches/Configurable-baby-zombie-movement-speed.patch index 9ecb4e8d60..c288c525cc 100644 --- a/Spigot-Server-Patches/Configurable-baby-zombie-movement-speed.patch +++ b/Spigot-Server-Patches/Configurable-baby-zombie-movement-speed.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Zach Brown <1254957+zachbr@users.noreply.github.com> -Date: Wed, 21 May 2014 15:35:12 -0500 +Date: Tue, 5 Aug 2014 17:18:23 -0500 Subject: [PATCH] Configurable baby zombie movement speed @@ -8,34 +8,29 @@ diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/jav index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java -@@ -0,0 +0,0 @@ import org.bukkit.event.entity.EntityCombustEvent; - import org.bukkit.event.entity.EntityTargetEvent; - //CraftBukkit end - -+import org.github.paperspigot.PaperSpigotWorldConfig; // PaperSpigot -+ - public class EntityZombie extends EntityMonster { +@@ -0,0 +0,0 @@ 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", PaperSpigotWorldConfig.babyZombieMovementSpeed, 1); // PaperSpigot - Make baby zombie movement speed configurable ++ // PaperSpigot - Configurable baby zombie movement speed ++ private static final AttributeModifier br = new AttributeModifier(bq, "Baby speed boost", org.github.paperspigot.PaperSpigotConfig.babyZombieMovementSpeed, 1); private final PathfinderGoalBreakDoor bs = new PathfinderGoalBreakDoor(this); private int bt; private boolean bu = false; -diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +diff --git a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java -+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java -@@ -0,0 +0,0 @@ public class PaperSpigotWorldConfig - cactusMaxHeight = getInt( "max-growth-height.cactus", 3 ); - reedMaxHeight = getInt ( "max-growth-height.reeds", 3 ); +--- a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java ++++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java +@@ -0,0 +0,0 @@ public class PaperSpigotConfig + config.addDefault( path, def ); + return config.getString( path, config.getString( path ) ); } + + public static double babyZombieMovementSpeed; -+ private void babyZombieMovementSpeed() ++ private static void babyZombieMovementSpeed() + { -+ babyZombieMovementSpeed = getDouble( "baby-zombie-movement-speed", 0.5D ); ++ babyZombieMovementSpeed = getDouble( "settings.baby-zombie-movement-speed", 0.5D); // Player moves at 0.1F, for reference + } } -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Configurable-cactus-and-reed-natural-growth-heights.patch b/Spigot-Server-Patches/Configurable-cactus-and-reed-natural-growth-heights.patch index fdb940ffef..7e87ae4c98 100644 --- a/Spigot-Server-Patches/Configurable-cactus-and-reed-natural-growth-heights.patch +++ b/Spigot-Server-Patches/Configurable-cactus-and-reed-natural-growth-heights.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Zach Brown <1254957+zachbr@users.noreply.github.com> -Date: Tue, 24 Jun 2014 07:44:59 -0500 +Date: Tue, 5 Aug 2014 16:26:30 -0500 Subject: [PATCH] Configurable cactus and reed natural growth heights @@ -8,21 +8,12 @@ diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/BlockCactus.java +++ b/src/main/java/net/minecraft/server/BlockCactus.java -@@ -0,0 +0,0 @@ import java.util.Random; - - import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit - -+import org.github.paperspigot.PaperSpigotWorldConfig; // PaperSpigot -+ - public class BlockCactus extends Block { - - protected BlockCactus() { @@ -0,0 +0,0 @@ public class BlockCactus extends Block { ; } - if (l < 3) { -+ if (l < PaperSpigotWorldConfig.cactusMaxHeight) { // PaperSpigot - Configurable natural growth heights ++ if (l < world.paperSpigotConfig.cactusMaxHeight) { // PaperSpigot - Configurable max growth height for cactus blocks int i1 = world.getData(i, j, k); if (i1 >= (byte) range(3, (world.growthOdds / world.spigotConfig.cactusModifier * 15) + 0.5F, 15)) { // Spigot @@ -30,20 +21,12 @@ diff --git a/src/main/java/net/minecraft/server/BlockReed.java b/src/main/java/n index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/BlockReed.java +++ b/src/main/java/net/minecraft/server/BlockReed.java -@@ -0,0 +0,0 @@ - package net.minecraft.server; - -+import org.github.paperspigot.PaperSpigotWorldConfig; // PaperSpigot -+ - import java.util.Random; - - public class BlockReed extends Block { @@ -0,0 +0,0 @@ public class BlockReed extends Block { ; } - if (l < 3) { -+ if (l < PaperSpigotWorldConfig.reedMaxHeight) { // PaperSpigot - Configurable natural growth heights ++ if (l < world.paperSpigotConfig.reedMaxHeight) { // PaperSpigot - Configurable max growth height for reed blocks int i1 = world.getData(i, j, k); if (i1 >= (byte) range(3, (world.growthOdds / world.spigotConfig.caneModifier * 15) + 0.5F, 15)) { // Spigot @@ -52,16 +35,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java @@ -0,0 +0,0 @@ public class PaperSpigotWorldConfig - { playerBlockingDamageMultiplier = getFloat( "player-blocking-damage-multiplier", 0.5F ); + log( "Player blocking damage multiplier set to " + playerBlockingDamageMultiplier); } + -+ public static int cactusMaxHeight; -+ public static int reedMaxHeight; ++ public int cactusMaxHeight; ++ public int reedMaxHeight; + private void blockGrowthHeight() + { + cactusMaxHeight = getInt( "max-growth-height.cactus", 3 ); -+ reedMaxHeight = getInt ( "max-growth-height.reeds", 3 ); ++ reedMaxHeight = getInt( "max-growth-height.reeds", 3 ); ++ log( "Max height for cactus growth " + cactusMaxHeight + ". Max height for reed growth " + reedMaxHeight); + } } -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Configurable-damage-multiplier-for-PvP-blocking.patch b/Spigot-Server-Patches/Configurable-damage-multiplier-for-PvP-blocking.patch index 80003640fe..28083710bf 100644 --- a/Spigot-Server-Patches/Configurable-damage-multiplier-for-PvP-blocking.patch +++ b/Spigot-Server-Patches/Configurable-damage-multiplier-for-PvP-blocking.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Zach Brown <1254957+zachbr@users.noreply.github.com> -Date: Tue, 24 Jun 2014 07:39:37 -0500 +Date: Tue, 5 Aug 2014 16:21:03 -0500 Subject: [PATCH] Configurable damage multiplier for PvP blocking @@ -8,21 +8,12 @@ diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java -@@ -0,0 +0,0 @@ import org.bukkit.event.player.PlayerDropItemEvent; - import org.bukkit.event.player.PlayerItemConsumeEvent; - // CraftBukkit end - -+import org.github.paperspigot.PaperSpigotWorldConfig; // PaperSpigot -+ - public abstract class EntityHuman extends EntityLiving implements ICommandListener { - - public PlayerInventory inventory = new PlayerInventory(this); @@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen // CraftBukkit end if (!this.isInvulnerable()) { if (!damagesource.ignoresArmor() && this.isBlocking() && f > 0.0F) { - f = (1.0F + f) * 0.5F; -+ f = (1.0F + f) * PaperSpigotWorldConfig.playerBlockingDamageMultiplier; // PaperSpigot - Configurable PvP blocking damage multiplier ++ f = (1.0F + f) * this.world.paperSpigotConfig.playerBlockingDamageMultiplier; // PaperSpigot - Configurable damage multiplier for blocking } f = this.applyArmorModifier(damagesource, f); @@ -31,14 +22,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java @@ -0,0 +0,0 @@ public class PaperSpigotWorldConfig - squidMinSpawnHeight = getDouble( "squid-spawn-height.minimum", 45.0D ); squidMaxSpawnHeight = getDouble( "squid-spawn-height.maximum", 63.0D ); + log( "Squids will spawn between Y: " + squidMinSpawnHeight + " and Y: " + squidMaxSpawnHeight); } + -+ public static float playerBlockingDamageMultiplier; ++ public float playerBlockingDamageMultiplier; + private void playerBlockingDamageMultiplier() + { + playerBlockingDamageMultiplier = getFloat( "player-blocking-damage-multiplier", 0.5F ); ++ log( "Player blocking damage multiplier set to " + playerBlockingDamageMultiplier); + } } -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Configurable-fishing-time-ranges.patch b/Spigot-Server-Patches/Configurable-fishing-time-ranges.patch index c6047609b6..1f6f069232 100644 --- a/Spigot-Server-Patches/Configurable-fishing-time-ranges.patch +++ b/Spigot-Server-Patches/Configurable-fishing-time-ranges.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Zach Brown <1254957+zachbr@users.noreply.github.com> -Date: Sun, 29 Jun 2014 13:22:09 -0500 +Date: Tue, 5 Aug 2014 17:49:02 -0500 Subject: [PATCH] Configurable fishing time ranges @@ -8,21 +8,13 @@ diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/mai index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/EntityFishingHook.java +++ b/src/main/java/net/minecraft/server/EntityFishingHook.java -@@ -0,0 +0,0 @@ import org.bukkit.entity.Fish; - import org.bukkit.event.player.PlayerFishEvent; - // CraftBukkit end - -+import org.github.paperspigot.PaperSpigotWorldConfig; // PaperSpigot -+ - public class EntityFishingHook extends Entity { - - private static final List d = Arrays.asList(new PossibleFishingResult[] { (new PossibleFishingResult(new ItemStack(Items.LEATHER_BOOTS), 10)).a(0.9F), new PossibleFishingResult(new ItemStack(Items.LEATHER), 10), new PossibleFishingResult(new ItemStack(Items.BONE), 10), new PossibleFishingResult(new ItemStack(Items.POTION), 10), new PossibleFishingResult(new ItemStack(Items.STRING), 5), (new PossibleFishingResult(new ItemStack(Items.FISHING_ROD), 2)).a(0.9F), new PossibleFishingResult(new ItemStack(Items.BOWL), 10), new PossibleFishingResult(new ItemStack(Items.STICK), 5), new PossibleFishingResult(new ItemStack(Items.INK_SACK, 10, 0), 1), new PossibleFishingResult(new ItemStack(Blocks.TRIPWIRE_SOURCE), 10), new PossibleFishingResult(new ItemStack(Items.ROTTEN_FLESH), 10)}); @@ -0,0 +0,0 @@ public class EntityFishingHook extends Entity { this.az = MathHelper.nextInt(this.random, 20, 80); } } else { - this.ay = MathHelper.nextInt(this.random, 100, 900); -+ this.ay = MathHelper.nextInt(this.random, PaperSpigotWorldConfig.fishingMinTicks, PaperSpigotWorldConfig.fishingMaxTicks); // PaperSpigot - configurable fishing time range ++ // PaperSpigot - Configurable fishing tick range ++ this.ay = MathHelper.nextInt(this.random, this.world.paperSpigotConfig.fishingMinTicks, this.world.paperSpigotConfig.fishingMaxTicks); this.ay -= EnchantmentManager.getLureEnchantmentLevel(this.owner) * 20 * 5; } } @@ -31,16 +23,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java @@ -0,0 +0,0 @@ public class PaperSpigotWorldConfig - InvertedDaylightDetectors = getBoolean( "inverted-daylight-detectors", false ); - log( "Inverted Redstone Lamps: " + InvertedDaylightDetectors ); + invertedDaylightDetectors = getBoolean( "inverted-daylight-detectors", false ); + log( "Inverted Redstone Lamps: " + invertedDaylightDetectors ); } + -+ public static int fishingMinTicks = 100; -+ public static int fishingMaxTicks = 900; ++ public int fishingMinTicks; ++ public int fishingMaxTicks; + private void fishingTickRange() + { -+ fishingMinTicks = getInt( "fishing-time-range.MinimumTicks", fishingMinTicks ); -+ fishingMaxTicks = getInt( "fishing-time-range.MaximumTicks", fishingMaxTicks ); ++ fishingMinTicks = getInt( "fishing-time-range.MinimumTicks", 100 ); ++ fishingMaxTicks = getInt( "fishing-time-range.MaximumTicks", 900 ); + } } -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Configurable-speed-for-water-flowing-over-lava.patch b/Spigot-Server-Patches/Configurable-speed-for-water-flowing-over-lava.patch index 5e75d60206..d3aac5d8d8 100644 --- a/Spigot-Server-Patches/Configurable-speed-for-water-flowing-over-lava.patch +++ b/Spigot-Server-Patches/Configurable-speed-for-water-flowing-over-lava.patch @@ -50,8 +50,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java @@ -0,0 +0,0 @@ public class PaperSpigotWorldConfig - // Technically a little disingenuous as it applies to all falling blocks but alas, backwards compat prevails! - fallingBlockHeightNerf = getDouble( "tnt-entity-height-nerf", 0 ); + log( "TNT/Falling Block Height Limit set to Y: " + fallingBlockHeightNerf); + } } + + public int waterOverLavaFlowSpeed; diff --git a/Spigot-Server-Patches/Configurable-squid-spawn-ranges.patch b/Spigot-Server-Patches/Configurable-squid-spawn-ranges.patch index a4511dd4a7..f13035ed34 100644 --- a/Spigot-Server-Patches/Configurable-squid-spawn-ranges.patch +++ b/Spigot-Server-Patches/Configurable-squid-spawn-ranges.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Zach Brown <1254957+zachbr@users.noreply.github.com> -Date: Mon, 19 May 2014 19:30:58 -0500 +Date: Tue, 5 Aug 2014 16:17:15 -0500 Subject: [PATCH] Configurable squid spawn ranges @@ -8,21 +8,13 @@ diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/EntitySquid.java +++ b/src/main/java/net/minecraft/server/EntitySquid.java -@@ -0,0 +0,0 @@ package net.minecraft.server; - - import org.bukkit.craftbukkit.TrigMath; // CraftBukkit - -+import org.github.paperspigot.PaperSpigotWorldConfig; // PaperSpigot -+ - public class EntitySquid extends EntityWaterAnimal { - - public float bp; @@ -0,0 +0,0 @@ public class EntitySquid extends EntityWaterAnimal { } public boolean canSpawn() { - return this.locY > 45.0D && this.locY < 63.0D && super.canSpawn(); -+ return this.locY > PaperSpigotWorldConfig.squidMinSpawnHeight && this.locY < PaperSpigotWorldConfig.squidMaxSpawnHeight && super.canSpawn(); // PaperSpigot - Configurable squid spawn height range ++ // PaperSpigot - Configurable squid spawn height range ++ return this.locY > this.world.paperSpigotConfig.squidMinSpawnHeight && this.locY < this.world.paperSpigotConfig.squidMaxSpawnHeight && super.canSpawn(); } } diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java @@ -34,12 +26,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 log( "Allow undead horse types to be leashed: " + allowUndeadHorseLeashing ); } + -+ public static double squidMinSpawnHeight; -+ public static double squidMaxSpawnHeight; ++ public double squidMinSpawnHeight; ++ public double squidMaxSpawnHeight; + private void squidSpawnHeight() + { + squidMinSpawnHeight = getDouble( "squid-spawn-height.minimum", 45.0D ); + squidMaxSpawnHeight = getDouble( "squid-spawn-height.maximum", 63.0D ); ++ log( "Squids will spawn between Y: " + squidMinSpawnHeight + " and Y: " + squidMaxSpawnHeight); + } } -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Drop-falling-block-entities-that-are-above-the-speci.patch b/Spigot-Server-Patches/Drop-falling-block-entities-that-are-above-the-speci.patch index d3d7d073b2..8937864e94 100644 --- a/Spigot-Server-Patches/Drop-falling-block-entities-that-are-above-the-speci.patch +++ b/Spigot-Server-Patches/Drop-falling-block-entities-that-are-above-the-speci.patch @@ -1,29 +1,20 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Byteflux -Date: Wed, 30 Jul 2014 03:31:43 -0500 +Date: Tue, 5 Aug 2014 18:39:57 -0500 Subject: [PATCH] Drop falling block entities that are above the specified - height diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java -@@ -0,0 +0,0 @@ import java.util.ArrayList; - import java.util.Iterator; - - import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit -+import org.github.paperspigot.PaperSpigotWorldConfig; - - public class EntityFallingBlock extends Entity { - @@ -0,0 +0,0 @@ public class EntityFallingBlock extends Entity { ++this.ticksLived; this.motY -= 0.03999999910593033D; this.move(this.motX, this.motY, this.motZ); + + // PaperSpigot start - Drop falling blocks above the specified height -+ if (PaperSpigotWorldConfig.fallingBlockHeightNerf != 0 && this.locY > PaperSpigotWorldConfig.fallingBlockHeightNerf) { ++ if (this.world.paperSpigotConfig.fallingBlockHeightNerf != 0 && this.locY > this.world.paperSpigotConfig.fallingBlockHeightNerf) { + if (this.dropItem) { + this.a(new ItemStack(this.id, 1, this.id.getDropData(this.data)), 0.0F); + } @@ -44,11 +35,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 log( "Keep spawn chunk loaded: " + keepSpawnInMemory ); } + -+ public static double fallingBlockHeightNerf; -+ private void fallingBlockHeightNerf() ++ public double fallingBlockHeightNerf; ++ private void fallingBlockheightNerf() + { + // Technically a little disingenuous as it applies to all falling blocks but alas, backwards compat prevails! + fallingBlockHeightNerf = getDouble( "tnt-entity-height-nerf", 0 ); ++ if (fallingBlockHeightNerf != 0) { ++ log( "TNT/Falling Block Height Limit set to Y: " + fallingBlockHeightNerf); ++ } + } } -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Inverted-Daylight-Detector-Toggle.patch b/Spigot-Server-Patches/Inverted-Daylight-Detector-Toggle.patch index 4c197cc4eb..dadad335b4 100644 --- a/Spigot-Server-Patches/Inverted-Daylight-Detector-Toggle.patch +++ b/Spigot-Server-Patches/Inverted-Daylight-Detector-Toggle.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: gsand -Date: Sun, 6 Jul 2014 02:46:20 -0500 +Date: Tue, 5 Aug 2014 17:31:07 -0500 Subject: [PATCH] Inverted Daylight Detector Toggle @@ -8,14 +8,6 @@ diff --git a/src/main/java/net/minecraft/server/BlockDaylightDetector.java b/src index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/BlockDaylightDetector.java +++ b/src/main/java/net/minecraft/server/BlockDaylightDetector.java -@@ -0,0 +0,0 @@ - package net.minecraft.server; - -+import org.github.paperspigot.PaperSpigotWorldConfig; // PaperSpigot -+ - import java.util.Random; - - public class BlockDaylightDetector extends BlockContainer { @@ -0,0 +0,0 @@ public class BlockDaylightDetector extends BlockContainer { f += (6.2831855F - f) * 0.2F; } @@ -24,15 +16,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - if (i1 < 0) { - i1 = 0; - } -+ // PaperSpigot start - Inverted Daylight Detectors -+ if (PaperSpigotWorldConfig.InvertedDaylightDetectors) { +- +- if (i1 > 15) { +- i1 = 15; ++ // PaperSpigot start - Configurable "inversion" for daylight detectors ++ if (world.paperSpigotConfig.invertedDaylightDetectors) { + i1 = Math.round((float) i1 * MathHelper.cos(f) * -1 + 15); + if (i1 < 10) { + i1 = 0; + } - -- if (i1 > 15) { -- i1 = 15; ++ + if (i1 > 9) { + i1 = 15; + } @@ -55,15 +48,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java @@ -0,0 +0,0 @@ public class PaperSpigotWorldConfig - { - babyZombieMovementSpeed = getDouble( "baby-zombie-movement-speed", 0.5D ); + reedMaxHeight = getInt( "max-growth-height.reeds", 3 ); + log( "Max height for cactus growth " + cactusMaxHeight + ". Max height for reed growth " + reedMaxHeight); } + -+ public static boolean InvertedDaylightDetectors; -+ private void InvertedDaylightDetectors() ++ public boolean invertedDaylightDetectors; ++ private void invertedDaylightDetectors() + { -+ InvertedDaylightDetectors = getBoolean( "inverted-daylight-detectors", false ); -+ log( "Inverted Redstone Lamps: " + InvertedDaylightDetectors ); ++ invertedDaylightDetectors = getBoolean( "inverted-daylight-detectors", false ); ++ log( "Inverted Redstone Lamps: " + invertedDaylightDetectors ); + } } -- \ No newline at end of file diff --git a/Spigot-Server-Patches/PaperSpigot-config-files.patch b/Spigot-Server-Patches/PaperSpigot-config-files.patch index 7235d6b07d..b58e4bf938 100644 --- a/Spigot-Server-Patches/PaperSpigot-config-files.patch +++ b/Spigot-Server-Patches/PaperSpigot-config-files.patch @@ -182,7 +182,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + return config.getBoolean( path, config.getBoolean( path ) ); + } + -+ private static float getFloat(String path, int def) ++ private static double getDouble(String path, double def) ++ { ++ config.addDefault( path, def ); ++ return config.getDouble( path, config.getDouble( path ) ); ++ } ++ ++ private static float getFloat(String path, float def) + { + config.addDefault( path, def ); + return config.getFloat( path, config.getFloat( path ) ); diff --git a/Spigot-Server-Patches/Player-Exhaustion-Multipliers.patch b/Spigot-Server-Patches/Player-Exhaustion-Multipliers.patch index 281dc12dd1..94e43b84b2 100644 --- a/Spigot-Server-Patches/Player-Exhaustion-Multipliers.patch +++ b/Spigot-Server-Patches/Player-Exhaustion-Multipliers.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: gsand -Date: Tue, 8 Jul 2014 21:41:43 -0500 +Date: Tue, 5 Aug 2014 18:28:21 -0500 Subject: [PATCH] Player Exhaustion Multipliers @@ -8,21 +8,12 @@ diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/m index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java -@@ -0,0 +0,0 @@ import java.util.Iterator; - import java.util.List; - import java.util.Random; - -+import org.github.paperspigot.PaperSpigotWorldConfig; // PaperSpigot -+ - public class Block { - - public static final RegistryMaterials REGISTRY = new RegistryBlocks("air"); @@ -0,0 +0,0 @@ public class Block { public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) { entityhuman.a(StatisticList.MINE_BLOCK_COUNT[getId(this)], 1); - entityhuman.applyExhaustion(0.025F); -+ entityhuman.a( PaperSpigotWorldConfig.playerExhaustionBlockBreak ); // PaperSpigot - Configurable block breaking exhaustion ++ entityhuman.applyExhaustion(org.github.paperspigot.PaperSpigotConfig.playerExhaustionBlockBreak); // PaperSpigot - Configurable block breaking exhaustion if (this.E() && EnchantmentManager.hasSilkTouchEnchantment(entityhuman)) { ItemStack itemstack = this.j(l); @@ -35,7 +26,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } - this.applyExhaustion(0.3F); -+ this.a( PaperSpigotWorldConfig.playerExhaustionAttack ); // PaperSpigot - Configurable attack exhaustion ++ this.applyExhaustion(org.github.paperspigot.PaperSpigotConfig.playerExhaustionAttack); // PaperSpigot - Configurable attack exhaustion } else if (flag1) { entity.extinguish(); } @@ -44,10 +35,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.a(StatisticList.r, 1); if (this.isSprinting()) { - this.applyExhaustion(0.8F); -+ this.a( PaperSpigotWorldConfig.playerExhaustionSprintJumping ); // PaperSpigot - Configurable sprint jumping exhaustion ++ this.applyExhaustion(org.github.paperspigot.PaperSpigotConfig.playerExhaustionSprintJumping); // PaperSpigot - Configurable sprint jumping exhaustion } else { - this.applyExhaustion(0.2F); -+ this.a( PaperSpigotWorldConfig.playerExhaustionJumping ); // PaperSpigot - Configurable jumping exhaustion ++ this.applyExhaustion(org.github.paperspigot.PaperSpigotConfig.playerExhaustionJumping); // PaperSpigot - Configurable jumping exhaustion } } @@ -56,14 +47,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 if (i > 0) { this.a(StatisticList.m, i); - this.applyExhaustion(0.015F * (float) i * 0.01F); -+ this.a( PaperSpigotWorldConfig.playerExhaustionSwimming * (float) i * 0.01F); // PaperSpigot - Configurable swimming exhaustion ++ this.applyExhaustion(org.github.paperspigot.PaperSpigotConfig.playerExhaustionSwimming * (float) i * 0.01F); // PaperSpigot - Configurable swimming exhaustion } } else if (this.M()) { i = Math.round(MathHelper.sqrt(d0 * d0 + d2 * d2) * 100.0F); if (i > 0) { this.a(StatisticList.i, i); - this.applyExhaustion(0.015F * (float) i * 0.01F); -+ this.a( PaperSpigotWorldConfig.playerExhaustionSwimming * (float) i * 0.01F); // PaperSpigot - Configurable swimming (diving) exhaustion ++ this.applyExhaustion(org.github.paperspigot.PaperSpigotConfig.playerExhaustionSwimming * (float) i * 0.01F); // PaperSpigot - Configurable swimming (diving) exhaustion } } else if (this.h_()) { if (d1 > 0.0D) { @@ -72,10 +63,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.a(StatisticList.h, i); if (this.isSprinting()) { - this.applyExhaustion(0.099999994F * (float) i * 0.01F); -+ this.a( PaperSpigotWorldConfig.playerExhaustionSprinting * (float) i * 0.01F); // PaperSpigot - Configurable sprinting exhaustion ++ this.applyExhaustion(org.github.paperspigot.PaperSpigotConfig.playerExhaustionSprinting * (float) i * 0.01F); // PaperSpigot - Configurable sprinting exhaustion } else { - this.applyExhaustion(0.01F * (float) i * 0.01F); -+ this.a( PaperSpigotWorldConfig.playerExhaustionWalking * (float) i * 0.01F); // PaperSpigot - Configurable walking exhaustion ++ this.applyExhaustion(org.github.paperspigot.PaperSpigotConfig.playerExhaustionWalking * (float) i * 0.01F); // PaperSpigot - Configurable walking exhaustion } } } else { @@ -83,30 +74,22 @@ diff --git a/src/main/java/net/minecraft/server/FoodMetaData.java b/src/main/jav index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/FoodMetaData.java +++ b/src/main/java/net/minecraft/server/FoodMetaData.java -@@ -0,0 +0,0 @@ - package net.minecraft.server; - -+import org.github.paperspigot.PaperSpigotWorldConfig; // PaperSpigot -+ - public class FoodMetaData { - - // CraftBukkit start - All made public @@ -0,0 +0,0 @@ public class FoodMetaData { if (this.foodTickTimer >= 80) { // CraftBukkit - added RegainReason entityhuman.heal(1.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.SATIATED); - this.a(3.0F); -+ this.a( PaperSpigotWorldConfig.playerExhaustionRegeneration ); // PaperSpigot - Configurable regeneration exhaustion ++ this.a(org.github.paperspigot.PaperSpigotConfig.playerExhaustionRegeneration); // PaperSpigot - Configurable regeneration exhaustion this.foodTickTimer = 0; } } else if (this.foodLevel <= 0) { -diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java +diff --git a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java -+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java -@@ -0,0 +0,0 @@ public class PaperSpigotWorldConfig - fishingMinTicks = getInt( "fishing-time-range.MinimumTicks", fishingMinTicks ); - fishingMaxTicks = getInt( "fishing-time-range.MaximumTicks", fishingMaxTicks ); +--- a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java ++++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java +@@ -0,0 +0,0 @@ public class PaperSpigotConfig + Bukkit.getLogger().log( Level.INFO, "Disabling player interaction limiter, your server may be more vulnerable to malicious users" ); + } } + + public static float playerExhaustionWalking; @@ -117,7 +100,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public static float playerExhaustionSprintJumping; + public static float playerExhaustionAttack; + public static float playerExhaustionRegeneration; -+ private void playerExhaustion() ++ private static void playerExhaustion() + { + playerExhaustionWalking = getFloat( "player-exhaustion.walking", 0.01F ); + playerExhaustionSwimming = getFloat( "player-exhaustion.swimming", 0.015F ); diff --git a/Spigot-Server-Patches/Toggle-for-player-interact-limiter.patch b/Spigot-Server-Patches/Toggle-for-player-interact-limiter.patch index 3363ff9fed..d23455cb32 100644 --- a/Spigot-Server-Patches/Toggle-for-player-interact-limiter.patch +++ b/Spigot-Server-Patches/Toggle-for-player-interact-limiter.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Zach Brown <1254957+zachbr@users.noreply.github.com> -Date: Thu, 24 Jul 2014 22:19:44 -0500 +Date: Tue, 5 Aug 2014 17:56:02 -0500 Subject: [PATCH] Toggle for player interact limiter @@ -8,21 +8,13 @@ diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -0,0 +0,0 @@ import org.bukkit.inventory.InventoryView; - import org.bukkit.util.NumberConversions; - // CraftBukkit end - -+import org.github.paperspigot.PaperSpigotConfig; // PaperSpigot -+ - public class PlayerConnection implements PacketPlayInListener { - - private static final Logger c = LogManager.getLogger(); @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketPlayInListener { public void a(PacketPlayInBlockPlace packetplayinblockplace) { boolean throttled = false; - if (lastPlace != -1 && packetplayinblockplace.timestamp - lastPlace < 30 && packets++ >= 4) { -+ if (PaperSpigotConfig.interactLimitEnabled && lastPlace != -1 && packetplayinblockplace.timestamp - lastPlace < 30 && packets++ >= 4) { ++ // PaperSpigot - Allow disabling the player interaction limiter ++ if (org.github.paperspigot.PaperSpigotConfig.interactLimitEnabled && lastPlace != -1 && packetplayinblockplace.timestamp - lastPlace < 30 && packets++ >= 4) { throttled = true; } else if ( packetplayinblockplace.timestamp - lastPlace >= 30 || lastPlace == -1 ) { @@ -31,7 +23,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java +++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java @@ -0,0 +0,0 @@ public class PaperSpigotConfig - Bukkit.getLogger().log( Level.INFO, "Disabling async plugin bad ju-ju catcher, this might be bad depending on your plugins" ); + Bukkit.getLogger().log( Level.INFO, "Disabling async plugin bad ju-ju catcher, this may be bad depending on your plugins" ); } } + @@ -39,6 +31,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + private static void interactLimitEnabled() + { + interactLimitEnabled = getBoolean( "settings.limit-player-interactions", true ); ++ if (!interactLimitEnabled) { ++ Bukkit.getLogger().log( Level.INFO, "Disabling player interaction limiter, your server may be more vulnerable to malicious users" ); ++ } + } } -- \ No newline at end of file