Sprache

Skill Slots

Modrinth

Adds player skill slots for item-based skills for mods and modpacks

15.2k Downloads 20 Follower aktualisiert 15mo ago
neueste v2.1.1+fabric Modrinth
Fabric Forge Neoforge Quilt 1.19.2 – 1.20.1 Game-mechanicsLibrary

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.

Interested in supporting me and the development of mods? BisectHosting is the perfect solution. New customers can use the promotion code "snownee" to get a 25% discount on their first month of a gaming server. With 24/7 support and fast response times, you can expect top-notch service for all your gaming needs.

Versionen

Release
2.1.1+fabric
fabric, quilt · 1.20, 1.20.1 · 15mo ago
## 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 -…
402
Release
2.1.1+forge
forge, neoforge · 1.20, 1.20.1 · 15mo ago
## 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 -…
12.4k
Release
2.1.0
forge · 1.20, 1.20.1 · 28mo ago
## 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…
514
Release
2.1.0
fabric · 1.20, 1.20.1 · 28mo ago
## 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…
465
Release
2.0.2
forge · 1.20, 1.20.1 · 29mo ago
## 2.0.2 - 1.20 port - . ## 1.0.6 - fix: skill slot locking after going through neteher portal (#3)
111
Release
2.0.2
fabric · 1.20, 1.20.1 · 29mo ago
## 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…
108
Release
1.0.6
fabric · 1.19.2 · 29mo ago
## 1.0.6 - fix: skill slot locking after going through neteher portal (#3) - fix: incorrect dependency on curseforge
216
Release
1.0.6
forge · 1.19.2 · 29mo ago
## 1.0.6 - fix: skill slot locking after going through neteher portal (#3)
233
Release
1.0.5
forge · 1.19.2 · 33mo ago
109
Release
1.0.5
fabric · 1.19.2 · 33mo ago
127
Release
2.0.1
fabric · 1.20, 1.20.1 · 33mo ago
## 2.0.1 - fix: crash on dedicated server (#2)
132
Release
2.0.0
fabric · 1.20, 1.20.1 · 35mo ago
125

Kommentare 0

Noch keine Kommentare. Sei der Erste, der seine Meinung teilt.