Repository navigation
Hephaestus Tools
These commands only exist when Hephaestus Tools is installed.
Tested against Hephaestus Tools 1.0.3 for 1.21.1.
Tool materials: their stats, color and ingredient. The mod reads them from data files, and
HT.material(...) writes those files for you.
Part casting and melting already work with the Forge recipes, see Hephaestus Forge.
Materials need ServerEvents.generateData('after_mods', ...), not ServerEvents.recipes.
ServerEvents.generateData('after_mods', event => {
HT.material('hephaestus_tools:iron')
.ingredient('minecraft:iron_ingot')
.color(0xD8D8D8)
.head({ durability: 400, mining_speed: 6.5, attack_damage: 2, attack_speed: 1, tier: 2, enchantability: 14, trait: 'magnetic' })
.handle({ durability_mult: 0.1 })
.binding({ durability: 75 })
.register(event)
})- If the id belongs to an existing material (like
hephaestus_tools:iron), it replaces it. - If the id is new, it adds a material.
- Use the
hephaestus_tools:namespace. Casting finds the material from the fluid name (molten_<name>becomeshephaestus_tools:<name>), so other namespaces can't be cast.
| Method | What it does |
|---|---|
.ingredient(item) |
item or tag that counts as this material, e.g. '#c:ingots/iron'
|
.color(0xRRGGBB) |
tint used on the parts |
.head({...}) |
head stats |
.handle({...}) |
handle stats |
.binding({...}) |
binding stats |
.register(event) |
adds the material, call it last |
Head
| Key | Meaning |
|---|---|
durability |
durability |
mining_speed |
mining speed |
attack_damage |
attack damage |
attack_speed |
attack speed |
tier |
mining tier: 0 wood, 1 stone, 2 iron, 3 diamond, 4 gold, 5 netherite |
enchantability |
enchantability |
trait |
special ability, see the list below |
Handle: durability_mult, speed_mult, damage_mult, attack_speed_mult.
These are multipliers, so 0.1 means +10%.
Binding: durability, a flat bonus.
A key that isn't in these lists throws an error, so typos show up right away.
lightweight, featherweight, solid, dense, heavy, dwarven, stonebound,
maintained, smite, jagged, pierce, cultivated, magnetic, shock, temperate
An unknown trait only gives a warning in the log, and the mod ignores it.
A new material also needs a fluid called <namespace>:molten_<name> if you want to cast its
parts. This addon doesn't create fluids, so for now a new material works best as a
replacement of an existing one.
In Hephaestus Tools 1.0.3 these are written in Java inside the mod:
- new traits (they are a fixed list)
- tool upgrades and modifiers
- new tool types
- damage per tool type
The part_builder, tool_building and modifier recipe types exist, but the mod doesn't use
them yet, so there are no scripts for them here. If a newer Tools version starts using them,
they can be added.