Fix speed calc in GUI from #934

Unmerged 1.6.4 commit: Multiple bugfixes #927
This commit is contained in:
Bernhard Bonigl committed 2014-08-28 14:29:08 +02:00
1 parent f33e7a535e
commit 7ca3acad88
2 files changed
+19 -5

No files matched your search

@@ -345,9 +345,16 @@ public class ToolStationGui extends GuiContainer
heads++;
}
float trueSpeed = mineSpeed / (heads * 100f) * ((HarvestTool) tool).breakSpeedModifier();
float trueSpeed = mineSpeed / (heads * 100f);
if(tool instanceof HarvestTool)
trueSpeed *= ((HarvestTool) tool).breakSpeedModifier();
float localStonebound = 72f;
if (tool instanceof HarvestTool)
localStonebound = ((HarvestTool) tool).stoneboundModifier();
float stoneboundSpeed = (float) Math.log(durability / localStonebound + 1) * 2 * stonebound;
float stoneboundSpeed = (float) Math.log(durability / ((HarvestTool) tool).stoneboundModifier() + 1) * 2 * stonebound;
DecimalFormat df = new DecimalFormat("##.##");
df.setRoundingMode(RoundingMode.DOWN);
trueSpeed += stoneboundSpeed;