diff --git a/Spigot-Server-Patches/Add-TNT-source-location-API.patch b/Spigot-Server-Patches/Add-TNT-source-location-API.patch index 815a504cab..9d5845d12f 100644 --- a/Spigot-Server-Patches/Add-TNT-source-location-API.patch +++ b/Spigot-Server-Patches/Add-TNT-source-location-API.patch @@ -69,7 +69,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public EntityTNTPrimed(org.bukkit.Location loc, World world, double d0, double d1, double d2, EntityLiving entityliving) { + this(loc, world); this.setPosition(d0, d1, d2); - //float f = (float) (Math.random() * 3.1415927410125732D * 2.0D); // PaperSpigot - Fix directional TNT bias + float f = (float) (Math.random() * 3.1415927410125732D * 2.0D); @@ -0,0 +0,0 @@ public class EntityTNTPrimed extends Entity { diff --git a/Spigot-Server-Patches/Center-TNT-grid-sample-points.patch b/Spigot-Server-Patches/Center-TNT-grid-sample-points.patch deleted file mode 100644 index b4e21bb89f..0000000000 --- a/Spigot-Server-Patches/Center-TNT-grid-sample-points.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jedediah Smith -Date: Fri, 28 Nov 2014 02:36:18 -0600 -Subject: [PATCH] Center TNT grid sample points - - -diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/server/World.java -+++ b/src/main/java/net/minecraft/server/World.java -@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { - double d1 = 1.0D / ((axisalignedbb.e - axisalignedbb.b) * 2.0D + 1.0D); - double d2 = 1.0D / ((axisalignedbb.f - axisalignedbb.c) * 2.0D + 1.0D); - -+ // PaperSpigot start - Center TNT sample points for more accurate calculations -+ // Shift the sample points so they are centered on the BB -+ double xOffset = (1.0 - Math.floor(1.0 / d0) * d0) / 2.0; -+ double zOffset = (1.0 - Math.floor(1.0 / d2) * d2) / 2.0; -+ // PaperSpigot end -+ - if (d0 >= 0.0D && d1 >= 0.0D && d2 >= 0.0D) { - int i = 0; - int j = 0; -@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { - double d4 = axisalignedbb.b + (axisalignedbb.e - axisalignedbb.b) * (double) f1; - double d5 = axisalignedbb.c + (axisalignedbb.f - axisalignedbb.c) * (double) f2; - -- if (this.rayTrace(new Vec3D(d3, d4, d5), vec3d) == null) { -+ if (this.rayTrace(new Vec3D(xOffset, d4, zOffset + d5), vec3d) == null) { // PaperSpigot - Center TNT sample points - ++i; - } - --- -1.9.5.msysgit.0 - diff --git a/Spigot-Server-Patches/Configurable-TNT-water-movement.patch b/Spigot-Server-Patches/Configurable-TNT-water-movement.patch deleted file mode 100644 index e60a265fe3..0000000000 --- a/Spigot-Server-Patches/Configurable-TNT-water-movement.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Byteflux -Date: Sat, 29 Nov 2014 23:05:52 -0800 -Subject: [PATCH] Configurable TNT water movement - - -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 @@ public class EntityTNTPrimed extends Entity { - public float getHeadHeight() { - return 0.0F; - } -+ -+ /** -+ * PaperSpigot - Configurable TNT water movement -+ */ -+ @Override -+ public boolean aK() { -+ return world.paperSpigotConfig.tntMovesInWater; -+ } - } -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 - { - boatsDropBoats = getBoolean( "game-mechanics.boats-drop-boats", false ); - } -+ -+ public boolean tntMovesInWater; -+ private void tntMovesInWater() -+ { -+ tntMovesInWater = getBoolean("tnt-moves-in-water", true ); -+ } - } --- -1.9.5.msysgit.0 - 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 bdae7508dd..d071daaa4a 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 @@ -47,7 +47,7 @@ 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 - log( "TNT/Falling Block Height Limit set to Y: " + fallingBlockHeightNerf); + log( "Falling Block Height Limit set to Y: " + fallingBlockHeightNerf); } } + diff --git a/Spigot-Server-Patches/Configurable-top-of-nether-void-damage.patch b/Spigot-Server-Patches/Configurable-top-of-nether-void-damage.patch index 0eed8576f4..155f3cc79c 100644 --- a/Spigot-Server-Patches/Configurable-top-of-nether-void-damage.patch +++ b/Spigot-Server-Patches/Configurable-top-of-nether-void-damage.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, 29 Jan 2015 15:11:31 -0600 +Date: Mon, 23 Feb 2015 14:57:28 -0600 Subject: [PATCH] Configurable top of nether void damage @@ -37,7 +37,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java @@ -0,0 +0,0 @@ public class PaperSpigotWorldConfig { - tntMovesInWater = getBoolean("tnt-moves-in-water", true ); + boatsDropBoats = getBoolean( "game-mechanics.boats-drop-boats", false ); } + + public boolean netherVoidTopDamage; 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 3e228be9e2..0bfa7f4da1 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 @@ -36,13 +36,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 log( "Keep spawn chunk loaded: " + keepSpawnInMemory ); } + -+ public double fallingBlockHeightNerf; ++ public int 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 ); ++ fallingBlockHeightNerf = getInt( "falling-block-height-nerf", 0 ); + if (fallingBlockHeightNerf != 0) { -+ log( "TNT/Falling Block Height Limit set to Y: " + fallingBlockHeightNerf); ++ log( "Falling Block Height Limit set to Y: " + fallingBlockHeightNerf); + } + } } diff --git a/Spigot-Server-Patches/Enderman-drop-the-block-they-re-holding-when-they-di.patch b/Spigot-Server-Patches/Enderman-drop-the-block-they-re-holding-when-they-di.patch index f3e243baba..46e3c6d52e 100644 --- a/Spigot-Server-Patches/Enderman-drop-the-block-they-re-holding-when-they-di.patch +++ b/Spigot-Server-Patches/Enderman-drop-the-block-they-re-holding-when-they-di.patch @@ -22,4 +22,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } public void setCarried(IBlockData iblockdata) { --- \ No newline at end of file +-- +1.9.5.msysgit.0 + diff --git a/Spigot-Server-Patches/Fix-directional-TNT-bias.patch b/Spigot-Server-Patches/Fix-directional-TNT-bias.patch deleted file mode 100644 index 1b0d8544ae..0000000000 --- a/Spigot-Server-Patches/Fix-directional-TNT-bias.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Iceee -Date: Fri, 11 Jul 2014 03:54:06 -0500 -Subject: [PATCH] Fix directional TNT bias - - -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 @@ public class EntityTNTPrimed extends Entity { - public EntityTNTPrimed(World world, double d0, double d1, double d2, EntityLiving entityliving) { - this(world); - this.setPosition(d0, d1, d2); -- float f = (float) (Math.random() * 3.1415927410125732D * 2.0D); -+ //float f = (float) (Math.random() * 3.1415927410125732D * 2.0D); // PaperSpigot - Fix directional TNT bias - -- this.motX = (double) (-((float) Math.sin((double) f)) * 0.02F); -+ this.motX = 0; // PaperSpigot - Fix directional TNT bias //(double) (-((float) Math.sin((double) f)) * 0.02F); - this.motY = 0.20000000298023224D; -- this.motZ = (double) (-((float) Math.cos((double) f)) * 0.02F); -+ this.motZ = 0; // PaperSpigot - Fix directional TNT bias //(double) (-((float) Math.cos((double) f)) * 0.02F); - this.fuseTicks = 80; - this.lastX = d0; - this.lastY = d1; --- -1.9.5.msysgit.0 - diff --git a/Spigot-Server-Patches/Further-improve-server-tick-loop.patch b/Spigot-Server-Patches/Further-improve-server-tick-loop.patch index dc52a2723b..c01459a034 100644 --- a/Spigot-Server-Patches/Further-improve-server-tick-loop.patch +++ b/Spigot-Server-Patches/Further-improve-server-tick-loop.patch @@ -211,4 +211,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 { return ( ( tps > 18.0 ) ? ChatColor.GREEN : ( tps > 16.0 ) ? ChatColor.YELLOW : ChatColor.RED ).toString() + ( ( tps > 20.0 ) ? "*" : "" ) + Math.min( Math.round( tps * 100.0 ) / 100.0, 20.0 ); --- \ No newline at end of file +-- +1.9.5.msysgit.0 + diff --git a/Spigot-Server-Patches/PaperSpigot-TNT-Changes.patch b/Spigot-Server-Patches/PaperSpigot-TNT-Changes.patch new file mode 100644 index 0000000000..efb0365d0d --- /dev/null +++ b/Spigot-Server-Patches/PaperSpigot-TNT-Changes.patch @@ -0,0 +1,146 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Zach Brown <1254957+zachbr@users.noreply.github.com> +Date: Mon, 23 Feb 2015 15:54:17 -0600 +Subject: [PATCH] PaperSpigot TNT Changes + +PaperSpigot communal TNT modification patch +Original authors for individual changes are listed w/in PaperSpigotWorldConfig + +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 @@ public class EntityTNTPrimed extends Entity { + this.lastY = d1; + this.lastZ = d2; + this.source = entityliving; ++ ++ // PaperSpigot start - Fix TNT directional bias ++ if (this.world.paperSpigotConfig.fixTNTDirectionBias) { ++ this.motX = this.motZ = 0; ++ } ++ // PaperSpigot end + } + + protected void h() {} +@@ -0,0 +0,0 @@ public class EntityTNTPrimed extends Entity { + } + // PaperSpigot end + ++ // PaperSpigot start - Configurable TNT Height Limit ++ if (this.world.paperSpigotConfig.tntHeightLimit != 0 && this.locY > this.world.paperSpigotConfig.tntHeightLimit) { ++ this.die(); ++ } ++ // PaperSpigot end ++ + this.motX *= 0.9800000190734863D; + this.motY *= 0.9800000190734863D; + this.motZ *= 0.9800000190734863D; +@@ -0,0 +0,0 @@ public class EntityTNTPrimed extends Entity { + server.getPluginManager().callEvent(event); + + if (!event.isCancelled()) { +- this.world.createExplosion(this, this.locX, this.locY + (double) (this.length / 2.0F), this.locZ, event.getRadius(), event.getFire(), true); ++ // PaperSpigot start - Configurable legacy TNT explosion height ++ double locY = this.locY; ++ ++ if (!this.world.paperSpigotConfig.legacyTNTExplosionHeight) { ++ locY += this.length / 2.0F; ++ } ++ ++ this.world.createExplosion(this, this.locX, locY, this.locZ, event.getRadius(), event.getFire(), true); ++ // PaperSpigot end + } + // CraftBukkit end + } +@@ -0,0 +0,0 @@ public class EntityTNTPrimed extends Entity { + public float getHeadHeight() { + return 0.0F; + } ++ ++ /** ++ * PaperSpigot - Configurable TNT water movement ++ */ ++ @Override ++ public boolean aK() { ++ return world.paperSpigotConfig.tntMovesInWater; ++ } + } +diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/server/World.java ++++ b/src/main/java/net/minecraft/server/World.java +@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { + double d1 = 1.0D / ((axisalignedbb.e - axisalignedbb.b) * 2.0D + 1.0D); + double d2 = 1.0D / ((axisalignedbb.f - axisalignedbb.c) * 2.0D + 1.0D); + ++ // PaperSpigot start - Fix TNT directional bias ++ double xOffset = (1.0 - Math.floor(1.0 / d0) * d0) / 2.0; ++ double zOffset = (1.0 - Math.floor(1.0 / d2) * d2) / 2.0; ++ // PaperSpigot end ++ + if (d0 >= 0.0D && d1 >= 0.0D && d2 >= 0.0D) { + int i = 0; + int j = 0; +@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { + double d4 = axisalignedbb.b + (axisalignedbb.e - axisalignedbb.b) * (double) f1; + double d5 = axisalignedbb.c + (axisalignedbb.f - axisalignedbb.c) * (double) f2; + +- if (this.rayTrace(new Vec3D(d3, d4, d5), vec3d) == null) { ++ // PaperSpigot start - Fix TNT directional bias ++ Vec3D vec3d1; ++ if (this.paperSpigotConfig.fixTNTDirectionBias) { ++ vec3d1 = new Vec3D(xOffset, d4, zOffset + d5); ++ } else { ++ vec3d1 = new Vec3D(d3, d4, d5); ++ } ++ ++ if (this.rayTrace(vec3d1, vec3d) == null) { ++ // PaperSpigot end + ++i; + } + +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 + { + netherVoidTopDamage = getBoolean( "nether-ceiling-void-damage", false ); + } ++ ++ public boolean fixTNTDirectionBias; ++ public boolean tntMovesInWater; ++ public boolean legacyTNTExplosionHeight; ++ public int tntHeightLimit; ++ private void tntChanges() ++ { ++ // Original Authors: Iceee and Jedediah Smith ++ fixTNTDirectionBias = getBoolean( "tnt-gameplay.fix-directional-bias", false ); ++ // Original Author: Byteflux ++ tntMovesInWater = getBoolean( "tnt-gameplay.moves-in-water", true ); ++ // Original Author: Byteflux ++ legacyTNTExplosionHeight = getBoolean( "tnt-gameplay.legacy-explosion-height", false ); ++ // Original Author: Somebody \o/ ++ tntHeightLimit = getInt( "tnt-gameplay.tnt-entity-height-limit", 0 ); ++ ++ log( "Fix TNT directional bias: " + fixTNTDirectionBias ); ++ log( "TNT moves in water: " + tntMovesInWater ); ++ log( "Use legacy TNT explosion height " + legacyTNTExplosionHeight ); ++ if ( tntHeightLimit != 0 ) { ++ log( "TNT height limit set at " + tntHeightLimit ); ++ } else { ++ log( "TNT height limit disabled" ); ++ } ++ ++ if (PaperSpigotConfig.version < 7) { ++ System.err.println( "==========================================" ); ++ System.err.println( " Many TNT Related Settings Have Moved " ); ++ System.err.println( " Please check your config in paper.yml! " ); ++ System.err.println( "==========================================" ); ++ } ++ } + } +-- +1.9.5.msysgit.0 + diff --git a/Spigot-Server-Patches/Player-lookup-improvements.patch b/Spigot-Server-Patches/Player-lookup-improvements.patch index c1d3110c7a..e40b1b112c 100644 --- a/Spigot-Server-Patches/Player-lookup-improvements.patch +++ b/Spigot-Server-Patches/Player-lookup-improvements.patch @@ -170,4 +170,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } public InetSocketAddress getAddress() { --- \ No newline at end of file +-- +1.9.5.msysgit.0 + diff --git a/Spigot-Server-Patches/RIP-metrics.patch b/Spigot-Server-Patches/RIP-metrics.patch index 46a49a0a06..7ba2ff7d39 100644 --- a/Spigot-Server-Patches/RIP-metrics.patch +++ b/Spigot-Server-Patches/RIP-metrics.patch @@ -686,4 +686,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } static void readConfig(Class clazz, Object instance) --- \ No newline at end of file +-- +1.9.5.msysgit.0 + diff --git a/Spigot-Server-Patches/Show-PaperSpigot-in-client-crashes-server-lists-and-.patch b/Spigot-Server-Patches/Show-PaperSpigot-in-client-crashes-server-lists-and-.patch index 40aa69c883..92c6dcbc9f 100644 --- a/Spigot-Server-Patches/Show-PaperSpigot-in-client-crashes-server-lists-and-.patch +++ b/Spigot-Server-Patches/Show-PaperSpigot-in-client-crashes-server-lists-and-.patch @@ -18,4 +18,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } public CrashReport b(CrashReport crashreport) { --- \ No newline at end of file +-- +1.9.5.msysgit.0 +