Various crashes fixed

This commit is contained in:
Anuken
2018-08-14 10:41:54 -04:00
parent 61ad9bc47d
commit fda9e6bb9c
11 changed files with 15 additions and 10 deletions

View File

@@ -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;

View File

@@ -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;
}