parent
6faa7a77ce
commit
cf800a905b
3 changed files with 28 additions and 17 deletions
|
@ -48,6 +48,17 @@ public class BlockOre extends BaseBlock implements IBlockTextureProvider {
|
||||||
return getOreByName(name, 1);
|
return getOreByName(name, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IBlockState getBlockStateFromName(String name){
|
||||||
|
int index = -1;
|
||||||
|
for (int i = 0; i < types.length; i++) {
|
||||||
|
if (types[i].equals(name)) {
|
||||||
|
index = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return getStateFromMeta(index);
|
||||||
|
}
|
||||||
|
|
||||||
public static final String[] types = new String[]
|
public static final String[] types = new String[]
|
||||||
{"Galena", "Iridium", "Ruby", "Sapphire", "Bauxite", "Pyrite", "Cinnabar",
|
{"Galena", "Iridium", "Ruby", "Sapphire", "Bauxite", "Pyrite", "Cinnabar",
|
||||||
"Sphalerite", "Tungston", "Sheldonite", "Peridot", "Sodalite",
|
"Sphalerite", "Tungston", "Sheldonite", "Peridot", "Sodalite",
|
||||||
|
|
|
@ -65,7 +65,7 @@ public class ModBlocks {
|
||||||
public static Block chargeBench;
|
public static Block chargeBench;
|
||||||
public static Block playerDetector;
|
public static Block playerDetector;
|
||||||
|
|
||||||
public static Block ore;
|
public static BlockOre ore;
|
||||||
public static Block storage;
|
public static Block storage;
|
||||||
public static Block storage2;
|
public static Block storage2;
|
||||||
public static Block machineframe;
|
public static Block machineframe;
|
||||||
|
|
|
@ -33,26 +33,26 @@ public class TROreGen implements IWorldGenerator {
|
||||||
|
|
||||||
public TROreGen() {
|
public TROreGen() {
|
||||||
// World
|
// World
|
||||||
oreGalena = new WorldGenMinable(ModBlocks.ore.getStateFromMeta(0), ConfigTechReborn.GalenaOreRare);
|
oreGalena = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Galena"), ConfigTechReborn.GalenaOreRare);
|
||||||
oreIridium = new WorldGenMinable(ModBlocks.ore.getStateFromMeta(1), ConfigTechReborn.IridiumOreRare);
|
oreIridium = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Iridium"), ConfigTechReborn.IridiumOreRare);
|
||||||
oreRuby = new WorldGenMinable(ModBlocks.ore.getStateFromMeta(2), ConfigTechReborn.RubyOreRare);
|
oreRuby = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Ruby"), ConfigTechReborn.RubyOreRare);
|
||||||
oreSapphire = new WorldGenMinable(ModBlocks.ore.getStateFromMeta(3), ConfigTechReborn.SapphireOreRare);
|
oreSapphire = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Sapphire"), ConfigTechReborn.SapphireOreRare);
|
||||||
oreBauxite = new WorldGenMinable(ModBlocks.ore.getStateFromMeta(4), ConfigTechReborn.BauxiteOreRare);
|
oreBauxite = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Bauxite"), ConfigTechReborn.BauxiteOreRare);
|
||||||
oreTetrahedrite = new WorldGenMinable(ModBlocks.ore.getStateFromMeta(12), ConfigTechReborn.TetrahedriteOreRare);
|
oreTetrahedrite = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Tetrahedrite"), ConfigTechReborn.TetrahedriteOreRare);
|
||||||
oreCassiterite = new WorldGenMinable(ModBlocks.ore.getStateFromMeta(13), ConfigTechReborn.CassiteriteOreRare);
|
oreCassiterite = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Cassiterite"), ConfigTechReborn.CassiteriteOreRare);
|
||||||
oreLead = new WorldGenMinable(ModBlocks.ore.getStateFromMeta(14), ConfigTechReborn.LeadOreRare);
|
oreLead = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Lead"), ConfigTechReborn.LeadOreRare);
|
||||||
oreSilver = new WorldGenMinable(ModBlocks.ore.getStateFromMeta(15), ConfigTechReborn.SilverOreRare);
|
oreSilver = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Silver"), ConfigTechReborn.SilverOreRare);
|
||||||
|
|
||||||
// Nether
|
// Nether
|
||||||
orePyrite = new WorldGenMinable(ModBlocks.ore.getStateFromMeta(5), ConfigTechReborn.PyriteOreRare);
|
orePyrite = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Pyrite"), ConfigTechReborn.PyriteOreRare);
|
||||||
oreCinnabar = new WorldGenMinable(ModBlocks.ore.getStateFromMeta(6), ConfigTechReborn.CinnabarOreRare);
|
oreCinnabar = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Cinnabar"), ConfigTechReborn.CinnabarOreRare);
|
||||||
oreSphalerite = new WorldGenMinable(ModBlocks.ore.getStateFromMeta(7), ConfigTechReborn.SphaleriteOreRare);
|
oreSphalerite = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Sphalerite"), ConfigTechReborn.SphaleriteOreRare);
|
||||||
|
|
||||||
// End
|
// End
|
||||||
oreTungston = new WorldGenMinable(ModBlocks.ore.getStateFromMeta(8), ConfigTechReborn.TungstenOreRare);
|
oreTungston = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Tungston"), ConfigTechReborn.TungstenOreRare);
|
||||||
oreSheldonite = new WorldGenMinable(ModBlocks.ore.getStateFromMeta(9), ConfigTechReborn.SheldoniteOreRare);
|
oreSheldonite = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Sheldonite"), ConfigTechReborn.SheldoniteOreRare);
|
||||||
orePeridot = new WorldGenMinable(ModBlocks.ore.getStateFromMeta(10), ConfigTechReborn.PeridotOreRare);
|
orePeridot = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Peridot"), ConfigTechReborn.PeridotOreRare);
|
||||||
oreSodalite = new WorldGenMinable(ModBlocks.ore.getStateFromMeta(11), ConfigTechReborn.SodaliteOreRare);
|
oreSodalite = new WorldGenMinable(ModBlocks.ore.getBlockStateFromName("Sodalite"), ConfigTechReborn.SodaliteOreRare);
|
||||||
|
|
||||||
Core.logHelper.info("WorldGen Loaded");
|
Core.logHelper.info("WorldGen Loaded");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue