From f7dff04bfc238840d79ad4bd197579060955866e Mon Sep 17 00:00:00 2001 From: Samsuik Date: Sun, 24 Dec 2023 17:56:35 +0000 Subject: [PATCH] Use conditional or when checking for cannon entities --- ...Treat-all-collidable-blocks-as-full-while-moving-fas.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/server/0046-Treat-all-collidable-blocks-as-full-while-moving-fas.patch b/patches/server/0046-Treat-all-collidable-blocks-as-full-while-moving-fas.patch index 18f10e2..7a95c08 100644 --- a/patches/server/0046-Treat-all-collidable-blocks-as-full-while-moving-fas.patch +++ b/patches/server/0046-Treat-all-collidable-blocks-as-full-while-moving-fas.patch @@ -59,14 +59,14 @@ index a40dcbde87860fd6d3b60d0b9e2d5e63e18e69b7..d0bab6610a0ea8d3e6ba69034a25f409 AABB singleAABB = blockCollision.getSingleAABBRepresentation(); if (singleAABB != null) { diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 852276d9bedc51c3c8a28b60c85fdb23cf9cf818..2588180e543dc8ca2e41c15802b59c9b87df7ee6 100644 +index 852276d9bedc51c3c8a28b60c85fdb23cf9cf818..7631e9c2d64bd153267ebd36648fe5e755906def 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -547,6 +547,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S flags |= io.papermc.paper.util.CollisionUtil.COLLISION_FLAG_LOAD_CHUNKS | io.papermc.paper.util.CollisionUtil.COLLISION_FLAG_ADD_TICKET; } -+ if (this.level().sakuraConfig().cannons.treatAllBlocksAsFullWhenMoving && this.isPrimedTNT | this.isFallingBlock) { ++ if (this.level().sakuraConfig().cannons.treatAllBlocksAsFullWhenMoving && (this.isPrimedTNT || this.isFallingBlock)) { + this.syncDeltaMovement(); + double horizontalMovementSqr = this.movementX*this.movementX + this.movementZ*this.movementZ; + if (horizontalMovementSqr > Math.pow(this.level().sakuraConfig().cannons.treatAllBlocksAsFullWhenMovingFasterThan, 2.0)) {