Added copper and tin to world gen
This commit is contained in:
parent
46cd99cdf5
commit
4ed305c9bb
2 changed files with 40 additions and 0 deletions
|
@ -40,6 +40,12 @@ public class ConfigTechReborn {
|
|||
|
||||
public static boolean SilverOreTrue;
|
||||
public static int SilverOreRare;
|
||||
|
||||
public static boolean CopperOreTrue;
|
||||
public static int CopperOreRare;
|
||||
|
||||
public static boolean TinOreTrue;
|
||||
public static int TinOreRare;
|
||||
|
||||
public static boolean PyriteOreTrue;
|
||||
public static int PyriteOreRare;
|
||||
|
@ -229,6 +235,12 @@ public class ConfigTechReborn {
|
|||
|
||||
SilverOreTrue = config.get(CATEGORY_WORLD, "Generate Silver Ore", true, "Allow Silver Ore to generate in world")
|
||||
.getBoolean(true);
|
||||
|
||||
CopperOreTrue = config.get(CATEGORY_WORLD, "Generate Copper Ore", true, "Allow Copper Ore to generate in world")
|
||||
.getBoolean(true);
|
||||
|
||||
TinOreTrue = config.get(CATEGORY_WORLD, "Generate Tin Ore", true, "Allow Tin Ore to generate in world")
|
||||
.getBoolean(true);
|
||||
|
||||
PyriteOreTrue = config.get(CATEGORY_WORLD, "Generate Pyrite Ore", true, "Allow Pyrite Ore to generate in world")
|
||||
.getBoolean(true);
|
||||
|
@ -279,6 +291,12 @@ public class ConfigTechReborn {
|
|||
|
||||
GalenaOreRare = config.get(CATEGORY_WORLD, "Galena Ore vein size", 8, "Set the max vein size for Galena Ore")
|
||||
.getInt();
|
||||
|
||||
CopperOreRare = config.get(CATEGORY_WORLD, "Copper Ore vein size", 8, "Set the max vein size for Copper Ore")
|
||||
.getInt();
|
||||
|
||||
TinOreRare = config.get(CATEGORY_WORLD, "Tin Ore vein size", 8, "Set the max vein size for Tin Ore")
|
||||
.getInt();
|
||||
|
||||
IridiumOreRare = config.get(CATEGORY_WORLD, "Iridium Ore vein size", 1, "Set the max vein size for Iridium Ore")
|
||||
.getInt();
|
||||
|
|
|
@ -30,6 +30,8 @@ public class TROreGen implements IWorldGenerator {
|
|||
WorldGenMinable oreCassiterite;
|
||||
WorldGenMinable oreLead;
|
||||
WorldGenMinable oreSilver;
|
||||
WorldGenMinable oreCopper;
|
||||
WorldGenMinable oreTin;
|
||||
|
||||
public TROreGen() {
|
||||
// World
|
||||
|
@ -42,6 +44,8 @@ public class TROreGen implements IWorldGenerator {
|
|||
oreCassiterite = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Cassiterite"), ConfigTechReborn.CassiteriteOreRare);
|
||||
oreLead = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Lead"), ConfigTechReborn.LeadOreRare);
|
||||
oreSilver = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Silver"), ConfigTechReborn.SilverOreRare);
|
||||
oreCopper = new WorldGenMinable(ModBlocks.ore2.getBlockStateFromName("copper"), ConfigTechReborn.CopperOreRare);
|
||||
oreTin = new WorldGenMinable(ModBlocks.ore2.getBlockStateFromName("tin"), ConfigTechReborn.TinOreRare);
|
||||
|
||||
// Nether
|
||||
orePyrite = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Pyrite"), ConfigTechReborn.PyriteOreRare);
|
||||
|
@ -162,6 +166,24 @@ public class TROreGen implements IWorldGenerator {
|
|||
oreSilver.generate(world, random, pos);
|
||||
}
|
||||
}
|
||||
if (config.CopperOreTrue) {
|
||||
for (int i = 0; i <= 16; i++) {
|
||||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = 10 + random.nextInt(60 - 20);
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
BlockPos pos = new BlockPos(xPos, yPos, zPos);
|
||||
oreCopper.generate(world, random, pos);
|
||||
}
|
||||
}
|
||||
if (config.TinOreTrue) {
|
||||
for (int i = 0; i <= 16; i++) {
|
||||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = 10 + random.nextInt(60 - 20);
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
BlockPos pos = new BlockPos(xPos, yPos, zPos);
|
||||
oreTin.generate(world, random, pos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void generateHellOres(Random random, int xChunk, int zChunk, World world) {
|
||||
|
|
Loading…
Add table
Reference in a new issue