Fixed tree color
This commit is contained in:
@@ -79,10 +79,10 @@ public abstract class BasicGenerator extends RandomGenerator{
|
||||
});
|
||||
}
|
||||
|
||||
public void overlay(Tile[][] tiles, Block floor, Block block, int octaves, float falloff, float scl, float threshold){
|
||||
public void overlay(Tile[][] tiles, Block floor, Block block, float chance, int octaves, float falloff, float scl, float threshold){
|
||||
sim.setSeed(Mathf.random(99999));
|
||||
pass(tiles, (x, y) -> {
|
||||
if(sim.octaveNoise2D(octaves, falloff, 1f / scl, x, y) > threshold && tiles[x][y].floor() == floor){
|
||||
if(sim.octaveNoise2D(octaves, falloff, 1f / scl, x, y) > threshold && Mathf.chance(chance) && tiles[x][y].floor() == floor){
|
||||
ore = block;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -38,7 +38,7 @@ public class DesertWastesGenerator extends BasicGenerator{
|
||||
noise(tiles, Blocks.darksand, Blocks.duneRocks, 5, 0.7f, 120f, 0.5f);
|
||||
|
||||
tech(tiles);
|
||||
overlay(tiles, Blocks.sand, Blocks.pebbles, 5, 0.8f, 30f, 0.6f);
|
||||
overlay(tiles, Blocks.sand, Blocks.pebbles, 0.15f, 5, 0.8f, 30f, 0.62f);
|
||||
//scatter(tiles, Blocks.sandRocks, Blocks.creeptree, 1f);
|
||||
|
||||
tiles[endX][endY].setBlock(Blocks.spawn);
|
||||
|
||||
@@ -12,14 +12,11 @@ public class TreeBlock extends Block{
|
||||
super(name);
|
||||
solid = true;
|
||||
layer = Layer.power;
|
||||
//cacheLayer = CacheLayer.walls;
|
||||
expanded = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawLayer(Tile tile){
|
||||
Draw.colorl(1f - tile.getRotation() / 4f);
|
||||
Draw.rect(region, tile.drawx(), tile.drawy(), Mathf.randomSeed(tile.pos(), 0, 4) * 90);
|
||||
Draw.color();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user