aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/api/world
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2019-10-11 18:14:07 +0100
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2019-10-11 18:14:07 +0100
commit4a2fa070a2ae91173cf15785c63b4090016323d4 (patch)
tree7a07b317b7b66778869f321da82f95dfee70107f /src/Java/gtPlusPlus/xmod/gregtech/api/world
parent8ca23d37495647bda859bc1821c2551cf8b21bf3 (diff)
downloadGT5-Unofficial-4a2fa070a2ae91173cf15785c63b4090016323d4.tar.gz
GT5-Unofficial-4a2fa070a2ae91173cf15785c63b4090016323d4.tar.bz2
GT5-Unofficial-4a2fa070a2ae91173cf15785c63b4090016323d4.zip
$ Fixed many tiny bugs, found by static code analysis.
$ Fixed Canning handling further. $ Adjusted the Charcoal Pit fix.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api/world')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Boulder.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Ore_Normal.java3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Boulder.java b/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Boulder.java
index c8a7b5119d..ca78a72e04 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Boulder.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Boulder.java
@@ -3,6 +3,7 @@ package gtPlusPlus.xmod.gregtech.api.world;
import java.util.Collection;
import java.util.Random;
+import gtPlusPlus.core.lib.CORE;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.util.MathHelper;
@@ -21,7 +22,7 @@ public class GTPP_Worldgen_Boulder extends GTPP_Worldgen_Ore {
int tX = aChunkX + aRandom.nextInt(16), tY = mMinY + aRandom.nextInt(mMaxY - mMinY), tZ = aChunkZ + aRandom.nextInt(16);
Block tBlock = aWorld.getBlock(tX, tY - 7, tZ);
if (tBlock != null && tBlock.isOpaqueCube() && aWorld.getBlock(tX, tY - 6, tZ).isAir(aWorld, tX, tY - 6, tZ)) {
- float math_pi = 3.141593F;
+ float math_pi = CORE.PI;
float var6 = aRandom.nextFloat() * math_pi;
float var1b = mSize / 8.0F;
float var3b = MathHelper.sin(var6) * var1b; float var4b = MathHelper.cos(var6) * var1b;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Ore_Normal.java b/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Ore_Normal.java
index 9d7eb5a020..e66106ad4a 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Ore_Normal.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/world/GTPP_Worldgen_Ore_Normal.java
@@ -3,6 +3,7 @@ package gtPlusPlus.xmod.gregtech.api.world;
import java.util.Collection;
import java.util.Random;
+import gtPlusPlus.core.lib.CORE;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.util.MathHelper;
@@ -20,7 +21,7 @@ public class GTPP_Worldgen_Ore_Normal extends GTPP_Worldgen_Ore {
for (int i = 0; i < mAmount; i++) {
int tX = aChunkX + aRandom.nextInt(16), tY = mMinY + aRandom.nextInt(mMaxY - mMinY), tZ = aChunkZ + aRandom.nextInt(16);
if (mAllowToGenerateinVoid || aWorld.getBlock(tX, tY, tZ).isAir(aWorld, tX, tY, tZ)) {
- float math_pi = 3.141593F;float var1b = mSize / 8.0F;
+ float math_pi = CORE.PI;float var1b = mSize / 8.0F;
float var6 = aRandom.nextFloat() * math_pi;
float var3b = MathHelper.sin(var6) * var1b; float var4b = MathHelper.cos(var6) * var1b;
float var8b = -2*var3b;float var9b = -2*var4b;