tome
一个用于创建服务端技能的极简库。提供了技能施放、冷却时间和容器的基础框架。不包含实体瞄准等功能性特性。
注意:在 1.0.0 版本之前,API 可能会在未提前通知的情况下发生变更。
Gradle 配置
Kotlin
repositories {
mavenCentral()
}
dependencies {
modImplementation("io.github.kouvali:tome:YOUR_VERSION")
}
Groovy
repositories {
mavenCentral()
}
dependencies {
modImplementation "io.github.kouvali:tome:YOUR_VERSION"
}
用法
以下是一个快速创建技能的示例:
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
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)
}
版本游戏版本平台发布时间本站下载
正式版
0.48.0
v0.48.0
26.1.2 Fabric 6 个月前 ·
0
26.1.2
Fabric
6 个月前
0
下载 tome
正式版
0.47.0
v0.47.0
26.1.2 Fabric 6 个月前 ·
0
26.1.2
Fabric
6 个月前
0
下载 tome
正式版
0.46.0
v0.46.0
26.1.2 Fabric 7 个月前 ·
0
26.1.2
Fabric
7 个月前
0
下载 tome
正式版
0.45.0
v0.45.0
26.1.2 Fabric 7 个月前 ·
0
26.1.2
Fabric
7 个月前
0
下载 tome
正式版
0.44.0
v0.44.0
26.1.2 Fabric 7 个月前 ·
0
26.1.2
Fabric
7 个月前
0
下载 tome
正式版
0.43.0
v0.43.0
26.1.2 Fabric 7 个月前 ·
0
26.1.2
Fabric
7 个月前
0
下载 tome
正式版
0.42.0
v0.42.0
26.1.2 Fabric 7 个月前 ·
0
26.1.2
Fabric
7 个月前
0
下载 tome
正式版
0.41.0
v0.41.0
26.1.1 Fabric 7 个月前 ·
0
26.1.1
Fabric
7 个月前
0
下载 tome
正式版
0.40.0
v0.40.0
26.1 Fabric 7 个月前 ·
0
26.1
Fabric
7 个月前
0
下载 tome
正式版
0.39.0
v0.39.0
26.1-rc-2 Fabric 7 个月前 ·
0
26.1-rc-2
Fabric
7 个月前
0
下载 tome
0.48.0
正式版
2026-05-08
未指定更新日志。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
Woot Revived
pharuxtan
一个用于收集生物掉落物的多区块模组。
生物科技
349
模组
玉Jade ?
Snownee
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
实用前置
339
模组
物品管理器Just Enough Items (JEI)
mezz
查看物品与配方
前置实用
239
模组
KubeJS
Lat
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
前置实用
239
模组
AAA Particles
ChloePrime
适用于 MC 1.18+ 的 Effekseer 加载器
前置装饰
186
模组
WTHIT
deirn
那是什么?一个 Waila/Hwyla 的分支。
前置实用
165
评论 0
登录后参与评分
还没有评论,来抢沙发吧