mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-02-16 10:30:42 +00:00
use search range for binary column in pattern locator
This commit is contained in:
@@ -25,7 +25,7 @@ public class AdjacentPatternLocator implements Locator {
|
||||
|
||||
@Override
|
||||
public BinaryColumn getSuitableCoordinates(Column<?> column) {
|
||||
BinaryColumn locations = new BinaryColumn(column.getMinY(), column.getMaxY());
|
||||
BinaryColumn locations = new BinaryColumn(search);
|
||||
|
||||
for(int y : search) {
|
||||
if(isValid(y, column)) locations.set(y);
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
package com.dfsek.terra.api.structure.feature;
|
||||
|
||||
import com.dfsek.terra.api.util.Range;
|
||||
|
||||
import java.util.function.IntConsumer;
|
||||
|
||||
|
||||
@@ -28,6 +30,10 @@ public class BinaryColumn {
|
||||
this.data = new boolean[maxY - minY];
|
||||
}
|
||||
|
||||
public BinaryColumn(Range y) {
|
||||
this(y.getMin(), y.getMax());
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of a height to {@code true}.
|
||||
* @param y Height of entry to set.
|
||||
|
||||
Reference in New Issue
Block a user