Map editor bugfixes / Re-added build noise
This commit is contained in:
@@ -27,7 +27,7 @@ public class DistortFilter extends GenerateFilter{
|
||||
|
||||
@Override
|
||||
public void apply(GenerateInput in){
|
||||
Tile tile = in.tile(in.x + noise(in, scl, mag) - mag / 2f, in.y + noise(in, scl, mag) - mag / 2f);
|
||||
Tile tile = in.tile(in.x + noise(in, scl, mag) - mag / 2f, in.y + noise(1, in, scl, mag) - mag / 2f);
|
||||
|
||||
in.floor = tile.floor();
|
||||
if(!tile.block().synthetic() && !in.block.synthetic()) in.block = tile.block();
|
||||
|
||||
@@ -99,6 +99,10 @@ public abstract class GenerateFilter{
|
||||
|
||||
//utility generation functions
|
||||
|
||||
protected float noise(int seedOffset, GenerateInput in, float scl, float mag){
|
||||
return Simplex.noise2d(seedOffset + seed, 1f, 0f, 1f / scl, in.x, in.y) * mag;
|
||||
}
|
||||
|
||||
protected float noise(GenerateInput in, float scl, float mag){
|
||||
return Simplex.noise2d(seed, 1f, 0f, 1f / scl, in.x, in.y) * mag;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user