aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api
diff options
context:
space:
mode:
authorJohannes Gäßler <updrn@student.kit.edu>2017-04-26 23:57:10 +0200
committerJohannes Gäßler <updrn@student.kit.edu>2017-04-26 23:57:10 +0200
commitbaa9caf06bd5793ccbddd8e8335668e3edd54900 (patch)
treeea724324a5fc7f49e281e852054ba47fc0328d1d /src/main/java/gregtech/api
parent8f4225f0b8d31931f33d18d6fcd6b43f7730a6fc (diff)
downloadGT5-Unofficial-baa9caf06bd5793ccbddd8e8335668e3edd54900.tar.gz
GT5-Unofficial-baa9caf06bd5793ccbddd8e8335668e3edd54900.tar.bz2
GT5-Unofficial-baa9caf06bd5793ccbddd8e8335668e3edd54900.zip
Eliminated rounding errors that caused fuel to burn too shortly
The Large Boiler now saves excess fuel between items, greatly improves performance of items like sticks and planks. The Large boiler now stores excess projected EU that is lost when throttling with an integrated circuit
Diffstat (limited to 'src/main/java/gregtech/api')
-rw-r--r--src/main/java/gregtech/api/util/GT_Recipe.java14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java
index 2bc8985c3f..3f1022167f 100644
--- a/src/main/java/gregtech/api/util/GT_Recipe.java
+++ b/src/main/java/gregtech/api/util/GT_Recipe.java
@@ -1406,17 +1406,11 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
private GT_Recipe addRecipe(GT_Recipe recipe, double baseBurnTime){
recipe = new GT_Recipe(recipe);
- //Some recipes will have a burn time like 15.9999999 and % always rounds down
- double floatErrorCorrection = 0.0001;
- double bronzeBurnTime = baseBurnTime * 2 + floatErrorCorrection;
- bronzeBurnTime -= bronzeBurnTime % 0.05;
- double steelBurnTime = baseBurnTime * 1.5 + floatErrorCorrection;
- steelBurnTime -= steelBurnTime % 0.05;
- double titaniumBurnTime = baseBurnTime * 1.3 + floatErrorCorrection;
- titaniumBurnTime -= titaniumBurnTime % 0.05;
- double tungstensteelBurnTime = baseBurnTime * 1.2 + floatErrorCorrection;
- tungstensteelBurnTime -= tungstensteelBurnTime % 0.05;
+ double bronzeBurnTime = baseBurnTime * 2;
+ double steelBurnTime = baseBurnTime * 1.5;
+ double titaniumBurnTime = baseBurnTime * 1.3;
+ double tungstensteelBurnTime = baseBurnTime * 1.2;
recipe.setNeiDesc("Burn time in seconds:",
String.format("Bronze Boiler: %.2f", bronzeBurnTime),