-
-
Save anonymous/17fc0032a07a5cd676a9 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(world, random, chunkX^16, chunkZ^16); | |
case 0 : generateSurface(world, random, chunkX^16, chunkZ^16); | |
} | |
} | |
private void generateSurface(World world, Random random, int blockX, int blockZ) { | |
for(int i = 0; i < 10; i++) { | |
System.out.println("Ore Spawned Succesfully"); | |
int Xcoord = blockX + random.nextInt(16); | |
int Ycoord = random.nextInt(20); | |
int Zcoord = blockZ + random.nextInt(16); | |
new WorldGenMinable(ItemList.sorrowfulore.blockID, 5, ItemList.brokendirt.blockID).generate(world, random, Xcoord, Ycoord, Zcoord); | |
} | |
} | |
private void generateNether(World world, Random random, int i, int j) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment