|
技能槽增强 (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
回复(0)
收起回复
|