This commit is contained in:
Adrian 2015-09-11 18:57:43 +02:00
parent 61cb92648c
commit 07ad273bd0
3 changed files with 10 additions and 3 deletions

View file

@ -65,7 +65,7 @@ public class TriggerEnergy extends BCStatement implements ITriggerInternal {
}
if (energyMaxStored > 0) {
float level = energyStored / energyMaxStored;
float level = (float) energyStored / (float) energyMaxStored;
if (high) {
return level > 0.95F;
} else {

View file

@ -40,6 +40,10 @@ public class MapChunk {
int y = chunk.getHeightValue(bx, bz);
int color;
if (y < 0) {
y = 255;
}
while ((color = chunk.getBlock(bx, y, bz).getMapColor(0).colorIndex) == MapColor.airColor.colorIndex) {
y--;
if (y < 0) {

View file

@ -125,8 +125,11 @@ public class MapWorld {
if (v > 1) {
timeToUpdate.put(c, v - 1);
} else {
timeToUpdate.remove(c);
updateChunk(c);
try {
updateChunk(c);
} catch (Exception e) {
e.printStackTrace();
}
}
}
}