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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ jobs:
if-no-files-found: error
retention-days: 30
path: |
build/libs/SkysGrassSlabs-1.1.0.110021.jar
build/libs/SkysGrassSlabs-1.1.0.110021-sources.jar
build/libs/SkysGrassSlabs-1.1.0.110021-javadoc.jar
build/libs/SkysGrassSlabs-1.1.1.110021.jar
build/libs/SkysGrassSlabs-1.1.1.110021-sources.jar
build/libs/SkysGrassSlabs-1.1.1.110021-javadoc.jar
build/release/SHA256SUMS
CHANGELOG.md

Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 1.1.1.110021 - Minecraft 1.10.2

- Added a Config screen to the Mods list, with help for each setting. Changes
take effect after restarting Minecraft.
- Improved smoothing where nearby decoration has already placed grass or
flowers. Trees, crops and occupied blocks are left alone; saved terrain stays
as it is.
- Kept exposed ground grassy beneath steps and corners when using Building
Pieces. Full-cover slabs keep their existing dirt support.
- Replaced repeated warnings about intentional legacy slab names with one
clear recovery notice. Saved IDs and recovery behaviour are unchanged.
- Fixed the mod information and Config button after Eclipse rebuilds.

## 1.1.0.110021 - Minecraft 1.10.2

- Added optional shared grass rules for Building Pieces and safe generation
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ covers the other recipes, plant support and drops.
## Smoother terrain

By default, grass slabs soften suitable one-block slopes in new Overworld
chunks. Existing terrain stays as it is. You can turn generation off in
chunks. Existing terrain stays as it is. To turn generation off, select the mod
in **Mods → Config**, save your choice and restart Minecraft. You can also edit
`config/skysgrassslabs.cfg`; see [configuration](docs/CONFIGURATION.md).

The mod works on its own. If you install
Expand Down
45 changes: 43 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ dependencies {
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.10.2'
}

apply from: 'gradle/runtime-log-checks.gradle'

def integrationTestClasses = layout.buildDirectory.dir('integration-test-mod/classes')
def compileIntegrationTestMod = tasks.register('compileIntegrationTestMod', JavaCompile) {
group = 'verification'
Expand Down Expand Up @@ -268,11 +270,16 @@ def prepareIntegrationTest = tasks.register('prepareIntegrationTest') {
into mods
}
new File(runDirectory, 'eula.txt').setText('eula=true\n', 'UTF-8')
['banned-players.json', 'banned-ips.json', 'ops.json', 'whitelist.json'].each { name ->
new File(runDirectory, name).setText('[]\n', 'UTF-8')
}
new File(runDirectory, 'server.properties').setText('''\
level-name=world
level-seed=skys-grass-slabs-integration
level-type=default
online-mode=false
server-ip=127.0.0.1
server-port=0
generate-structures=false
spawn-animals=false
spawn-monsters=false
Expand Down Expand Up @@ -301,6 +308,14 @@ def createIntegrationProcess = { String phase, Object dependency ->
if (values.getProperty("${phase.toLowerCase(Locale.ROOT)}_complete") != 'true') {
throw new GradleException("${phase} integration did not complete: ${marker}")
}
File log = new File(integrationRunDirectory.get().asFile, 'logs/latest.log')
File archived = layout.buildDirectory.file("integration-logs/${phase.toLowerCase(Locale.ROOT)}.log").get().asFile
archived.parentFile.mkdirs()
archived.bytes = log.bytes
project.ext.auditRuntimeLog(archived, [
kind: 'development', side: 'server',
directory: integrationRunDirectory.get().asFile
])
}
}
}
Expand Down Expand Up @@ -497,6 +512,7 @@ tasks.register('writeReleaseChecksums') {
group = 'verification'
dependsOn tasks.named('verifyReleaseArtifacts')
def output = layout.buildDirectory.file('release/SHA256SUMS')
inputs.files(releaseFiles.map { names -> names.collect { layout.buildDirectory.file("libs/${it}") } })
outputs.file(output)
doLast {
File libs = layout.buildDirectory.dir('libs').get().asFile
Expand Down Expand Up @@ -610,8 +626,27 @@ idea {
module { downloadSources = true; downloadJavadoc = true }
}
eclipse {
classpath { downloadSources = true; downloadJavadoc = true }
synchronizationTasks 'genEclipseRuns'
classpath {
downloadSources = true
downloadJavadoc = true
file.whenMerged { classpath ->
// Eclipse copies these files on every build. Use Gradle's expanded metadata, never the template.
def resources = classpath.entries.findAll {
it instanceof org.gradle.plugins.ide.eclipse.model.SourceFolder &&
it.path in ['src/main/resources', 'build/resources/main']
}
// Keep one entry when Gradle merges an existing Eclipse classpath.
resources.drop(1).each { classpath.entries.remove(it) }
resources.take(1).each { entry ->
entry.path = 'build/resources/main'
}
}
}
synchronizationTasks 'processResources', 'genEclipseRuns'
}

tasks.named('eclipseClasspath') {
dependsOn tasks.named('processResources')
}

def prepareEclipseResources = tasks.register('prepareEclipseResources') {
Expand Down Expand Up @@ -691,6 +726,12 @@ tasks.register('verifyEclipseProductionClasspath') {
throw new GradleException('Eclipse Buildship uses the wrong Gradle home')
}
File metadata = file('bin/main/mcmod.info')
def eclipseClasspath = new groovy.xml.XmlSlurper().parse(file('.classpath'))
def resourceFolders = eclipseClasspath.classpathentry.findAll { it.@kind == 'src' }*.@path*.text()
if (resourceFolders.contains('src/main/resources') ||
resourceFolders.count { it == 'build/resources/main' } != 1) {
throw new GradleException('Eclipse must copy processed resources, not overwrite them with templates')
}
def parsed = new JsonSlurper().parseText(metadata.getText('UTF-8'))
if (parsed[0].version != project.mod_version || parsed[0].mcversion != project.minecraft_version) {
throw new GradleException('Eclipse output contains incorrect mcmod.info')
Expand Down
42 changes: 42 additions & 0 deletions docs/BUILDING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Building and checking this branch

Use the Gradle wrapper with Java 17 and set `SGS_JAVA8_HOME` to the Java 8
installation used for Minecraft. Run these commands from the checkout:

```text
gradlew clean check build javadoc genEclipseRuns verifyEclipseProductionClasspath verifyReleaseArtifacts writeReleaseChecksums
```

The checks include unit tests and disposable fresh/reload servers. Test mods
are not included in the main jar or ordinary Eclipse launches.

## Runtime logs

Each integration server log is saved and checked before the next process can
overwrite it. An unexpected warning, error, crash, missing recovery notice or
remaining legacy-prefix warning fails the check.

To check another captured verification log:

```text
gradlew verifyRuntimeLog -PruntimeLog=<log> -PruntimeDirectory=<disposable game folder> -PruntimeKind=packaged -PruntimeSide=server
```

Use `development` only for a mapped development launch and `client` for a
client log. Offline-server warnings are accepted only when that test folder
is configured for loopback networking on an automatically allocated port.
Use `-PrecoveryMessage=false` when the original legacy mod is installed.

The development allowances cover specific old-Forge launcher and class-scanner
diagnostics, with their expected file names and paired messages. They do not
permit arbitrary corrupt jars or missing classes. Packaged runs do not inherit
those allowances. Unrelated warnings remain visible in the game logs.

For the combined 1.10 development checks, `-PruntimeLocalMineralogy=true` allows
the unsigned local Mineralogy build's fingerprint warning only after verifying
its exact jar checksum. It does not allow fingerprint warnings from other jars,
and it does not hide the warning in the game.

The 1.12 branch also checks cross-version fixtures against reviewed diagnostics
tied to their archive checksums. Those exceptions cover the test-only generator
mod and exact vanilla numeric-ID changes, not ordinary worlds.
11 changes: 7 additions & 4 deletions docs/CONFIGURATION.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Configuration

Forge creates `config/skysgrassslabs.cfg` after the mod is started for the
first time. Stop the game or server before editing it, then restart to apply
changes. On a dedicated server, the server's configuration controls world
generation and world upgrades.
Open **Mods**, select **Sky's Grass Slabs** and choose **Config** to change
world generation and the legacy replacement option. Save with **Done**, then
restart Minecraft to apply your choices. Settings are not changed mid-world.

You can also edit `config/skysgrassslabs.cfg` while the game or server is
stopped. On a dedicated server, edit the server's file and restart it; the
client's Config screen does not change a remote server.

## World smoothing

Expand Down
6 changes: 6 additions & 0 deletions docs/INTEGRATION.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Optional content integration

`coversSupport(state, world, pos)` reports whether a piece covers the whole
horizontal footprint. This method is available from 1.1.1. Support repair leaves
grass beneath narrower steps and corners intact, and that exposed soil can
regrow. Full-cover slabs and turf
retain their previous support rules.

Grass Slabs remains standalone. Terrain Smoother 0.1 uses Grass Slabs 1.1's
version 1 API in `zone.moddev.mc.skysgrassslabs.api.GrassSlabsApi`.

Expand Down
20 changes: 20 additions & 0 deletions docs/RELEASE-1.1.1.110021.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Sky's Grass Slabs 1.1.1 for Minecraft 1.10.2

You can now change the world-generation and legacy replacement settings from
**Mods → Sky's Grass Slabs → Config**. Each setting has help text. Save your
changes and restart Minecraft to apply them.

Grass slab smoothing now handles small plants that neighbouring decoration has
already placed on a slope. Trees, crops and occupied blocks stay protected,
and existing terrain is unchanged.

With Building Pieces installed, exposed grass beneath steps and corners stays
grassy. Full-cover slabs keep their usual dirt support. Grass Slabs still works
on its own, with the same blocks, recipes, configuration defaults and saved
migration progress.

Legacy recovery now explains its intentional registrations with one startup
notice. The historical IDs and recovery rules have not changed.

Requires Minecraft 1.10.2, Forge 12.18.3.2511 and Java 8. Back up your world before
updating mods.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ curseforge_project_id=1677588
mod_id=skysgrassslabs
mod_name=Sky's Grass Slabs
mod_license=LGPL-2.1-only
mod_version=1.1.0.110021
mod_version=1.1.1.110021
mod_group=zone.moddev.mc.skysgrassslabs
mod_authors=SkyBlade1978
mod_description=Adds dirt, grass and path slabs, turf, natural grass spreading and smoother Overworld terrain.
Loading
Loading