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
The table of contents is too big for display.
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
41 changes: 28 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: Sky's Building Pieces 1.10 CI
name: Sky's Building Pieces CI

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

permissions:
contents: read

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

jobs:
Expand All @@ -26,23 +26,38 @@ jobs:
- name: Check out source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: Install Java 8 toolchain
- name: Read target build metadata
id: target
shell: bash
run: |
set -euo pipefail
value() { sed -n "s/^$1=//p" gradle.properties; }
toolchain="$(value java_toolchain_version)"
selector="$(value java_setup_version)"
echo "java_setup_version=${selector:-$toolchain}" >> "$GITHUB_OUTPUT"
echo "java_version=$(value java_version)" >> "$GITHUB_OUTPUT"
echo "minecraft_version=$(value minecraft_version)" >> "$GITHUB_OUTPUT"
echo "gradle_java_version=$(value gradle_java_version)" >> "$GITHUB_OUTPUT"
echo "artifact_prefix=SkysBuildingPieces-$(value mod_version)" >> "$GITHUB_OUTPUT"

- name: Install target Java toolchain
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '8.0.502+7'
java-version: ${{ steps.target.outputs.java_setup_version }}

- name: Pin production Java
if: steps.target.outputs.java_version == '8'
run: |
echo "SGS_JAVA8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
echo "SBP_JAVA8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
echo "STS_JAVA8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"

- name: Install Java 17 for Gradle
- name: Install Java for Gradle
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: microsoft
java-version: '17'
java-version: ${{ steps.target.outputs.gradle_java_version }}

- name: Set up Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6
Expand All @@ -63,21 +78,21 @@ jobs:
- name: Upload audited release candidate
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: SkysBuildingPieces-1.10.2-${{ github.sha }}
name: SkysBuildingPieces-${{ steps.target.outputs.minecraft_version }}-${{ github.sha }}
if-no-files-found: error
retention-days: 30
path: |
build/libs/SkysBuildingPieces-0.3.0.110021.jar
build/libs/SkysBuildingPieces-0.3.0.110021-sources.jar
build/libs/SkysBuildingPieces-0.3.0.110021-javadoc.jar
build/libs/${{ steps.target.outputs.artifact_prefix }}.jar
build/libs/${{ steps.target.outputs.artifact_prefix }}-sources.jar
build/libs/${{ steps.target.outputs.artifact_prefix }}-javadoc.jar
build/release/SHA256SUMS
CHANGELOG.md

- name: Upload diagnostics on failure
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: SkysBuildingPieces-1.10.2-diagnostics-${{ github.sha }}
name: SkysBuildingPieces-${{ steps.target.outputs.minecraft_version }}-diagnostics-${{ github.sha }}
if-no-files-found: ignore
retention-days: 14
path: |
Expand Down
27 changes: 21 additions & 6 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-*'
- 'feature/**'
pull_request:
branches:
- master-1.10.2
- 'master-*'
schedule:
- cron: '47 7 * * 4'

Expand All @@ -26,23 +26,38 @@ jobs:
- name: Check out source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: Install Java 8 toolchain
- name: Read target build metadata
id: target
shell: bash
run: |
set -euo pipefail
value() { sed -n "s/^$1=//p" gradle.properties; }
toolchain="$(value java_toolchain_version)"
selector="$(value java_setup_version)"
echo "java_setup_version=${selector:-$toolchain}" >> "$GITHUB_OUTPUT"
echo "java_version=$(value java_version)" >> "$GITHUB_OUTPUT"
echo "minecraft_version=$(value minecraft_version)" >> "$GITHUB_OUTPUT"
echo "gradle_java_version=$(value gradle_java_version)" >> "$GITHUB_OUTPUT"
echo "artifact_prefix=SkysBuildingPieces-$(value mod_version)" >> "$GITHUB_OUTPUT"

- name: Install target Java toolchain
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '8.0.502+7'
java-version: ${{ steps.target.outputs.java_setup_version }}

- name: Pin production Java
if: steps.target.outputs.java_version == '8'
run: |
echo "SGS_JAVA8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
echo "SBP_JAVA8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
echo "STS_JAVA8_HOME=$JAVA_HOME" >> "$GITHUB_ENV"

- name: Install Java 17 for Gradle
- name: Install Java for Gradle
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: microsoft
java-version: '17'
java-version: ${{ steps.target.outputs.gradle_java_version }}

- name: Set up Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/release-on-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ 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$ ]]
minecraft="$(sed -n 's/^minecraft_version=//p' gradle.properties)"
loader="$(sed -n 's/^loader_code=//p' gradle.properties)"
IFS=. read -r major minor patch <<<"$minecraft"
printf -v suffix '%s%02d%02d%s' "$major" "$((10#$minor))" "$((10#${patch:-0}))" "$loader"
[[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+\.${suffix}$ ]]
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-*'
- 'feature/**'
pull_request:
branches:
- master-1.10.2
- 'master-*'

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

## 0.3.6.110021

- Shortened piece names, including Gold Wall, Gold Stairs and Oak Step.
- Tidied material names and word order across all 18 languages.
- Kept recipes, registry IDs, metadata and world migration unchanged.

## 0.3.5.110021

- Gave all custom walls lower panels and raised posts, including gold and packed ice.
- Kept posts at ends, corners, junctions and beneath blocks or torches above.
- Matched selection and collision shapes to the wall profile and removed internal faces.
- Kept existing materials, registry IDs, recipes and saved palette assignments unchanged.
- Updated the BOP add-on wall models to use the same profile.

## 0.3.4.110021

- Matching clear and stained-glass walls now join without a repeated border
between blocks. Posts, exposed ends and colour changes keep their borders.
- Each wall block can still be placed, selected and broken separately.

## 0.3.3.110021

- Torches and redstone torches can now be placed on top of walls. Glass walls
form a supporting post when needed.
- The glass-wall selection outline now follows the post and connections
rather than drawing a large box around the empty space between them.

## 0.3.2.110021

- Glass walls now form continuous straight runs, with posts at ends, corners
and junctions instead of on every block. Posts also support blocks above.
- Wall selection and collision follow the changing post shape.

## 0.3.1.110021

- Added a Sky's Building Pieces creative tab, including the vanilla pieces
used by the mod. Vertical slabs and old templates remain hidden.
- Gave glass walls raised posts and lower, narrower connections.
- Removed the internal glass faces that made connected walls look dark and
overlapping. Different glass colours keep their visible boundary.

## 0.3.0.110021

- Added a piece lookup interface for Terrain Smoother and shared grass rules
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 README](README.md) for this branch's toolchain and checks.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Sky's Building Pieces

Piece names use the material itself: Gold Wall and Oak Step, rather than the
full block's name followed by the shape. All 18 languages have matching material labels.

Building pieces for Minecraft 1.10.2, made from vanilla materials with ordinary
crafting recipes. No templates or tools are needed. The mod does not generate terrain.

Version 0.3.0.110021 is a beta for testing. Back up existing worlds before
Version 0.3.6.110021 is a beta for testing. Back up existing worlds before
trying it. Do not remove BuildingBricks from a world that still needs its
other materials, shapes or tools.

Expand All @@ -21,6 +24,8 @@ The mod adds 235 building block IDs and one hidden recovery holder: 236 in
total. Fixed metadata palettes keep material and orientation assignments
consistent between installations. Existing vanilla pieces are reused.
Supported regular slab items place horizontally or vertically, including oak.
Find the pieces in the Sky's Building Pieces creative tab, alongside the
vanilla slab, stair, wall and pane items reused by the catalogue.
Vertical slabs drop regular slabs and do not have separate creative entries.
Only ordinary dirt needs a separate recipe when no horizontal slab is available.

Expand All @@ -38,3 +43,8 @@ See [pieces and recipes](docs/GAMEPLAY.md), [configuration](docs/CONFIGURATION.m

Licensed under LGPL-2.1-only. Adapted BuildingBricks definitions and geometry
retain the MIT notice in BUILDINGBRICKS-MIT.txt.

All custom walls have lower connecting panels and raised posts at ends, corners
and junctions. A block or torch above keeps its supporting post. Selection follows
the visible wall; the wall still prevents jumping over it.
If using the BOP add-on, update its jar too so its wall models match this version.
Binary file added artwork/skysbuildingpieces-logo-concept-v1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added artwork/skysbuildingpieces-logo-concept-v2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,18 @@ dependencies {
}

def integrationTestClasses = layout.buildDirectory.dir('integration-test-mod/classes')
tasks.register('generateWallModels', JavaExec) {
group = 'build setup'
description = 'Regenerates wall exterior models from their shared collision profile.'
dependsOn tasks.named('testClasses')
classpath = sourceSets.test.runtimeClasspath
mainClass = 'zone.moddev.mc.skysbuildingpieces.GenerateWallModels'
workingDir = project.projectDir
if (providers.gradleProperty('wallAssetRoot').isPresent()) {
args(providers.gradleProperty('wallAssetNamespace').get(), providers.gradleProperty('wallAssetRoot').get())
}
}

def compileIntegrationTestMod = tasks.register('compileIntegrationTestMod', JavaCompile) {
group = 'verification'
dependsOn tasks.named('classes')
Expand Down Expand Up @@ -352,6 +364,20 @@ tasks.register('integrationClientProcess', JavaExec) {
}
}

tasks.register('integrationPresentationProcess', JavaExec) {
group = 'verification'
dependsOn prepareIntegrationTest
workingDir integrationRunDirectory
systemProperty 'skysbuildingpieces.integrationPhase', 'client-presentation'
systemProperty 'log4j.configurationFile', file('src/integrationTest/resources/log4j2.xml').toURI().toString()
configureFromForgeRun(delegate, 'runClient')
doLast {
File directory = integrationRunDirectory.get().asFile
if (!new File(directory, 'screenshots/glass-walls.png').isFile())
throw new GradleException('Glass-wall gallery screenshot is missing')
}
}

tasks.named('check') {
dependsOn tasks.named('integrationTest')
}
Expand Down
15 changes: 15 additions & 0 deletions docs/GAMEPLAY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Pieces and recipes

The Sky's Building Pieces creative tab contains the mod's pieces and the
vanilla slab, stair, wall and pane items it reuses. Vertical slab items and old
templates stay hidden; use the regular slab for either placement direction.

Use matching full blocks to craft building pieces. No template or tool is
needed. Existing Minecraft pieces keep their native items and recipes; the
BOP add-on follows the same patterns for its materials.
Expand Down Expand Up @@ -27,6 +31,17 @@ brick fences. Native cobblestone walls, slabs, stairs and glass panes keep
their usual recipes. Only supported shapes are available; there are no wooden
walls or horizontal soil slabs.

Walls form continuous straight runs, with posts at the ends, corners
and junctions. A block above also keeps a supporting post. Extending or breaking
the wall updates its shape automatically.
Torches and redstone torches can sit on top of walls, including straight runs.
A wall forms a supporting post beneath the torch. Its selection outline
follows the post and connections rather than filling the gaps between them.
Matching clear or stained-glass walls also join without a repeated border
between blocks. Borders remain at posts, exposed ends and colour changes.
The blocks can still be placed, selected and broken individually; no extra
mod or texture pack is needed.

There is no separate vertical slab recipe when a regular slab exists. The same
item places either way. Old vertical slab items can be crafted back into regular
slabs one for one, retaining custom item data.
Expand Down
18 changes: 15 additions & 3 deletions docs/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,32 @@ Pushes and pull requests run the build, tests, artifact audit, CodeQL and Gradle
wrapper checks. CI uploads the main, sources and Javadoc jars with their checksums.
Tags only validate a candidate; they never publish it.

Publication is currently disabled. Before the first release, create this mod's
CurseForge project, set its own `curseforge_project_id` in `gradle.properties`,
and set `release_enabled=true`. Do not reuse another mod's project ID.
Building Pieces publishes to CurseForge project 1754162. Publication is enabled
only in MMD; a fork build never uploads a release.

The MMD release workflow uses the organisation's `CURSEFORGE_TOKEN`,
`MAVEN_UPLOAD_URL`, `MAVEN_UPLOAD_USERNAME` and `MAVEN_UPLOAD_PASSWORD`.
It requires a passing CI build and explicit confirmation of live publication.
Enter the full release version and choose the CurseForge release level.

The first 0.3 releases are betas. Select `beta` for CurseForge and confirm live
publication after the branch's checks have passed.

The workflow resolves the Minecraft branch from the version, rebuilds the exact
commit, and checks one immutable artifact bundle. It validates or creates the tag,
then publishes the same files to Maven, CurseForge and GitHub, in that order.
A failed step prevents the later publication steps. Check the public downloads
before announcing a release.

The dispatcher reads the selected branch's Minecraft, loader, Java and artifact
metadata. It is not restricted to 1.10 or 1.12: later Forge and NeoForge ports
use the same version suffix and branch naming rules. Each port must supply its
own tested build setup and correct metadata.

If publication stops, inspect the completed stages before retrying. Keep the
same commit and immutable bundle; rerun only failed jobs when an upload has
already succeeded. Do not create another CurseForge file while one is awaiting
approval.

Content mods must be released before add-ons that require them. Keep dependency
source pins up to date when preparing a coordinated release.
Loading
Loading