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
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
# Changelog

## 0.3.6.112021

- 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.112021

- 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.112021

- Added a Sky's Building Pieces creative tab, including the vanilla pieces the mod reuses.
- Made clear and stained glass walls continuous where the material and colour match.
Borders remain at posts, exposed ends and colour changes.
- Added raised posts at wall ends, corners, junctions and beneath blocks above.
Straight glass runs have lower panels without a post in every block.
- Matched glass-wall selection outlines to the panels and posts, and removed
hidden internal glass faces.
- Allowed ordinary and redstone torches on walls.
- Kept existing pieces, palette assignments, recipes and world recovery unchanged.

## 0.3.0.112021

- Kept separate recovery progress for removed BOP decorations supplied by the add-on.
- Added Minecraft 1.12.2 support with the existing IDs, palettes and save state.
- Kept native crafting recipes intact when other material mods are installed.
- Recovered supported legacy stacks before containers read them, including
furniture inventories with their own saved-data layout.

## 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.
22 changes: 18 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Sky's Building Pieces

Building pieces for Minecraft 1.10.2, made from vanilla materials with ordinary
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.12.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.112021 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 @@ -14,7 +17,7 @@ Ordinary dirt vertical slabs are included. Horizontal soil slabs, other vertical
soil or grass slabs, turf and path slabs are not included. Sky's Grass Slabs
remains independent.

Requires Forge 12.18.3.2511 and Java 8. Development uses ForgeGradle 7.0.34
Requires Forge 14.23.5.2859 and Java 8. Development uses ForgeGradle 7.0.34
and Gradle 9.6.1 under Java 17.

The mod adds 235 building block IDs and one hidden recovery holder: 236 in
Expand All @@ -24,12 +27,18 @@ Supported regular slab items place horizontally or vertically, including oak.
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.

The Sky's Building Pieces creative tab groups the pieces together, including
reused vanilla slabs and stairs. Matching clear or stained glass walls join
without a border between each panel. Posts remain at ends, corners and junctions,
and beneath a torch or other block above.

The optional Biomes O Plenty add-on provides pieces for its woods, stones and
gem blocks. It uses the same crafting patterns and replacement setting, with separate
migration progress. Install the matching add-on and Biomes O Plenty on both
the client and server. The core does not require either one.

Core and BOP together use 302 block IDs. Existing palette slots remain unchanged.
Core and the 1.12 BOP add-on together use 310 block IDs, including retired BOP
recovery. Existing palette slots remain unchanged.

See [pieces and recipes](docs/GAMEPLAY.md), [configuration](docs/CONFIGURATION.md),
[existing worlds](docs/WORLD-UPGRADES.md) and [trying the beta](docs/TRYING-THE-BETA.md).
Expand All @@ -38,3 +47,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.
Loading
Loading