effect
This script will allow the knife of Tetracelium to automatically and the affiliated to the farmer. All the formulas that use the knife on the cutting board. If compatibility fails, it is the problem of the affiliated author!Intersection
Code
Put the script in the server_scripts folder
Event.Foreachrecipe ({'Type': Farmersdelight: Cutting ', not: {' mod ':' farrsdelight '}, recipes => {{// Screening and traversing all the cutting board formulas that do not belong to the main body of farmers and music
Let data = json.parse (recipes.json.tostring ())
// Extract the formula of JSON data
Let ID = 'testracelium: kubejs/'+recipes.getid (). Split (':') [1]
// Extract the ID of the formula and reorganize it into a new ID [Avoid conflict]
If (data.Tool? .Tag == "Forge: Tools/Knives") {{
// Trust whether this formula uses TAG to determine the tool and whether the tag is a knife
Data.Tool = {"Type": "Farmersdelight: TOOL_ACTION", "Action": "Blade_cut"}
// Replace the tool as a knife for Tetracelium
Event.custom (data) .id (ID)
// Add this recipe
}
})