Repository navigation
Stat Types
hp-1e edited this page Oct 31, 2026
·
2 revisions
English | 中文
Tinkers parts read their numbers from a material stat type: pick heads use head, handles use handle, bow limbs use limb, and so on. This mod lets you register new stat types and pair them with Parts to create parts with entirely new stats.
ArsenalMaterialEvents.statTypes(event => {
event.create('kubejs:blade')
.field('sharpness', 'attack_damage', 'base', 0)
.field('balance', 'attack_speed', 'percent', 0)
.field('durability', 'durability', 'base', 1)
.textureLike('head')
.name('zh_cn', '刃身')
})| Method | Description |
|---|---|
event.create(id) |
Stat type ID. Must use your own namespace, not tconstruct:
|
.field(name, toolStat, operation, default) |
Adds a field, in order. Names use lowercase letters, digits and _. The tool stat gets tconstruct: when no namespace is given and must be numeric. The default is used when a material omits the field |
.textureLike(statType) |
Which existing stat type these parts count as for texture generation, head by default. A material's .generator that supports that type also generates textures for these parts |
.name(lang, text) |
Display name; English defaults to the ID path |
| Value | Meaning | Tinkers example |
|---|---|---|
base |
Base value from the part, averaged across parts of the same kind | Head durability and attack |
add |
Added to the base value | Grip accuracy |
percent |
Percentage bonus, 0.1 means +10% |
Handle durability and attack speed |
multiply |
Multiplier | — |
The part's weight on the tool still applies: every field is multiplied by the part scale.
ArsenalMaterialEvents.data(event => {
// New material
event.create('kubejs:mithril')
.head(800, 9, 'minecraft:diamond', 3)
.customStat('kubejs:blade', 4, 0.1, 600) // in .field order: sharpness, balance, durability
// Existing Tinkers material
event.extend('tconstruct:iron')
.customStat('kubejs:blade', 2, 0, 250)
})The number of values must match the fields. Only materials with this stat can make parts bound to this stat type.
- Tooltips and the Tinker Station show each field as its tool stat name and value.
add,percentandmultiplyuse the colored Tinkers bonus format. - Tinkers books get one material section per stat type. The section is titled with the stat type name and has one page per material with that stat. Each book covers the same tiers as Tinkers does:
| Book | Materials |
|---|---|
| Materials and You | Tier 0–1 |
| Puny Smelting | Tier 2 |
| Mighty Smelting | Tier 3 |
| Encyclopedia of Tinkering | All |
No section is created when no material has the stat.