Internal changes for surface-less floors
This commit is contained in:
@@ -188,12 +188,12 @@ public class BaseGenerator{
|
||||
|
||||
tile.block.iterateTaken(tile.x + cx, tile.y + cy, (ex, ey) -> {
|
||||
|
||||
if(!tiles.getn(ex, ey).floor().isLiquid){
|
||||
if(tiles.getn(ex, ey).floor().hasSurface()){
|
||||
set(tiles.getn(ex, ey), item);
|
||||
}
|
||||
|
||||
Tile rand = tiles.getc(ex + Mathf.range(1), ey + Mathf.range(1));
|
||||
if(!rand.floor().isLiquid){
|
||||
if(rand.floor().hasSurface()){
|
||||
//random ores nearby to make it look more natural
|
||||
set(rand, item);
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ public abstract class BasicGenerator implements WorldGenerator{
|
||||
|
||||
public void ores(Seq<Block> ores){
|
||||
pass((x, y) -> {
|
||||
if(floor.asFloor().isLiquid) return;
|
||||
if(!floor.asFloor().hasSurface()) return;
|
||||
|
||||
int offsetX = x - 4, offsetY = y + 23;
|
||||
for(int i = ores.size - 1; i >= 0; i--){
|
||||
@@ -124,7 +124,7 @@ public abstract class BasicGenerator implements WorldGenerator{
|
||||
Block[] blocks = {Blocks.darkPanel3};
|
||||
int secSize = 20;
|
||||
pass((x, y) -> {
|
||||
if(floor.asFloor().isLiquid) return;
|
||||
if(!floor.asFloor().hasSurface()) return;
|
||||
|
||||
int mx = x % secSize, my = y % secSize;
|
||||
int sclx = x / secSize, scly = y / secSize;
|
||||
|
||||
Reference in New Issue
Block a user