Jump to content

Minecraft Forge Mod Ore Generation


Marco_ru
 Share

Recommended Posts

Hallo,

ich habe mich ein bisschen mit der Minecraft Ore Generation beschäftig.

Doch nun habe ich ein Problem.

Code:

private GenCopper GenerationCopper;		@Override	public void generate(Random random, int chunkX, int chunkZ, World world, 				IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {					switch(world.provider.dimensionId) {			case -1:				generateNether(world, random, chunkX*16, chunkZ*16);			break;			case 0:				generateWorld(world, random, chunkX*16, chunkZ*16);			break;			case 1:				generateEnd(world, random, chunkX*16, chunkZ*16);			break;		}	}					private void generateWorld(World world, Random rand, int chunkx, int chunkz) {				GenerationCopper = new GenCopper(world, rand, chunkz, chunkz, main.BlockCopperCount, main.BlockCopperAppear);	}	private void generateNether(World world, Random rand, int chunkx, int chunkz) {}	private void generateEnd(World world, Random rand, int chunkx, int chunkz) {}

GenCopper:

public class GenCopper {		public GenCopper(World world, Random rand, int chunkx, int chunkz, int count, int appear) {		for(int i = 0;i < appear;i++) {			int BlockxCoord = chunkx + rand.nextInt(16);			int BlockzCoord = chunkz + rand.nextInt(16);			int BlockyCoord = rand.nextInt(128);						new WorldGenMinable(main.BlockCopper.blockID, count).generate(world, rand, BlockxCoord, BlockyCoord, BlockzCoord);		}	}}

Doch leider werden keine Blöcke generiert.

Woran kann dies liegen?

mfg Marco

EDIT:

ok habe den Fehler selber gefunden:

GenerationCopper = new GenCopper(world, rand, chunkz, chunkz, main.BlockCopperCount, main.BlockCopperAppear);

Zweimal chunkZ war der Fehler MinecraftSquid

Edited by Tuxcraft32
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...
B
B