mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-18 14:50:56 +00:00
binary column SurfaceLocator
This commit is contained in:
+4
-2
@@ -21,11 +21,13 @@ public class SurfaceLocator implements Locator {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BinaryColumn getSuitableCoordinates(Column column) {
|
public BinaryColumn getSuitableCoordinates(Column column) {
|
||||||
|
BinaryColumn location = new BinaryColumn(column.getMinY(), column.getMaxY());
|
||||||
for(int y : search) {
|
for(int y : search) {
|
||||||
if(column.getBlock(y).matches(air) && !column.getBlock(y-1).matches(air)) {
|
if(column.getBlock(y).matches(air) && !column.getBlock(y-1).matches(air)) {
|
||||||
return Collections.singletonList(y);
|
location.set(y);
|
||||||
|
return location;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Collections.emptyList();
|
return location;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user