-
-
Save anonymous/4eb674a30b54145f2905 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Mod.DismalGlow.WorldGeneration; | |
import java.util.Random; | |
import Mod.DismalGlow.Item.ItemList; | |
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 sorrowfuloreWorldGeneration implements IWorldGenerator{ | |
@Override | |
public void generate(Random random, int chunkX, int chunkZ, World world, | |
IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { | |
switch(world.provider.dimensionId) { | |
case -1: | |
generateNether(); | |
break; | |
case 0: | |
generateSurface(world, random, chunkX*16, chunkZ*16); | |
break; | |
case 1: | |
generateEnd(); | |
break; | |
} | |
} | |
private void generateSurface(World world, Random random, int chunkX, int chunkZ) { | |
for (int i = 0; i < 9; i++){ | |
System.out.println("Ore Spawned Succesfully"); | |
int randPosX = chunkX + random.nextInt(16); | |
int randPosZ = chunkZ + random.nextInt(16); | |
int randPosY = 45 + random.nextInt(5); | |
(new WorldGenMinable(ItemList.sorrowfulore.blockID, 9)).generate(world, random,randPosX, randPosY, randPosZ); | |
} | |
} | |
private void generateNether() { | |
} | |
private void generateEnd() { | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment