From dd74dc9737a09f5c8e33fbd2a51fa747960a60e6 Mon Sep 17 00:00:00 2001 From: Axionize <154778082+Axionize@users.noreply.github.com> Date: Sun, 15 Dec 2024 16:52:02 -0500 Subject: [PATCH] Fix IndexOutofBoundsException when interacting with Pink Petals with 3 or more flowers --- src/main/java/ac/grim/grimac/utils/collisions/HitboxData.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/ac/grim/grimac/utils/collisions/HitboxData.java b/src/main/java/ac/grim/grimac/utils/collisions/HitboxData.java index 012f1b1536..90c229116f 100644 --- a/src/main/java/ac/grim/grimac/utils/collisions/HitboxData.java +++ b/src/main/java/ac/grim/grimac/utils/collisions/HitboxData.java @@ -542,7 +542,7 @@ public enum HitboxData { int flowerAmount = data.getFlowerAmount(); int horizontalIndex = getHorizontalID(data.getFacing()); - CollisionBox result = NoCollisionBox.INSTANCE; + CollisionBox result = flowerAmount < 2 ? NoCollisionBox.INSTANCE : new ComplexCollisionBox(flowerAmount); // Pre-defined collision boxes for each quadrant HexCollisionBox[] boxes = new HexCollisionBox[] {