Skip to content

Commit c47cea6

Browse files
committed
Improve ivory_trees
1 parent 3dbe6fd commit c47cea6

File tree

7 files changed

+116
-16
lines changed

7 files changed

+116
-16
lines changed

biomes/end/ivory_empyrean.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ palette:
1414
features:
1515
flora:
1616
- END_GRASS
17+
- PEARLESCENT_BUSHES
1718
trees:
1819
- IVORY_TREES
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
id: PEARLESCENT_BUSHES
2+
type: FEATURE
3+
4+
distributor:
5+
type: PADDED_GRID
6+
width: 7
7+
padding: 2
8+
salt: 3246
9+
10+
locator:
11+
type: AND
12+
locators:
13+
- type: TOP
14+
range: &range
15+
min: 62
16+
max: 319
17+
- type: PATTERN
18+
range: *range
19+
pattern:
20+
type: OR
21+
patterns:
22+
- type: MATCH_SET
23+
blocks: $features/meta.yml:end-plantable-blocks
24+
offset: -1
25+
- type: MATCH_SET
26+
blocks:
27+
- minecraft:sand
28+
- minecraft:red_sand
29+
offset: -1
30+
- type: PATTERN
31+
range: *range
32+
pattern:
33+
type: MATCH_SET
34+
blocks:
35+
- minecraft:snow
36+
- minecraft:air
37+
offset: 0
38+
39+
structures:
40+
distribution:
41+
type: CONSTANT
42+
structures: pearlescent_bush

features/end/vegetation/trees/ivory_trees.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ structures:
3838
distribution:
3939
type: WHITE_NOISE
4040
structures:
41-
- small_ivory_tree: 6
41+
- small_ivory_tree: 10
4242
- large_ivory_tree: 1

structures/end/pearlescent_bush.tesf

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
num randPrecision = 100;
2+
num radius = randomInt(randPrecision)/randPrecision*3 + 1;
3+
num radiusCeil = ceil(radius);
4+
num radiusSquared = pow(radius, 2);
5+
6+
block(0, 0, 0, "minecraft:pearlescent_froglight");
7+
8+
str setBlock = "";
9+
for(num x = -radiusCeil; x <= radiusCeil; x = x + 1) {
10+
for(num y = 0; y <= radiusCeil; y = y + 1) {
11+
for(num z = -radiusCeil; z <= radiusCeil; z = z + 1) {
12+
num distanceSquared = (pow(x,2) + pow(y*3,2) + pow(z,2));
13+
if (distanceSquared/radiusSquared < randomInt(randPrecision)/randPrecision) {
14+
setBlock = "minecraft:white_stained_glass";
15+
if (randomInt(4) == 0) setBlock = "minecraft:light_gray_stained_glass";
16+
block(x, y, z, setBlock, false);
17+
}
18+
}
19+
}
20+
}
21+
22+
block(0, 1, 0, "minecraft:white_stained_glass", false);
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
num length = randomInt(6) + 10;
2+
3+
if (getBlock(0,1,0) == "minecraft:air") fail;
4+
5+
str setBlock = "";
6+
for (num i = 0; i < length; i = i + 1) {
7+
if (getBlock(0, -i, 0) != "minecraft:air") return;
8+
setBlock = "minecraft:white_stained_glass";
9+
10+
block(0, -i, 0, setBlock, false);
11+
12+
if (i == (length-1)) block(0, -i, 0, "minecraft:pearlescent_froglight", true);
13+
}
14+
15+

structures/end/trees/ivory_trees/large_ivory_tree.tesf

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@ str setBlock = "";
99
num random = 0;
1010

1111
num trunkRadius = 3;
12-
num length = 40+randomInt(30);
12+
num length = 35+randomInt(25);
1313
num trunkTranslate = -2;
1414

15-
num topBranches = 4+randomInt(4);
15+
num topBranches = 12+randomInt(4);
1616
num topBranchLengthUpwardsMin = 7+randomInt(3);
17-
num topBranchLengthOutwardsMin = 4+randomInt(3);
17+
num topBranchLengthOutwardsMin = 25+randomInt(3);
1818
num topBranchVerticalDirection = 1;
19-
num topBranchLeafRadiusMin = 5;
19+
num topBranchLeafRadiusMin = 8;
2020
num topBranchLeafTranslate = 0;
21-
num topBranchLeafTopFlatness = 1;
22-
num topBranchLeafBottomFlatness = 2;
21+
num topBranchLeafTopFlatness = 2;
22+
num topBranchLeafBottomFlatness = 3;
2323
num topBranchLeafDensity = 0.5;
2424
str topBranchLeafStructure = "ivory_clump";
2525

2626
num sideBranchInterval = 3+randomInt(2);
27-
num sideBranchMinHeight = 3+randomInt(2);
27+
num sideBranchMinHeight = 20;
2828
num sideBranchLengthMin = 7+randomInt(4);
2929
num sideBranchLengthVariation = 2;
3030
num sideBranchVerticalVariation = 0;
@@ -164,3 +164,13 @@ for (num b = 1; b <= topBranches; b = b + 1) {
164164
}
165165
}
166166
}
167+
168+
num twopi = pi*2;
169+
for (num v = 15; v < length+20; v = v + 0.5) {
170+
num rx = sin(randomInt(randPrecision)/randPrecision * twopi) * (randomInt(7) + 10);
171+
num rz = cos(randomInt(randPrecision)/randPrecision * twopi) * (randomInt(7) + 10);
172+
structure(rx, v, rz, "ivory_vine", "NONE");
173+
structure(-rx, v, rz, "ivory_vine", "NONE");
174+
structure(rx, v, -rz, "ivory_vine", "NONE");
175+
structure(-rx, v, -rz, "ivory_vine", "NONE");
176+
}

structures/end/trees/ivory_trees/small_ivory_tree.tesf

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@ str setBlock = "";
99
num random = 0;
1010

1111
num trunkRadius = 2;
12-
num length = 20+randomInt(5);
12+
num length = 15+randomInt(5);
1313
num trunkTranslate = -2;
1414

15-
num topBranches = 4+randomInt(4);
15+
num topBranches = 8+randomInt(4);
1616
num topBranchLengthUpwardsMin = 7+randomInt(3);
17-
num topBranchLengthOutwardsMin = 4+randomInt(3);
18-
num topBranchVerticalDirection = 0.5+randomInt(randPrecision)/randPrecision/2;
19-
num topBranchLeafRadiusMin = 5;
17+
num topBranchLengthOutwardsMin = 15+randomInt(3);
18+
num topBranchVerticalDirection = 1;
19+
num topBranchLeafRadiusMin = 8;
2020
num topBranchLeafTranslate = 0;
21-
num topBranchLeafTopFlatness = 1;
22-
num topBranchLeafBottomFlatness = 2;
21+
num topBranchLeafTopFlatness = 2;
22+
num topBranchLeafBottomFlatness = 3;
2323
num topBranchLeafDensity = 0.5;
2424
str topBranchLeafStructure = "ivory_clump";
2525

2626
num sideBranchInterval = 3+randomInt(2);
27-
num sideBranchMinHeight = 3+randomInt(2);
27+
num sideBranchMinHeight = 20;
2828
num sideBranchLengthMin = 7+randomInt(4);
2929
num sideBranchLengthVariation = 2;
3030
num sideBranchVerticalVariation = 0;
@@ -164,3 +164,13 @@ for (num b = 1; b <= topBranches; b = b + 1) {
164164
}
165165
}
166166
}
167+
168+
num twopi = pi*2;
169+
for (num v = 15; v < length+20; v = v + 0.5) {
170+
num rx = sin(randomInt(randPrecision)/randPrecision * twopi) * (randomInt(7) + 10);
171+
num rz = cos(randomInt(randPrecision)/randPrecision * twopi) * (randomInt(7) + 10);
172+
structure(rx, v, rz, "ivory_vine", "NONE");
173+
structure(-rx, v, rz, "ivory_vine", "NONE");
174+
structure(rx, v, -rz, "ivory_vine", "NONE");
175+
structure(-rx, v, -rz, "ivory_vine", "NONE");
176+
}

0 commit comments

Comments
 (0)