Skip to main content

Forging Blueprint

A forging blueprint describes one item that can be forged at the Forge Table: which materials the table must hold, which methods are allowed, what the forging meter has to reach and what quality the extra steps buy.

File Location

Forging blueprint JSON files go in data/<namespace>/mxt/forging_blueprint/ within your data pack.

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

Fields

FieldTypeDefaultDescription
inputList<ForgingMaterial>requiredUnordered material requirement; each entry is { "id": <item ID>, "count": <count> }, where count defaults to 1.
allowed_methodsHolderSet<forging_method>emptyThe forging methods this blueprint allows. You may write a list of IDs, a single "#namespace:tag", or omit the field entirely. Omitting it or writing an empty list means no restriction, and the usable methods are decided entirely by the tools.
meter_min / meter_maxIntegerrequiredThe forging meter bounds. They must cross 0.
target_min / target_maxIntegerrequiredThe success range. It must lie inside the meter bounds.
finish_patternObjectempty patternThe last six steps pattern.
max_stepsIntegernoneThe maximum number of steps. If it is omitted, this blueprint can never fail because of the step count.
quality_by_extra_stepsList<QualityThreshold>requiredAn ascending map from extra steps to quality. The last entry must be 2147483647.
resultIdentifierrequiredThe item ID produced on success.
complete_actionEntityActionmxt:no_opThe action run on success.
fail_actionEntityActionmxt:no_opThe action run on failure.
failure_settlementObjectdestroy inputThe return and material loss on failure.

Input

input is order-independent: the Forge Table only requires that the 15 input slots together hold the declared count of every entry, and which slots the materials come from does not affect the check. Datapack loading rejects an empty list, more than 15 entries, the same item appearing twice and item IDs that cannot be resolved. Because native datapack registries are parsed before item component bindings, input uses id + count instead of an ItemStack.

Finish Pattern

finish_pattern has the fields steps (six forging methods) and required_suffix_steps (0..6). When required_suffix_steps > 0 you must provide all six steps. Only the last N entries of steps are checked; the first 6-N entries are neither shown nor checked, and in the interface they are barrier slots. Success requires the final value to fall inside the target range and the required trailing steps to match exactly; the number of extra steps decides the quality.

Step Limit

max_steps is the only source of failure: once it is defined, reaching that step count without meeting the completion conditions fails the attempt. When it is not defined, the player can keep striking until the conditions are met.

Example

{
"input": [
{ "id": "minecraft:iron_sword", "count": 1 }
],
"allowed_methods": [
"mxt_test:heavy_strike", "mxt_test:light_strike", "mxt_test:draw_out", "mxt_test:flatten",
"mxt_test:quench", "mxt_test:temper", "mxt_test:fold", "mxt_test:punch", "mxt_test:grind", "mxt_test:polish"
],
"meter_min": -10,
"meter_max": 10,
"target_min": 2,
"target_max": 4,
"finish_pattern": {
"steps": [
"mxt_test:heavy_strike", "mxt_test:light_strike", "mxt_test:heavy_strike",
"mxt_test:light_strike", "mxt_test:light_strike", "mxt_test:heavy_strike"
],
"required_suffix_steps": 3
},
"max_steps": 32,
"quality_by_extra_steps": [
{ "max_extra_steps": 0, "quality": "mxt_test:excellent" },
{ "max_extra_steps": 5, "quality": "mxt_test:normal" },
{ "max_extra_steps": 2147483647, "quality": "mxt_test:poor" }
],
"result": "minecraft:iron_sword",
"complete_action": { "type": "mxt:add_resource", "resource": "mxt_test:true_essence", "amount": 5 },
"fail_action": { "type": "mxt:apply_effect", "effect": "minecraft:weakness", "duration_ticks": 100 },
"failure_settlement": { "result": "minecraft:iron_nugget", "input_return_ratio": 0.25, "material_loss_ratio": 0.75 }
}

The methods it names are defined by Forging Method, made available by the tools in Tool Binding, offered to the player through Blueprint Binding, and its quality ladder points at entries of Item Quality.