Mineral Fountain Chance Recipe
This recipe converts blocks with a probability in a specified dimension.
Basic Structure
js
ServerEvents.recipes(event => {
event.custom({
type: "anvilcraft:mineral_fountain_chance",
dimension: "minecraft:overworld",
from_block: "minecraft:stone",
to_block: "minecraft:diamond_ore",
chance: 0.05
})
})Field Description
type: Fixed valueanvilcraft:mineral_fountain_chancedimension: Target dimension (resource location)from_block: Source block predicateto_block: Destination blockchance: Probability (0.0 ~ 1.0)
KubeJS Style Builder
js
ServerEvents.recipes(event => {
event.recipes.anvilcraft.mineral_fountain_chance()
.dimension("minecraft:overworld")
.fromBlock("minecraft:stone")
.toBlock("minecraft:diamond_ore")
.chance(0.05)
})Notes
- Use decimal probability values, e.g.
0.1for 10% - The recipe only works in the specified
dimension