diff options
author | Technus <daniel112092@gmail.com> | 2016-11-04 13:26:08 +0100 |
---|---|---|
committer | Technus <daniel112092@gmail.com> | 2016-11-04 13:26:08 +0100 |
commit | eac4226c168b6498531468b727c8b8e87c69a143 (patch) | |
tree | 59a7113f263a5f0c32c62676927f56434960c67e /src/main/java/gregtech/api/util | |
parent | 840f26908864638d6afd02e0d35aee40e72cd9b9 (diff) | |
download | GT5-Unofficial-eac4226c168b6498531468b727c8b8e87c69a143.tar.gz GT5-Unofficial-eac4226c168b6498531468b727c8b8e87c69a143.tar.bz2 GT5-Unofficial-eac4226c168b6498531468b727c8b8e87c69a143.zip |
Estimate optimized functions for bloodasp like oil amounts (uhh)
Diffstat (limited to 'src/main/java/gregtech/api/util')
-rw-r--r-- | src/main/java/gregtech/api/util/GT_Utility.java | 9 |
1 files changed, 6 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 0f6e28f0f3..3e8d5ad83a 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -1568,9 +1568,12 @@ 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); - if (amnt<13)amnt=0; - else amnt = ((int)(Math.ceil(Math.pow(2D+(double)(amnt)+(new XSTR()).nextDouble(), 5D)*0.7D))); + int amnt = tRandom.nextInt(50); + if (amnt<12)amnt=0; + else { + double bloodAspAmnt=Math.pow((double)amnt+(new XSTR()).nextDouble(),5D)/100D; + amnt = (int)(Math.ceil(Math.pow(bloodAspAmnt, 2D)/50000D)); + } //roughly uses 28 bits FluidStack tFluidStack; switch (type) {//0 is old system |