aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTechnus <daniel112092@gmail.com>2016-11-04 13:44:32 +0100
committerTechnus <daniel112092@gmail.com>2016-11-04 13:44:32 +0100
commit82544a524626db4e7146df163c488ffc3d223b7c (patch)
tree1b2522b7ca9e0875f39f50973a4d425a2bc21c14
parentd72eef6662306e38981c89c7a0f959d05bf9c9a4 (diff)
downloadGT5-Unofficial-82544a524626db4e7146df163c488ffc3d223b7c.tar.gz
GT5-Unofficial-82544a524626db4e7146df163c488ffc3d223b7c.tar.bz2
GT5-Unofficial-82544a524626db4e7146df163c488ffc3d223b7c.zip
Optimize oil gen estimator (who gives a damn about rounding when it doesnt really affect the result that much >1%)
-rw-r--r--src/main/java/gregtech/api/util/GT_Utility.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java
index 95463d2fe3..364f974bb3 100644
--- a/src/main/java/gregtech/api/util/GT_Utility.java
+++ b/src/main/java/gregtech/api/util/GT_Utility.java
@@ -1568,9 +1568,7 @@ public class GT_Utility {
private static FluidStack setUndergroundOil(World aWorld, int aX, int aZ,ChunkPosition tPos,int[] tInts) {
XSTR tRandom = new XSTR(aWorld.getSeed() ^ ((long)(aX / 6) + (long)(7000 * (aZ / 6))));
int type=tRandom.nextInt(5);//type slowly changes
- int amnt = tRandom.nextInt(48);
- double bloodAspAmnt=Math.pow(2D+(double)amnt+(new XSTR()).nextDouble(),5D)/100D;
- amnt = (int)(Math.ceil(Math.pow(bloodAspAmnt, 2D)/50000D));
+ int amnt = (int)(Math.ceil(Math.pow(2D+(double)tRandom.nextInt(48)+(new XSTR()).nextDouble(),10D)/500000000D));
//roughly uses 28 bits
FluidStack tFluidStack;
switch (type) {//0 is old system