HomeBedrockAddonsButton skill
Button skill
AddonsBedrock

Button skill

by YTAUN · on CurseForge

Transform a skill that requires multiple activation methods into one that only requires pressing a single button.

⬇ Download on CurseForge

The author built this one for Minecraft 26.30–26.40. On other versions it may install and then do nothing.

Button skill — screenshot 1

YTAUN Skill Buttons

Adds on-screen skill buttons for Minecraft Bedrock. Six buttons sit in an arc around the jump button: one dash, and five skill buttons that appear when you hold a weapon that has skills.

This is a base pack. On its own it gives you the dash plus skills on the vanilla swords. Other weapon addons can register their own skills, cooldowns and icons through two script events.

Companion weapon: Yamato Katana. All five buttons are wired up: Judgment Cut, Sin Stinger, Summoned Swords, Doppelganger and Devil Trigger, with different versions of each while Devil Trigger is active.


Features

Skills included on vanilla swords

Weapon Skill 1 Skill 2
Diamond Sword Whirlwind, a spinning slash around you Leap Strike, jump and slam the ground
Iron Sword Piercing Thrust, a long forward stab -

How the buttons use the hotbar

Bedrock gives scripts no way to detect a custom interface button. The only channel that can tell a script a button was pressed is the hotbar, so each button selects a hotbar slot and the script puts your selection straight back.

Nothing is deleted or dropped from your inventory.

While a skill weapon is in hand, tapping slots 4 to 8 on the hotbar also fires the skill, because a button press and a hotbar tap look the same to the script. Switch to slots 1 to 3 first and those slots behave normally.


For addon makers

A weapon addon can add its own buttons without editing this pack.

Register the weapon:

system.sendScriptEvent("ytsb:register", JSON.stringify({
  item: "yourpack:your_sword",
  skill1: { name: "Void Rift",   cooldown: 120 },  // ticks
  skill2: { name: "Reaper Spin", cooldown: 200 },
}));

Run the skill when its button is pressed:

system.afterEvents.scriptEventReceive.subscribe((ev) => {
  if (ev.id === "ytsb:ready") return register();   // Skill Buttons reloaded
  if (ev.id !== "ytsb:cast") return;
  const { player, item, skill } = JSON.parse(ev.message);
  // fire skill number `skill` for that player
}, { namespaces: ["ytsb"] });

Other options:

A working example is in the behaviour pack at examples/external_weapon_addon.js. The Yamato Katana script is a full reference.


Install

  1. Import the .mcaddon.
  2. Enable both the behaviour pack and the resource pack on your world.
  3. Needs Minecraft Bedrock 1.21.90 or newer. No experimental toggles.

Updating from an older version: remove the old behaviour pack and resource pack from the world first, because every release uses new UUIDs.

Configuration

BP/scripts/config.js holds the dash strength, cooldown, particle and sound, which hotbar slots the buttons use, and whether a weapon is moved out of its own skill slot.

Button layout, sizes and icon sets come from BP/build_ui.py. Edit the values at the top and run python3 build_ui.py to rebuild the interface.

The settings menu does not remember its layout after you rejoin. To set a permanent starting layout, edit RP/ui/_global_variables.json.

Credits

Made by YTAUN.

You can use this in your own weapon addons and modpacks. Please credit and link back. Bug reports and skill ideas are welcome.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Bedrock addons & mods walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more