2015-09-13 00:57:39 +00:00
|
|
|
From dbad7403c71170dedfd8ea73c9e5e1a4fe4c4b43 Mon Sep 17 00:00:00 2001
|
2015-06-05 08:24:22 +00:00
|
|
|
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
|
2015-09-13 00:57:39 +00:00
|
|
|
index 27cb4ed..4bb6feb 100644
|
2015-06-05 08:24:22 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/World.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/World.java
|
2015-08-05 00:24:47 +00:00
|
|
|
@@ -1203,7 +1203,15 @@ public abstract class World implements IBlockAccess {
|
2015-06-05 08:24:22 +00:00
|
|
|
}
|
|
|
|
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();
|
2015-08-05 09:31:55 +00:00
|
|
|
+ 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 || b instanceof BlockChest || b instanceof BlockSlowSand || b instanceof BlockBed || b instanceof BlockEnderChest)) {
|
2015-06-05 08:24:22 +00:00
|
|
|
+ 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
|
2015-09-13 00:57:39 +00:00
|
|
|
index beeaa0b..88e0644 100644
|
2015-06-05 08:24:22 +00:00
|
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
2015-07-01 02:46:05 +00:00
|
|
|
@@ -332,4 +332,10 @@ public class PaperSpigotWorldConfig
|
2015-06-05 08:24:22 +00:00
|
|
|
fixCannons = getBoolean( "fix-cannons", false );
|
|
|
|
log( "Fix TNT cannons: " + fixCannons );
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean fallingBlocksCollideWithSigns;
|
|
|
|
+ private void fallingBlocksCollideWithSigns()
|
|
|
|
+ {
|
|
|
|
+ fallingBlocksCollideWithSigns = getBoolean( "falling-blocks-collide-with-signs", false );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2015-09-13 00:57:39 +00:00
|
|
|
2.5.1
|
2015-06-05 08:24:22 +00:00
|
|
|
|