Estimate optimized functions for bloodasp like oil amounts (uhh)

This commit is contained in:
Technus 2016-11-04 13:26:08 +01:00
parent 840f269088
commit eac4226c16

View file

@ -1568,9 +1568,12 @@ public class GT_Utility {
private static FluidStack setUndergroundOil(World aWorld, int aX, int aZ,ChunkPosition tPos,int[] tInts) { 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)))); XSTR tRandom = new XSTR(aWorld.getSeed() ^ ((long)(aX / 6) + (long)(7000 * (aZ / 6))));
int type=tRandom.nextInt(5);//type slowly changes int type=tRandom.nextInt(5);//type slowly changes
int amnt = tRandom.nextInt(48); int amnt = tRandom.nextInt(50);
if (amnt<13)amnt=0; if (amnt<12)amnt=0;
else amnt = ((int)(Math.ceil(Math.pow(2D+(double)(amnt)+(new XSTR()).nextDouble(), 5D)*0.7D))); 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 //roughly uses 28 bits
FluidStack tFluidStack; FluidStack tFluidStack;
switch (type) {//0 is old system switch (type) {//0 is old system