Various crashes fixed
This commit is contained in:
@@ -128,7 +128,7 @@ public class FortressGenerator{
|
||||
int maxIndex = (int)(1 + ((float)gen.sector.difficulty / maxDifficulty * (structures.length-2)));
|
||||
|
||||
for(int i = maxIndex/2; i < maxIndex; i++){
|
||||
selected.add(structures[i]);
|
||||
selected.add(structures[Math.min(i, structures.length-1)]);
|
||||
}
|
||||
|
||||
float baseChance = 0.8f / selected.size;
|
||||
|
||||
@@ -242,7 +242,7 @@ public class WorldGenerator{
|
||||
int x = sectorX * sectorSize + localX + Short.MAX_VALUE;
|
||||
int y = sectorY * sectorSize + localY + Short.MAX_VALUE;
|
||||
|
||||
Block floor;
|
||||
Block floor = Blocks.stone;
|
||||
Block wall = Blocks.air;
|
||||
|
||||
double ridge = rid.getValue(x, y, 1f / 400f);
|
||||
@@ -283,7 +283,7 @@ public class WorldGenerator{
|
||||
if(iceridge > 0.25 && minDst > lerpDst/1.5f){
|
||||
elevation ++;
|
||||
}
|
||||
}else{
|
||||
}else if(minDst > lerpDst/1.5f){
|
||||
floor = Blocks.lava;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user