mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-19 23:00:19 +00:00
reformat code
This commit is contained in:
@@ -10,7 +10,7 @@ final class SelfDelegate implements BiomeDelegate {
|
||||
public static final SelfDelegate INSTANCE = new SelfDelegate();
|
||||
|
||||
private SelfDelegate() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -28,7 +28,7 @@ public class BiomePipelineTemplate extends BiomeProviderTemplate {
|
||||
@Description("""
|
||||
The initial size of biome chunks. This value must be at least 2.
|
||||
<b>This is not the final size of biome chunks. Final chunks will be much larger</b>.
|
||||
|
||||
|
||||
It is recommended to keep biome chunks' final size in the range of [50, 300]
|
||||
to prevent performance issues. To calculate the size of biome chunks, simply
|
||||
take initial-size and for each expand stage, multiply the running value by 2
|
||||
|
||||
@@ -22,7 +22,7 @@ public class SlantHolder {
|
||||
}
|
||||
|
||||
public static SlantHolder of(TreeMap<Double, PaletteHolder> layers, double minSlope) {
|
||||
if(layers.size() == 1){
|
||||
if(layers.size() == 1) {
|
||||
Entry<Double, PaletteHolder> firstEntry = layers.firstEntry();
|
||||
return new Single(firstEntry.getValue(), minSlope);
|
||||
}
|
||||
@@ -42,9 +42,9 @@ public class SlantHolder {
|
||||
}
|
||||
|
||||
private static final class Single extends SlantHolder {
|
||||
|
||||
|
||||
private final PaletteHolder layers;
|
||||
|
||||
|
||||
public Single(PaletteHolder layers, double minSlope) {
|
||||
super(of(minSlope, layers), minSlope);
|
||||
this.layers = layers;
|
||||
@@ -55,7 +55,7 @@ public class SlantHolder {
|
||||
map.put(v, layer);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PaletteHolder getPalette(double slope) {
|
||||
return layers;
|
||||
|
||||
@@ -34,12 +34,12 @@ public class PaddedGridDistributor implements Distributor {
|
||||
public boolean matches(int x, int z, long seed) {
|
||||
int cellX = FastMath.floorDiv(x, cellWidth);
|
||||
int cellZ = FastMath.floorDiv(z, cellWidth);
|
||||
|
||||
|
||||
Random random = new Random((murmur64(MathUtil.squash(cellX, cellZ)) ^ seed) + salt);
|
||||
|
||||
|
||||
int pointX = random.nextInt(width) + cellX * cellWidth;
|
||||
int pointZ = random.nextInt(width) + cellZ * cellWidth;
|
||||
|
||||
|
||||
return x == pointX && z == pointZ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,9 +7,10 @@
|
||||
|
||||
package com.dfsek.terra.addons.noise.normalizer;
|
||||
|
||||
import net.jafama.FastMath;
|
||||
|
||||
import com.dfsek.terra.api.noise.NoiseSampler;
|
||||
|
||||
import net.jafama.FastMath;
|
||||
|
||||
public class PosterizationNormalizer extends Normalizer {
|
||||
private final double stepSize;
|
||||
|
||||
@@ -22,6 +22,7 @@ public class GaborNoiseSampler extends NoiseFunction {
|
||||
private double impulseDensity = (impulsesPerKernel / (Math.PI * kernelRadius * kernelRadius));
|
||||
private double impulsesPerCell = impulseDensity * kernelRadius * kernelRadius;
|
||||
private double g = FastMath.exp(-impulsesPerCell);
|
||||
|
||||
private double omega0 = Math.PI * 0.25;
|
||||
private boolean isotropic = true;
|
||||
|
||||
|
||||
@@ -13,9 +13,6 @@ import ca.solostudios.strata.version.VersionRange;
|
||||
import com.dfsek.tectonic.api.exception.LoadException;
|
||||
import com.dfsek.tectonic.api.loader.ConfigLoader;
|
||||
import com.dfsek.tectonic.yaml.YamlConfiguration;
|
||||
|
||||
import com.dfsek.terra.api.addon.bootstrap.BootstrapAddonClassLoader;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -23,7 +20,6 @@ import java.io.IOException;
|
||||
import java.io.UncheckedIOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.nio.file.FileVisitOption;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
@@ -41,6 +37,7 @@ import com.dfsek.terra.addons.manifest.impl.config.loaders.VersionRangeLoader;
|
||||
import com.dfsek.terra.addons.manifest.impl.exception.AddonException;
|
||||
import com.dfsek.terra.addons.manifest.impl.exception.ManifestException;
|
||||
import com.dfsek.terra.addons.manifest.impl.exception.ManifestNotPresentException;
|
||||
import com.dfsek.terra.api.addon.bootstrap.BootstrapAddonClassLoader;
|
||||
import com.dfsek.terra.api.addon.bootstrap.BootstrapBaseAddon;
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ public class Scope {
|
||||
public Variable<?> get(String id) {
|
||||
throw new IllegalStateException("Cannot get variable from null scope: " + id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void put(String id, Variable<?> variable) {
|
||||
throw new IllegalStateException("Cannot set variable in null scope: " + id);
|
||||
@@ -38,7 +38,7 @@ public class Scope {
|
||||
public void put(String id, Variable<?> variable) {
|
||||
variableMap.put(id, variable);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Scope sub() {
|
||||
return new Scope(this);
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
|
||||
package com.dfsek.terra.addons.terrascript.parser.lang.operations;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.ImplementationArguments;
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.Returnable;
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.Scope;
|
||||
import com.dfsek.terra.addons.terrascript.tokenizer.Position;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
|
||||
public abstract class BinaryOperation<I, O> implements Returnable<O> {
|
||||
private final Returnable<I> left;
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
|
||||
package com.dfsek.terra.addons.terrascript.parser.lang.operations;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.Returnable;
|
||||
import com.dfsek.terra.addons.terrascript.tokenizer.Position;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
|
||||
public class BooleanAndOperation extends BinaryOperation<Boolean, Boolean> {
|
||||
public BooleanAndOperation(Returnable<Boolean> left, Returnable<Boolean> right, Position start) {
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
|
||||
package com.dfsek.terra.addons.terrascript.parser.lang.operations;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.Returnable;
|
||||
import com.dfsek.terra.addons.terrascript.tokenizer.Position;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
|
||||
public class BooleanOrOperation extends BinaryOperation<Boolean, Boolean> {
|
||||
public BooleanOrOperation(Returnable<Boolean> left, Returnable<Boolean> right, Position start) {
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
|
||||
package com.dfsek.terra.addons.terrascript.parser.lang.operations;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.Returnable;
|
||||
import com.dfsek.terra.addons.terrascript.tokenizer.Position;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
|
||||
public class ConcatenationOperation extends BinaryOperation<Object, Object> {
|
||||
public ConcatenationOperation(Returnable<Object> left, Returnable<Object> right, Position position) {
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
|
||||
package com.dfsek.terra.addons.terrascript.parser.lang.operations;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.Returnable;
|
||||
import com.dfsek.terra.addons.terrascript.tokenizer.Position;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
|
||||
public class DivisionOperation extends BinaryOperation<Number, Number> {
|
||||
public DivisionOperation(Returnable<Number> left, Returnable<Number> right, Position position) {
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
|
||||
package com.dfsek.terra.addons.terrascript.parser.lang.operations;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.Returnable;
|
||||
import com.dfsek.terra.addons.terrascript.tokenizer.Position;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
|
||||
public class ModuloOperation extends BinaryOperation<Number, Number> {
|
||||
public ModuloOperation(Returnable<Number> left, Returnable<Number> right, Position start) {
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
|
||||
package com.dfsek.terra.addons.terrascript.parser.lang.operations;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.Returnable;
|
||||
import com.dfsek.terra.addons.terrascript.tokenizer.Position;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
|
||||
public class MultiplicationOperation extends BinaryOperation<Number, Number> {
|
||||
public MultiplicationOperation(Returnable<Number> left, Returnable<Number> right, Position position) {
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
|
||||
package com.dfsek.terra.addons.terrascript.parser.lang.operations;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.Returnable;
|
||||
import com.dfsek.terra.addons.terrascript.tokenizer.Position;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
|
||||
public class NumberAdditionOperation extends BinaryOperation<Number, Number> {
|
||||
public NumberAdditionOperation(Returnable<Number> left, Returnable<Number> right, Position position) {
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
|
||||
package com.dfsek.terra.addons.terrascript.parser.lang.operations;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.Returnable;
|
||||
import com.dfsek.terra.addons.terrascript.tokenizer.Position;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
|
||||
public class SubtractionOperation extends BinaryOperation<Number, Number> {
|
||||
public SubtractionOperation(Returnable<Number> left, Returnable<Number> right, Position position) {
|
||||
|
||||
@@ -9,12 +9,12 @@ package com.dfsek.terra.addons.terrascript.parser.lang.operations.statements;
|
||||
|
||||
import net.jafama.FastMath;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.Returnable;
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.operations.BinaryOperation;
|
||||
import com.dfsek.terra.addons.terrascript.tokenizer.Position;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import static com.dfsek.terra.api.util.MathUtil.EPSILON;
|
||||
|
||||
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
|
||||
package com.dfsek.terra.addons.terrascript.parser.lang.operations.statements;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.Returnable;
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.operations.BinaryOperation;
|
||||
import com.dfsek.terra.addons.terrascript.tokenizer.Position;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
|
||||
public class GreaterOrEqualsThanStatement extends BinaryOperation<Number, Boolean> {
|
||||
public GreaterOrEqualsThanStatement(Returnable<Number> left, Returnable<Number> right, Position position) {
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
|
||||
package com.dfsek.terra.addons.terrascript.parser.lang.operations.statements;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.Returnable;
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.operations.BinaryOperation;
|
||||
import com.dfsek.terra.addons.terrascript.tokenizer.Position;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
|
||||
public class GreaterThanStatement extends BinaryOperation<Number, Boolean> {
|
||||
public GreaterThanStatement(Returnable<Number> left, Returnable<Number> right, Position position) {
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
|
||||
package com.dfsek.terra.addons.terrascript.parser.lang.operations.statements;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.Returnable;
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.operations.BinaryOperation;
|
||||
import com.dfsek.terra.addons.terrascript.tokenizer.Position;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
|
||||
public class LessThanOrEqualsStatement extends BinaryOperation<Number, Boolean> {
|
||||
public LessThanOrEqualsStatement(Returnable<Number> left, Returnable<Number> right, Position position) {
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
|
||||
package com.dfsek.terra.addons.terrascript.parser.lang.operations.statements;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.Returnable;
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.operations.BinaryOperation;
|
||||
import com.dfsek.terra.addons.terrascript.tokenizer.Position;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
|
||||
public class LessThanStatement extends BinaryOperation<Number, Boolean> {
|
||||
public LessThanStatement(Returnable<Number> left, Returnable<Number> right, Position position) {
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
|
||||
package com.dfsek.terra.addons.terrascript.parser.lang.operations.statements;
|
||||
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.Returnable;
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.operations.BinaryOperation;
|
||||
import com.dfsek.terra.addons.terrascript.tokenizer.Position;
|
||||
|
||||
import net.jafama.FastMath;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.Returnable;
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.operations.BinaryOperation;
|
||||
import com.dfsek.terra.addons.terrascript.tokenizer.Position;
|
||||
|
||||
import static com.dfsek.terra.api.util.MathUtil.EPSILON;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ public class NotEqualsStatement extends BinaryOperation<Object, Boolean> {
|
||||
if(leftUnwrapped instanceof Number l && rightUnwrapped instanceof Number r) {
|
||||
return FastMath.abs(l.doubleValue() - r.doubleValue()) > EPSILON;
|
||||
}
|
||||
|
||||
|
||||
return !leftUnwrapped.equals(rightUnwrapped);
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ public class EntityFunction implements Function<Void> {
|
||||
TerraImplementationArguments arguments = (TerraImplementationArguments) implementationArguments;
|
||||
Vector2 xz = RotationUtil.rotateVector(Vector2.of(x.apply(implementationArguments, scope).doubleValue(),
|
||||
z.apply(implementationArguments, scope).doubleValue()), arguments.getRotation());
|
||||
|
||||
|
||||
Entity entity = arguments.getWorld().spawnEntity(Vector3.of(xz.getX(), y.apply(implementationArguments, scope).doubleValue(),
|
||||
xz.getZ())
|
||||
.mutable()
|
||||
|
||||
@@ -36,9 +36,9 @@ public class GetMarkFunction implements Function<String> {
|
||||
TerraImplementationArguments arguments = (TerraImplementationArguments) implementationArguments;
|
||||
Vector2 xz = RotationUtil.rotateVector(Vector2.of(x.apply(implementationArguments, scope).doubleValue(),
|
||||
z.apply(implementationArguments, scope).doubleValue()), arguments.getRotation());
|
||||
|
||||
|
||||
String mark = arguments.getMark(Vector3.of(FastMath.floorToInt(xz.getX()), FastMath.floorToInt(
|
||||
y.apply(implementationArguments, scope).doubleValue()),
|
||||
y.apply(implementationArguments, scope).doubleValue()),
|
||||
FastMath.floorToInt(xz.getZ()))
|
||||
.mutable()
|
||||
.add(arguments.getOrigin())
|
||||
|
||||
@@ -38,8 +38,8 @@ public class SetMarkFunction implements Function<Void> {
|
||||
TerraImplementationArguments arguments = (TerraImplementationArguments) implementationArguments;
|
||||
Vector2 xz = RotationUtil.rotateVector(Vector2.of(x.apply(implementationArguments, scope).doubleValue(),
|
||||
z.apply(implementationArguments, scope).doubleValue()), arguments.getRotation());
|
||||
|
||||
|
||||
|
||||
|
||||
arguments.setMark(Vector3.of(FastMath.floorToInt(xz.getX()),
|
||||
FastMath.floorToInt(
|
||||
y.apply(implementationArguments, scope).doubleValue()),
|
||||
|
||||
@@ -43,8 +43,8 @@ public class StateFunction implements Function<Void> {
|
||||
TerraImplementationArguments arguments = (TerraImplementationArguments) implementationArguments;
|
||||
Vector2 xz = RotationUtil.rotateVector(Vector2.of(x.apply(implementationArguments, scope).doubleValue(),
|
||||
z.apply(implementationArguments, scope).doubleValue()), arguments.getRotation());
|
||||
|
||||
|
||||
|
||||
|
||||
Vector3 origin = Vector3.of(FastMath.roundToInt(xz.getX()), y.apply(implementationArguments, scope).intValue(),
|
||||
FastMath.roundToInt(xz.getZ())).mutable().add(arguments.getOrigin()).immutable();
|
||||
try {
|
||||
|
||||
@@ -60,11 +60,11 @@ public class StructureFunction implements Function<Boolean> {
|
||||
|
||||
if(arguments.getRecursions() > platform.getTerraConfig().getMaxRecursion())
|
||||
throw new RuntimeException("Structure recursion too deep: " + arguments.getRecursions());
|
||||
|
||||
|
||||
Vector2 xz = RotationUtil.rotateVector(Vector2.of(x.apply(implementationArguments, scope).doubleValue(),
|
||||
z.apply(implementationArguments, scope).doubleValue()), arguments.getRotation());
|
||||
|
||||
|
||||
|
||||
|
||||
String app = id.apply(implementationArguments, scope);
|
||||
return registry.getByID(app).map(script -> {
|
||||
Rotation rotation1;
|
||||
|
||||
@@ -4,8 +4,6 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import com.dfsek.terra.addons.noise.config.DimensionApplicableNoiseSampler;
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.Returnable;
|
||||
@@ -14,7 +12,6 @@ import com.dfsek.terra.addons.terrascript.parser.lang.constants.NumericConstant;
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.constants.StringConstant;
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.functions.FunctionBuilder;
|
||||
import com.dfsek.terra.addons.terrascript.tokenizer.Position;
|
||||
import com.dfsek.terra.api.noise.NoiseSampler;
|
||||
|
||||
|
||||
public class SamplerFunctionBuilder implements FunctionBuilder<com.dfsek.terra.addons.terrascript.parser.lang.functions.Function<Number>> {
|
||||
@@ -36,30 +33,36 @@ public class SamplerFunctionBuilder implements FunctionBuilder<com.dfsek.terra.a
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public com.dfsek.terra.addons.terrascript.parser.lang.functions.Function<Number> build(List<Returnable<?>> argumentList, Position position) {
|
||||
public com.dfsek.terra.addons.terrascript.parser.lang.functions.Function<Number> build(List<Returnable<?>> argumentList,
|
||||
Position position) {
|
||||
Returnable<String> arg = (Returnable<String>) argumentList.get(0);
|
||||
|
||||
if(argumentList.size() == 3) { // 2D
|
||||
if(arg instanceof StringConstant constant) {
|
||||
return new ConstantSamplerFunction(Objects.requireNonNull(samplers2d.get(constant.getConstant()), "No such 2D noise function " + constant.getConstant()).getSampler(),
|
||||
(Returnable<Number>) argumentList.get(1),
|
||||
new NumericConstant(0, position),
|
||||
(Returnable<Number>) argumentList.get(2),
|
||||
true,
|
||||
position);
|
||||
return new ConstantSamplerFunction(Objects.requireNonNull(samplers2d.get(constant.getConstant()),
|
||||
"No such 2D noise function " + constant.getConstant())
|
||||
.getSampler(),
|
||||
(Returnable<Number>) argumentList.get(1),
|
||||
new NumericConstant(0, position),
|
||||
(Returnable<Number>) argumentList.get(2),
|
||||
true,
|
||||
position);
|
||||
} else {
|
||||
return new SamplerFunction((Returnable<String>) argumentList.get(0),
|
||||
(Returnable<Number>) argumentList.get(1),
|
||||
new NumericConstant(0, position),
|
||||
(Returnable<Number>) argumentList.get(2),
|
||||
s -> Objects.requireNonNull(samplers2d.get(s.get()), "No such 2D noise function " + s.get()).getSampler(),
|
||||
s -> Objects.requireNonNull(samplers2d.get(s.get()), "No such 2D noise function " + s.get())
|
||||
.getSampler(),
|
||||
true,
|
||||
position);
|
||||
}
|
||||
|
||||
} else { // 3D
|
||||
if(arg instanceof StringConstant constant) {
|
||||
return new ConstantSamplerFunction(Objects.requireNonNull(samplers3d.get(constant.getConstant()), "No such 2D noise function " + constant.getConstant()).getSampler(),
|
||||
return new ConstantSamplerFunction(Objects.requireNonNull(samplers3d.get(constant.getConstant()),
|
||||
"No such 2D noise function " + constant.getConstant())
|
||||
.getSampler(),
|
||||
(Returnable<Number>) argumentList.get(1),
|
||||
(Returnable<Number>) argumentList.get(2),
|
||||
(Returnable<Number>) argumentList.get(3),
|
||||
@@ -70,7 +73,8 @@ public class SamplerFunctionBuilder implements FunctionBuilder<com.dfsek.terra.a
|
||||
(Returnable<Number>) argumentList.get(1),
|
||||
(Returnable<Number>) argumentList.get(2),
|
||||
(Returnable<Number>) argumentList.get(3),
|
||||
s -> Objects.requireNonNull(samplers2d.get(s.get()), "No such 2D noise function " + s.get()).getSampler(),
|
||||
s -> Objects.requireNonNull(samplers2d.get(s.get()), "No such 2D noise function " + s.get())
|
||||
.getSampler(),
|
||||
true,
|
||||
position);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user