WIP crystal biome

This commit is contained in:
Anuken
2022-01-18 20:35:43 -05:00
parent f3811d6710
commit 19ddc1dd65
39 changed files with 148 additions and 23 deletions

View File

@@ -364,6 +364,21 @@ public abstract class BasicGenerator implements WorldGenerator{
return false;
}
public boolean near(int cx, int cy, int rad, Block block){
for(int x = -rad; x <= rad; x++){
for(int y = -rad; y <= rad; y++){
int wx = cx + x, wy = cy + y;
if(Structs.inBounds(wx, wy, width, height) && Mathf.within(x, y, rad)){
Tile other = tiles.getn(wx, wy);
if(other.block() == block){
return true;
}
}
}
}
return false;
}
public void decoration(float chance){
pass((x, y) -> {
for(int i = 0; i < 4; i++){