截图
介绍
中文介绍正在准备中,下面暂时显示原文。
Skill Slots is a mod that adds player skill slots for item-based skills. You can use KubeJS or Java code to create your
own skills.
// priority: 0
// Server script
// Make your item can be put in skill slots
// If the item already has a right-click function, the skill already works now
ServerEvents.tags('item', event => {
event.add('skillslots:skill', 'minecraft:diamond')
})
// Of course, you can use KubeJS to create an item, and add some fancy right-click function to it
ItemEvents.rightClicked('minecraft:diamond', event => {
event.player.tell('You right clicked a diamond!')
// Cooldown, works
event.player.addItemCooldown(event.item, 60)
})
// This event will also be called when using the skill
BlockEvents.rightClicked(event => {
// Check the item cooldown by yourself
event.player.tell('You right clicked a block!')
})
// Here you will know how to get access to the skill slots from a player
ItemEvents.rightClicked('minecraft:emerald', event => {
let handler = Java.loadClass('snownee.skillslots.SkillSlotsHandler').of(event.player)
let diamond = Item.of('minecraft:diamond')
// Here are some NBT options to customize the skill
diamond.nbt = {}
diamond.nbt.SkillSlots = {
UseDuration: 20,
IconScale: 1.5,
// CanBeToggled: true, // make your skill work as a passive skill. the player can toggle it on/off
ChargeCompleteSound: 'minecraft:entity.player.levelup', // leave it empty to mute
}
// In config, you can disable the player ability to change skills
// Here is an example to change the skill through KubeJS
handler.setItem(0, diamond)
// Example of checking if the player has a skill that can be toggled and currently activated
let index = handler.findActivatedPassiveSkill(skill => skill.item.id === 'minecraft:diamond')
if (index !== -1) {
let skill = handler.skills.get(index)
event.player.tell(skill.item.id)
}
})
You can use handler.setSlots(int) to set the amount of the unlocked slots, or use the Slot Unlock item provided by this mod.
The colored button border is provided only when JEI is installed.
常见问题
Skill Slots 支持哪些 Minecraft 版本?
Skill Slots 支持 Minecraft Java 版 1.19.2–1.20.1,共 3 个版本,可用的加载器:Fabric / Forge / NeoForge / Quilt。下载时注意选择和你游戏版本一致的文件。
Skill Slots 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / Forge / NeoForge / Quilt,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端和服务端都要装。
Snownee 的其他作品
查看全部 →Jade 🔍
by Snownee
显示你所注视方块的信息。(Hwyla/Waila 的 Minecraft 1.16+ 分支)
3.6亿
21 天前
Modrinth · CurseForge
Kiwi 🥝 (Neo/Forge)
by Snownee
Minecraft 模组开发库
9834万
17 天前
CurseForge
Jade Addons (Neo/Forge)
by Snownee
Jade 🔍 的 Neo/Forge 额外模组支持
783万
1 个月前
CurseForge · Modrinth
Snow! Real Magic! ⛄ (Neo/Forge)
by Snownee
不是魔法模组。| 雪的重力与堆积 | 积雪方块 | 调整雪的行为
7446万
3 天前
CurseForge

评论
登录后评论和评分