https://modrinth.com/mod/breakfree

feat: neoforge support?

+67 -18
+20 -5
build.gradle
··· 3 3 id 'maven-publish' 4 4 } 5 5 6 - version = project.mod_version 6 + version = project.version 7 7 group = project.maven_group 8 8 9 9 base { ··· 12 12 13 13 dependencies { 14 14 minecraft "com.mojang:minecraft:${project.minecraft_version}" 15 - implementation "net.fabricmc:fabric-loader:${project.loader_version}" 15 + implementation "net.fabricmc:fabric-loader:${project.fabric_loader_version}" 16 16 } 17 17 18 18 processResources { 19 - inputs.property "version", project.version 19 + var expandProps = [ 20 + "mod_id": project.archives_base_name, 21 + "name": project.name, 22 + "description": project.description, 23 + "version": project.version, 24 + "author": project.author, 25 + "license": project.license, 26 + "home_url": project.home_url, 27 + "repo_url": project.repo_url, 28 + "issues_url": project.issues_url, 29 + "discord_url": project.discord_url, 30 + "fabric_mc_version_range": project.fabric_mc_version_range, 31 + "neoforge_mc_version_range": project.neoforge_mc_version_range, 32 + ] 20 33 21 - filesMatching("fabric.mod.json") { 22 - expand "version": inputs.properties.version 34 + filesMatching(["fabric.mod.json", "neoforge.mods.toml"]) { 35 + expand expandProps 23 36 } 37 + 38 + inputs.properties(expandProps) 24 39 } 25 40 26 41 tasks.withType(JavaCompile).configureEach {
+14 -2
gradle.properties
··· 5 5 # Fabric Properties 6 6 # check these on https://fabricmc.net/versions.html 7 7 minecraft_version=26.1-snapshot-1 8 - loader_version=0.18.3 8 + fabric_loader_version=0.18.3 9 9 loom_version=1.14-SNAPSHOT 10 10 11 11 # Mod Properties 12 - mod_version=1.4.0 13 12 maven_group=dev.potota 14 13 archives_base_name=breakfree 14 + 15 + # Metadata 16 + name=Break Free 17 + description=Keep breaking blocks when you switch tools! 18 + version=1.5.0 19 + author=Potota 20 + license=unlicense 21 + home_url=https://modrinth.com/mod/breakfree 22 + repo_url=https://tangled.org/potota54.bsky.social/minecraft-breakfree 23 + issues_url=https://tangled.org/potota54.bsky.social/minecraft-breakfree/issues 24 + discord_url=https://discord.gg/PKK2RkNhYd 25 + fabric_mc_version_range=>=26.1-alpha.1 26 + neoforge_mc_version_range=[21.6-snapshot-1,)
+22
src/main/resources/META-INF/neoforge.mods.toml
··· 1 + license="${license}" 2 + 3 + displayURL="${home_url}" 4 + 5 + [[mods]] 6 + modId="${mod_id}" 7 + version="${mod_version}" 8 + displayName="${name}" 9 + authors="${author}" 10 + description="${description}" 11 + issueTrackerURL="${issues_url}" 12 + updateJSONURL="https://api.modrinth.com/updates/${mod_id}/forge_updates.json?neoforge=include" 13 + 14 + [[mixins]] 15 + config="${mod_id}.mixins.json" 16 + 17 + [[dependencies.${mod_id}]] 18 + modId="minecraft" 19 + type="required" 20 + versionRange="${neoforge_mc_version_range}" 21 + ordering = "NONE" 22 + side = "CLIENT"
+11 -11
src/main/resources/fabric.mod.json
··· 1 1 { 2 2 "schemaVersion": 1, 3 - "id": "breakfree", 3 + "id": "${mod_id}", 4 4 "version": "${version}", 5 - "name": "Break Free", 6 - "description": "Allows you to keep breaking blocks when you switch tools.", 7 - "authors": ["Potota"], 5 + "name": "${name}", 6 + "description": "${description}", 7 + "authors": ["${author}"], 8 8 "contact": { 9 - "homepage": "https://modrinth.com/mod/breakfree", 10 - "sources": "https://tangled.org/potota54.bsky.social/minecraft-breakfree", 11 - "issues": "https://tangled.org/potota54.bsky.social/minecraft-breakfree/issues", 12 - "discord": "https://discord.gg/PKK2RkNhYd" 9 + "homepage": "${home_url}", 10 + "sources": "${repo_url}", 11 + "issues": "${issues_url}", 12 + "discord": "${discord_url}" 13 13 }, 14 - "license": "unlicense", 14 + "license": "${license}", 15 15 "icon": "assets/breakfree/icon.png", 16 16 "environment": "client", 17 17 "entrypoints": { ··· 21 21 ], 22 22 "depends": { 23 23 "fabricloader": ">=0.18.0", 24 - "minecraft": ">=26.1-alpha.1", 25 - "java": ">=21" 24 + "minecraft": "${fabric_mc_version_range}", 25 + "java": ">=25" 26 26 } 27 27 }