Repository navigation
Build the mod for fabric 1.21.1 from the shared sources - #59
Merged
Merged
Conversation
macmv
force-pushed
the
worktree-stonecutter-1-21
branch
from
October 22, 2026 18:52
9302e40 to
baa882f
Compare
ForgeGradle 6 refuses to run on Gradle 9, so mod-v12 gets its own wrapper pinned to Gradle 8. This lets the root build update independently.
The root build now runs on Gradle 9 with the latest Stonecutter and Loom, since mod-v12 is a separate build. The v12-to-fabric transformer runs once in the stonecutter controller and writes src/generated/java, which stonecutter then processes for each version. Needs Java 25+ to run gradle.
Stonecutter only processes src/main/java, and leaves the active version alone. So the transformer now writes into src/main/java (ignored by git, with a manifest to clean up), and 1.12.2 is a placeholder active version so that every real version gets processed.
A stonecutter flag (vanilla_moss, from 1.17) picks between vanilla's moss and our own MossBlock/MossCarpet. Vanilla blocks are recorded as aliases of the rgen: names, and the rust block lookup goes through RBlocks.byName, so the terrain generator can keep placing rgen:mossy_block everywhere.
…use a separate java for the game
…2 when building mod-v12
…w blockstate paths GraveDirtBlock has a handwritten fabric version, and the transformer drops the BlockDirt import. Main's burned tree and grave dirt blockstates now name their models with the full block/ path. The fabric build now puts the generated lang and item models in the processed resources, since adding them to the run classpath had no effect.
macmv
force-pushed
the
worktree-stonecutter-1-21
branch
from
October 30, 2026 00:39
baa882f to
613038b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Gets the mod building and loading on fabric 1.21.1, from the same
common/sources as 1.12.mod-fabricis a stonecutter project with one version (1.21.1) for now. The generated sources are in their 1.12 state, so there is no active version.v12-to-fabrictranslatescommon/into yarn sources before stonecutter runs. It renames classes and imports, drops methods that only exist in 1.12 (leaving a// v12-to-fabric: droppednote), and adds the modern arguments and constructors.mod-fabric/src/main/java(allow-listed in its.gitignore):RGen,BlockSettings,compat/, the four items, and the data generator.common/are now in the modern layout (textures/block,textures/item, blockstates with full model paths).mod-v12/assets.gradleconverts them back when building the 1.12 mod. Fabric uses them as they are.runDatagen), checked in undermod-fabric/src/main/generated.mod-v12is its own gradle build (ForgeGradle can't use Gradle 9). The root build is the fabric mod and needs Java 25 or newer.Not done
only v12.grep -r "v12-to-fabric: dropped" mod-fabric/src/main/javalists them.//? if >=1.21.2code is still there for when it comes back.For people working on 1.12
mod-v12/(own wrapper). The root./gradlewis the fabric build now.common/files are transformed for fabric. Add// # only v12 #to the top of a file that fabric can't use. Methods named like a 1.12-only method (seedrop_methodsinv12-to-fabric/src/main.rs) are dropped on fabric.LeavesBlock,Sapling,RBlocksandRItemshave small signature changes, see the diff.Testing
./gradlew :mod-fabric:1.21.1:buildpasses, and a dedicated 1.21.1 server started with the mod and registered everything.mod-v12build after these changes, and the mod in a client.docs/block_guide.mdand the build commands indocs/advanced_setup.mdstill describe the old layout.