Skip to content

Commit

Permalink
take only one crystal from any spike
Browse files Browse the repository at this point in the history
  • Loading branch information
omergunr100 committed Nov 17, 2024
1 parent 3aba2e0 commit 09d3be1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ protected void updateConnectedFeatures() {
.map(spike -> getLevel().getEntitiesOfClass(EndCrystal.class, spike.getTopBoundingBox(),
crystal -> crystal.distanceToSqr(getPos().getCenter()) < maxDistance))
.reduce(new ArrayList<>(), (lst, crystalList) -> {
lst.addAll(crystalList);
crystalList.stream().findFirst().ifPresent(lst::add);
return lst;
});

Expand Down

0 comments on commit 09d3be1

Please sign in to comment.