Skip to content

Commit

Permalink
Fix falses on dead corals
Browse files Browse the repository at this point in the history
  • Loading branch information
Axionize committed Nov 2, 2024
1 parent 28be03b commit f02d138
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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])),
Expand Down

0 comments on commit f02d138

Please sign in to comment.