2014-08-06 07:45:22 +08:00
|
|
|
From 2c20bd30ddb002e0f17abbce55b0ccf99fb659c2 Mon Sep 17 00:00:00 2001
|
2014-07-30 16:35:19 +08:00
|
|
|
From: Byteflux <byte@byteflux.net>
|
2014-08-06 07:45:22 +08:00
|
|
|
Date: Tue, 5 Aug 2014 18:39:57 -0500
|
2014-07-30 16:35:19 +08:00
|
|
|
Subject: [PATCH] Drop falling block entities that are above the specified
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
2014-08-06 07:45:22 +08:00
|
|
|
index df602bd..00dcca6 100644
|
2014-07-30 16:35:19 +08:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
2014-08-06 07:45:22 +08:00
|
|
|
@@ -67,6 +67,17 @@ public class EntityFallingBlock extends Entity {
|
2014-07-30 16:35:19 +08:00
|
|
|
++this.ticksLived;
|
|
|
|
this.motY -= 0.03999999910593033D;
|
|
|
|
this.move(this.motX, this.motY, this.motZ);
|
|
|
|
+
|
|
|
|
+ // PaperSpigot start - Drop falling blocks above the specified height
|
2014-08-06 07:45:22 +08:00
|
|
|
+ if (this.world.paperSpigotConfig.fallingBlockHeightNerf != 0 && this.locY > this.world.paperSpigotConfig.fallingBlockHeightNerf) {
|
2014-07-30 16:35:19 +08:00
|
|
|
+ if (this.dropItem) {
|
|
|
|
+ this.a(new ItemStack(this.id, 1, this.id.getDropData(this.data)), 0.0F);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.die();
|
|
|
|
+ }
|
|
|
|
+ // PaperSpigot end
|
|
|
|
+
|
|
|
|
this.motX *= 0.9800000190734863D;
|
|
|
|
this.motY *= 0.9800000190734863D;
|
|
|
|
this.motZ *= 0.9800000190734863D;
|
|
|
|
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
2014-08-06 07:45:22 +08:00
|
|
|
index f998cb0..fc9b6df 100644
|
2014-07-30 16:35:19 +08:00
|
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
2014-08-06 07:45:22 +08:00
|
|
|
@@ -146,4 +146,14 @@ public class PaperSpigotWorldConfig
|
2014-07-30 16:35:19 +08:00
|
|
|
keepSpawnInMemory = getBoolean( "keep-spawn-loaded", true );
|
|
|
|
log( "Keep spawn chunk loaded: " + keepSpawnInMemory );
|
|
|
|
}
|
|
|
|
+
|
2014-08-06 07:45:22 +08:00
|
|
|
+ public double fallingBlockHeightNerf;
|
|
|
|
+ private void fallingBlockheightNerf()
|
2014-07-30 16:35:19 +08:00
|
|
|
+ {
|
|
|
|
+ // Technically a little disingenuous as it applies to all falling blocks but alas, backwards compat prevails!
|
|
|
|
+ fallingBlockHeightNerf = getDouble( "tnt-entity-height-nerf", 0 );
|
2014-08-06 07:45:22 +08:00
|
|
|
+ if (fallingBlockHeightNerf != 0) {
|
|
|
|
+ log( "TNT/Falling Block Height Limit set to Y: " + fallingBlockHeightNerf);
|
|
|
|
+ }
|
2014-07-30 16:35:19 +08:00
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
|
|
|
1.9.1
|
|
|
|
|