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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
/**
*
*/
package darkknight.jewelrycraft.worldGen;
import java.util.Random;
import darkknight.jewelrycraft.block.BlockList;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
/**
* @author Sorin
*/
public class WorldGenStructure4 extends WorldGenStructure {
@Override
public boolean generate(World world, BiomeGenBase biome,
Random rand, int x, int y, int z) {
Block stair = Blocks.stone_brick_stairs;
Block block = Blocks.stonebrick;
int metadata = 0, slabMeta = 5;
if (biome == BiomeGenBase.desert
|| biome == BiomeGenBase.desertHills) {
stair = Blocks.sandstone_stairs;
block = Blocks.sandstone;
metadata = 2;
slabMeta = 1;
}
for (int i = -1; i <= 1; i++)
for (int j = 0; j <= 3; j++)
for (int k = -1; k <= 1; k++)
world.setBlock(x + i, y + j, z + k,
Blocks.air);
for (int i = -1; i <= 1; i++)
for (int k = -1; k <= 1; k++)
world.setBlock(x + i, y, z + k,
Blocks.stone_slab,
slabMeta, 2);
world.setBlock(x, y, z, block, metadata, 2);
world.setBlock(x, y, z - 1, stair, 3, 1);
world.setBlock(x, y, z + 1, stair, 2, 1);
world.setBlock(x - 1, y, z, stair, 1, 1);
world.setBlock(x + 1, y, z, stair, 0, 1);
world.setBlock(x, y + 1, z - 1, stair, 7, 1);
world.setBlock(x, y + 1, z + 1, stair, 6, 1);
world.setBlock(x - 1, y + 1, z, stair, 5, 1);
world.setBlock(x + 1, y + 1, z, stair, 4, 1);
world.setBlock(x, y + 1, z, BlockList.shadowBlock);
slabMeta = 5;
if (biome == BiomeGenBase.desert
|| biome == BiomeGenBase.desertHills)
slabMeta = 1;
for (int i = -1; i <= 1; i++)
for (int k = -1; k <= 1; k++)
if (i == 0 || k == 0)
world.setBlock(x + i, y + 2, z + k,
Blocks.stone_slab,
slabMeta, 2);
world.setBlock(x, y + 2, z, block, metadata, 2);
world.setBlock(x, y + 3, z, BlockList.crystal);
return true;
}
@Override
public boolean generate(World world, Random rand, int x, int y,
int z) {
return generate(world, BiomeGenBase.plains, rand, x, y, z);
}
@Override
public int structureNo() {
return 4;
}
}
|