mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-03 08:25:31 +00:00
fix matchpattern when min >= max
This commit is contained in:
parent
baccd04c8d
commit
bcae15225f
@ -29,6 +29,7 @@ public class MatchPattern implements Pattern {
|
||||
public boolean matches(int y, Column<?> column) {
|
||||
int min = FastMath.max(column.getMinY(), range.getMin() + y);
|
||||
int max = FastMath.min(column.getMaxY(), range.getMax() + y);
|
||||
if(max <= min) return false;
|
||||
for(int i = min; i < max; i++) {
|
||||
if(!matches.test(column.getBlock(i))) return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user