The ftbsba
module of the FTB Skyblock Addons (FTBSBA) mod provides a way of adding custom recipes for the Hammer and the Crook tools in Minecraft. It has two main handlers:
The Hammer handler is used to create recipes for the Hammer tool. The Hammer tool is typically used to convert one block into another.
event.recipes.ftbsba.hammer(outputItems, inputItem)
outputItems
is an array of the items that will be produced when theinputItem
is hammered.inputItem
is the item that will be hammered to produce theoutputItems
.
For example, the following code creates a hammer recipe that converts any of the stone variants (normal stone, granite, etc.) into cobblestone:
event.recipes.ftbsba.hammer(
"minecraft:cobblestone",
[
"minecraft:stone",
"minecraft:granite",
"minecraft:polished_granite",
"minecraft:diorite",
"minecraft:polished_diorite",
"minecraft:andesite",
"minecraft:polished_andesite",
"minecraft:polished_deepslate",
"minecraft:tuff",
"minecraft:infested_stone",
"minecraft:infested_deepslate",
]
);
The Crook handler is used to create recipes for the Crook tool. The Crook tool is typically used to increase drop rate from leaves.
event.recipes.ftbsba.crook(outputItems, inputItem)
outputItems
is an array of the items that will be produced when theinputItem
is crooked.inputItem
is the item that will be crooked to produce theoutputItems
.
For example, the following code sets a crook recipe that provides a 50% chance of getting a stick and a guaranteed apple when any #minecraft:leaves
are crooked:
event.recipes.ftbsba.crook(
[Item.of('minecraft:stick').withChance(0.5), 'minecraft:apple'],
'#minecraft:leaves'
);