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
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
52 changes: 29 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: Sky's Building Pieces 1.21.1 NeoForge CI
name: Sky's Building Pieces 26.3 NeoForge CI

on:
push:
branches:
- master-1.21.1-neo
- master-26.3-neo
pull_request:
branches:
- master-1.21.1-neo
- master-26.3-neo

permissions:
contents: read

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

jobs:
Expand All @@ -33,7 +33,7 @@ jobs:
echo "java_setup_version=$(sed -n 's/^java_setup_version=//p' gradle.properties)" >> "$GITHUB_OUTPUT"
echo "gradle_java_version=$(sed -n 's/^gradle_java_version=//p' gradle.properties)" >> "$GITHUB_OUTPUT"

- name: Install pinned Java 21 runtime and toolchain
- name: Install pinned Java 25 runtime and toolchain
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
Expand All @@ -55,13 +55,13 @@ jobs:
mkdir -p "$GRADLE_USER_HOME"
chmod +x ./gradlew
gradle_args=(
classes test
--no-daemon --no-build-cache --stacktrace --max-workers=2
-Dorg.gradle.java.installations.paths="$JAVA_HOME"
-Dorg.gradle.java.installations.auto-detect=false
-Dorg.gradle.java.installations.auto-download=false
)
./gradlew "${gradle_args[@]}"
./gradlew clean "${gradle_args[@]}"
./gradlew classes test "${gradle_args[@]}"

- name: Verify same-cache bootstrap offline
shell: bash
Expand All @@ -70,13 +70,13 @@ jobs:
run: |
set -euo pipefail
gradle_args=(
classes test
--rerun-tasks --offline --no-daemon --no-build-cache --stacktrace --max-workers=2
--offline --no-daemon --no-build-cache --stacktrace --max-workers=2
-Dorg.gradle.java.installations.paths="$JAVA_HOME"
-Dorg.gradle.java.installations.auto-detect=false
-Dorg.gradle.java.installations.auto-download=false
)
./gradlew "${gradle_args[@]}"
./gradlew clean "${gradle_args[@]}"
./gradlew classes test --rerun-tasks "${gradle_args[@]}"

build:
name: Build, test, and audit
Expand All @@ -95,7 +95,7 @@ jobs:
echo "java_setup_version=$(sed -n 's/^java_setup_version=//p' gradle.properties)" >> "$GITHUB_OUTPUT"
echo "gradle_java_version=$(sed -n 's/^gradle_java_version=//p' gradle.properties)" >> "$GITHUB_OUTPUT"

- name: Install pinned Java 21 runtime and toolchain
- name: Install pinned Java 25 runtime and toolchain
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
Expand All @@ -113,13 +113,19 @@ jobs:
run: chmod +x ./gradlew

- name: Build, test, and audit release artifacts
run: >-
./gradlew clean check build javadoc verifyReleaseArtifacts writeReleaseChecksums
preparePackagedRuntimeProbes eclipse verifyEclipseConfiguration --no-daemon --stacktrace
-Declipse.application=org.eclipse.ui.ide.workbench
-Dorg.gradle.java.installations.paths="$JAVA_HOME"
-Dorg.gradle.java.installations.auto-detect=false
-Dorg.gradle.java.installations.auto-download=false
shell: bash
run: |
set -euo pipefail
gradle_args=(
--no-daemon --stacktrace --max-workers=2
-Dorg.gradle.java.installations.paths="$JAVA_HOME"
-Dorg.gradle.java.installations.auto-detect=false
-Dorg.gradle.java.installations.auto-download=false
)
./gradlew clean "${gradle_args[@]}"
./gradlew check build javadoc verifyReleaseArtifacts writeReleaseChecksums \
preparePackagedRuntimeProbes eclipse verifyEclipseConfiguration \
-Declipse.application=org.eclipse.ui.ide.workbench "${gradle_args[@]}"

- name: Test native fresh and reload servers
run: |
Expand All @@ -133,21 +139,21 @@ jobs:
- name: Upload audited release candidate
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: SkysBuildingPieces-1.21.1-${{ github.sha }}
name: SkysBuildingPieces-26.3-${{ github.sha }}
if-no-files-found: error
retention-days: 30
path: |
build/libs/SkysBuildingPieces-0.3.8.121012.jar
build/libs/SkysBuildingPieces-0.3.8.121012-sources.jar
build/libs/SkysBuildingPieces-0.3.8.121012-javadoc.jar
build/libs/SkysBuildingPieces-0.3.10.2603002.jar
build/libs/SkysBuildingPieces-0.3.10.2603002-sources.jar
build/libs/SkysBuildingPieces-0.3.10.2603002-javadoc.jar
build/release/SHA256SUMS
CHANGELOG.md

- name: Upload diagnostics on failure
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: SkysBuildingPieces-1.21.1-diagnostics-${{ github.sha }}
name: SkysBuildingPieces-26.3-diagnostics-${{ github.sha }}
if-no-files-found: ignore
retention-days: 14
path: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: CodeQL
on:
push:
branches:
- master-1.21.1-neo
- master-26.3-neo
pull_request:
branches:
- master-1.21.1-neo
- master-26.3-neo
schedule:
- cron: '47 7 * * 4'

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

- name: Install pinned Java 21 runtime and toolchain
- name: Install pinned Java 25 runtime and toolchain
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '21.0.7+6.0.LTS'
java-version: '25.0.3+9.0.LTS'

- name: Set up Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6
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.10.2603002

- Snowy steps and corners cover the grass beneath them, and snow pieces can be dug by hand.
- Grass pieces now decay under solid cover and receive normal random ticks.
- Wooden pieces use fuel values that match their size.

## 0.3.9.2603002

- Each material and shape now has its own block ID. Existing pieces keep their material, orientation and waterlogging.
- Directional slab placement can be turned off from the Mods menu.
- Vanilla items stay in their usual creative tabs.

## 0.3.8.2603002

- Updated for Minecraft 26.3 on NeoForge. Wool uses the new vanilla slabs and stairs for new builds.
- Saved Building Pieces wool pieces and inventory items are still supported.

## 0.3.8.2602002

- Updated Building Pieces for Minecraft 26.2 on NeoForge.
- Existing pieces, recipes and migration totals carry forward.
- Fixed an upgrade crash when opening older Forge worlds with large registry snapshots.

## 0.3.8.2601022 - Minecraft 26.1.2 (NeoForge)

- Updated the pieces for Minecraft 26.1.2.
- Kept saved pieces and migration totals when opening older worlds.

## 0.3.8.121112

- Bring Building Pieces to Minecraft 1.21.11 on NeoForge.
- Keep existing pieces, recipes and supported world upgrades.
- Grass Slabs and Mineralogy are still optional.

## 0.3.8.121012

- Bring Building Pieces to Minecraft 1.21.1 on NeoForge.
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ Pieces doesn't generate terrain.

- Use the same slab item for horizontal and vertical placement. Click the centre
of a face to place against it, or near an edge to place along that edge.
Breaking a vertical slab returns the regular slab.
Breaking a vertical slab returns the regular slab. To use ordinary slab
placement, open **Mods → Sky's Building Pieces → Config → Gameplay** and
turn off **Directional slab placement**.
- Sneak while placing a step to turn it vertically. Steps are quarter-block
pieces; corners are eighth-block pieces.
- Matching pieces can join into supported larger shapes or a full block.
Different materials don't combine.
- Find the pieces, including the vanilla items the mod reuses, in the
**Sky's Building Pieces** creative tab.
- Find the mod's pieces in the **Sky's Building Pieces** creative tab. Vanilla
pieces stay in their usual tabs.

Walls have lower panels with posts at ends, corners and junctions. A torch or
block above keeps a supporting post. Matching glass walls form a continuous
Expand Down Expand Up @@ -54,14 +56,14 @@ when Grass Slabs isn't installed.

## Installation and other Sky mods

For **Minecraft 1.21.1**, use **NeoForge 21.1.247** and **Java 21**.
For **Minecraft 26.3**, use **NeoForge 26.3.0.99** and **Java 25**.
No other mod is required. Put the main jar in `mods` on both the client and
server.

You can also add:

- [Sky's Grass Slabs](https://github.com/MinecraftModDevelopmentMods/SkysGrassSlabs)
version 1.2.0.121012 or later for horizontal dirt and grass slabs, paths and turf.
version 1.2.0.2603002 or later for horizontal dirt and grass slabs, paths and turf.
- [The Biomes O' Plenty add-on](https://github.com/MinecraftModDevelopmentMods/SkysBuildingPieces-BiomesOPlenty-Addon)
for pieces made from BOP woods, stones and gem blocks.
- [Sky's Terrain Smoother](https://github.com/MinecraftModDevelopmentMods/SkysTerrainSmoother)
Expand Down
57 changes: 31 additions & 26 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
id 'idea'
id 'java-library'
id 'maven-publish'
id 'net.neoforged.gradle.userdev' version '7.1.38'
id 'net.neoforged.gradle.userdev' version '7.1.39'
}

def sha256Of = { File inputFile ->
Expand All @@ -32,7 +32,7 @@ base {

java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
languageVersion = JavaLanguageVersion.of(25)
vendor = JvmVendorSpec.ADOPTIUM
}
withSourcesJar()
Expand All @@ -41,11 +41,11 @@ java {

tasks.withType(JavaCompile).configureEach {
javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(21)
languageVersion = JavaLanguageVersion.of(25)
vendor = JvmVendorSpec.ADOPTIUM
}
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility = JavaVersion.VERSION_25
targetCompatibility = JavaVersion.VERSION_25
options.encoding = 'UTF-8'
}

Expand All @@ -56,28 +56,28 @@ tasks.withType(Javadoc).configureEach {
options.addBooleanOption('notimestamp', true)
}

def java21Launcher = javaToolchains.launcherFor {
languageVersion = JavaLanguageVersion.of(21)
def java25Launcher = javaToolchains.launcherFor {
languageVersion = JavaLanguageVersion.of(25)
vendor = JvmVendorSpec.ADOPTIUM
}

tasks.register('verifyJava21Toolchain') {
tasks.register('verifyJava25Toolchain') {
group = 'verification'
description = 'Verifies the pinned Temurin Java 21 production toolchain.'
description = 'Verifies the pinned Temurin Java 25 production toolchain.'
doLast {
def metadata = java21Launcher.get().metadata
def metadata = java25Launcher.get().metadata
String runtimeVersion = metadata.javaRuntimeVersion
if (project.java_toolchain_version != '21.0.7+6'
if (project.java_toolchain_version != '25.0.3+9'
|| metadata.vendor.toString() != 'Eclipse Temurin'
|| !(runtimeVersion == '21.0.7+6' || runtimeVersion == '21.0.7+6-LTS')) {
|| !(runtimeVersion == '25.0.3+9' || runtimeVersion == '25.0.3+9-LTS')) {
throw new GradleException("Expected Temurin ${project.java_toolchain_version}, found " +
"${metadata.vendor} ${runtimeVersion} at ${metadata.installationPath}")
}
}
}

tasks.named('check') {
dependsOn tasks.named('verifyJava21Toolchain')
dependsOn tasks.named('verifyJava25Toolchain')
}

tasks.named('compileTestJava', JavaCompile) {
Expand All @@ -90,7 +90,7 @@ tasks.withType(Test).configureEach {
// These saved-world audits read files outside the compiled test resources.
inputs.file('tools/native-log-profiles.json')
inputs.dir('src/testFixtures')
javaLauncher = java21Launcher
javaLauncher = java25Launcher
}
tasks.withType(AbstractArchiveTask).configureEach {
includeEmptyDirs = false
Expand Down Expand Up @@ -144,7 +144,7 @@ runs {
modSource project.sourceSets.main
}

data {
clientData {
workingDirectory project.layout.projectDirectory.dir('run-data')
modSource project.sourceSets.main
arguments.addAll '--mod', mod_id, '--all', '--output',
Expand All @@ -169,7 +169,7 @@ dependencies {
}

tasks.withType(JavaExec).configureEach {
javaLauncher = java21Launcher
javaLauncher = java25Launcher
if (name == 'runServer') standardInput = System.in
}

Expand Down Expand Up @@ -251,11 +251,11 @@ def releaseFiles = provider {
tasks.register('verifyReleaseMetadata') {
group = 'verification'
doLast {
if (project.minecraft_version != '1.21.1' || project.neo_version != '21.1.247' ||
if (project.minecraft_version != '26.3' || project.neo_version != '26.3.0.99' ||
project.loader_name != 'neoforge' || project.loader_code != '2' ||
project.java_version != '21' || project.java_toolchain_version != '21.0.7+6' ||
project.java_version != '25' || project.java_toolchain_version != '25.0.3+9' ||
project.mod_id != 'skysbuildingpieces') {
throw new GradleException('Unexpected 1.21.1 release metadata')
throw new GradleException('Unexpected 26.3 release metadata')
}
}
}
Expand All @@ -278,7 +278,7 @@ tasks.register('verifyReleaseArtifacts') {
throw new GradleException("The jar's Java label does not match its production target")
}
Set<String> names = zip.entries().collect { it.name } as Set<String>
['META-INF/neoforge.mods.toml', 'pack.mcmeta', 'META-INF/coremods.json',
['META-INF/neoforge.mods.toml', 'pack.mcmeta', 'skysbuildingpieces.mixins.json',
'META-INF/LICENSE', 'META-INF/LICENSE.spdx', 'META-INF/NOTICE',
'zone/moddev/mc/skysbuildingpieces/SkysBuildingPieces.class', 'META-INF/BUILDINGBRICKS-MIT.txt'].each { required ->
if (!names.contains(required)) throw new GradleException("Release jar is missing ${required}")
Expand All @@ -304,8 +304,8 @@ tasks.register('verifyReleaseArtifacts') {
if (!entry.directory) {
byte[] auditBytes = zip.getInputStream(entry).bytes
if (entry.name.endsWith('.class') &&
(((auditBytes[6] & 255) << 8) | (auditBytes[7] & 255)) != 65) {
throw new GradleException("Non-Java-21 production class: ${entry.name}")
(((auditBytes[6] & 255) << 8) | (auditBytes[7] & 255)) != 69) {
throw new GradleException("Non-Java-25 production class: ${entry.name}")
}
String content = new String(zip.getInputStream(entry).bytes,
StandardCharsets.ISO_8859_1).toLowerCase(Locale.ROOT)
Expand Down Expand Up @@ -510,8 +510,8 @@ def verifyEclipseConfiguration = tasks.register('verifyEclipseConfiguration') {
if (entries.find { it.@kind == 'output' }.@path != 'bin/default' ||
entries.find { it.@path == 'src/main/java' }.@output != 'bin/main' ||
entries.find { it.@path == 'src/test/java' }.@output != 'bin/test' ||
!classpathText.contains('/JavaSE-21/')) {
throw new GradleException('Eclipse production, test and default output must be separate on Java 21')
!classpathText.contains('/JavaSE-25/')) {
throw new GradleException('Eclipse production, test and default output must be separate on Java 25')
}
List<String> libraries = entries.findAll { it.@kind == 'lib' }
.collect { file(it.@path).canonicalPath }
Expand All @@ -531,8 +531,13 @@ def verifyEclipseConfiguration = tasks.register('verifyEclipseConfiguration') {
String name = launch.name.toLowerCase(Locale.ROOT)
name.startsWith('run ') && (name.contains('client') || name.contains('server'))
}
if (runLaunches.size() != 6) {
throw new GradleException('Expected isolated Eclipse client and server launches')
Set<String> expectedLaunches = [
'Client', 'Server', 'ClientData', 'ServerData',
'GrassSlabsClient', 'GrassSlabsServer', 'MineralogyClient', 'MineralogyServer'
].collect { "Run ${project.name} - ${it}.launch".toString() } as Set<String>
if ((runLaunches.collect { it.name } as Set<String>) != expectedLaunches
|| runLaunches.size() != expectedLaunches.size()) {
throw new GradleException('Expected isolated Eclipse game and data launches')
}
runLaunches.each { launch ->
String launchText = launch.getText('UTF-8')
Expand Down
Loading
Loading