From f02d1383c88856b9763116a35ce287827d1992c9 Mon Sep 17 00:00:00 2001 From: Axionize <154778082+Axionize@users.noreply.github.com> Date: Fri, 1 Nov 2024 21:25:08 -0400 Subject: [PATCH] Fix falses on dead corals --- .../ac/grim/grimac/utils/collisions/CollisionData.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/ac/grim/grimac/utils/collisions/CollisionData.java b/src/main/java/ac/grim/grimac/utils/collisions/CollisionData.java index 51a260e03c..66c7868890 100644 --- a/src/main/java/ac/grim/grimac/utils/collisions/CollisionData.java +++ b/src/main/java/ac/grim/grimac/utils/collisions/CollisionData.java @@ -24,6 +24,7 @@ import io.github.retrooper.packetevents.util.viaversion.ViaVersionUtil; import java.util.*; +import java.util.stream.Stream; // Warning for major game updates! // Do not use an enum for stuff like Axis and other data types not in 1.7 @@ -791,7 +792,14 @@ public enum CollisionData { CORAL_PLANT((player, version, data, x, y, z) -> { return new HexCollisionBox(2.0D, 0.0D, 2.0D, 14.0D, 15.0D, 14.0D); - }, BlockTags.CORAL_PLANTS.getStates().toArray(new StateType[0])), + }, Stream.concat( + Arrays.stream(BlockTags.CORAL_PLANTS.getStates().toArray(new StateType[0])), + Stream.of(StateTypes.DEAD_HORN_CORAL, StateTypes.DEAD_TUBE_CORAL, StateTypes.DEAD_BRAIN_CORAL, + StateTypes.DEAD_BUBBLE_CORAL, StateTypes.DEAD_FIRE_CORAL, StateTypes.DEAD_HORN_CORAL) + ) + .distinct() // This will remove duplicates + .toArray(StateType[]::new) + ), SIGN(new SimpleCollisionBox(0.25, 0.0, 0.25, 0.75, 1.0, 0.75, false), BlockTags.STANDING_SIGNS.getStates().toArray(new StateType[0])),