1
+ num randPrecision = 100;
2
+
3
+ num height = 50 + randomInt(20);
4
+ num yTranslate = -20;
5
+ num radius = 4+randomInt(2);
6
+ str setBlock = "minecraft:obsidian";
7
+ str altBlock = "minecraft:crying_obsidian";
8
+ structure(0,0,0,"obsidian_spike_cluster","NONE");
9
+
10
+ for(num y = yTranslate; y <= height+yTranslate; y = y + 1) {
11
+ for(num x = -radius; x <= radius; x = x + 1) {
12
+ for(num z = -radius; z <= radius; z = z + 1) {
13
+ if (pow(x,2)+pow(z,2) < pow(radius,2)) {
14
+
15
+ if (randomInt(10) == 0) { setBlock = altBlock;
16
+ } else setBlock = "minecraft:obsidian";
17
+ block(x, y, z, setBlock, false);
18
+ }
19
+ }
20
+ }
21
+ }
22
+
23
+ for(num y = yTranslate+height-5; y <= height+yTranslate+4; y = y + 1) {
24
+ if (randomInt(15) == 0) { setBlock = altBlock;
25
+ } else setBlock = "minecraft:obsidian";
26
+ block(-radius, y, 0, setBlock, false);
27
+
28
+ if (randomInt(15) == 0) { setBlock = altBlock;
29
+ } else setBlock = "minecraft:obsidian";
30
+ block(0, y, -radius, setBlock, false);
31
+
32
+ if (randomInt(15) == 0) { setBlock = altBlock;
33
+ } else setBlock = "minecraft:obsidian";
34
+ block(radius, y, 0, setBlock, false);
35
+
36
+ if (randomInt(15) == 0) { setBlock = altBlock;
37
+ } else setBlock = "minecraft:obsidian";
38
+ block(0, y, radius, setBlock, false);
39
+
40
+ if (y < yTranslate+height+3) {
41
+
42
+ if (randomInt(15) == 0) { setBlock = altBlock;
43
+ } else setBlock = "minecraft:obsidian";
44
+ block(radius-1, y, radius-1, setBlock, false);
45
+
46
+ if (randomInt(15) == 0) { setBlock = altBlock;
47
+ } else setBlock = "minecraft:obsidian";
48
+ block(-radius+1, y, -radius+1, setBlock, false);
49
+
50
+ if (randomInt(15) == 0) { setBlock = altBlock;
51
+ } else setBlock = "minecraft:obsidian";
52
+ block(-radius+1, y, radius-1, setBlock, false);
53
+
54
+ if (randomInt(15) == 0) { setBlock = altBlock;
55
+ } else setBlock = "minecraft:obsidian";
56
+ block(radius-1, y, -radius+1, setBlock, false);
57
+ }
58
+
59
+ }
60
+
61
+ if (randomInt(3) == 0) {
62
+ for (num y = yTranslate+height; y < yTranslate+height+5; y = y + 1) {
63
+ for (num x = -3; x <= 3; x = x + 1) {
64
+ for (num z = -3; z <= 3; z = z + 1) {
65
+ // z-sides
66
+ if (x == 0 && (z == 2 || z == -2) && y > yTranslate+height) {
67
+ block(x,y,z,"minecraft:iron_bars[east=true,west=true]");
68
+ block(x+1,y,z,"minecraft:iron_bars[east=true,west=true]");
69
+ block(x-1,y,z,"minecraft:iron_bars[east=true,west=true]");
70
+ }
71
+
72
+ // x-sides
73
+ if (z == 0 && (x == 2 || x == -2) && y > yTranslate+height) {
74
+ block(x,y,z,"minecraft:iron_bars[north=true,south=true]");
75
+ block(x,y,z+1,"minecraft:iron_bars[north=true,south=true]");
76
+ block(x,y,z-1,"minecraft:iron_bars[north=true,south=true]");
77
+ }
78
+
79
+ // corners
80
+ if (z == 2 && x == 2 && y > yTranslate+height) {
81
+ block(x,y,z,"minecraft:iron_bars[north=true,west=true]");
82
+ }
83
+
84
+ if (z == 2 && x == -2 && y > yTranslate+height) {
85
+ block(x,y,z,"minecraft:iron_bars[north=true,east=true]");
86
+ }
87
+
88
+ if (z == -2 && x == 2 && y > yTranslate+height) {
89
+ block(x,y,z,"minecraft:iron_bars[south=true,west=true]");
90
+ }
91
+
92
+ if (z == -2 && x == -2 && y > yTranslate+height) {
93
+ block(x,y,z,"minecraft:iron_bars[south=true,east=true]");
94
+ }
95
+ }
96
+ }
97
+ }
98
+ }
99
+
100
+ block(0, height+yTranslate+1, 0, "minecraft:bedrock");
101
+ entity(0, height+yTranslate+2, 0, "minecraft:end_crystal");
0 commit comments