From 3d97b1e3ec117ac27db2bc98be30ed03fc3718cb Mon Sep 17 00:00:00 2001 From: shartte Date: Wed, 5 Aug 2020 17:45:53 +0200 Subject: [PATCH] Fixes #4551: Bounding box of annihilation planes is too small. (#4552) --- .../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 bc843d9ed..9a16ab367 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); } /**