Customization
Editing existing content
By default, Little Joys ships with event definitions for Vanilla content as well as some popular mods: Dig Spots for naturally generated surface blocks, Drop Rushes for typical crops, Gold Rushes for ores, and a Fishing Spot definition for water.
These definitions can be manipulated through data packs or other customization mods just the same way you would modify a recipe.
You can find the default recipes in the GitHub repository.
Additionally, the mod comes with loot tables for all dig spots and fishing spots, also found on the GitHub repository for reference.
Adding additional content
You can also add additional event definitions in the same manner. Recipes can be weighted and the mod randomly picks one matching recipe for the given location and context.
Dig Spots
{
"type": "littlejoys:dig_spot",
"eventCondition": {
"type": "above_state",
"state": {
"Name": "minecraft:sand"
}
},
"lootTable": "example:dig_spot/white_sand",
"weight": 1
}
Fishing Spots
{
"type": "littlejoys:fishing_spot",
"eventCondition": {
"type": "all",
"conditions": [
{
"type": "above_fluid_source"
},
{
"type": "can_see_sky"
}
]
},
"lootTable": "example:fishing_spot/lush_water",
"weight": 1
}
Drop Rushes
{
"type": "littlejoys:drop_rush",
"eventCondition": {
"type": "all",
"conditions": [
{
"type": "is_block",
"block": "minecraft:cave_vines"
},
{
"type": "is_state_property",
"property": "berries",
"value": "true"
}
]
},
"lootTable": "minecraft:blocks/cave_vines",
"chanceMultiplier": 1.0,
"rolls": 8,
"seconds": 12.5,
"range": 8,
"weight": 1
}
chanceMultiplier multiplies the configured Drop Rush base chance. rolls controls how often the loot table is rolled. seconds is the timer length.
Gold Rushes
{
"type": "littlejoys:gold_rush",
"eventCondition": {
"type": "all",
"conditions": [
{
"type": "is_block",
"block": "example:mythril_ore"
},
{
"type": "is_tool",
"item": "#littlejoys:can_trigger_goldrush"
},
{
"type": "not",
"condition": {
"type": "is_tool",
"item": "#littlejoys:cannot_trigger_goldrush"
}
}
]
},
"lootTable": "example:blocks/mythril_ore",
"chanceMultiplier": 0.5,
"seconds": 7.0,
"maxDropsPerSecond": -1,
"weight": 1
}
chanceMultiplier multiplies the configured Gold Rush base chance. seconds controls how long the block remains in a rush. maxDropsPerSecond limits repeated drops; -1 means no additional limit.
Event conditions
Little Joys recipes use eventCondition objects to decide where and when an event can apply.
always: always matches.all: matches when every entry inconditionsmatches.any: matches when at least one entry inconditionsmatches.not: inverts one nestedcondition.above_state: matches an exact block state below the event position.above_fluid_source: matches a source fluid below the event position.can_see_sky: requires sky access at the event position.is_block: matches the block being broken, ignoring block-state properties.is_state: matches the exact block state being broken.is_state_property: matches one property value on the block state being broken.is_tool: matches the player's held tool against an item id or item tag.is_dimension: matches a dimension id such asminecraft:overworld.
Use is_block and is_state_property when you want to support blocks with many state permutations without listing every exact state.
Tags
Several blessing and Gold Rush behaviors are tag-driven:
littlejoys:can_trigger_goldrush: tools allowed to trigger Gold Rushes. Defaults to pickaxes.littlejoys:cannot_trigger_goldrush: tools excluded from Gold Rushes. Defaults to Just Hammers hammers when present.littlejoys:star_of_abundance_blocks: blocks whose drops Star of Abundance may duplicate if they are also taggedlittlejoys:star_of_abundance_items.littlejoys:star_of_abundance_mobs: mobs whose drops Star of Abundance may duplicate if they are also taggedlittlejoys:star_of_abundance_items.littlejoys:star_of_abundance_items: item drops that Star of Abundance may duplicate.littlejoys:calmed_by_serenity: mobs that Star of Serenity can calm.littlejoys:prevented_by_star_of_serenity: damage types that Star of Serenity can prevent.