Custom Anvil Crushing Recipes - DaFuqs/Spectrum GitHub Wiki
Anvil Crushing recipes are "crafted" by dropping an item stack on the ground and letting an anvil fall on it. The anvil may get damaged in the process depending on fall height, just like in vanilla. Multiple items can be crushed at once.
Properties
Entry | Type | Default | Description |
---|---|---|---|
group | string | empty | A string that represents a recipe group. Recipes with a common group will only trigger a single unlock popup if multiple are unlocked at once. Add a localization string recipeGroup.spectrum.<<your_group_string>> so the toast popup is properly localized |
secret | boolean | false | If true, the recipe will never be listed in recipe listing mods, like REI |
required_advancement | advancement_identifier | empty | The advancement a player needs to have to be able to see this recipe. Spectrum will automatically show a toast to the player when this advancement has been unlocked and reached the set tier |
ingredient | ingredient | The ingredient getting crushed | |
crushedItemsPerPointOfDamage | float | How much anvil damage is needed to crush 1 ingredient item. If the damage exceeds this value, a single anvil fall can convert more than 1 ingredient at once | |
experience | float | How much experience should be spawned per 1 crushed ingredient | |
particleEffectIdentifier | particle_effect_identifier | The particle effect that should play | |
particleCount | int | 1 | The amount of particles spawned on crushing |
soundEventIdentifier | sound_event_identifier | The sound that should play | |
result | item_stack | Output item stack, supports NBT |
Example: Crushing 1 blaze rod into 4 blaze powder with an anvil
{
"type": "spectrum:anvil_crushing",
"ingredient": {
"item": "minecraft:blaze_rod"
},
"crushedItemsPerPointOfDamage": 2,
"experience": 0.0,
"result" : {
"item": "minecraft:blaze_powder",
"count": 4
},
"particleEffectIdentifier": "lava",
"particleCount": 3,
"soundEventIdentifier": "block.stone.break"
}