Kaya
Kaya(是 'kakayahan' 的缩写,这是 Tagalog 语中“能力/才能”的意思)是一个库,允许通过数据包将“能力”附加到实体上。这是 Apace 对 Apoli 项目的重写版本。
功能
- 类原版的上下文系统,允许某些类型之间相互连接。
- 数据驱动的能力,赋予实体特定的“能力”。这些能力为其他类型的运作提供所需的上下文。
- 动作和条件,利用上下文系统分别影响和检查世界对象的状态。
- 各种类型的值提供者,利用上下文系统提供动态值,例如为字段提供实体的属性值。
用法
对于玩家/整合包作者
您无需安装此库,因为绝大多数依赖项都会包含或要求它,但此库也可以作为独立模组正常运行。
对于开发者
-
使用 Modrinth Maven
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
filter {
includeGroup "maven.modrinth"
}
}
maven {
name = "QuiltMC"
url = "https://maven.quiltmc.org/repository/release"
}
maven {
name = "Xander Maven"
url = "https://maven.isxander.dev/releases"
}
maven {
name = "Terraformers"
url = "https://maven.terraformersmc.com/"
}
}
dependencies {
// 如果不希望 JiJ 该库,请移除 'include'
include(modImplementation("maven.modrinth:kaya:<version>"))
}
-
使用本地 Maven / 作为本地依赖
您可以克隆此仓库并运行 ./gradlew publishToMavenLocal。它会将制品发布到本地 Maven 下的 io.github.eggohito 组:
repositories {
mavenLocal()
maven {
name = "QuiltMC"
url = "https://maven.quiltmc.org/repository/release"
}
maven {
name = "Xander Maven"
url = "https://maven.isxander.dev/releases"
}
maven {
name = "Terraformers"
url = "https://maven.terraformersmc.com/"
}
}
dependencies {
// 如果不希望 JiJ 该库,请移除 'include'
include(modImplementation("io.github.eggohito:kaya:<version>"))
}
贡献
本项目使用 JDK 25(Fabric Loom 所需)和 Fabric Loom 1.19-SNAPSHOT。您可以使用 ./gradlew build 生成制品,并通过 ./gradlew runClient 或 ./gradlew runServer 运行客户端或服务器进行测试。客户端和服务器将分别使用 run/client 和 run/server 目录。
Kaya
Kaya (shortened form of 'kakayahan', which is the tagalog translation for 'capability'/'ability') is a library that allows attaching "powers" to entities via data packs. This is a rewrite of the Apoli project by Apace.
Features
- Vanilla-esque context system which allows for certain types to interconnect with each other.
- Data-driven powers which gives an entity a certain "ability" when granted. These provide the context needed by other types to function.
- Actions and conditions that uses the context system to affect and check the state of the objects of a world respectively.
- Value providers of various types that uses the context system to provide a dynamic value, like providing the attribute value of an entity for a field.
Usage
For players/mod pack authors
You don't have to install this library as most if not all dependents will include or require it, but this library will work fine as a standalone mod.
For developers
-
Using Modrinth Maven
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
filter {
includeGroup "maven.modrinth"
}
}
maven {
name = "QuiltMC"
url = "https://maven.quiltmc.org/repository/release"
}
maven {
name = "Xander Maven"
url = "https://maven.isxander.dev/releases"
}
maven {
name = "Terraformers"
url = "https://maven.terraformersmc.com/"
}
}
dependencies {
// Remove 'include' if you don't want to JiJ the library
include(modImplementation("maven.modrinth:kaya:<version>"))
}
-
Using local maven / as a local dependency
You can clone this repository and run ./gradlew publishToMavenLocal. It will publish the artifacts to the local maven and under the io.github.eggohito group:
repositories {
mavenLocal()
maven {
name = "QuiltMC"
url = "https://maven.quiltmc.org/repository/release"
}
maven {
name = "Xander Maven"
url = "https://maven.isxander.dev/releases"
}
maven {
name = "Terraformers"
url = "https://maven.terraformersmc.com/"
}
}
dependencies {
// Remove 'include' if you don't want to JiJ the library
include(modImplementation("io.github.eggohito:kaya:<version>"))
}
Contributing
This project uses JDK 25 (required by Fabric Loom) and Fabric Loom 1.19-SNAPSHOT. You can generate artifacts using ./gradlew build and run the client or server with ./gradlew runClient or ./gradlew runServer for testing. The client and server will use the run/client and run/server directories respectively.
评论 0
登录后参与评分
还没有评论,来抢沙发吧