Skip to main content

Forging Method

A forging method defines a single hammering operation that a player can perform while forging at the Forge Table: how far it moves the forging meter, what it costs and when it may be used.

File Location

Forging method JSON files go in data/<namespace>/mxt/forging_method/ within your data pack.

The filename corresponds to its ID. For example, data/example/mxt/forging_method/heavy_strike.json has the ID example:heavy_strike.

Fields

FieldTypeDefaultDescription
value_deltaIntegerrequiredThe forging meter shift. It must not be 0.
costsList<ResourceCost>[]The cost of each strike.
conditionEntityConditionmxt:always_trueThe condition for using this method.
display_iconIdentifiernoneThe item ID drawn as the icon in the interface.
cooldownInteger0The strike cooldown in ticks, range 0..72000. Consecutive strikes by the same player on the same Forge Table are rate-limited by the server.
soundSoundEvent IDminecraft:block.anvil.placeThe sound played at the Forge Table position when a strike with this method succeeds.

Sound

sound is played after the strike actually happens, for every player near the table rather than only for the one who struck, through the blocks volume channel, at volume and pitch 1.0. A rejected strike (not enough resources, condition not met, cooling down, out of range) plays nothing. The field is resolved to a sound event by its ID at load time, so a wrong ID rejects that entry instead of loading a method that never makes a sound.

Silent methods

Write minecraft:intentionally_empty (the vanilla empty sound) for a method that should produce no sound at all.

Example

{
"value_delta": 2,
"costs": [{ "id": "mxt_test:spirit_power", "amount": 1 }],
"condition": { "type": "mxt:health", "comparison": ">=", "compare_to": 1 },
"display_icon": "minecraft:iron_ingot",
"cooldown": 10,
"sound": "minecraft:block.anvil.land"
}

Methods are unlocked by tools, which reference them through Tool Binding, and are accepted by a blueprint through its allowed_methods list in Forging Blueprint.