15 janv. 2014, 09:33

Voici mon code : j’ai un deuxième soucis mon generateNether se souligne en rouge comme si il avais été supprimer normal ?


package chinesemod;

import java.util.Random;

import net.minecraft.block.Block;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.gen.feature.WorldGenMinable;
import cpw.mods.fml.common.IWorldGenerator;

public class WorldGeneratorTutoriel implements IWorldGenerator {

@Override
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider)
{
switch(world.provider.dimensionId)
{
case -1:
this.generateEnd(world, chunkX * 16, chunkZ * 16, random);
case 0:
this.generateSurface(world, chunkX * 16, chunkZ * 16, random);
case 1:
//*this.generateNether(world, chunkX * 16, chunkZ * 16, random);*//
}
}

private void generateSurface(World world, int x, int z, Random rand)
{
for(int i = 0; i < 14; i++)
{
(new WorldGenMinable(chinesemodmain.oretopaze.blockID, 0, 6, Block.stone.blockID)).generate(world, rand, x + rand.nextInt(16), rand.nextInt(16), z + rand.nextInt(16));
}
}
private void generateEnd(World world, int x, int z, Random rand)
{
for(int i = 0; i < 100; i++)
{
int targetX = x + rand.nextInt(16);
int targetY = rand.nextInt(192);
int targetZ = z + rand.nextInt(16);
if(world.isAirBlock(targetZ, targetY, targetZ))
{
(new WorldGenMinable(chinesemodmain.orenephrite.blockID, 0, 6, Block.whiteStone.blockID)).generate(world, rand, targetX, targetY, targetZ);
}
}

}

}