aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech
diff options
context:
space:
mode:
authorTechnus <daniel112092@gmail.com>2016-11-01 11:10:05 +0100
committerTechnus <daniel112092@gmail.com>2016-11-01 11:10:05 +0100
commit6417c403ad13ed9e8cd9c130e69703d1af3b528f (patch)
tree979f30e4581112944418762e37d3905f9b5ad9b7 /src/main/java/gregtech
parent02cbc5744445923b2f39c6f25096fb23ac56a294 (diff)
downloadGT5-Unofficial-6417c403ad13ed9e8cd9c130e69703d1af3b528f.tar.gz
GT5-Unofficial-6417c403ad13ed9e8cd9c130e69703d1af3b528f.tar.bz2
GT5-Unofficial-6417c403ad13ed9e8cd9c130e69703d1af3b528f.zip
Tweak numbers to match max values from bloodasp
Diffstat (limited to 'src/main/java/gregtech')
-rw-r--r--src/main/java/gregtech/api/util/GT_Utility.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java
index 6229bb9e03..76ce61c3f1 100644
--- a/src/main/java/gregtech/api/util/GT_Utility.java
+++ b/src/main/java/gregtech/api/util/GT_Utility.java
@@ -1531,8 +1531,8 @@ public class GT_Utility {
if(GT_Proxy.chunkData.containsKey(tPos)){
tInts = GT_Proxy.chunkData.get(tPos);
if(tInts.length>0){
- int type=tInts[0]>>27;
- int amnt=tInts[0]-(type<<27)-sub;
+ int type=tInts[0]>>28;
+ int amnt=tInts[0]-(type<<28)-sub;
if(type==0){//update old thing //IGNORES SAVE - chunk must be updated
//here i don't care about type it will be added
if(amnt<=0) tInts[0] = 0;
@@ -1540,8 +1540,8 @@ public class GT_Utility {
return setUndergroundOilFromOld(aWorld,aX,aZ,tPos,tInts);//compatibility thing
}
if(save){//obvious?
- if(amnt<=0) tInts[0] = type << 27;
- else tInts[0] = (type << 27) + amnt;
+ if(amnt<=0) tInts[0] = type << 28;
+ else tInts[0] = (type << 28) + amnt;
GT_Proxy.chunkData.remove(tPos);
GT_Proxy.chunkData.put(tPos, tInts);
}
@@ -1569,8 +1569,8 @@ public class GT_Utility {
private static FluidStack setUndergroundOil(World aWorld, int aX, int aZ,ChunkPosition tPos,int[] tInts) {
XSTR tRandom = new XSTR((aWorld.getSeed() + (aX / 6) + (7 * (aZ / 6))));
int type=tRandom.nextInt(5);//type slowly changes
- int amnt = (int) (Math.pow(2+tRandom.nextInt(48)+(new XSTR()).nextDouble(), 5))>>5;// /32 upped a bit
- //max is 51^5/32 roughly uses 24 bits
+ int amnt = (int) ((float)Math.pow(2+tRandom.nextInt(48)+(new XSTR()).nextFloat(), 5)*0.7);
+ //roughly uses 28 bits
FluidStack tFluidStack;
switch (type) {//0 is old system
case 1:
@@ -1590,7 +1590,7 @@ public class GT_Utility {
tFluidStack=new FluidStack(Materials.NatruralGas.mGas,amnt);//5
}
- tInts[0]=(type<<27)+amnt;//here since the switch changes type
+ tInts[0]=(type<<28)+amnt;//here since the switch changes type
GT_Proxy.chunkData.put(tPos, tInts);
return tFluidStack;
}
@@ -1618,7 +1618,7 @@ public class GT_Utility {
type=4;
tFluidStack = new FluidStack(Materials.Oil.mFluid,tInts[0]);
}
- tInts[0]+=type<<27;
+ tInts[0]+=type<<28;
GT_Proxy.chunkData.remove(tPos);
GT_Proxy.chunkData.put(tPos, tInts);
return tFluidStack;