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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*.gradle text eol=lf
*.java text eol=lf
*.json text eol=lf
*.lang text eol=lf
*.md text eol=lf
*.mcmeta text eol=lf
*.properties text eol=lf
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ jobs:
if-no-files-found: error
retention-days: 30
path: |
build/libs/SkysGrassSlabs-0.3.0.110021.jar
build/libs/SkysGrassSlabs-0.3.0.110021-sources.jar
build/libs/SkysGrassSlabs-0.3.0.110021-javadoc.jar
build/libs/SkysGrassSlabs-1.0.0.110021.jar
build/libs/SkysGrassSlabs-1.0.0.110021-sources.jar
build/libs/SkysGrassSlabs-1.0.0.110021-javadoc.jar
build/release/SHA256SUMS
CHANGELOG.md

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Compile production code
run: |
chmod +x ./gradlew
./gradlew clean classes --no-daemon --stacktrace
./gradlew clean classes --rerun-tasks --no-daemon --stacktrace

- name: Analyze
uses: github/codeql-action/analyze@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4
20 changes: 15 additions & 5 deletions .github/workflows/release-on-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ concurrency:

jobs:
validate-release-tag:
name: Validate tag without publishing
name: Validate tag for manual release confirmation
if: github.repository == 'MinecraftModDevelopmentMods/SkysGrassSlabs'
runs-on: ubuntu-latest
timeout-minutes: 10
Expand Down Expand Up @@ -73,12 +73,22 @@ jobs:
exit 1
fi

- name: Record validation result
- name: Record the required manual publication step
env:
RELEASE_WORKFLOW_URL: https://github.com/${{ github.repository }}/actions/workflows/deploy-release.yml
run: |
{
echo "## Release tag validated"
echo "## Release candidate validated"
echo
echo "Tag \`$GITHUB_REF_NAME\` matches this target and has a successful Build, test, and audit check."
echo
echo "**Nothing has been published.**"
echo
echo "To continue, open [Release Sky's Grass Slabs]($RELEASE_WORKFLOW_URL), select **Run workflow**, and enter:"
echo
echo "Tag \`$GITHUB_REF_NAME\` matches this target and has a successful audited CI build."
echo "- release_version: \`$GITHUB_REF_NAME\`"
echo "- curseforge_release_level: \`release\`, \`beta\`, or \`alpha\`"
echo "- confirm_live_publication: enabled"
echo
echo "**This workflow does not publish anything.** Publication still requires the separately approved manual release dispatcher."
echo "The dispatcher rebuilds and audits one immutable bundle before publishing it in order to Maven, CurseForge, and GitHub."
} >> "$GITHUB_STEP_SUMMARY"
24 changes: 23 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Changelog

## 1.0.0.110021 - Minecraft 1.10.2

- First stable release for Minecraft 1.10.2.
- Added dirt, grass and lowered path slabs that can be placed in either half of
a block and combine into their matching vanilla blocks.
- Added natural grass spreading, covered grass decay, plant support and
bonemeal support.
- Added one pixel high turf that spreads grass, turns dirt slabs into grass
slabs and can be eaten by sheep.
- Added shovel flattening for dirt and grass slabs.
- Added grass slabs to suitable height changes in newly generated terrain.
- Added optional migration for compatible grass and dirt slabs from older
worlds. Replacement is disabled by default and other shapes are left alone.
- Kept completed legacy conversions marked across repeated world reloads.
- Added complete visual snow caps for grass and dirt slabs.
- Added translations for the supported block names.

Snow on slabs is visual only in Minecraft 1.10.2. It adds no height, does not
melt by itself and drops no snowballs.

## 0.3.0.110021 - Minecraft 1.10.2 beta

- Brought dirt, grass and lowered path slabs, along with turf, to Minecraft
Expand All @@ -16,7 +36,9 @@
- Grass slabs can appear in newly generated terrain to smooth suitable one
block height changes.
- Added migration support for compatible grass and dirt slabs and items from
older worlds. Other block shapes are left alone.
older worlds. Automatic replacement while the older content remains
installed is optional and disabled by default. Other block shapes are left
alone.
- Grass no longer remains beneath grass slabs or turf.
- Sheep can eat turf and regrow their wool. The normal `mobGriefing` game rule
is respected.
Expand Down
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Sky's Grass Slabs adds dirt, grass and lowered path slabs, along with a thin
layer of cuttable turf. Grass spreads naturally between full blocks and slabs,
and newly generated Overworld terrain uses grass slabs to soften small steps.

This branch targets Minecraft 1.10.2 with Forge 12.18.3.2511. The current beta
version is `0.3.0.110021`.
This branch targets Minecraft 1.10.2 with Forge 12.18.3.2511. The current
release candidate is `1.0.0.110021`.

## Features

Expand All @@ -22,11 +22,18 @@ version is `0.3.0.110021`.
- Place turf on a dirt slab to turn it into a grass slab.
- Grass slabs in new terrain smooth suitable one block height changes.
- Migration support for compatible grass and dirt slabs from older worlds.
- Block names translated into German, Spanish, French, Japanese, Korean,
Portuguese, Russian and Simplified Chinese.

World smoothing is enabled by default. It can be disabled in the common Forge
configuration with `worldgen.generateGrassSlabs=false`; the setting affects
only chunks generated afterwards.

Compatible grass and dirt slabs from an installed older mod are left alone by
default. World owners who want Sky's Grass Slabs to replace them can enable
`compat.forceReplaceBuildingBricksSlabs=true` and restart the game or server.
This replacement cannot be undone automatically, so make a world backup first.

## Development

Run Gradle with Java 17. Production code, tests, and Minecraft launches use the
Expand Down
37 changes: 35 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import groovy.json.JsonSlurper
import java.nio.charset.StandardCharsets
import java.nio.file.Files
import java.security.MessageDigest
import java.util.zip.ZipFile
import org.apache.tools.ant.filters.FixCrLfFilter
Expand Down Expand Up @@ -71,11 +72,14 @@ tasks.withType(AbstractArchiveTask).configureEach {
}

def archiveTextSuffixes = [
'.cfg', '.html', '.info', '.java', '.json', '.lang', '.mcmeta', '.md',
'.cfg', '.html', '.info', '.java', '.json', '.mcmeta', '.md',
'.properties', '.txt', '.xml'
]
def archiveTextPatterns = archiveTextSuffixes.collect { "**/*${it}".toString() }
archiveTextPatterns.addAll(['**/element-list', '**/package-list'])
archiveTextPatterns.addAll([
'**/element-list', '**/package-list',
'**/LICENSE', '**/LICENSE.spdx', '**/NOTICE'
])
def normalizeArchiveLineEndings = { details ->
details.filter(FixCrLfFilter,
eol: FixCrLfFilter.CrLf.newInstance('lf'),
Expand Down Expand Up @@ -443,6 +447,35 @@ tasks.register('verifyReleaseArtifacts') {
} finally {
zip.close()
}

List<String> localeFiles = [
'de_AT.lang', 'de_AU.lang', 'de_DE.lang',
'en_CA.lang', 'en_EN.lang', 'en_GB.lang', 'en_PT.lang', 'en_US.lang',
'es_ES.lang', 'es_MX.lang', 'fr_CA.lang', 'fr_FR.lang',
'ja_JP.lang', 'ko_KR.lang', 'pt_BR.lang', 'pt_PT.lang',
'ru_RU.lang', 'zh_CN.lang'
]
releaseFiles.get()[0..1].each { artifactName ->
ZipFile localizedZip = new ZipFile(new File(libs, artifactName))
try {
localeFiles.each { localeName ->
String entryName = "assets/skysgrassslabs/lang/${localeName}"
def entry = localizedZip.getEntry(entryName)
if (entry == null) {
throw new GradleException("${artifactName} is missing ${entryName}")
}
File source = file("src/main/resources/${entryName}")
byte[] sourceBytes = Files.readAllBytes(source.toPath())
byte[] archiveBytes = localizedZip.getInputStream(entry).bytes
if (!Arrays.equals(sourceBytes, archiveBytes)) {
throw new GradleException(
"${artifactName} changed the UTF-8 bytes of ${entryName}")
}
}
} finally {
localizedZip.close()
}
}
}
}

Expand Down
25 changes: 19 additions & 6 deletions docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

## Product contract

Version `0.3.0.110021` is the Minecraft 1.10.2 backport of the complete grass
Version `1.0.0.110021` is the Minecraft 1.10.2 release of the complete grass
slab and turf product. It retains mod ID `skysgrassslabs`, package root
`zone.moddev.mc.skysgrassslabs`, all established block/item IDs, common config
key `worldgen.generateGrassSlabs`, and schema-1 world state
keys `worldgen.generateGrassSlabs` and
`compat.forceReplaceBuildingBricksSlabs`, and schema-1 world state
`skysgrassslabs_world_state`.

The four permanent blocks are `dirt_slab`, `grass_slab`, `path_slab`, and
Expand Down Expand Up @@ -103,18 +104,30 @@ mod runs first, makes a one time backup of the old configuration, and disables
the overlapping generator. If configuration arbitration fails, Sky smoothing
is disabled for that process so duplicate generation cannot occur.

Replacement of supported installed legacy slabs is a separate decision.
`compat.forceReplaceBuildingBricksSlabs` defaults to false. When false, chunk,
placement, entity and inventory migration handlers make no changes and do not
mark chunks. Recipes still accept the supported legacy slabs. When true, the
existing migration operates independently of the world generation setting.
Removing the legacy mod always leaves missing mapping recovery active for the
supported IDs so those blocks and items do not disappear.

Chunk migration reads the original serialized 1.10 section arrays to locate
numeric legacy IDs efficiently, writes only supported grass and dirt slab
states into `ExtendedBlockStorage`, and marks each processed chunk with
`buildingbricks_migration_version=1`. Tile/entity stacks are migrated through
serialized NBT so unopened loot containers are not forced open. Player and
ender chest inventories are checked on login. See `LEGACY-MIGRATION.md` for the
exact supported IDs and qualification evidence.
ender chest inventories are checked on login. Current and future migration
markers are copied back into the chunk data on every later save so a completed
chunk remains complete across repeated reloads. See `LEGACY-MIGRATION.md` for
the exact supported IDs and qualification evidence.

## Save state

`ModWorldState` is stored in the Overworld map storage so all dimensions share
one aggregate. It records schema version, migration version, processed chunks,
top and bottom block conversions, item conversions, and unsupported shape
totals. The readable migration report is written atomically under the world's
`serverconfig` directory.
totals. While forced replacement is active, the readable migration report is
written atomically under the world's `serverconfig` directory and records the
active replacement mode. Disabling replacement does not erase historical
state or an earlier report.
26 changes: 17 additions & 9 deletions docs/BETA-0.3.0.110021.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ Forge build, and Java 8.
accept compatible seeds.
- Added grass slabs to suitable height changes in newly generated terrain.
- Added migration support for compatible grass and dirt slabs and items from
older worlds. Other block shapes are left unchanged.
older worlds. Replacement while the older content remains installed is
optional and disabled by default. Other block shapes are left unchanged.
- Grass no longer remains beneath grass slabs or turf.
- Snowy grass and dirt slabs now have a complete snow cap with snowy side
edges.
Expand All @@ -53,8 +54,8 @@ License: GNU Lesser General Public License 2.1 only. Copyright SkyBlade1978.
## Candidate evidence

The candidate was built with Gradle 9.6.1 on Java 17, then compiled, tested and
launched with Temurin Java 8. All 24 focused tests in seven suites pass. The
Forge test runtime passes fresh world and reload checks with 72 gameplay
launched with Temurin Java 8. All 32 focused tests in nine suites pass. The
Forge test runtime passes fresh world and reload checks with 74 gameplay
assertions and 8 world generation assertions, including occupied replaceable
targets. The fixed seed 9×9 chunk comparison passes in forward, reverse and
shuffled orders. The focused 256 column benchmark measured approximately
Expand All @@ -74,15 +75,22 @@ shapes across 13 IDs. The source fixture contains 1,080 files and 1,380,450,555
bytes. Its aggregate SHA-256 remained
`45C0A84913A71D0F7832F76719A4C3B745DAEA9BE5C8EFD9FEF6B97077EFBF44`.

That migration result uses
`compat.forceReplaceBuildingBricksSlabs=true`. With the setting omitted or
false, installed legacy slabs remain unchanged. Recovery of the supported IDs
when the older mod is removed remains automatic. The full default coexistence,
forced replacement, second load, and missing content backup paths were checked
on fresh disposable copies without changing the source fixture.

Two clean builds produced identical main, sources and Javadocs jars. The
release files are:

- `SkysGrassSlabs-0.3.0.110021.jar` - 75,300 bytes - SHA-256
`DBF2D4EDECCD853600420656846B028D689CB8091459E75D2EB095AFFABF25A5`
- `SkysGrassSlabs-0.3.0.110021-sources.jar` - 46,457 bytes - SHA-256
`8CBFBE18F5739D7D4428AEBFACDFCB7B039AC6B1A9A65D2F49C01C4741B28369`
- `SkysGrassSlabs-0.3.0.110021-javadoc.jar` - 141,607 bytes - SHA-256
`14A2136ECF76148A2DED53A5B0B5876C51D7FC90D02FD37CF8B1EA32109A66F9`
- `SkysGrassSlabs-0.3.0.110021.jar` - 78,897 bytes - SHA-256
`9F52887FF538CB6C6ADB86E939FA70F4508B66547343C372198DA0745FED0435`
- `SkysGrassSlabs-0.3.0.110021-sources.jar` - 48,200 bytes - SHA-256
`50FF954A77FF94D3CC6B9A8B465D8AE9FC9BB28A72FA2F2AE19AB230424E16ED`
- `SkysGrassSlabs-0.3.0.110021-javadoc.jar` - 141,919 bytes - SHA-256
`4B4934513508A7486276D1E77736E733C35B7E9F3C3805AEF8466F4890D79523`

Eclipse run generation and production classpath verification pass. The
development client identifies the mod, initializes OpenAL, builds the 512x512
Expand Down
Loading
Loading