-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRCWorldGenerator.java
More file actions
45 lines (28 loc) · 1.05 KB
/
Copy pathRCWorldGenerator.java
File metadata and controls
45 lines (28 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package mods.runecraft;
import java.util.Random;
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 RCWorldGenerator implements IWorldGenerator
{
@Override
public void generate(Random random, int chunkX, int chunkZ, World world,
IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
switch (world.provider.dimensionId)
{
case 0: generateSurface(world, random, chunkX*16, chunkZ*16);
}
}
private void generateSurface(World world, Random random, int blockX, int blockZ)
{
int Xcoord = blockX + random.nextInt(16);
int Ycoord = random.nextInt(60);
int Zcoord = blockZ + random.nextInt(16);
(new WorldGenMinable(Runecraft.oreRuneEssence.blockID, 20)).generate(world, random, Xcoord, Ycoord, Zcoord);
int Xcoord1 = blockX + random.nextInt(16);
int Ycoord1 = random.nextInt(80);
int Zcoord1 = blockZ + random.nextInt(16);
(new WorldGenAltar()).generate(world, random, Xcoord1, Ycoord1, Zcoord1);
}
}