mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-07 08:16:05 +00:00
Only calculate slope if slant is defined
This commit is contained in:
@@ -10,9 +10,11 @@ public final class PaletteUtil {
|
||||
public static Palette getPalette(int x, int y, int z, BiomeTemplate c, Sampler sampler) {
|
||||
|
||||
SlantHolder slant = c.getSlant();
|
||||
double slope = MathUtil.derivative(sampler, x, y, z);
|
||||
if (slant != null && slope > slant.getMinSlope()) {
|
||||
return slant.getPalette(slope).getPalette(y);
|
||||
if (slant != null) {
|
||||
double slope = MathUtil.derivative(sampler, x, y, z);
|
||||
if (slope > slant.getMinSlope()) {
|
||||
return slant.getPalette(slope).getPalette(y);
|
||||
}
|
||||
}
|
||||
|
||||
return c.getPalette().getPalette(y);
|
||||
|
||||
Reference in New Issue
Block a user