Generic overlay tiles

This commit is contained in:
Anuken
2019-04-12 15:10:10 -04:00
parent ef2b8be726
commit 46c3b35028
22 changed files with 105 additions and 104 deletions
@@ -145,10 +145,10 @@ public abstract class BasicGenerator extends RandomGenerator{
for(int y = 0; y < height; y++){
floor = tiles[x][y].floor();
block = tiles[x][y].block();
ore = tiles[x][y].ore();
ore = tiles[x][y].overlay();
r.accept(x, y);
tiles[x][y] = new Tile(x, y, floor.id, block.id);
tiles[x][y].setOre(ore);
tiles[x][y].setOverlay(ore);
}
}
}
@@ -125,7 +125,7 @@ public class MapGenerator extends Generator{
if(distortFloor){
tile.setFloor(tiles[newX][newY].floor());
tile.setOre(tiles[newX][newY].ore());
tile.setOverlay(tiles[newX][newY].overlay());
}
for(Decoration decor : decorations){
@@ -168,7 +168,7 @@ public class MapGenerator extends Generator{
double dst = Mathf.dst(x, y);
if(dst < frad && Structs.inBounds(wx, wy, tiles) && (dst <= rad || Mathf.chance(0.5))){
Tile tile = tiles[wx][wy];
tile.clearOre();
tile.clearOverlay();
}
}
}
@@ -27,7 +27,7 @@ public abstract class RandomGenerator extends Generator{
ore = Blocks.air;
generate(x, y);
tiles[x][y] = new Tile(x, y, floor.id, block.id);
tiles[x][y].setOre(ore);
tiles[x][y].setOverlay(ore);
}
}