Warning: file_put_contents(/www/wwwroot/nmbt.106988770/cache/modrinth_versions_irp22K8O.json): Failed to open stream: Permission denied in /www/wwwroot/nmbt.106988770/resource_detail.php on line 53
Hearty - 墨喵 Minecraft 资源
Hearty 图标

Hearty

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 neoforge-1.21.1-1.3.0
本资源为搬运资源,原资源地址: https://modrinth.com/mod/hearty
资源信息

Minecraft 版本: 1.21.1

平台: neoforge

标签: game-mechanics library utility

资源介绍

Hearty

A NeoForge mod that provides several features that change how health is displayed in Minecraft.

For modders

Adding to existing Gradle project

Insert the following block inside your build.gradle or build.gradle.kts's repositories block.

maven {
    name = "GPR for Hearty"
    url = uri("https://maven.pkg.github.com/zygzaggaming/hearty")
    credentials {
        username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_ACTOR")
        password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
    }
}

Then, configure the gpr.user and gpr.key Gradle properties to your GitHub username and a personal access token with read:packages access.
It is HIGHLY recommended to keep these properties in your global gradle.properties file (<user>\.gradle\gradle.properties) rather than your project's gradle.properties.

If you use GitHub Actions to build your mod, the fallback GITHUB_ACTOR and GITHUB_TOKEN environment variables are already set, so don't worry about remote builds failing from lack of authentication.

Then, in the same build.gradle(.kts), add the following line in your dependencies block:

localRuntime(variantOf(libs.hearty) { classifier("all") })

And in your gradle\libs.versions.toml:

[versions]
hearty = { strictly = "[<min-version>,<max-version>)", prefer = "latest.release" }

[libraries]
hearty = { id = "io.github.zygzaggaming.hearty.mod", name = "hearty", version.ref = "hearty" }

Using the API directly

Importing the Hearty mod directly also imports the API by extension. However, if you want your mod to interact with Hearty without packaging it as a dependency, you'll need to import the API directly.

To import the API, add this block in the same place as above:

maven {
    name = "GPR for Hearty"
    url = uri("https://maven.pkg.github.com/zygzaggaming/hearty")
    credentials {
        username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_ACTOR")
        password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
    }
}

Anywhere top-level in your build.gradle(.kts) add the line jarJar.enable() to enable Jar-in-Jar to package the API into your mod when it's built.
build.gradle(.kts) dependencies:

jarJar(group: 'io.github.zygzaggaming.hearty.api', name: 'hearty-api', version: '[<min-version>, <max-version>)') {
    jarJar.pin(it, '<chosen-version>')
}
implementation libs.hearty.api

gradle\libs.versions.toml:

[versions]
hearty-api = { strictly = "[<min-version>,<max-version>)", prefer = "latest.release" }

[libraries]
hearty-api = { id = "io.github.zygzaggaming.hearty.api", name = "hearty-api", version.ref = "hearty-api" }
下载与版本
评论(0)
请 登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

赞助作者

请 登录 后赞助作者。

🔥 相关推荐
OptimizerX

价格:0 墨喵币
下载量:0

查看详情
PlayerLimiter

价格:0 墨喵币
下载量:0

查看详情
Animageddon: Mob Overhaul

价格:0 墨喵币
下载量:0

查看详情
Weather Campfire

价格:0 墨喵币
下载量:0

查看详情