From 0dd0769187b8d36861fc4b5975c9c9569a564f19 Mon Sep 17 00:00:00 2001 From: Astrashh Date: Fri, 16 Jun 2023 12:49:07 +1000 Subject: [PATCH 1/5] Bump pack version to 1.4.0 --- pack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pack.yml b/pack.yml index ca0f811e..1f15cfad 100644 --- a/pack.yml +++ b/pack.yml @@ -1,5 +1,5 @@ id: OVERWORLD -version: 1.3.0 +version: 1.4.0 author: "Astrash, Sancires, Aureus" generator: NOISE_3D From 96bcbe68c8a540046454b84bc0833dad59bae253 Mon Sep 17 00:00:00 2001 From: justaureus Date: Mon, 10 Jul 2023 04:33:40 -0400 Subject: [PATCH 2/5] Update sakura_mountains to use cherry features --- .../temperate/semi-humid/sakura_mountains.yml | 5 +- features/vegetation/flowers/pink_petals.yml | 49 ++++++ .../vegetation/trees/dense_sakura_trees.yml | 36 +++++ .../vegetation/flowers/pink_petals.tesf | 16 ++ .../vegetation/trees/cherry_leaves_clump.tesf | 11 ++ .../trees/sakura_tree_procedural.tesf | 142 ++++++++++++++++++ 6 files changed, 258 insertions(+), 1 deletion(-) create mode 100644 features/vegetation/flowers/pink_petals.yml create mode 100644 features/vegetation/trees/dense_sakura_trees.yml create mode 100644 structures/vegetation/flowers/pink_petals.tesf create mode 100644 structures/vegetation/trees/cherry_leaves_clump.tesf create mode 100644 structures/vegetation/trees/sakura_tree_procedural.tesf diff --git a/biomes/land/mountains-small/temperate/semi-humid/sakura_mountains.yml b/biomes/land/mountains-small/temperate/semi-humid/sakura_mountains.yml index a5c4cbfa..4f11ec29 100644 --- a/biomes/land/mountains-small/temperate/semi-humid/sakura_mountains.yml +++ b/biomes/land/mountains-small/temperate/semi-humid/sakura_mountains.yml @@ -6,12 +6,15 @@ color: $biomes/colors.yml:SAKURA_MOUNTAINS colors: foliage: 0xffb7c5 + grass: 0xB6DB61 + water: 0x5DB7EF features: flora: - GRASS + - PINK_PETALS trees: - - DENSE_DARK_FOREST_TREES + - DENSE_SAKURA_TREES landforms: - MOSSY_BOULDERS - SMALL_MOSSY_BOULDER_PATCHES diff --git a/features/vegetation/flowers/pink_petals.yml b/features/vegetation/flowers/pink_petals.yml new file mode 100644 index 00000000..e50dae54 --- /dev/null +++ b/features/vegetation/flowers/pink_petals.yml @@ -0,0 +1,49 @@ +id: PINK_PETALS +type: FEATURE + +distributor: + type: AND + distributors: + - type: SAMPLER + sampler: + type: POSITIVE_WHITE_NOISE + salt: 8172 + threshold: 0.7 + - type: SAMPLER + sampler: + type: PROBABILITY + sampler: + type: DOMAIN_WARP + amplitude: 5 + warp: + type: GAUSSIAN + sampler: + type: OPEN_SIMPLEX_2 + threshold: 0.5 + +locator: + type: AND + locators: + - type: TOP + range: &range + min: 62 + max: 319 + - type: PATTERN + range: *range + pattern: + type: MATCH_SET + blocks: $features/vegetation/meta.yml:plantable-blocks + offset: -1 + - type: PATTERN + range: *range + pattern: + type: MATCH_SET + blocks: + - minecraft:snow + - minecraft:air + offset: 0 + +structures: + distribution: + type: CONSTANT + structures: pink_petals \ No newline at end of file diff --git a/features/vegetation/trees/dense_sakura_trees.yml b/features/vegetation/trees/dense_sakura_trees.yml new file mode 100644 index 00000000..a8a200ed --- /dev/null +++ b/features/vegetation/trees/dense_sakura_trees.yml @@ -0,0 +1,36 @@ +id: DENSE_SAKURA_TREES +type: FEATURE + +distributor: + type: PADDED_GRID + width: 7 + padding: 5 + salt: 5972 + +locator: + type: AND + locators: + - type: TOP + range: &range + min: 64 + max: 255 + - type: PATTERN + range: *range + pattern: + type: MATCH_SET + blocks: $features/vegetation/meta.yml:plantable-blocks + offset: -1 + - type: PATTERN + range: *range + pattern: + type: MATCH_SET + blocks: + - minecraft:snow + - minecraft:air + offset: 0 + +structures: + distribution: + type: CONSTANT + structures: + - sakura_tree_procedural: 1 diff --git a/structures/vegetation/flowers/pink_petals.tesf b/structures/vegetation/flowers/pink_petals.tesf new file mode 100644 index 00000000..0c8f577c --- /dev/null +++ b/structures/vegetation/flowers/pink_petals.tesf @@ -0,0 +1,16 @@ +num flowers = randomInt(1000)/1000; +num dir = randomInt(10); +str blockID = "minecraft:pink_petals"; + +if(dir == 0) blockID = blockID + "[facing=north"; +else if(dir == 1) blockID = blockID + "[facing=east"; +else if(dir == 2) blockID = blockID + "[facing=west"; +else if(dir == 3) blockID = blockID + "[facing=south"; + +if(flowers <= 0.5) blockID = blockID + ",flower_amount=4]"; +else if(flowers <= 0.6) blockID = blockID + ",flower_amount=3]"; +else if(flowers <= 0.8) blockID = blockID + ",flower_amount=2]"; +else if(flowers <= 0.9) blockID = blockID + ",flower_amount=1]"; + +// Place flowers +block(0, 0, 0, blockID); \ No newline at end of file diff --git a/structures/vegetation/trees/cherry_leaves_clump.tesf b/structures/vegetation/trees/cherry_leaves_clump.tesf new file mode 100644 index 00000000..4b26e24a --- /dev/null +++ b/structures/vegetation/trees/cherry_leaves_clump.tesf @@ -0,0 +1,11 @@ +block(0, 0, 0, "minecraft:cherry_leaves[distance=1,persistent=false]", false); + +if (randomInt(4) == 0) { + block(0, 0, 1, "minecraft:cherry_leaves[distance=1,persistent=false]", false); + block(0, 1, 0, "minecraft:cherry_leaves[distance=1,persistent=false]", false); + block(0, 1, 1, "minecraft:cherry_leaves[distance=1,persistent=false]", false); + block(1, 0, 0, "minecraft:cherry_leaves[distance=1,persistent=false]", false); + block(1, 0, 1, "minecraft:cherry_leaves[distance=1,persistent=false]", false); + block(1, 1, 0, "minecraft:cherry_leaves[distance=1,persistent=false]", false); + block(1, 1, 1, "minecraft:cherry_leaves[distance=1,persistent=false]", false); +} \ No newline at end of file diff --git a/structures/vegetation/trees/sakura_tree_procedural.tesf b/structures/vegetation/trees/sakura_tree_procedural.tesf new file mode 100644 index 00000000..b2273700 --- /dev/null +++ b/structures/vegetation/trees/sakura_tree_procedural.tesf @@ -0,0 +1,142 @@ +num randPrecision = 100; +num goldenAngle = 2.39996; +num pi = 3.14159; +num twopi = 6.28318530718; + +num trunkHeight = 4+randomInt(4); +str trunkBlock = "minecraft:cherry_log"; + +num sideBranchInterval = 3+randomInt(2); +num sideBranchMinHeight = 2+randomInt(3); +num sideBranchLengthMin = 3; +num sideBranchLengthVariation = 2; +num sideBranchVerticalVariation = 0; +num sideBranchVerticalDirection = 1+randomInt(randPrecision)/randPrecision/2; +num sideBranchLeafRadiusMin = 2; +num sideBranchLeafTranslate = 0; +num sideBranchLeafTopFlatness = 2; +num sideBranchLeafBottomFlatness = 4; +num sideBranchLeafDensity = 0.6; +str sideBranchLeafStructure = "cherry_leaves_clump"; +str sideBranchBlockX = "minecraft:cherry_log[axis=x]"; +str sideBranchBlockY = "minecraft:cherry_log[axis=y]"; +str sideBranchBlockZ = "minecraft:cherry_log[axis=z]"; + +num topBranches = 10+randomInt(3); +num topBranchLengthUpwardsMin = 7+randomInt(3); +num topBranchLengthOutwardsMin = 4+randomInt(3); +num topBranchVerticalDirection = 0.4; +num topBranchLeafRadiusMin = 2; +num topBranchLeafTranslate = 0; +num topBranchLeafTopFlatness = 1.5; +num topBranchLeafBottomFlatness = 1; +num topBranchLeafDensity = 0.6; +str topBranchLeafStructure = "cherry_leaves_clump"; +str topBranchBlockX = "minecraft:cherry_log[axis=x]"; +str topBranchBlockY = "minecraft:cherry_log[axis=y]"; +str topBranchBlockZ = "minecraft:cherry_log[axis=z]"; + +num branchAngle = randomInt(randPrecision)/randPrecision*2*pi; +for (num i = 0; i < trunkHeight; i = i + 1) { + if (i > sideBranchMinHeight) { + if (i % sideBranchInterval == 0) { + // Branch direction vector + num dx = sin(branchAngle); + num dy = sideBranchVerticalDirection + randomInt(randPrecision)/randPrecision*sideBranchVerticalVariation; + num dz = cos(branchAngle); + // Normalize vector + num mag = sqrt(pow(dx,2)+pow(dy,2)+pow(dz,2)); + dx = dx/mag; + dy = dy/mag; + dz = dz/mag; + // Branch origin + num ox = 0; + num oy = i; + num oz = 0; + // Set branch block based on largest unsigned vector component + str branchBlock = sideBranchBlockY; + if (abs(dx) > max(abs(dy),abs(dz))) branchBlock = sideBranchBlockX; + else if (abs(dz) > max(abs(dy),abs(dx))) branchBlock = sideBranchBlockZ; + num branchLength = sideBranchLengthMin + randomInt(randPrecision)/randPrecision*sideBranchLengthVariation; + // Generate branch + for (num l = 1; l <= branchLength; l = l + 1) { + block(l*dx+ox, l*dy+oy, l*dz+oz, branchBlock); + } + // Rotate angle of next branch + branchAngle = branchAngle + goldenAngle; + // Generate leaf cluster at the end of the branch + num radius = sideBranchLeafRadiusMin; + num radiusSquared = pow(radius, 2); + // Leaf cluster origin (end of branch) + num lox = ox+branchLength*dx; + num loy = oy+branchLength*dy + sideBranchLeafTranslate; + num loz = oz+branchLength*dz; + for (num cx = ceil(-radius); cx <= ceil(radius); cx = cx + 1) { + for (num cy = ceil(-radius/sideBranchLeafBottomFlatness); cy <= ceil(radius/sideBranchLeafTopFlatness); cy = cy + 1) { + for (num cz = ceil(-radius); cz <= ceil(radius); cz = cz + 1) { + num squashFactor = sideBranchLeafBottomFlatness; + if (cy > 0) squashFactor = sideBranchLeafTopFlatness; + num distanceSquared = pow(cx,2)+pow(cy*squashFactor,2)+pow(cz,2); + if (distanceSquared max(abs(dy),abs(dz))) branchBlock = topBranchBlockX; + else if (abs(dz) > max(abs(dy),abs(dx))) branchBlock = topBranchBlockZ; + num branchLength = topBranchLengthUpwardsMin*ti + topBranchLengthOutwardsMin*t; + // Generate branch + for (num l = 0; l <= branchLength; l = l + 1) { + block(l*dx+ox, l*dy+oy, l*dz+oz, branchBlock); + } + // Rotate angle of next branch + branchAngle = branchAngle + goldenAngle; + // Generate leaf cluster at the end of the branch + num radius = topBranchLeafRadiusMin; + num radiusSquared = pow(radius, 2); + // Leaf cluster origin (end of branch) + num lox = ox+branchLength*dx; + num loy = oy+branchLength*dy + topBranchLeafTranslate; + num loz = oz+branchLength*dz; + for (num cx = ceil(-radius); cx <= ceil(radius); cx = cx + 1) { + for (num cy = ceil(-radius/topBranchLeafBottomFlatness); cy <= ceil(radius/topBranchLeafTopFlatness); cy = cy + 1) { + for (num cz = ceil(-radius); cz <= ceil(radius); cz = cz + 1) { + num squashFactor = topBranchLeafBottomFlatness; + if (cy > 0) squashFactor = topBranchLeafTopFlatness; + num distanceSquared = pow(cx,2)+pow(cy*squashFactor,2)+pow(cz,2); + if (distanceSquared < radiusSquared && randomInt(randPrecision)/randPrecision < topBranchLeafDensity) { + structure(lox+cx, loy+cy, loz+cz, topBranchLeafStructure, "NONE", "CW_90", "CCW_90", "CW_180"); + } + } + } + } +} + +num beeNestRoll = randomInt(30); // 1 in 30 chance +if (beeNestRoll == 0) { + structure(0, sideBranchMinHeight-1, 0, "bee_nest", "NONE"); +} \ No newline at end of file From 250de0c44b12548fc6e5714fc54723e11bea9848 Mon Sep 17 00:00:00 2001 From: Astrashh Date: Mon, 10 Jul 2023 19:14:23 +1000 Subject: [PATCH 3/5] Make version bump patch instead of minor 1.3.2 instead of 1.4.0 since the release only includes feature changes. --- pack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pack.yml b/pack.yml index 79a73029..9a3490e5 100644 --- a/pack.yml +++ b/pack.yml @@ -1,5 +1,5 @@ id: OVERWORLD -version: 1.4.0 +version: 1.3.2 author: "Astrash, Sancires, Aureus" generator: NOISE_3D From 737a7db8c635b537af1f79cd270b4facecbfa2bd Mon Sep 17 00:00:00 2001 From: justaureus Date: Mon, 10 Jul 2023 11:06:43 -0400 Subject: [PATCH 4/5] Updated CHANGELOG.md to contain v1.3.2 updates --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dfc1ddcc..90958ae5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,15 @@ generate in an area where it previously did not (resulting in a chunk border). ### Fixed +## [v1.3.2] +### Added +- Cherry tree features. +- Pink petal features. + +### Changed +- Sakura Mountains now use Cherry tree features instead of Dark Oak. +- Sakura Mountains generate pink petal patches. + ## [v1.3.1] ### Added - Re-added biome blending, which was previously removed by accident, resulting in blocky biome transitions (notably around beaches). From 72189f0647d28f9f32a249b6767d360312c57acf Mon Sep 17 00:00:00 2001 From: Astrashh Date: Tue, 11 Jul 2023 09:21:16 +1000 Subject: [PATCH 5/5] Move changelog to unreleased for CI to handle --- CHANGELOG.md | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90958ae5..9a844115 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,10 +41,12 @@ generate in an area where it previously did not (resulting in a chunk border). ## [Unreleased] ### Added - +- Cherry tree features. +- Pink petal features. ### Changed - +- Sakura Mountains now use Cherry tree features instead of Dark Oak. +- Sakura Mountains generate pink petal patches. ### Removed @@ -52,15 +54,6 @@ generate in an area where it previously did not (resulting in a chunk border). ### Fixed -## [v1.3.2] -### Added -- Cherry tree features. -- Pink petal features. - -### Changed -- Sakura Mountains now use Cherry tree features instead of Dark Oak. -- Sakura Mountains generate pink petal patches. - ## [v1.3.1] ### Added - Re-added biome blending, which was previously removed by accident, resulting in blocky biome transitions (notably around beaches).