Jump to content

draypratt

Members
  • Posts

    1
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

draypratt's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. i got the same thing but insted i got it when i put in GameRegistry.registerWorldGenerator(eventWorldGen, 0); hear is my worldGen package net.vampirecraft.mod.worldgen; 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 net.vampirecraft.mod.Vampirecraft; import cpw.mods.fml.common.IWorldGenerator; public class VampirecraftWorldGen implements IWorldGenerator { @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { switch(world.provider.dimensionId) { case 0 : //Generate our surface world generateSurface(world, random, chunkX*16, chunkZ*16); case -1 : //Generate our surface world generateNether(world, random, chunkX*16, chunkZ*16); case 1 : //Generate our surface world generateEnd(world, random, chunkX*16, chunkZ*16); } } private void generateSurface(World world, Random random, int x, int z) { //this.addOreSpawn(Vampirecraft.oreVampiric, world, random, i=blockXPos, j=blockZpos, maxX, maxZ, maxVeinSize, chancetospawn, minY, maxY); this.addOreSpawn(Vampirecraft.oreVampiricOre, world,random, x, z, 10, 10, 4+random.nextInt(6), 10, 10, 11); this.addOreSpawn(Vampirecraft.oreBloodOre, world,random, x, z, 12, 14, 4+random.nextInt(6), 12, 14, 11); this.addOreSpawn(Vampirecraft.oreSunOre, world,random, x, z, 10, 19, 4+random.nextInt(6), 10, 19, 11); } private void addOreSpawn(Block block, World world, Random random, int blockXpos, int blockZpos, int maxX, int maxZ, int maxVeinSize, int chanceToSpawn, int minY, int maxY) { for(int i = 0; i < chanceToSpawn; i++) { int posX = blockXpos + random.nextInt(maxX); int posY = minY + random.nextInt(maxY - minY); int posZ = blockZpos + random.nextInt(maxZ); (new WorldGenMinable(block, maxVeinSize)).generate(world, random, posX, posY, posZ); } } private void generateNether(World world, Random random, int x, int z) { // TODO Auto-generated method stub } private void generateEnd(World world, Random random, int x, int z) { // TODO Auto-generated method stub } }
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.