mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-10-26 05:50:08 +00:00
bounds check
This commit is contained in:
1 parent
6434b6b213
commit
81023e1d67
1 file changed
+1
@@ -70,6 +70,7 @@ public class Column<T extends WritableWorld> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Column<T> clamp(int min, int max) {
|
public Column<T> clamp(int min, int max) {
|
||||||
|
if(min >= max) throw new IllegalArgumentException("Min greater than or equal to max: " + min + ", " + max);
|
||||||
return new Column<>(x, z, world, min, max);
|
return new Column<>(x, z, world, min, max);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user