mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-02-16 10:30:42 +00:00
Don't apply align to single image fallback
This commit is contained in:
@@ -21,9 +21,9 @@ public class SingleImageColorSampler implements ColorSampler {
|
||||
|
||||
@Override
|
||||
public Integer apply(int x, int z) {
|
||||
x = transformation.transformX(image, x);
|
||||
z = transformation.transformZ(image, z);
|
||||
if(x < 0 || z < 0 || x >= image.getWidth() || z >= image.getHeight()) return fallback.apply(x, z);
|
||||
return image.getRGB(x, z);
|
||||
var nx = transformation.transformX(image, x);
|
||||
var nz = transformation.transformZ(image, z);
|
||||
if(nx < 0 || nz < 0 || nx >= image.getWidth() || nz >= image.getHeight()) return fallback.apply(x, z);
|
||||
return image.getRGB(nx, nz);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user