check the block below if occupied

This commit is contained in:
Oth3r 2024-11-16 15:26:55 -06:00
commit 012778ba2b
2 changed files with 8 additions and 8 deletions

View file

@ -58,10 +58,7 @@ public class Utl {
* checks the list of sit entities and sees if any of them are occupying the block pos
*/
public static boolean isNotOccupied(BlockPos pos) {
for (DisplayEntity.TextDisplayEntity entity : Data.getSitEntities().values()) {
if (entity.getBlockPos().equals(pos)) return false;
}
return true;
return Data.getSitEntities().values().stream().noneMatch(entity -> entity.getBlockPos().equals(pos));
}
public static class Num {