97 lines
1.8 KiB
JavaScript
97 lines
1.8 KiB
JavaScript
console.info('fixing cherry wood :3')
|
|
// we need plurals becuase "stripped_cherry_log" needs to be in
|
|
// "#c:stripped_logs", thanks The English Language i appreciate it very much
|
|
const logTypes = [
|
|
{"name": "log", "plural": "logs"},
|
|
{"name": "wood", "plural": "wood"}
|
|
]
|
|
const farmersDelightSalvageable = [
|
|
"trapdoor",
|
|
"sign",
|
|
"door"
|
|
]
|
|
|
|
ServerEvents.tags('item', event => {
|
|
for (const type of logTypes) {
|
|
event.add('c:stripped_' + type.plural, 'minecraft:stripped_cherry_' + type.name)
|
|
}
|
|
})
|
|
|
|
ServerEvents.recipes(event => {
|
|
for (const type of logTypes) {
|
|
// create recipes
|
|
event.custom({
|
|
"type": "create:cutting",
|
|
"ingredients": [
|
|
{
|
|
"item": "minecraft:cherry_" + type.name
|
|
}
|
|
],
|
|
"results": [
|
|
{
|
|
"item": "minecraft:stripped_cherry_" + type.name
|
|
}
|
|
],
|
|
"processingTime": 50
|
|
})
|
|
event.custom({
|
|
"type": "create:cutting",
|
|
"ingredients": [
|
|
{
|
|
"item": "minecraft:stripped_cherry_" + type.name
|
|
}
|
|
],
|
|
"results": [
|
|
{
|
|
"item": "minecraft:cherry_planks",
|
|
"count": 6
|
|
}
|
|
],
|
|
"processingTime": 50
|
|
})
|
|
|
|
// farmer's delight recipes
|
|
event.custom({
|
|
"type": "farmersdelight:cutting",
|
|
"ingredients": [
|
|
{
|
|
"item": "minecraft:cherry_" + type.name
|
|
}
|
|
],
|
|
"tool": {
|
|
"type": "farmersdelight:tool",
|
|
"tag": "c:tools/axes"
|
|
},
|
|
"result": [
|
|
{
|
|
"item": "minecraft:stripped_cherry_" + type.name
|
|
},
|
|
{
|
|
"item": "farmersdelight:tree_bark"
|
|
}
|
|
],
|
|
"sound": "minecraft:item.axe.strip"
|
|
})
|
|
}
|
|
|
|
for (const item of farmersDelightSalvageable) {
|
|
event.custom({
|
|
"type": "farmersdelight:cutting",
|
|
"ingredients": [
|
|
{
|
|
"item": "minecraft:cherry_" + item
|
|
}
|
|
],
|
|
"tool": {
|
|
"type": "farmersdelight:tool",
|
|
"tag": "c:tools/axes"
|
|
},
|
|
"result": [
|
|
{
|
|
"item": "minecraft:cherry_planks"
|
|
}
|
|
]
|
|
})
|
|
}
|
|
})
|