patched divide by zero within SmelteryGui

This commit is contained in:
GraxRabble committed 2013-09-18 07:42:39 -04:00
1 parent ff7b96728d
commit 9d4cc1c037
1 file changed
+7 -4
+7 -4
View File
@@ -117,10 +117,13 @@ public class SmelteryGui extends NewContainerGui
{
int total = logic.getTotalLiquid();
int liquidLayers = (total / 20000 + 1) * 20000;
liquidSize = liquid.amount * 52 / liquidLayers;
if (liquidSize == 0)
liquidSize = 1;
base += liquidSize;
if (liquidLayers > 0)
{
liquidSize = liquid.amount * 52 / liquidLayers;
if (liquidSize == 0)
liquidSize = 1;
base += liquidSize;
}
}
int leftX = cornerX + basePos;