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
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.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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.
0.3.6.110021 together on the client and server. Mineralogy is optional.

## Smoothing levels

Expand Down
13 changes: 11 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,24 @@ 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 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
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.10.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.
6 changes: 3 additions & 3 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.commit=5ebc77d3e1195e4c537994ad3ffe0f234332321f
grass.version=1.1.0.110021
pieces.repository=SkyBlade1978/SkysBuildingPieces
pieces.commit=f21616d4e4bfe09dcf25490a3568fd846a820792
pieces.version=0.3.0.110021
pieces.commit=f55f53d0c6f29e741635f47234fbabba893bdffd
pieces.version=0.3.6.110021
Loading
Loading