Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*.java]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
max_line_length = 120
trim_trailing_whitespace = true
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: Sky's Terrain Smoother 1.10 CI
name: Sky's Terrain Smoother 1.12 CI

on:
push:
branches:
- master-1.10.2
- master-1.12.2
- 'feature/**'
pull_request:
branches:
- master-1.10.2
- master-1.12.2

permissions:
contents: read

concurrency:
group: skysterrainsmoother-1.10-${{ github.workflow }}-${{ github.ref }}
group: skysterrainsmoother-1.12-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -92,21 +92,21 @@ jobs:
- name: Upload audited release candidate
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: SkysTerrainSmoother-1.10.2-${{ github.sha }}
name: SkysTerrainSmoother-1.12.2-${{ github.sha }}
if-no-files-found: error
retention-days: 30
path: |
build/libs/SkysTerrainSmoother-0.1.0.110021.jar
build/libs/SkysTerrainSmoother-0.1.0.110021-sources.jar
build/libs/SkysTerrainSmoother-0.1.0.110021-javadoc.jar
build/libs/SkysTerrainSmoother-0.1.0.112021.jar
build/libs/SkysTerrainSmoother-0.1.0.112021-sources.jar
build/libs/SkysTerrainSmoother-0.1.0.112021-javadoc.jar
build/release/SHA256SUMS
CHANGELOG.md

- name: Upload diagnostics on failure
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: SkysTerrainSmoother-1.10.2-diagnostics-${{ github.sha }}
name: SkysTerrainSmoother-1.12.2-diagnostics-${{ github.sha }}
if-no-files-found: ignore
retention-days: 14
path: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: CodeQL
on:
push:
branches:
- master-1.10.2
- master-1.12.2
- 'feature/**'
pull_request:
branches:
- master-1.10.2
- master-1.12.2
schedule:
- cron: '47 7 * * 4'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-on-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
set -euo pipefail
version="$(sed -n 's/^mod_version=//p' gradle.properties)"
test "$GITHUB_REF_NAME" = "$version"
[[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+\.110021$ ]]
[[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+\.112021$ ]]
checks="$(gh api "repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/check-runs?per_page=100" --jq '[.check_runs[] | select(.name == "Build, test, and audit" and .conclusion == "success")] | length')"
test "$checks" -gt 0
echo "verifyReleaseArtifacts passed in CI. This tag check publishes nothing."
4 changes: 2 additions & 2 deletions .github/workflows/validate-gradle-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: Validate Gradle Wrapper
on:
push:
branches:
- master-1.10.2
- master-1.12.2
- 'feature/**'
pull_request:
branches:
- master-1.10.2
- master-1.12.2

permissions:
contents: read
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 0.1.0.112021

- Added Minecraft 1.12.2 support for surface and cave smoothing.
- Kept all three levels, matching sand caps and existing-world protections.
- Retained optional Mineralogy support without adding duplicate rock pieces.

## 0.1.0.110021

- Added hardened clay transitions and smoothing for grass oasis patches added during decoration.
Expand Down
15 changes: 15 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Contributing

Keep the code easy to read and straightforward to review.

- Use four spaces, UTF-8 and LF line endings. Aim for 120 columns; do not split a registry ID or other literal just to meet the limit.
- Put each statement on its own line and use braces for conditional and loop bodies, including early returns.
- Leave a blank line between logical steps. Keep related assignments together rather than separating every line.
- Name variables for their role. Use `inventorySlot`, `cellX` or `chunkX` when that context matters, rather than a single letter or a type abbreviation. Keep established names such as `world` and `state` when their meaning is already clear.
- Declare separate local values on separate lines. Explain packed masks and coordinate conventions where the names cannot tell the whole story.
- Write comments in plain English. Explain a decision, save-format constraint or surprising API behaviour instead of repeating what the next line says.
- Document public extension points, including when they can be called and what they preserve. Keep comments current when behaviour changes.

For Eclipse, import [the Java formatter profile](style/eclipse-java-formatter.xml) under **Java > Code Style > Formatter** and select **Sky Java**. The formatter handles layout; braces and logical grouping still need a quick human review.

Treat registry IDs, metadata palettes, configuration keys and saved NBT fields as compatibility contracts. A readability change should not alter them. Keep behavioural changes separate and run the relevant tests before submitting a pull request. See [the build guide](docs/BUILDING.md) for this branch's toolchain and checks.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Sky's Terrain Smoother softens new Overworld slopes using pieces from Sky's
Grass Slabs and Sky's Building Pieces. It also provides ordinary and red sand
slabs for beaches and desert slopes.

This beta is for Minecraft 1.10.2 and Forge 12.18.3.2511. Install Terrain
Smoother 0.1.0.110021, Grass Slabs 1.1.0.110021 and Building Pieces
0.3.0.110021 together on the client and server. Mineralogy is optional.
This beta is for Minecraft 1.12.2 and Forge 14.23.5.2859. Install Terrain
Smoother 0.1.0.112021, Grass Slabs 1.1.0.112021 and Building Pieces
0.3.6.112021 together on the client and server. Mineralogy is optional.

## Smoothing levels

Expand Down
35 changes: 22 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,27 @@ tasks.withType(JavaCompile).configureEach {
}
}

def grassSlabsDirectory = file(providers.gradleProperty('grassSlabsDirectory').getOrElse('../..' + '/SkysGrassSlabs110/SkysGrassSlabs'))
def buildingPiecesDirectory = file(providers.gradleProperty('buildingPiecesDirectory').getOrElse('../..' + '/SkysBuildingPieces110/SkysBuildingPieces'))
def grassSlabsDevelopmentJar = new File(grassSlabsDirectory, 'build/libs-dev/SkysGrassSlabs-1.1.0.110021-deobf.jar')
def buildingPiecesDevelopmentJar = new File(buildingPiecesDirectory, 'build/libs-dev/SkysBuildingPieces-0.3.0.110021-deobf.jar')
def grassSlabsDirectory = file(providers.gradleProperty('grassSlabsDirectory').getOrElse('../..' + '/SkysGrassSlabs112/SkysGrassSlabs'))
def buildingPiecesDirectory = file(providers.gradleProperty('buildingPiecesDirectory').getOrElse('../..' + '/SkysBuildingPieces112/SkysBuildingPieces'))
def grassSlabsDevelopmentJar = new File(grassSlabsDirectory, 'build/libs-dev/SkysGrassSlabs-1.1.0.112021-deobf.jar')
def contentLock=new Properties()
file('gradle/content-dependencies.properties').withInputStream { contentLock.load(it) }

def localPiecesVersion = providers.gradleProperty('buildingPiecesCoreVersion')
if (localPiecesVersion.isPresent() &&
(System.getenv('CI') != null || !providers.gradleProperty('buildingPiecesDirectory').isPresent())) {
throw new GradleException('A local core-version override needs an explicit core directory and is not allowed in CI.')
}
def piecesVersion = localPiecesVersion.getOrElse(contentLock.getProperty('pieces.version'))
def buildingPiecesDevelopmentJar = new File(buildingPiecesDirectory,
"build/libs-dev/SkysBuildingPieces-${piecesVersion}-deobf.jar")
def verifyContentDependencies=tasks.register('verifyContentDependencies') {
doLast {
[grass:grassSlabsDirectory,pieces:buildingPiecesDirectory].each { name,directory ->
Properties metadata=new Properties()
new File(directory,'gradle.properties').withInputStream { metadata.load(it) }
if(metadata.mod_version!=contentLock.getProperty(name+'.version'))
String expectedVersion = name == 'pieces' ? piecesVersion : contentLock.getProperty(name + '.version')
if(metadata.mod_version!=expectedVersion)
throw new GradleException('Content dependency version does not match its lock: '+name)
if(System.getenv('CI')!=null) {
Process git=new ProcessBuilder('git','-C',directory.path,'rev-parse','HEAD').start()
Expand Down Expand Up @@ -146,14 +155,14 @@ minecraft {
}
}

// Forge 1.10 discovers a development mod from one classes/resources root.
def forge10DevelopmentOutput = layout.buildDirectory.dir('forge10-development/main')
// Forge 1.12 discovers a development mod from one classes/resources root.
def forge12DevelopmentOutput = layout.buildDirectory.dir('forge12-development/main')
def syncForge10DevelopmentResources = tasks.register('syncForge10DevelopmentResources', Sync) {
group = 'ide'
dependsOn tasks.named('classes')
from tasks.named('compileJava', JavaCompile).flatMap { it.destinationDirectory }
from sourceSets.main.output.resourcesDir
into forge10DevelopmentOutput
into forge12DevelopmentOutput
}
tasks.configureEach {
if (name in ['runClient', 'runServer', 'runTestClient', 'runTestServer']) {
Expand All @@ -164,7 +173,7 @@ tasks.configureEach {
tasks.named('compileJava', JavaCompile).get().destinationDirectory.get().asFile,
sourceSets.main.output.resourcesDir
] as Set<File>
classpath = files(forge10DevelopmentOutput, classpath.filter {
classpath = files(forge12DevelopmentOutput, classpath.filter {
!splitMainOutputs.contains(it)
})
}
Expand Down Expand Up @@ -205,7 +214,7 @@ def configureFromForgeRun = { JavaExec process, String runTaskName ->
tasks.named('compileJava', JavaCompile).get().destinationDirectory.get().asFile,
sourceSets.main.output.resourcesDir
] as Set<File>
run.setClasspath(files(forge10DevelopmentOutput, run.classpath.filter {
run.setClasspath(files(forge12DevelopmentOutput, run.classpath.filter {
!splitMainOutputs.contains(it)
}))
if (pinnedJava8.isPresent()) run.executable = javaToolchains.launcherFor(exactJava8Spec).get().executablePath.asFile.path
Expand Down Expand Up @@ -461,12 +470,12 @@ def releaseFiles = provider {
tasks.register('verifyReleaseMetadata') {
group = 'verification'
doLast {
if (project.minecraft_version != '1.10.2' || project.forge_version != '12.18.3.2511' ||
project.mapping_channel != 'stable' || project.mapping_version != '29-1.10.2' ||
if (project.minecraft_version != '1.12.2' || project.forge_version != '14.23.5.2859' ||
project.mapping_channel != 'stable' || project.mapping_version != '39-1.12' ||
project.loader_name != 'forge' || project.loader_code != '1' ||
project.java_version != '8' || project.java_toolchain_version != '8.0.502+7' ||
project.mod_id != 'skysterrainsmoother') {
throw new GradleException('Unexpected 1.10.2 release metadata')
throw new GradleException('Unexpected 1.12.2 release metadata')
}
}
}
Expand Down
39 changes: 22 additions & 17 deletions docs/BUILDING.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
# Building from source

Use Java 17 for Gradle and Temurin 8.0.502+7 for production. Set `STS_JAVA8_HOME`
to the Java 8 installation. The wrapper uses Gradle 9.6.1 and ForgeGradle
7.0.34 with stable 29-1.10.2 mappings.
Use the Gradle 9.6.1 wrapper with Java 17 and Temurin 8.0.502+7 for production.
Set `STS_JAVA8_HOME` to the Java 8 installation. This branch targets
Minecraft 1.12.2 with ForgeGradle 7.0.34.

Build the Grass Slabs and Building Pieces source commits recorded in
Build the exact Grass Slabs and Building Pieces source commits listed in
`gradle/content-dependencies.properties` with their `jar` tasks first.
Then run `gradlew check build javadoc verifyReleaseArtifacts
writeReleaseChecksums verifyEclipseProductionClasspath` here.

The default layout uses sibling Grass Slabs and Building Pieces 1.10
checkouts. Elsewhere, pass `-PgrassSlabsDirectory=<checkout>` and
`-PbuildingPiecesDirectory=<checkout>`. Development dependencies use their
deobfuscated jars; packaged games use the normal main jars. No dependency
classes or assets are bundled.
The default layout uses sibling checkouts. For another layout, pass
`-PgrassSlabsDirectory=<checkout>` and
`-PbuildingPiecesDirectory=<checkout>`.
Then run:

The build-only integration mod exercises real Forge startup, grass lifecycle,
every footprint, player-tracked chunk generation and a saved-world reload.
It is absent from production artifacts and ordinary Eclipse runs. Use
`genEclipseRuns eclipse` to regenerate those runs. CI builds the pinned content
mods first. Publication remains disabled until this mod has its own CurseForge
project.
```text
gradlew check build javadoc verifyReleaseArtifacts writeReleaseChecksums verifyEclipseProductionClasspath
```

Development dependencies use deobfuscated jars. Packaged games use the normal
main jars; dependency classes and assets are not bundled. CI builds the exact
pinned commits rather than moving branches.

A local-only `buildingPiecesCoreVersion` override can test another core
candidate. It requires an explicit core directory and is rejected in CI.

Use `genEclipseRuns eclipse` to prepare the Java 8 IDE setup. Ordinary launches
exclude unit tests and build-only runtime probes. Publication remains disabled
until this mod has its own CurseForge project.
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ org.gradle.configuration-cache=false
org.gradle.caching=true
org.gradle.parallel=false
net.minecraftforge.gradle.merge-source-sets=false
minecraft_version=1.10.2
minecraft_version_range=[1.10.2]
forge_version=12.18.3.2511
minecraft_version=1.12.2
minecraft_version_range=[1.12.2]
forge_version=14.23.5.2859
mapping_channel=stable
mapping_version=29-1.10.2
mapping_version=39-1.12
loader_name=forge
loader_code=1
java_version=8
Expand All @@ -20,7 +20,7 @@ release_enabled=false
curseforge_project_id=
mod_name=Sky's Terrain Smoother
mod_license=LGPL-2.1-only
mod_version=0.1.0.110021
mod_version=0.1.0.112021
mod_group=zone.moddev.mc.skysterrainsmoother
mod_authors=SkyBlade1978
mod_description=Smooths new Overworld surfaces with existing slabs, steps and corners. Optional Mineralogy support.
8 changes: 4 additions & 4 deletions gradle/content-dependencies.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
grass.repository=SkyBlade1978/SkysGrassSlabs
grass.commit=95c11e25bd8dad7398e05104277aa6cb522719bc
grass.version=1.1.0.110021
grass.commit=1b6069b5922d20285432bb3a76dbcfccd1b1d2d8
grass.version=1.1.0.112021
pieces.repository=SkyBlade1978/SkysBuildingPieces
pieces.commit=f21616d4e4bfe09dcf25490a3568fd846a820792
pieces.version=0.3.0.110021
pieces.commit=78360eefcf6f7637c7959f34dc45bdb9efb6ba12
pieces.version=0.3.6.112021
Loading
Loading