mirror of
https://github.com/BentoBoxWorld/Greenhouses.git
synced 2024-11-25 03:55:29 +01:00
parent
1f0b579d5a
commit
1975df2732
@ -107,7 +107,9 @@ public class GreenhouseMap {
|
||||
private boolean isOverlapping(Greenhouse greenhouse) {
|
||||
return greenhouse.getLocation() != null && addon.getIslands().getIslandAt(greenhouse.getLocation()).map(i -> {
|
||||
greenhouses.putIfAbsent(i, new ArrayList<>());
|
||||
return greenhouses.get(i).stream().anyMatch(g -> g.getBoundingBox().overlaps(greenhouse.getBoundingBox()));
|
||||
return greenhouses.get(i).stream().anyMatch(g ->
|
||||
g.getLocation().getWorld().equals(greenhouse.getLocation().getWorld()) &&
|
||||
g.getBoundingBox().overlaps(greenhouse.getBoundingBox()));
|
||||
}).orElse(false);
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user