mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-08-29 21:30:43 +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) {
|
public static Palette getPalette(int x, int y, int z, BiomeTemplate c, Sampler sampler) {
|
||||||
|
|
||||||
SlantHolder slant = c.getSlant();
|
SlantHolder slant = c.getSlant();
|
||||||
double slope = MathUtil.derivative(sampler, x, y, z);
|
if (slant != null) {
|
||||||
if (slant != null && slope > slant.getMinSlope()) {
|
double slope = MathUtil.derivative(sampler, x, y, z);
|
||||||
return slant.getPalette(slope).getPalette(y);
|
if (slope > slant.getMinSlope()) {
|
||||||
|
return slant.getPalette(slope).getPalette(y);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return c.getPalette().getPalette(y);
|
return c.getPalette().getPalette(y);
|
||||||
|
|||||||
Reference in New Issue
Block a user