diff --git a/CraftBukkit-Patches/0028-Configurable-nerf-for-TNT-cannons.patch b/CraftBukkit-Patches/0028-Configurable-nerf-for-TNT-cannons.patch new file mode 100644 index 0000000000..ddb3dd3ea8 --- /dev/null +++ b/CraftBukkit-Patches/0028-Configurable-nerf-for-TNT-cannons.patch @@ -0,0 +1,47 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Zach Brown <1254957+zachbr@users.noreply.github.com> +Date: Wed, 9 Jul 2014 17:38:48 -0500 +Subject: [PATCH] Configurable nerf for TNT cannons + + +diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java ++++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java +@@ -0,0 +0,0 @@ + package net.minecraft.server; + + import org.bukkit.event.entity.ExplosionPrimeEvent; // CraftBukkit ++import org.github.paperspigot.PaperSpigotWorldConfig; + + public class EntityTNTPrimed extends Entity { + +@@ -0,0 +0,0 @@ public class EntityTNTPrimed extends Entity { + this.motY *= -0.5D; + } + ++ // PaperSpigot start - Configurable nerf for TNT cannons ++ if (this.locY > PaperSpigotWorldConfig.tntHeightNerf && PaperSpigotWorldConfig.tntHeightNerf != 0) { ++ this.die(); ++ } ++ // PaperSpigot end ++ + if (this.fuseTicks-- <= 0) { + // CraftBukkit start - Need to reverse the order of the explosion and the entity death so we have a location for the event + if (!this.world.isStatic) { +diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.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 + keepSpawnInMemory = getBoolean( "keep-spawn-loaded", true ); + log( "Keep spawn chunk loaded: " + keepSpawnInMemory ); + } ++ ++ public static double tntHeightNerf; ++ private void tntHeightNerf() ++ { ++ tntHeightNerf = getDouble( "tnt-entity-height-nerf", 0 ); ++ } + } +-- \ No newline at end of file