From eab6483bd7c10c7f6e1b8a5335a32b4cfb5dd492 Mon Sep 17 00:00:00 2001 From: Sebastian Hartte Date: Tue, 4 Aug 2020 19:49:11 +0200 Subject: [PATCH] Fixes #4551: Bounding box of annihilation planes is too small. --- .../parts/automation/AnnihilationPlanePart.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/main/java/appeng/parts/automation/AnnihilationPlanePart.java b/src/main/java/appeng/parts/automation/AnnihilationPlanePart.java index 29071a678..1488b0bff 100644 --- a/src/main/java/appeng/parts/automation/AnnihilationPlanePart.java +++ b/src/main/java/appeng/parts/automation/AnnihilationPlanePart.java @@ -108,6 +108,15 @@ public class AnnihilationPlanePart extends BasicStatePart implements IGridTickab @Override public void getBoxes(final IPartCollisionHelper bch) { + + // For collision, we're using a simplified bounding box + if (bch.isBBCollision()) { + // The smaller collision hitbox here is needed to allow for the entity collision + // event + bch.addBox(0, 0, 14, 16, 16, 15.5); + return; + } + int minX = 1; int minY = 1; int maxX = 15; @@ -140,9 +149,7 @@ public class AnnihilationPlanePart extends BasicStatePart implements IGridTickab } bch.addBox(5, 5, 14, 11, 11, 15); - // The smaller collision hitbox here is needed to allow for the entity collision - // event - bch.addBox(minX, minY, 15, maxX, maxY, bch.isBBCollision() ? 15 : 16); + bch.addBox(minX, minY, 15, maxX, maxY, 16); } /**