介绍
中文介绍正在准备中,下面暂时显示原文。
tome
A barebone library for creating server-side skills. Provides basic frameworks for skill casting, cooldowns, and
containers. Does not include functional features like entity targeting.
Note: Until version 1.0.0, the API may change without prior notice.
Gradle Setup
Kotlin
repositories {
mavenCentral()
}
dependencies {
modImplementation("io.github.kouvali:tome:YOUR_VERSION")
}
Groovy
repositories {
mavenCentral()
}
dependencies {
modImplementation "io.github.kouvali:tome:YOUR_VERSION"
}
Usage
Here’s a quick example of skill creation:
Java
Skill<Vec3> exampleSkill = Skill.<Vec3>builder()
.setStateFactory(
SkillStateFactory.alwaysOk(context ->
context.getSource().getForward()
)
)
.setTickBehavior(instance -> {
instance.getSource().setDeltaMovement(instance.getState());
instance.getSource().hurtMarked = true;
})
.setCompleteBehavior(instance -> {
instance.getSource().setDeltaMovement(Vec3.ZERO);
instance.getSource().hurtMarked = true;
})
.setInterruptPredicate(instance ->
!instance.getSource().isInvulnerable()
)
.setDurationProvider(
SkillDurationProvider.constant(20)
)
.build();
Kotlin
val exampleSkill: Skill<Vec3> = Skill {
alwaysOkStateFactory {
source.forward
}
tickBehavior {
source.deltaMovement = state
source.hurtMarked = true
}
completeBehavior {
source.deltaMovement = Vec3.ZERO
source.hurtMarked = true
}
interruptPredicate {
!source.isInvulnerable
}
constantDurationProvider(20)
}
常见问题
tome 支持哪些 Minecraft 版本?
tome 支持 Minecraft Java 版 1.21.11–26.1.2,共 4 个版本,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。
tome 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅服务端。
Ghost 的其他作品
查看全部 →
Samurai Dynasty
by Ghost
这个模组灵感来源于日本民间传说和武士,将为游戏添加新的3D盔甲和武器。
63.5万
10 个月前
Modrinth
Harvestable Flowers
by Ghost
可采集花朵让你能通过对花朵使用骨粉来获取花朵。
60.4万
3 年前
Modrinth
Epic Knights’n’Mages – Forge
by Ghost
This is an Ars Nouveau addon, focused on adding new armors and Source Gem's to the game.
19万
2 年前
Modrinth
Regions Unexplored: Expansion
by Ghost
Remodels vanilla biomes to match the look of Regions Unexplored biomes
12.3万
1 年前
Modrinth
评论
登录后评论和评分