搜索历史
清空
暂无搜索历史
论坛热搜
1
【MC整合包发布】乌托邦探险之旅3.2
热
3
[1.6.4]上古老物 冒险者传说 by WhiteSword
新
5
[转载]洛心斗罗-福利|公会据点战|武魂||抽奖|最终版
2
[1.12.2]Jenny — 有趣的模拟女友模组|珍妮模组
热
4
幻虚斗罗V1.5[炫酷魂环][高级魂技][全模型贴图覆盖][超吸金]
6
[1.7.10] [HQM] [Mercury landing]水星迫降——在未知的世界中挣扎
登陆 注册 QQ登陆
快捷导航
查看: 22|回复: 0

[模组分享] 技能槽增强 (Skill Slots)-MOD模组

[复制链接]

5159

主题

5

回帖

6129

积分

龙❁妻

Rank: 8Rank: 8

经验
6129 EP
金粒
928 粒
绿宝石
20 块
爱心
0 点
发表于 2025-8-10 19:19:50 | 显示全部楼层 |阅读模式
技能槽增强 (Skill Slots)Github |相关wiki |源站链接支持: fabric , forge为模组和模组包添加基于物品的技能的玩家技能槽。您可以使用 KubeJS 或 Java 代码来创建自己的技能。

技能槽增强是一个为基于物品的技能添加玩家技能槽的模组。您可以使用 KubeJS 或 Java 代码来创建自己的技能。

功能介绍:

- 增加了玩家技能槽,用于装备基于物品的技能。
- 可以使用 KubeJS 或 Java 代码创建自定义技能。

使用方法:

- 使用 KubeJS 或 Java 代码将物品添加到技能槽。
- 可以设置已解锁的技能槽数量,也可以使用模组提供的槽解锁物品。

示例代码:

以下是使用 KubeJS 和 Java 代码添加和管理技能槽的示例:

// 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)
  }
})Copy已复制!

备注:

安装 JEI 后提供彩色按钮边框。

截图:



来自Modrinth所有游戏版本1.201.20.11.19.2所有类型fabricquiltforgeneoforge[Fabric 1.20.1] 2.1.1SkillSlots-1.20.1-Fabric-2.1.1.jar下载2.1.1+fabric#Release## 2.1.1- fix: Crashes when you die with an item in a skillslot thats on cooldown (close [#5](https://github.com/Snownee/SkillSlots/issues/5))## 2.1.0- feat: add `SkillSlots.IsUsing` tag to allow determining if the item is from skills## 2.0.2- fix: skill slot locking after going through neteher portal ([#3](https://github.com/Snownee/SkillSlots/issues/3))- fix: incorrect dependency on curseforge## 2.0.1- fix: crash on dedicated server ([#2](https://github.com/Snownee/SkillSlots/issues/2))展开版本: 2.1.1+fabric支持游戏: 1.20, 1.20.1类型:FabricQuiltRelease下载次数: 150[Forge 1.20.1] 2.1.1SkillSlots-1.20.1-forge-2.1.1.jar下载2.1.1+forge#Release## 2.1.1- fix: Crashes when you die with an item in a skillslot thats on cooldown (close [#5](https://github.com/Snownee/SkillSlots/issues/5))## 2.1.0- feat: add `SkillSlots.IsUsing` tag to allow determining if the item is from skills- 1.20 port## 1.0.6- fix: skill slot locking after going through neteher portal ([#3](https://github.com/Snownee/SkillSlots/issues/3))展开版本: 2.1.1+forge支持游戏: 1.20, 1.20.1类型:ForgeNeoForgeRelease下载次数: 204[Forge 1.20.1] 2.1.0SkillSlots-1.20.1-forge-2.1.0.jar下载2.1.0#Release## 2.1.0- feat: add `SkillSlots.IsUsing` tag to allow determining if the item is from skills- 1.20 port## 1.0.6- fix: skill slot locking after going through neteher portal ([#3](https://github.com/Snownee/SkillSlots/issues/3))展开版本: 2.1.0支持游戏: 1.20, 1.20.1类型:ForgeRelease下载次数: 490[Fabric 1.20.1] 2.1.0SkillSlots-1.20.1-fabric-2.1.0.jar下载2.1.0#Release## 2.1.0- feat: add `SkillSlots.IsUsing` tag to allow determining if the item is from skills## 2.0.2- fix: skill slot locking after going through neteher portal ([#3](https://github.com/Snownee/SkillSlots/issues/3))- fix: incorrect dependency on curseforge## 2.0.1- fix: crash on dedicated server ([#2](https://github.com/Snownee/SkillSlots/issues/2))展开版本: 2.1.0支持游戏: 1.20, 1.20.1类型:FabricRelease下载次数: 436[Forge 1.20.1] 2.0.2SkillSlots-1.20.1-forge-2.0.2.jar下载2.0.2#Release## 2.0.2- 1.20 port- .## 1.0.6- fix: skill slot locking after going through neteher portal (#3)展开版本: 2.0.2支持游戏: 1.20, 1.20.1类型:ForgeRelease下载次数: 88[Fabric 1.20.1] 2.0.2SkillSlots-1.20.1-fabric-2.0.2.jar下载2.0.2#Release## 2.0.2- fix: skill slot locking after going through neteher portal (#3)- fix: incorrect dependency on curseforge## 2.0.1- fix: crash on dedicated server (#2)展开版本: 2.0.2支持游戏: 1.20, 1.20.1类型:FabricRelease下载次数: 79[Fabric 1.19.2] 1.0.6SkillSlots-1.19.2-fabric-1.0.6.jar下载1.0.6#Release## 1.0.6- fix: skill slot locking after going through neteher portal (#3)- fix: incorrect dependency on curseforge展开版本: 1.0.6支持游戏: 1.19.2类型:FabricRelease下载次数: 177[Forge 1.19.2] 1.0.6SkillSlots-1.19.2-forge-1.0.6.jar下载1.0.6#Release## 1.0.6- fix: skill slot locking after going through neteher portal (#3)展开版本: 1.0.6支持游戏: 1.19.2类型:ForgeRelease下载次数: 1971.0.5SkillSlots-1.19.2-forge-1.0.5.jar下载1.0.5#Release展开版本: 1.0.5支持游戏: 1.19.2类型:ForgeRelease下载次数: 851.0.5SkillSlots-1.19.2-fabric-1.0.5.jar下载1.0.5#Release展开版本: 1.0.5支持游戏: 1.19.2类型:FabricRelease下载次数: 1112.0.1SkillSlots-1.20.1-fabric-2.0.1.jar下载2.0.1#Release## 2.0.1- fix: crash on dedicated server (#2)展开版本: 2.0.1支持游戏: 1.20, 1.20.1类型:FabricRelease下载次数: 1102.0.0SkillSlots-1.20.1-fabric-2.0.0.jar下载2.0.0#Release展开版本: 2.0.0支持游戏: 1.20, 1.20.1类型:FabricRelease下载次数: 931.0.4SkillSlots-1.19.2-forge-1.0.4.jar下载1.0.4#ReleaseNo changelog was specified.展开版本: 1.0.4支持游戏: 1.19.2类型:ForgeRelease下载次数: 901.0.4SkillSlots-1.19.2-fabric-1.0.4.jar下载1.0.4#ReleaseNo changelog was specified.展开版本: 1.0.4支持游戏: 1.19.2类型:FabricRelease下载次数: 84全部版本

markdown_parsed

文章类型:收录

layui.use([\'form\'], function(){
var form = layui.form;
});

游客,如果您要查看本帖隐藏内容请回复
技能槽增强
楼主 2025-8-10 19:19:50 回复 收起回复
小僵尸论坛感谢有你~
回复 论坛版权

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 手机动态码快速登录

本版积分规则



介绍

我的世界(Minecraft)小僵尸论坛
收录了来自各地的我的世界(MC)爱好者们的各种资源

须知: 切勿滥用举报,任何与举报相关的信息必须属实!

"Minecraft"以及"我的世界"为Mojang Synergies AB的商标 本站与Mojang以及微软公司没有从属关系

官方

新浪微博 腾讯微博 微信公众号 投稿规则 版权声明 捐助我们

官方QQ①群: 291907844 (点击加群)
官方QQ②群: 421312192
官方QQ③群: 528726532

我的世界(Minecraft)小僵尸论坛

新会员

QQ|Archiver|手机版|小黑屋|Minecraft(我的世界)小僵尸论坛 |网站地图

GMT+8, 2025-9-25 10:31 , Processed in 0.203667 second(s), 52 queries .

快速回复 返回顶部 返回列表