From 38aa4c080b9b87b5307f8b875639598e3058d940 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Fri, 5 Jun 2015 01:24:22 -0700
Subject: [PATCH] FallingBlock and TNT entities collide with specific blocks

---
 .../Configurable-TNT-cannon-fix.patch         |  2 +-
 ...-TNT-entities-collide-with-specific-.patch | 46 +++++++++++++++++++
 2 files changed, 47 insertions(+), 1 deletion(-)
 create mode 100644 Spigot-Server-Patches/FallingBlock-and-TNT-entities-collide-with-specific-.patch

diff --git a/Spigot-Server-Patches/Configurable-TNT-cannon-fix.patch b/Spigot-Server-Patches/Configurable-TNT-cannon-fix.patch
index be2f47d5eb..a6c7108cdb 100644
--- a/Spigot-Server-Patches/Configurable-TNT-cannon-fix.patch
+++ b/Spigot-Server-Patches/Configurable-TNT-cannon-fix.patch
@@ -342,7 +342,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 +        }
 +
 +        fixCannons = getBoolean( "fix-cannons", false );
-+        log( "Fix TNT cannons: " + fixCannons);
++        log( "Fix TNT cannons: " + fixCannons );
 +    }
  }
 -- 
diff --git a/Spigot-Server-Patches/FallingBlock-and-TNT-entities-collide-with-specific-.patch b/Spigot-Server-Patches/FallingBlock-and-TNT-entities-collide-with-specific-.patch
new file mode 100644
index 0000000000..7875bf925a
--- /dev/null
+++ b/Spigot-Server-Patches/FallingBlock-and-TNT-entities-collide-with-specific-.patch
@@ -0,0 +1,46 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Byteflux <byte@byteflux.net>
+Date: Fri, 5 Jun 2015 00:43:17 -0700
+Subject: [PATCH] FallingBlock and TNT entities collide with specific blocks
+
+
+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 {
+                             }
+                             if ( block != null )
+                             {
+-                                block.getBlock().a(this, blockposition, block, axisalignedbb, arraylist, entity);
++                                // PaperSpigot start - FallingBlocks and TNT collide with specific non-collidable blocks
++                                Block b = block.getBlock();
++                                if (entity.world.paperSpigotConfig.fallingBlocksCollideWithSigns && (entity instanceof EntityTNTPrimed || entity instanceof EntityFallingBlock) &&
++                                        (b instanceof BlockSign || b instanceof BlockFenceGate || b instanceof BlockTorch || b instanceof BlockButtonAbstract || b instanceof BlockLever || b instanceof BlockTripwireHook || b instanceof BlockTripwire)) {
++                                    AxisAlignedBB aabb = AxisAlignedBB.a(x, y, z, x + 1.0, y + 1.0, z + 1.0);
++                                    if (axisalignedbb.b(aabb)) arraylist.add(aabb);
++                                } else {
++                                    b.a(this, blockposition, block, axisalignedbb, arraylist, entity);
++                                }
++                                // PaperSpigot end
+                             }
+                         }
+                     }
+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
+         fixCannons = getBoolean( "fix-cannons", false );
+         log( "Fix TNT cannons: " + fixCannons );
+     }
++
++    public boolean fallingBlocksCollideWithSigns;
++    private void fallingBlocksCollideWithSigns()
++    {
++        fallingBlocksCollideWithSigns = getBoolean( "falling-blocks-collide-with-signs", false );
++    }
+ }
+-- 
+1.9.5.msysgit.1
+