aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/bartworks/system/worldgen/MapGenRuins.java
diff options
context:
space:
mode:
authorboubou19 <miisterunknown@gmail.com>2024-09-14 22:35:51 +0200
committerGitHub <noreply@github.com>2024-09-14 20:35:51 +0000
commit9c18caf7fc642a21efad6673e59db85f5b66ab88 (patch)
treedbd10650e51b45b94eb47734c76ca43ea6226e7a /src/main/java/bartworks/system/worldgen/MapGenRuins.java
parent0d2de2fef9148b2284d700810aad18a6139f1130 (diff)
downloadGT5-Unofficial-9c18caf7fc642a21efad6673e59db85f5b66ab88.tar.gz
GT5-Unofficial-9c18caf7fc642a21efad6673e59db85f5b66ab88.tar.bz2
GT5-Unofficial-9c18caf7fc642a21efad6673e59db85f5b66ab88.zip
Port BW config to GTNHLib (#3169)
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Diffstat (limited to 'src/main/java/bartworks/system/worldgen/MapGenRuins.java')
-rw-r--r--src/main/java/bartworks/system/worldgen/MapGenRuins.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/bartworks/system/worldgen/MapGenRuins.java b/src/main/java/bartworks/system/worldgen/MapGenRuins.java
index a5668fb7ed..b8489ccce4 100644
--- a/src/main/java/bartworks/system/worldgen/MapGenRuins.java
+++ b/src/main/java/bartworks/system/worldgen/MapGenRuins.java
@@ -13,7 +13,6 @@
package bartworks.system.worldgen;
-import static bartworks.common.configs.ConfigHandler.maxTierRoss;
import static net.minecraftforge.common.ChestGenHooks.PYRAMID_JUNGLE_CHEST;
import java.security.SecureRandom;
@@ -29,6 +28,7 @@ import net.minecraft.world.gen.feature.WorldGenerator;
import net.minecraftforge.common.ChestGenHooks;
import net.minecraftforge.common.util.ForgeDirection;
+import bartworks.common.configs.Configuration;
import bartworks.util.Pair;
import gregtech.api.GregTechAPI;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
@@ -225,11 +225,11 @@ public abstract class MapGenRuins extends WorldGenerator {
this.setMiscBlocks(new int[] { 1 }, Blocks.log);
this.statBlocks = new int[] { rand.nextInt(this.ToBuildWith[0].length) };
int colored = rand.nextInt(15);
- int tier = secureRandom.nextInt(maxTierRoss);
+ int tier = secureRandom.nextInt(Configuration.RossRuinMetas.maxTierRoss);
boolean useColor = rand.nextBoolean();
byte set = 0;
- byte toSet = (byte) (rand.nextInt(maxTierRoss - tier) + 1);
- short cablemeta = BWWorldGenUtil.getCable(secureRandom, tier);
+ byte toSet = (byte) (rand.nextInt(Configuration.RossRuinMetas.maxTierRoss - tier) + 1);
+ int cablemeta = BWWorldGenUtil.getCable(secureRandom, tier);
byte treeinaRow = 0;
boolean lastset = rand.nextBoolean();
for (int dx = -6; dx <= 6; dx++) {
@@ -316,7 +316,7 @@ public abstract class MapGenRuins extends WorldGenerator {
}
if (dx == 4 && dz == 4) {
- short meta = BWWorldGenUtil.getGenerator(secureRandom, tier);
+ int meta = BWWorldGenUtil.getGenerator(secureRandom, tier);
this.setGTMachine(
worldObj,
x + dx,
@@ -327,7 +327,7 @@ public abstract class MapGenRuins extends WorldGenerator {
tier > 0 ? ForgeDirection.WEST : ForgeDirection.UP);
} else if (dx == 3 && dz == 4) {
if (tier > 0) {
- short meta = BWWorldGenUtil.getBuffer(secureRandom, tier);
+ int meta = BWWorldGenUtil.getBuffer(secureRandom, tier);
this.setGTMachine(
worldObj,
x + dx,
@@ -343,7 +343,7 @@ public abstract class MapGenRuins extends WorldGenerator {
this.setGTCablekWChance(worldObj, x + dx, y + dy, z + dz, rand, 33, cablemeta);
} else if (dx < 3 && dx > -5 && dz == 3 && set < toSet) {
if (!lastset || treeinaRow > 2) {
- short meta = BWWorldGenUtil.getMachine(secureRandom, tier);
+ int meta = BWWorldGenUtil.getMachine(secureRandom, tier);
this.setGTMachine(
worldObj,
x + dx,
@@ -481,7 +481,7 @@ public abstract class MapGenRuins extends WorldGenerator {
break tosetloop;
}
if (!lastset || treeinaRow > 2 && worldObj.getTileEntity(x + dx, y + dy, z + dz) == null) {
- short meta = BWWorldGenUtil.getMachine(secureRandom, tier);
+ int meta = BWWorldGenUtil.getMachine(secureRandom, tier);
this.setGTMachine(worldObj, x + dx, y + dy, z + dz, meta, owner, ForgeDirection.UP);
set++;