mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-24 05:21:16 +00:00
start working on error handling stuff
This commit is contained in:
+1
-1
@@ -24,6 +24,6 @@ public class AirMatchPatternTemplate implements ObjectTemplate<Pattern> {
|
||||
|
||||
@Override
|
||||
public Pattern get() {
|
||||
return new MatchPattern(offset, BlockState::isAir);
|
||||
return new MatchPattern(offset, BlockState::air);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -26,6 +26,6 @@ public class BlockSetMatchPatternTemplate implements ObjectTemplate<Pattern> {
|
||||
|
||||
@Override
|
||||
public Pattern get() {
|
||||
return new MatchPattern(offset, blockState -> blocks.contains(blockState.getBlockType()));
|
||||
return new MatchPattern(offset, blockState -> blocks.contains(blockState.blockType()));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -21,6 +21,6 @@ public class SolidMatchPatternTemplate implements ObjectTemplate<Pattern> {
|
||||
|
||||
@Override
|
||||
public Pattern get() {
|
||||
return new MatchPattern(offset, blockState -> blockState.getBlockType().isSolid());
|
||||
return new MatchPattern(offset, blockState -> blockState.blockType().solid());
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ public class SurfaceLocator implements Locator {
|
||||
int min = Math.max(search.getMin(), column.getMinY());
|
||||
if(min >= max) return builder.build();
|
||||
for(int y = min; y < max; y++) {
|
||||
if(column.getBlock(y).isAir() && !column.getBlock(y - 1).isAir()) {
|
||||
if(column.getBlock(y).air() && !column.getBlock(y - 1).air()) {
|
||||
builder.set(y);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ public class TopLocator implements Locator {
|
||||
@Override
|
||||
public BinaryColumn getSuitableCoordinates(Column<?> column) {
|
||||
for(int y = search.getMax(); y >= search.getMin(); y--) {
|
||||
if(column.getBlock(y).isAir() && !column.getBlock(y - 1).isAir()) {
|
||||
if(column.getBlock(y).air() && !column.getBlock(y - 1).air()) {
|
||||
return new BinaryColumn(y, y + 1, yi -> true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user