Auto formatted, and cleaned imports

This commit is contained in:
Modmuss50 2015-04-15 16:23:12 +01:00
parent c001231216
commit 8e7d6b011e
64 changed files with 2268 additions and 2587 deletions

View file

@ -1,7 +1,6 @@
package techreborn.world;
import java.util.Random;
import cpw.mods.fml.common.IWorldGenerator;
import net.minecraft.init.Blocks;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
@ -9,109 +8,92 @@ import net.minecraft.world.gen.feature.WorldGenMinable;
import techreborn.config.ConfigTechReborn;
import techreborn.init.ModBlocks;
import techreborn.util.LogHelper;
import cpw.mods.fml.common.IWorldGenerator;
public class TROreGen implements IWorldGenerator{
public static ConfigTechReborn config;
WorldGenMinable oreGalena;
WorldGenMinable oreIridium;
WorldGenMinable oreRuby;
WorldGenMinable oreSapphire;
WorldGenMinable oreBauxite;
WorldGenMinable orePyrite;
WorldGenMinable oreCinnabar;
WorldGenMinable oreSphalerite;
WorldGenMinable oreTungston;
WorldGenMinable oreSheldonite;
WorldGenMinable oreOlivine;
WorldGenMinable oreSodalite;
public TROreGen()
{
//World
oreGalena = new WorldGenMinable(ModBlocks.ore, 0, 8, Blocks.stone);
oreIridium = new WorldGenMinable(ModBlocks.ore, 1, 2, Blocks.stone);
oreRuby = new WorldGenMinable(ModBlocks.ore, 2, 8, Blocks.stone);
oreSapphire = new WorldGenMinable(ModBlocks.ore, 3, 8, Blocks.stone);
oreBauxite = new WorldGenMinable(ModBlocks.ore, 4, 8, Blocks.stone);
//Nether
orePyrite = new WorldGenMinable(ModBlocks.ore, 5, 8, Blocks.netherrack);
oreCinnabar = new WorldGenMinable(ModBlocks.ore, 6, 8, Blocks.netherrack);
oreSphalerite = new WorldGenMinable(ModBlocks.ore, 7, 8, Blocks.netherrack);
//End
oreTungston = new WorldGenMinable(ModBlocks.ore, 8, 8, Blocks.end_stone);
oreSheldonite = new WorldGenMinable(ModBlocks.ore, 9, 8, Blocks.end_stone);
oreOlivine = new WorldGenMinable(ModBlocks.ore, 10, 8, Blocks.end_stone);
oreSodalite = new WorldGenMinable(ModBlocks.ore, 11, 8, Blocks.end_stone);
LogHelper.info("WorldGen Loaded");
}
@Override
public void generate(Random random, int xChunk, int zChunk, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider)
{
if(world.provider.isSurfaceWorld())
{
generateUndergroundOres(random, xChunk * 16, zChunk * 16, world);
}
else if(world.provider.isHellWorld)
{
generateHellOres(random, xChunk * 16, zChunk * 16, world);
}
else
{
generateEndOres(random, xChunk * 16, zChunk * 16, world);
}
}
void generateUndergroundOres (Random random, int xChunk, int zChunk, World world)
{
import java.util.Random;
public class TROreGen implements IWorldGenerator {
public static ConfigTechReborn config;
WorldGenMinable oreGalena;
WorldGenMinable oreIridium;
WorldGenMinable oreRuby;
WorldGenMinable oreSapphire;
WorldGenMinable oreBauxite;
WorldGenMinable orePyrite;
WorldGenMinable oreCinnabar;
WorldGenMinable oreSphalerite;
WorldGenMinable oreTungston;
WorldGenMinable oreSheldonite;
WorldGenMinable oreOlivine;
WorldGenMinable oreSodalite;
public TROreGen() {
//World
oreGalena = new WorldGenMinable(ModBlocks.ore, 0, 8, Blocks.stone);
oreIridium = new WorldGenMinable(ModBlocks.ore, 1, 2, Blocks.stone);
oreRuby = new WorldGenMinable(ModBlocks.ore, 2, 8, Blocks.stone);
oreSapphire = new WorldGenMinable(ModBlocks.ore, 3, 8, Blocks.stone);
oreBauxite = new WorldGenMinable(ModBlocks.ore, 4, 8, Blocks.stone);
//Nether
orePyrite = new WorldGenMinable(ModBlocks.ore, 5, 8, Blocks.netherrack);
oreCinnabar = new WorldGenMinable(ModBlocks.ore, 6, 8, Blocks.netherrack);
oreSphalerite = new WorldGenMinable(ModBlocks.ore, 7, 8, Blocks.netherrack);
//End
oreTungston = new WorldGenMinable(ModBlocks.ore, 8, 8, Blocks.end_stone);
oreSheldonite = new WorldGenMinable(ModBlocks.ore, 9, 8, Blocks.end_stone);
oreOlivine = new WorldGenMinable(ModBlocks.ore, 10, 8, Blocks.end_stone);
oreSodalite = new WorldGenMinable(ModBlocks.ore, 11, 8, Blocks.end_stone);
LogHelper.info("WorldGen Loaded");
}
@Override
public void generate(Random random, int xChunk, int zChunk, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
if (world.provider.isSurfaceWorld()) {
generateUndergroundOres(random, xChunk * 16, zChunk * 16, world);
} else if (world.provider.isHellWorld) {
generateHellOres(random, xChunk * 16, zChunk * 16, world);
} else {
generateEndOres(random, xChunk * 16, zChunk * 16, world);
}
}
void generateUndergroundOres(Random random, int xChunk, int zChunk, World world) {
int xPos, yPos, zPos;
if (config.GalenaOreTrue)
{
for (int i = 0; i <= 16; i++)
{
if (config.GalenaOreTrue) {
for (int i = 0; i <= 16; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 60 + random.nextInt(60 - 20);
zPos = zChunk + random.nextInt(16);
oreGalena.generate(world, random, xPos, yPos, zPos);
}
}
if (config.IridiumOreTrue)
{
for (int i = 0; i <= 16; i++)
{
if (config.IridiumOreTrue) {
for (int i = 0; i <= 16; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 60 + random.nextInt(60 - 20);
zPos = zChunk + random.nextInt(16);
oreIridium.generate(world, random, xPos, yPos, zPos);
}
}
if (config.RubyOreTrue)
{
for (int i = 0; i <= 16; i++)
{
if (config.RubyOreTrue) {
for (int i = 0; i <= 16; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 60 + random.nextInt(60 - 20);
zPos = zChunk + random.nextInt(16);
oreRuby.generate(world, random, xPos, yPos, zPos);
}
}
if (config.SapphireOreTrue)
{
for (int i = 0; i <= 16; i++)
{
if (config.SapphireOreTrue) {
for (int i = 0; i <= 16; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 60 + random.nextInt(60 - 20);
zPos = zChunk + random.nextInt(16);
oreSapphire.generate(world, random, xPos, yPos, zPos);
}
}
if (config.BauxiteOreTrue)
{
for (int i = 0; i <= 16; i++)
{
if (config.BauxiteOreTrue) {
for (int i = 0; i <= 16; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 60 + random.nextInt(60 - 20);
zPos = zChunk + random.nextInt(16);
@ -119,34 +101,27 @@ public class TROreGen implements IWorldGenerator{
}
}
}
void generateHellOres (Random random, int xChunk, int zChunk, World world)
{
int xPos, yPos, zPos;
if (config.PyriteOreTrue)
{
for (int i = 0; i <= 16; i++)
{
void generateHellOres(Random random, int xChunk, int zChunk, World world) {
int xPos, yPos, zPos;
if (config.PyriteOreTrue) {
for (int i = 0; i <= 16; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 60 + random.nextInt(60 - 20);
zPos = zChunk + random.nextInt(16);
orePyrite.generate(world, random, xPos, yPos, zPos);
}
}
if (config.CinnabarOreTrue)
{
for (int i = 0; i <= 16; i++)
{
if (config.CinnabarOreTrue) {
for (int i = 0; i <= 16; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 60 + random.nextInt(60 - 20);
zPos = zChunk + random.nextInt(16);
oreCinnabar.generate(world, random, xPos, yPos, zPos);
}
}
if (config.SphaleriteOreTrue)
{
for (int i = 0; i <= 16; i++)
{
if (config.SphaleriteOreTrue) {
for (int i = 0; i <= 16; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 60 + random.nextInt(60 - 20);
zPos = zChunk + random.nextInt(16);
@ -154,44 +129,35 @@ public class TROreGen implements IWorldGenerator{
}
}
}
void generateEndOres (Random random, int xChunk, int zChunk, World world)
{
int xPos, yPos, zPos;
if (config.TungstonOreTrue)
{
for (int i = 0; i <= 16; i++)
{
void generateEndOres(Random random, int xChunk, int zChunk, World world) {
int xPos, yPos, zPos;
if (config.TungstonOreTrue) {
for (int i = 0; i <= 16; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 60 + random.nextInt(60 - 20);
zPos = zChunk + random.nextInt(16);
oreTungston.generate(world, random, xPos, yPos, zPos);
}
}
if (config.SheldoniteOreTrue)
{
for (int i = 0; i <= 16; i++)
{
if (config.SheldoniteOreTrue) {
for (int i = 0; i <= 16; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 60 + random.nextInt(60 - 20);
zPos = zChunk + random.nextInt(16);
oreSheldonite.generate(world, random, xPos, yPos, zPos);
}
}
if (config.OlivineOreTrue)
{
for (int i = 0; i <= 16; i++)
{
if (config.OlivineOreTrue) {
for (int i = 0; i <= 16; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 60 + random.nextInt(60 - 20);
zPos = zChunk + random.nextInt(16);
oreOlivine.generate(world, random, xPos, yPos, zPos);
}
}
if (config.SodaliteOreTrue)
{
for (int i = 0; i <= 16; i++)
{
if (config.SodaliteOreTrue) {
for (int i = 0; i <= 16; i++) {
xPos = xChunk + random.nextInt(16);
yPos = 60 + random.nextInt(60 - 20);
zPos = zChunk + random.nextInt(16);