Compare commits

..

2 Commits

Author SHA1 Message Date
thallada 70a6a2916e Move mod group to net.hallada 2026-05-09 14:49:15 -04:00
thallada 3167943b7e Resolve gravestone mod from curseforge maven 2026-05-09 14:44:48 -04:00
6 changed files with 50 additions and 24 deletions
+12 -6
View File
@@ -53,11 +53,17 @@ Then build the mod:
The output jar is at `build/libs/gravestone_sable_compat-1.0.0.jar`. The output jar is at `build/libs/gravestone_sable_compat-1.0.0.jar`.
If the Modrinth maven can't resolve `gravestone-mod` for your machine, drop If Curse Maven is unreachable from your build machine, drop
`gravestone-1.21.1-1.0.19.jar` (or any 1.21.1 build of gravestone) into a `gravestone-1.21.1-1.0.19.jar` (or any 1.21.1 build) into a `libs/` folder at
`libs/` folder at the project root, comment out the `compileOnly the project root, comment out the `compileOnly "curse.maven:gravestone-mod-..."`
"maven.modrinth:gravestone-mod:..."` line in `build.gradle`, and uncomment the line in `build.gradle`, and uncomment the `compileOnly fileTree(dir: 'libs',
`compileOnly fileTree(dir: 'libs', ...)` line. ...)` line.
To target a newer gravestone build, look up its CurseForge file ID at
[curseforge.com/minecraft/mc-mods/gravestone-mod/files](https://www.curseforge.com/minecraft/mc-mods/gravestone-mod/files)
(filter to 1.21.1) and update `gravestone_curse_file_id` in
`gradle.properties`. The mixin signature has been stable from 1.0.19 through
1.0.37, so any 1.21.1 build should work.
## Runtime requirements ## Runtime requirements
@@ -85,7 +91,7 @@ gravestone-sable-compat/
├─ build.gradle ├─ build.gradle
├─ gradle.properties ├─ gradle.properties
├─ settings.gradle ├─ settings.gradle
├─ src/main/java/com/example/gravestonesablecompat/ ├─ src/main/java/net/hallada/gravestonesablecompat/
│ ├─ GravestoneSableCompat.java # tiny @Mod entry point │ ├─ GravestoneSableCompat.java # tiny @Mod entry point
│ └─ mixin/DeathEventsMixin.java # the actual fix (one @WrapOperation) │ └─ mixin/DeathEventsMixin.java # the actual fix (one @WrapOperation)
└─ src/main/resources/ └─ src/main/resources/
+24 -11
View File
@@ -29,16 +29,19 @@ repositories {
} }
} }
// Modrinth maven (used for gravestone-mod jar to compile against). // Curse Maven used to fetch gravestone-mod by CurseForge file ID. The Modrinth
// maven was the obvious choice but it doesn't reliably serve POMs for gravestone
// 1.21.1 builds, which makes Gradle resolution fail with a 404. Curse Maven serves
// both the JAR and (synthesized) POM, so it just works.
exclusiveContent { exclusiveContent {
forRepository { forRepository {
maven { maven {
name = 'Modrinth' name = 'Curse Maven'
url = 'https://api.modrinth.com/maven' url = 'https://cursemaven.com'
} }
} }
filter { filter {
includeGroup 'maven.modrinth' includeGroup 'curse.maven'
} }
} }
} }
@@ -88,14 +91,24 @@ dependencies {
} }
} }
// Gravestone Mod — compile against the published jar from Modrinth. // Gravestone Mod via Curse Maven. The string format is:
// The shadowed jar contains relocated classes under de.maxhenkel.gravestone.* // curse.maven:<slug>-<projectId>:<fileId>
// We only reference de.maxhenkel.gravestone.events.DeathEvents (target) and // - <slug> = "gravestone-mod" (CurseForge URL slug)
// de.maxhenkel.gravestone.GraveUtils (referenced in @At target descriptor). // - <projectId> = 238551 (gravestone's CurseForge project ID — fixed for the project)
compileOnly "maven.modrinth:gravestone-mod:${gravestone_version}" // - <fileId> = the specific build's CurseForge file ID (changes per release)
//
// The default fileId 7099728 is the 1.21.1-1.0.19 NeoForge build, the same one
// used by the Corpse-Gravestone-Curios-Compat reference mod for 1.21.1. To use a
// newer 1.21.1 build, look it up at
// https://www.curseforge.com/minecraft/mc-mods/gravestone-mod/files (filter to 1.21.1)
// and copy the numeric ID from the file's URL into the gravestone_curse_file_id
// property in gradle.properties. The mixin will keep working as long as gravestone
// doesn't refactor DeathEvents.playerDeath's signature (stable through 1.0.37).
compileOnly "curse.maven:gravestone-mod-238551:${gravestone_curse_file_id}"
// Optional fallback if the modrinth jar can't be resolved: drop a gravestone JAR // Optional fallback if Curse Maven is unreachable from your network: drop a
// into a 'libs/' folder in this project root, then uncomment the next line. // gravestone JAR into a 'libs/' folder at the project root, comment out the
// compileOnly above, and uncomment this:
// compileOnly fileTree(dir: 'libs', include: ['*.jar']) // compileOnly fileTree(dir: 'libs', include: ['*.jar'])
} }
+9 -2
View File
@@ -17,10 +17,17 @@ mod_id=gravestone_sable_compat
mod_name=Gravestone Sable Compat mod_name=Gravestone Sable Compat
mod_license=MIT mod_license=MIT
mod_version=1.0.0 mod_version=1.0.0
mod_group_id=com.example.gravestonesablecompat mod_group_id=net.hallada.gravestonesablecompat
mod_authors=YourName mod_authors=YourName
mod_description=Places gravestones on the correct Sable sub-level (e.g. Create Aeronautics airships) when a player dies on one. mod_description=Places gravestones on the correct Sable sub-level (e.g. Create Aeronautics airships) when a player dies on one.
# Dependencies # Dependencies
sable_companion_version=1.6.0 sable_companion_version=1.6.0
gravestone_version=1.21.1-1.0.19
# Gravestone Mod is fetched via Curse Maven. Coord format:
# curse.maven:gravestone-mod-238551:<file_id>
# Find the file ID for the build you want at
# https://www.curseforge.com/minecraft/mc-mods/gravestone-mod/files (filter to 1.21.1)
# 7099728 = gravestone 1.21.1-1.0.19 (NeoForge), the build the reference compat mod
# Corpse-Gravestone-Curios-Compat targets for 1.21.1.
gravestone_curse_file_id=8056307
@@ -1,4 +1,4 @@
package com.example.gravestonesablecompat; package net.hallada.gravestonesablecompat;
import net.neoforged.fml.common.Mod; import net.neoforged.fml.common.Mod;
import org.slf4j.Logger; import org.slf4j.Logger;
@@ -8,7 +8,7 @@ import org.slf4j.LoggerFactory;
* Entry point for the Gravestone <-> Sable compatibility patch mod. * Entry point for the Gravestone <-> Sable compatibility patch mod.
* *
* <p>This mod has no runtime logic of its own the entire fix lives in * <p>This mod has no runtime logic of its own the entire fix lives in
* {@link com.example.gravestonesablecompat.mixin.DeathEventsMixin}, which redirects * {@link net.hallada.gravestonesablecompat.mixin.DeathEventsMixin}, which redirects
* gravestone's grave-placement target into the player's tracking sub-level when one * gravestone's grave-placement target into the player's tracking sub-level when one
* is present (e.g. a Create Aeronautics / Sable airship).</p> * is present (e.g. a Create Aeronautics / Sable airship).</p>
*/ */
@@ -1,6 +1,6 @@
package com.example.gravestonesablecompat.mixin; package net.hallada.gravestonesablecompat.mixin;
import com.example.gravestonesablecompat.GravestoneSableCompat; import net.hallada.gravestonesablecompat.GravestoneSableCompat;
import com.llamalad7.mixinextras.injector.wrapoperation.Operation; import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
import com.llamalad7.mixinextras.sugar.Local; import com.llamalad7.mixinextras.sugar.Local;
@@ -1,7 +1,7 @@
{ {
"required": true, "required": true,
"minVersion": "0.8.5", "minVersion": "0.8.5",
"package": "com.example.gravestonesablecompat.mixin", "package": "net.hallada.gravestonesablecompat.mixin",
"compatibilityLevel": "JAVA_21", "compatibilityLevel": "JAVA_21",
"refmap": "gravestone_sable_compat.refmap.json", "refmap": "gravestone_sable_compat.refmap.json",
"mixins": [ "mixins": [