move expressions to registry

This commit is contained in:
dfsek
2021-02-14 23:08:43 -07:00
parent 0f152f9281
commit 92db30e181
12 changed files with 88 additions and 35 deletions
@@ -61,10 +61,10 @@ public class UserDefinedCarver extends Carver {
functions.forEach((id, noise) -> {
switch(noise.getDimensions()) {
case 2:
p.registerFunction(id, new NoiseFunction2(hash, noise));
p.registerFunction(id, new NoiseFunction2(noise.apply(hash)));
break;
case 3:
p.registerFunction(id, new NoiseFunction3(hash, noise));
p.registerFunction(id, new NoiseFunction3(noise.apply(hash)));
break;
}
});