mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
Interpolator as registry
This commit is contained in:
parent
e5033cceec
commit
44c807aedd
@ -18,10 +18,13 @@
|
|||||||
|
|
||||||
package com.volmit.iris.engine.object;
|
package com.volmit.iris.engine.object;
|
||||||
|
|
||||||
|
import com.volmit.iris.core.loader.IrisRegistrant;
|
||||||
import com.volmit.iris.engine.object.annotations.*;
|
import com.volmit.iris.engine.object.annotations.*;
|
||||||
import com.volmit.iris.util.function.NoiseProvider;
|
import com.volmit.iris.util.function.NoiseProvider;
|
||||||
import com.volmit.iris.util.interpolation.InterpolationMethod;
|
import com.volmit.iris.util.interpolation.InterpolationMethod;
|
||||||
import com.volmit.iris.util.interpolation.IrisInterpolation;
|
import com.volmit.iris.util.interpolation.IrisInterpolation;
|
||||||
|
import com.volmit.iris.util.json.JSONObject;
|
||||||
|
import com.volmit.iris.util.plugin.VolmitSender;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
@ -33,7 +36,7 @@ import lombok.experimental.Accessors;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Desc("Configures rotation for iris")
|
@Desc("Configures rotation for iris")
|
||||||
@Data
|
@Data
|
||||||
public class IrisInterpolator {
|
public class IrisInterpolator extends IrisRegistrant {
|
||||||
@Required
|
@Required
|
||||||
@Desc("The interpolation method when two biomes use different heights but this same generator")
|
@Desc("The interpolation method when two biomes use different heights but this same generator")
|
||||||
private InterpolationMethod function = InterpolationMethod.BILINEAR_STARCAST_6;
|
private InterpolationMethod function = InterpolationMethod.BILINEAR_STARCAST_6;
|
||||||
@ -51,4 +54,19 @@ public class IrisInterpolator {
|
|||||||
public double interpolate(int x, int z, NoiseProvider provider) {
|
public double interpolate(int x, int z, NoiseProvider provider) {
|
||||||
return IrisInterpolation.getNoise(getFunction(), x, z, getHorizontalScale(), provider);
|
return IrisInterpolation.getNoise(getFunction(), x, z, getHorizontalScale(), provider);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getFolderName() {
|
||||||
|
return "interpolators";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTypeName() {
|
||||||
|
return "Interpolator";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void scanForErrors(JSONObject p, VolmitSender sender) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user