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
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .github/workflows/deploy-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,8 @@ jobs:
with:
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
curseforge-id: ${{ needs.preflight.outputs.curseforge_project_id }}
# A timeout or HTTP 500 can follow an accepted upload. Check the file before retrying.
curseforge-retry-attempts: 1
name: Sky's Building Pieces ${{ needs.preflight.outputs.release_version }} for Minecraft ${{ needs.preflight.outputs.minecraft_version }} (${{ needs.preflight.outputs.loader_display }})
version: ${{ needs.preflight.outputs.release_version }}
version-type: ${{ inputs.curseforge_release_level }}
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## 0.3.7.112021

- Use a shovel to turn ordinary dirt and grass steps and corners into paths.
They keep their orientation, with the top lowered by one pixel.
- Flattening a grass step or corner also turns the grass block beneath it into
a path, using the shovel once for both changes.
- Grass steps and corners keep their grass and snow edges, with grass left
visible beneath partial pieces.
- Rebuild two corners into one step and two steps into one slab by stacking
them in the crafting grid. Matching BOP pieces work the same way.
- Mineralogy rock steps and corners are now included when Mineralogy is
installed. They rebuild into its native slabs; no separate add-on is needed.
Saves made with the earlier test add-on keep their pieces and item data.
- When Grass Slabs is installed, use 1.1.1.112021 or later for shared grass
behaviour. Building Pieces still works on its own.

## 0.3.6.112021

- Shortened piece names, including Gold Wall, Gold Stairs and Oak Step.
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ with: slabs, steps, corners, stairs, walls and ice panes. Add narrow trims,
fill awkward corners or build a glass wall without using full blocks everywhere.

The mod uses vanilla materials and reuses existing Minecraft pieces where they
already fit. It doesn't generate terrain.
already fit. When Mineralogy is installed, its natural rocks also get matching
steps and corners automatically. No Mineralogy add-on is needed. Building
Pieces doesn't generate terrain.

## Building with the pieces

Expand All @@ -25,12 +27,18 @@ run, with borders at posts, exposed ends and colour changes.

Dirt and grass steps and corners are included too. Grass follows biome colours,
spreads and decays much like vanilla grass. Plants need a complete upper face.
Use a shovel on an uncovered dirt or grass step or corner to turn it into a
matching path piece. Its footprint stays the same, with a one-pixel lower top.
Flattening a grass piece also turns an ordinary grass block directly beneath
it into a path, using the same shovel action.

## Crafting

Craft pieces from matching full blocks, slabs and steps. For example, three
full blocks in a row make six slabs, and two matching slabs placed diagonally
make four steps. Existing vanilla recipes stay available.
You can also rebuild larger pieces: stack two matching corners in the crafting
grid for one step, or two matching steps for one slab.

The [recipe and placement guide](docs/GAMEPLAY.md) has the full patterns,
quantities and exceptions, including the separate dirt vertical slab recipe
Expand Down
35 changes: 33 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ minecraft {
runs {
configureEach {
workingDir.convention layout.projectDirectory.dir(developmentRunDirectory)
// Supply the legacy version before ForgeGradle expands the launch environment.
environment 'MC_VERSION', project.minecraft_version.toString()
systemProperty 'forge.logging.console.level', 'debug'
systemProperty 'fml.coreMods.load', 'zone.moddev.mc.skysbuildingpieces.legacy.LoaderPlugin'
}
Expand Down Expand Up @@ -211,6 +213,17 @@ repositories {
filter { includeGroupAndSubgroups('org.spongepowered') }
}
mavenCentral()
exclusiveContent {
forRepository {
ivy {
name = 'GrassSlabsReleases'
url = 'https://github.com/MinecraftModDevelopmentMods/SkysGrassSlabs/releases/download'
patternLayout { artifact '[revision]/[artifact]-[revision].[ext]' }
metadataSources { artifact() }
}
}
filter { includeModule 'zone.moddev.mc.skysgrassslabs', 'SkysGrassSlabs' }
}
maven {
name = 'MinecraftLibraries'
url = 'https://libraries.minecraft.net/'
Expand Down Expand Up @@ -239,6 +252,15 @@ tasks.register('generateWallModels', JavaExec) {
}
}

tasks.register('alignSoilModels', JavaExec) {
group = 'build setup'
description = 'Aligns grass and snow fringes with the exposed top of each soil piece.'
dependsOn tasks.named('testClasses')
classpath = sourceSets.test.runtimeClasspath
mainClass = 'zone.moddev.mc.skysbuildingpieces.AlignSoilModels'
workingDir = project.projectDir
}

def integrationTestClasses = layout.buildDirectory.dir('integration-test-mod/classes')
def compileIntegrationTestMod = tasks.register('compileIntegrationTestMod', JavaCompile) {
group = 'verification'
Expand Down Expand Up @@ -585,9 +607,10 @@ ext.releaseFiles = releaseFiles
ext.releaseJar = releaseJar
apply from: 'gradle/release.gradle'

// Keep the old entry point disabled until publication is configured.

// Releases use the validated MMD workflow.
tasks.register('publishRelease') {
doLast { throw new GradleException('Publication is disabled for the local beta.') }
doLast { throw new GradleException('Use the MMD release workflow to publish this mod.') }
}

idea {
Expand Down Expand Up @@ -705,3 +728,11 @@ tasks.register('verifyEclipseProductionClasspath') {
tasks.named('check') {
dependsOn tasks.named('verifyReleaseMetadata')
}

// Optional native mods stay in a separate development folder and never enter the published jar.
ext.configureMineralogyVerificationRun = configureFromForgeRun
ext.mineralogyProfileProbeId = 'skysbuildingpieces'
ext.mineralogyProfileAdditionalMods = files()
apply from: 'gradle/mineralogy-runs.gradle'
apply from: 'gradle/mineralogy-fixtures.gradle'
apply from: 'gradle/grass-slabs-release.gradle'
45 changes: 45 additions & 0 deletions docs/BUILDING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Building and running the mod

Run Gradle with Java 17. Production code and Minecraft use Java 8; the tested
toolchain is Temurin 8.0.502+7. Use the included Gradle wrapper.

```text
gradlew clean check build javadoc verifyReleaseArtifacts writeReleaseChecksums
gradlew genEclipseRuns eclipse verifyEclipseProductionClasspath
```

The main jar is in `build/libs`. Sources and Javadocs are separate jars, and
`build/release/SHA256SUMS` records their checksums. Only the main jar goes into
a game's mods folder.

## Eclipse

Import the project through Buildship, using the Gradle wrapper. Regenerate
the launches after changing dependencies. The generated configuration uses
processed resources and keeps test code out of ordinary game runs.

- `runClient` and `runServer` run Building Pieces on its own.
- `runGrassSlabsClient` and `runGrassSlabsServer` also load the released Grass
Slabs jar recorded in `gradle/grass-slabs-release.properties`.
- `runMineralogyClient` and `runMineralogyServer` use the optional Mineralogy
and OreSpawn jars recorded in `gradle/mineralogy-runtime.properties`.

Each profile has its own game folder. Grass Slabs is downloaded from its public
release, checked against its SHA-256 and mapped to development names. There is
no sibling source build to prepare. The published Grass Slabs jar remains
unchanged, and none of its classes are bundled into Building Pieces.

For the Mineralogy profile, supply the jars named in its lock file, or use
`-PmineralogyRuntimeJar=<jar>` and `-PorespawnRuntimeJar=<jar>` to select matching
copies. They must pass the recorded checksums.

## Runtime checks

`check` runs the unit suite and disposable server checks, both standalone and
with the released Grass Slabs jar. `integrationGrassSlabsClientProcess` checks
the combined client models. `integrationMineralogyTest` and
`integrationMineralogyClientProcess` cover the optional rock pieces when the
locked native jars are available.

Verification worlds live under `build/`. Keep player worlds in the separate
ordinary game folders or another instance.
12 changes: 9 additions & 3 deletions docs/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,16 @@ configuration, generation or migration progress.

## Block-ID budget for modpacks

Building Pieces uses 236 block IDs: 235 building blocks and one hidden recovery
Without Mineralogy, Building Pieces uses 238 block IDs: 237 building blocks and one hidden recovery
holder. Materials share fixed metadata palettes so they don't each need a
separate block ID for every shape and orientation. Saved palette assignments
do not change between installations.

The matching Biomes O Plenty add-on uses another 74 IDs, for 310 combined.
These totals exclude blocks already registered by Minecraft and Biomes O Plenty.
The matching Biomes O Plenty add-on uses another 74 IDs, for 312 combined.
Mineralogy support adds 35 IDs only when Mineralogy is installed, for 273 core
IDs in that setup. The vanilla catalogue still uses 238 IDs. The optional rock
catalogue has its own fixed 35-ID budget; it does not change existing palettes.
These totals exclude blocks already registered by Minecraft, Biomes O Plenty
and Mineralogy.
With both Mineralogy and the BOP add-on installed, the combined Sky pieces use
347 IDs (238+35+74).
33 changes: 31 additions & 2 deletions docs/GAMEPLAY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Pieces and recipes

Mineralogy rock steps and corners are included automatically when Mineralogy
is installed. Three matching full rocks diagonally across the crafting grid
make twelve steps; two steps side by side make four corners. Vertical pairs
rebuild corners into steps and steps into Mineralogy's existing slabs.
Disabled native slab types are not used by recipes or smoothing. The rock
steps and corners remain craftable from full blocks.

Find the pieces in the Sky's Building Pieces creative tab. It includes the
vanilla pieces reused by the catalogue. Separate vertical slab items, old
templates and recovery holders stay hidden.
Expand Down Expand Up @@ -47,6 +54,17 @@ also applies to supported BOP materials. A vertical pair keeps any existing
native decorative-block recipe. Smooth stone has no obtainable full block item
in this Minecraft version and therefore has no recombination recipe.

To rebuild larger pieces, put two matching corners one above the other to make
one step. Two matching steps in a column make one slab. This works in either
crafting grid and also covers the Building Pieces BOP add-on's materials.
Keep each pair the same material and item type; saved placement orientations
do not matter. Side-by-side steps still make four corners, and diagonal slabs
still make four steps.

Dirt and grass steps return the matching Grass Slabs item when that mod is
installed. Without it, ordinary dirt steps return the existing dirt vertical
slab. No new slabs are added for soil materials without a matching slab.

For raw stone, snow, decorative sandstone and mossy/cracked/chiseled stone brick
slabs, use two full blocks diagonally to make four slabs. Their full-block rows
already belong to native recipes, which remain unchanged.
Expand Down Expand Up @@ -88,11 +106,22 @@ do not combine. Some unions have no supported shape and cannot combine.

Grass shapes use biome colours and spread to ordinary dirt and matching dirt
pieces. Covered or dark grass becomes the matching dirt shape, retaining its
orientation. Grass pieces keep their grass-block support as dirt. With Grass
Slabs 1.1 installed, spreading also works across its slabs and turf.
orientation. Steps and corners leave exposed ground grassy; pieces covering
the whole footprint keep dirt underneath. With Grass
Slabs 1.1.1.112021 or later installed, spreading also works across its slabs and turf.
Plants and bonemeal need a complete upper supporting face. Nearby snow gives
soil and grass pieces a visual snow cap without changing their collision.

Use a compatible shovel on an uncovered ordinary dirt or grass step or corner
to make a path. The piece keeps its shape and orientation; only its exposed
top drops by one pixel. Each use costs one durability, except in creative mode.
Flattening a grass piece also turns an ordinary grass block directly beneath
it into a path. Both changes use that same durability point. Other supporting
blocks stay as they are.
Paths drop matching dirt pieces, even with Silk Touch. A solid block above a
path turns it back into the matching dirt shape. Coarse dirt, podzol and
mycelium are not converted. Grass Slabs still provides the full-width path slabs.

Without Grass Slabs, three ordinary dirt blocks in a column make six dirt vertical slabs.
Place them in any of the four directions; complementary halves combine
into a vanilla dirt block.
Expand Down
14 changes: 13 additions & 1 deletion docs/INTEGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
Catalogue API version 1 remains supported. Register add-on catalogues during
pre-initialization as before; permanent palette slots must never be reassigned.

The JSON-array overload of `registerCatalogue` accepts resolved material and
palette definitions. Use it when a native mod can disable some shapes, without
changing the permanent piece palettes. A material can set
`fullBlockStepRecipe: true` to cut three diagonal full blocks into twelve
steps instead of using the usual two-slab recipe.

Building Pieces 0.3 also provides `BuildingPiecesApi.bottomPiece(material,
TerrainShape, direction)` during initialization, after the block registry event. It returns an existing block
state or `null` when that material has no such piece. It registers nothing.
Expand All @@ -11,4 +17,10 @@ west; corners use those directions for NW, NE, SE and SW respectively.

Sky's Terrain Smoother uses this lookup without depending on palette internals.
Building Pieces never generates terrain itself. It optionally joins Grass
Slabs 1.1's grass-form integration, but works without either mod installed.
Slabs' grass-form integration, using 1.1.1.112021 or later on Minecraft 1.12.2.
It works without either Grass Slabs or Terrain Smoother installed.

Mineralogy is supported directly. Its presence adds 35 fixed rock-piece
palettes during pre-initialization; no add-on or compile-time Mineralogy
dependency is required. The original rocks, textures and slabs remain owned
by Mineralogy. Disabled native slabs are not used in recipes or smoothing.
19 changes: 19 additions & 0 deletions docs/RELEASE-0.3.7.112021.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Sky's Building Pieces 0.3.7 for Minecraft 1.12.2

Dirt and grass steps and corners can now be flattened with a shovel. A grass
block beneath a grass piece becomes a path in the same action, using one point
of tool durability. The pieces keep their shape and orientation.

Grass and snowy edges now follow the smaller pieces properly, and exposed
ground beneath steps and corners can stay grassy. When Grass Slabs is
installed, use version 1.1.1.112021 or later for the shared grass behaviour.

Two matching corners stacked in the crafting grid make a step; two steps make
a slab. This also works with the BOP add-on's materials. Existing native
recipes keep their normal results.

Mineralogy steps and corners are included automatically when Mineralogy is
installed. No separate rock-piece add-on is needed. Pieces saved by the earlier
test add-on keep their materials, orientations and item data.

Building Pieces still works on its own and does not generate terrain.
8 changes: 6 additions & 2 deletions docs/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ The MMD release workflow uses the organisation's `CURSEFORGE_TOKEN`,
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.
Choose `beta` for a build still undergoing wider testing, or `release` for a
manually accepted version. 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,
Expand All @@ -31,5 +32,8 @@ 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.

CurseForge uploads have one attempt. A timeout can happen after a file has been
accepted, so check the project files before attempting any recovery upload.

Content mods must be released before add-ons that require them. Keep dependency
source pins up to date when preparing a coordinated release.
8 changes: 8 additions & 0 deletions docs/TRYING-THE-BETA.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Trying the beta

For Mineralogy, use the core jar with Mineralogy and its OreSpawn dependency.
Do not install the separate Mineralogy piece add-on from the earlier tests.
The generated `runMineralogyClient` Eclipse profile loads the native mods in
a separate development folder. Check rock textures, all step and corner
orientations, cutting recipes and rebuilding to the native slab.

Install the main jar in a Minecraft 1.12.2 Forge 14.23.5.2859 instance using
Java 8. The sources and Javadoc jars are not game mods. Start with a new
creative world; use a separate copy when trying an existing world.
Expand Down Expand Up @@ -37,6 +43,8 @@ Before relying on the beta in a modpack, check:
templates should not appear in creative inventory or crafting results.
- Check grass colours in several biomes, nearby snow, covered grass becoming
dirt, plant support, breaking drops and Silk Touch.
- Use a shovel on a grass step or corner above ordinary grass. Both should
become paths, with one durability point used. Check after saving and reloading.
- Check wall and pane connections and stair corners, including their collision.
- With BuildingBricks present, first leave replacement disabled. On a second
backup enable it, restart, and check converted blocks, containers and item
Expand Down
6 changes: 6 additions & 0 deletions docs/WORLD-UPGRADES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Existing worlds

The separate Mineralogy piece add-on from the earlier local tests is no longer
needed. Use Building Pieces with Mineralogy instead. Its test-save piece IDs
are recovered automatically, including item stacks in chunks opened after the
first upgrade save. Counts, metadata, names and other item data are retained.
Do not load the old add-on jar alongside the new core.

Test this beta on a disposable copy, never the only copy of a world.

BuildingBricks 1.10.2-2.0.13 stores many pieces using generic block IDs and
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ release_enabled=true
curseforge_project_id=1754162
mod_name=Sky's Building Pieces
mod_license=LGPL-2.1-only
mod_version=0.3.6.112021
mod_version=0.3.7.112021
mod_group=zone.moddev.mc.skysbuildingpieces
mod_authors=SkyBlade1978
mod_description=Vanilla building pieces with ordinary crafting recipes and optional legacy world recovery. No world generation.
mod_description=Extra building shapes for vanilla materials, with built-in Mineralogy support when installed. No world generation.
17 changes: 17 additions & 0 deletions gradle/development-log4j2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level] [%logger]: %msg%n"/>
</Console>
<File name="DevelopmentLog" fileName="logs/latest.log" append="false">
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level] [%logger]: %msg%n"/>
</File>
</Appenders>
<Loggers>
<Root level="info">
<AppenderRef ref="Console"/>
<AppenderRef ref="DevelopmentLog"/>
</Root>
</Loggers>
</Configuration>
Loading
Loading