mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-04-05 23:36:12 +00:00
Improve biome generator performance when interpolators match each other
This commit is contained in:
@@ -31,7 +31,8 @@ import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Snippet("interpolator")
|
||||
import java.util.Objects;
|
||||
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@@ -50,6 +51,11 @@ public class IrisInterpolator {
|
||||
@Desc("The range checked horizontally. Smaller ranges yeild more detail but are not as smooth.")
|
||||
private double horizontalScale = 7;
|
||||
|
||||
public int hashCode()
|
||||
{
|
||||
return Objects.hash(horizontalScale, function);
|
||||
}
|
||||
|
||||
public double interpolate(double x, double z, NoiseProvider provider) {
|
||||
return interpolate((int) Math.round(x), (int) Math.round(z), provider);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user