geforkt von Mirrors/Paper
46 Zeilen
2.7 KiB
Diff
46 Zeilen
2.7 KiB
Diff
From b492b9f378575d22dba8aa0c1766c5c1b06133b4 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 d2cb1f1..7660356 100644
|
|
--- a/src/main/java/net/minecraft/server/World.java
|
|
+++ b/src/main/java/net/minecraft/server/World.java
|
|
@@ -1207,7 +1207,15 @@ 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 || b instanceof BlockChest || b instanceof BlockSlowSand || b instanceof BlockBed || b instanceof BlockEnderChest || b instanceof BlockEnchantmentTable || b instanceof BlockBrewingStand)) {
|
|
+ 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 180158b..ef59074 100644
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
@@ -300,4 +300,10 @@ 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 );
|
|
+ }
|
|
}
|
|
--
|
|
2.7.0
|
|
|