Hand

Hand is a metapackage that provides a way to trigger actions from the quick actions menu.

Requirements

Contents

Dialogs:

name description
hand:quick_actions Accessible via Quick Actions Button.

Usage

When pressing the Quick Actions Button (by default 'G' on QWERTY) you are prompted with a menu to select your "game mode".

The menu has ten different buttons that are, by default, unset except the first one that results in the "Normal" mode for vanilla play.

Other packs can register themselves so when a mode is selected, one of the player's hands will be filled with an specific item if it's not already holding a regular one; these items are considered "actions" and have different results when used on mobs and blocks.

To register a pack, run a function with the #hand:load tag that executes some code like this:

data modify storage wishlist:hand modes[SLOT] set value {\
    slot: "minecraft:mainhand",\
    predicate: "item_model=\"foo:foo\"",\
    loot_table: "foo:foo",
    }

Where SLOT is a fixed number in the 1..9 range. This will erase items matching the predicate from your inventory, and instead add the result of the given loot table to the chosen inventory slot (usually mainhand).

In addition to this you must define the dialog.wishlist.hand.SLOT string in a language file; this will be the name of the mode in the Quick Actions Menu.

Overhead

Every tick, checks all players:

Known Issues

The items can be thrown and they will stack on the floor. They can't be picked up, but there are ways of storing them into containers via the use of hoppers.