parent
61cb92648c
commit
07ad273bd0
|
@ -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 {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue