-
Notifications
You must be signed in to change notification settings - Fork 3
/
GT_Worldgen_GT_Ore_Bedrock.java
44 lines (34 loc) · 1.53 KB
/
GT_Worldgen_GT_Ore_Bedrock.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package bloodasp.GalacticGreg;
import gregapi.block.prefixblock.PrefixBlock;
import gregapi.config.Config;
import gregapi.data.CS;
import gregapi.data.CS.BlocksGT;
import gregapi.oredict.OreDictMaterial;
import gregapi.worldgen.WorldgenObject;
import gregapi.worldgen.Worldgenerator;
import java.util.Random;
import net.minecraft.init.Blocks;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
public class GT_Worldgen_GT_Ore_Bedrock
{
public final int mProbability;
public final OreDictMaterial mMaterial;
public final boolean mMoon;
public final boolean mMars;
public final String mWorldGenName;
public GT_Worldgen_GT_Ore_Bedrock(String aName, boolean aDefault, int aProbability, boolean aMoon, boolean aMars, OreDictMaterial aPrimary)
{
this.mWorldGenName = aName;
this.mProbability = Math.max(1, CS.ConfigsGT.WORLDGEN.get("worldgen." + this.mWorldGenName, "Probability", (long)aProbability));
this.mMaterial = OreDictMaterial.get(CS.ConfigsGT.WORLDGEN.get("worldgen." + this.mWorldGenName, "Ore", aPrimary.mNameInternal));
this.mMoon = CS.ConfigsGT.WORLDGEN.get("worldgen." + this.mWorldGenName, "Moon", aMoon);
this.mMars = CS.ConfigsGT.WORLDGEN.get("worldgen." + this.mWorldGenName, "Mars", aMars);
for (WorldgenObject tWorldGen : Worldgenerator.sWorldgenList){
if(tWorldGen.mWorldGenName.equals(aName)){
tWorldGen.isGenerationAllowed("moon.moon", -27, this.mMoon ? -27: -50);
tWorldGen.isGenerationAllowed("planet.mars", -28, this.mMars ? -28: -50);
}
}
}
}