From c4e610e33c83303707cba28806fbb5adbd170741 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 16 Jun 2019 14:47:23 +0100 Subject: [PATCH] Fix out of bounds falling block removal (#2188) --- ...ck-and-tnt-entities-at-the-specified.patch | 29 ++++++++++--------- Spigot-Server-Patches/Entity-Origin-API.patch | 2 +- ...a-from-ArmorStand-and-SpawnEgg-items.patch | 2 +- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/Spigot-Server-Patches/Drop-falling-block-and-tnt-entities-at-the-specified.patch b/Spigot-Server-Patches/Drop-falling-block-and-tnt-entities-at-the-specified.patch index 59ce736ae..da18bc265 100644 --- a/Spigot-Server-Patches/Drop-falling-block-and-tnt-entities-at-the-specified.patch +++ b/Spigot-Server-Patches/Drop-falling-block-and-tnt-entities-at-the-specified.patch @@ -36,23 +36,26 @@ index c348d6bec3..f5647a171d 100644 public EntityItem a(ItemStack itemstack, float f) { if (itemstack.isEmpty()) { diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java -index c9c903367f..55591fbe05 100644 +index c9c903367f..fee5e67877 100644 --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java @@ -0,0 +0,0 @@ public class EntityFallingBlock extends Entity { + } - if (!this.onGround && !flag1) { - if (!this.world.isClientSide && (this.ticksLived > 100 && (blockposition.getY() < 1 || blockposition.getY() > 256) || this.ticksLived > 600)) { -+ if (this.world.paperConfig.fallingBlockHeightNerf != 0 && this.locY > this.world.paperConfig.fallingBlockHeightNerf) { // Paper - Configurable EntityFallingBlock height nerf - if (this.dropItem && this.world.getGameRules().getBoolean("doEntityDrops")) { - this.a((IMaterial) block); - } - - this.die(); -+ } // Paper - } - } else { - IBlockData iblockdata = this.world.getType(blockposition); + this.move(EnumMoveType.SELF, this.getMot()); ++ ++ // Paper start - Configurable EntityFallingBlock height nerf ++ if (this.world.paperConfig.fallingBlockHeightNerf != 0 && this.locY > this.world.paperConfig.fallingBlockHeightNerf) { ++ if (this.dropItem && this.world.getGameRules().getBoolean("doEntityDrops")) { ++ this.a(block); ++ } ++ ++ this.die(); ++ } ++ // Paper end + if (!this.world.isClientSide) { + blockposition = new BlockPosition(this); + boolean flag = this.block.getBlock() instanceof BlockConcretePowder; diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java index ba86a07344..e3001570f9 100644 --- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java diff --git a/Spigot-Server-Patches/Entity-Origin-API.patch b/Spigot-Server-Patches/Entity-Origin-API.patch index 5e7ef9cb4..a4c47c644 100644 --- a/Spigot-Server-Patches/Entity-Origin-API.patch +++ b/Spigot-Server-Patches/Entity-Origin-API.patch @@ -51,7 +51,7 @@ index f5647a171d..205376f6af 100644 NBTTagList nbttaglist = new NBTTagList(); double[] adouble1 = adouble; diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java -index 55591fbe05..90becdfdec 100644 +index a4984aa9a8..23a1f8c77c 100644 --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java @@ -0,0 +0,0 @@ public class EntityFallingBlock extends Entity { diff --git a/Spigot-Server-Patches/Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch b/Spigot-Server-Patches/Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch index ead41ce24..6de609405 100644 --- a/Spigot-Server-Patches/Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch +++ b/Spigot-Server-Patches/Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch @@ -30,7 +30,7 @@ index eed454bf40..4892113a15 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java -index 90becdfdec..f54887e5e8 100644 +index 23a1f8c77c..a86dd55292 100644 --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java @@ -0,0 +0,0 @@ public class EntityFallingBlock extends Entity {