diff options
Diffstat (limited to 'patches/server/0024-Drop-falling-block-and-tnt-entities-at-the-specified.patch')
-rw-r--r-- | patches/server/0024-Drop-falling-block-and-tnt-entities-at-the-specified.patch | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/patches/server/0024-Drop-falling-block-and-tnt-entities-at-the-specified.patch b/patches/server/0024-Drop-falling-block-and-tnt-entities-at-the-specified.patch index ed1b412de9..3d283fcacd 100644 --- a/patches/server/0024-Drop-falling-block-and-tnt-entities-at-the-specified.patch +++ b/patches/server/0024-Drop-falling-block-and-tnt-entities-at-the-specified.patch @@ -3,10 +3,10 @@ From: Byteflux <[email protected]> Date: Tue, 1 Mar 2016 14:14:15 -0600 Subject: [PATCH] Drop falling block and tnt entities at the specified height -* Dec 2, 2020 Added tnt nerf for tnt minecarts - Machine_Maker +Co-authored-by: Jake Potrebic <[email protected]> diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -index 7e1594e8df4fd09cd1aecbc5f3784797b04a8337..bd357c3e6fcbd82f3c53ecc8dab46aa5d3708bc2 100644 +index 7e1594e8df4fd09cd1aecbc5f3784797b04a8337..ba5f365cc0ae9773e63ff58ad0a8f8bb4087889a 100644 --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java @@ -137,6 +137,17 @@ public class FallingBlockEntity extends Entity { @@ -15,7 +15,7 @@ index 7e1594e8df4fd09cd1aecbc5f3784797b04a8337..bd357c3e6fcbd82f3c53ecc8dab46aa5 this.move(MoverType.SELF, this.getDeltaMovement()); + + // Paper start - Configurable EntityFallingBlock height nerf -+ if (this.level.paperConfig().fixes.fallingBlockHeightNerf != 0 && this.getY() > this.level.paperConfig().fixes.fallingBlockHeightNerf) { ++ if (this.level.paperConfig().fixes.fallingBlockHeightNerf.test(v -> this.getY() > v)) { + if (this.dropItem && this.level.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) { + this.spawnAtLocation(block); + } @@ -28,7 +28,7 @@ index 7e1594e8df4fd09cd1aecbc5f3784797b04a8337..bd357c3e6fcbd82f3c53ecc8dab46aa5 BlockPos blockposition = this.blockPosition(); boolean flag = this.blockState.getBlock() instanceof ConcretePowderBlock; diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java -index e24b46820394c5f220d5bf7c4e763ef95ff9e9ab..2d4a990da2402a6c24c03e8be7e518e33db99c8f 100644 +index e24b46820394c5f220d5bf7c4e763ef95ff9e9ab..54a8548e8d3ddee049d3fed41332c94e368ba2c4 100644 --- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java +++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java @@ -68,6 +68,12 @@ public class PrimedTnt extends Entity { @@ -36,7 +36,7 @@ index e24b46820394c5f220d5bf7c4e763ef95ff9e9ab..2d4a990da2402a6c24c03e8be7e518e3 this.move(MoverType.SELF, this.getDeltaMovement()); + // Paper start - Configurable TNT entity height nerf -+ if (this.level.paperConfig().fixes.tntEntityHeightNerf != 0 && this.getY() > this.level.paperConfig().fixes.tntEntityHeightNerf) { ++ if (this.level.paperConfig().fixes.tntEntityHeightNerf.test(v -> this.getY() > v)) { + this.discard(); + return; + } @@ -45,7 +45,7 @@ index e24b46820394c5f220d5bf7c4e763ef95ff9e9ab..2d4a990da2402a6c24c03e8be7e518e3 if (this.onGround) { this.setDeltaMovement(this.getDeltaMovement().multiply(0.7D, -0.5D, 0.7D)); diff --git a/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java b/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java -index c10c28eb441e65c6285c25b5d4760c876909c724..136bd0168b573079dfad127d02ca8ba72c02fafb 100644 +index c10c28eb441e65c6285c25b5d4760c876909c724..ed457aeccb91c290bbd2191c9e3e52b499dc8200 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java @@ -46,6 +46,12 @@ public class MinecartTNT extends AbstractMinecart { @@ -53,7 +53,7 @@ index c10c28eb441e65c6285c25b5d4760c876909c724..136bd0168b573079dfad127d02ca8ba7 super.tick(); if (this.fuse > 0) { + // Paper start - Configurable TNT entity height nerf -+ if (this.level.paperConfig().fixes.tntEntityHeightNerf != 0 && this.getY() > this.level.paperConfig().fixes.tntEntityHeightNerf) { ++ if (this.level.paperConfig().fixes.tntEntityHeightNerf.test(v -> this.getY() > v)) { + this.discard(); + return; + } |