skapa-season-3/kubejs/server_scripts/quark.js
Steve McMaster bcce7846a9
All checks were successful
continuous-integration/drone/push Build is passing
Add a mod to the server (NO UPDATE REQUIRED) so Mike's old computer can log in
2024-07-21 00:19:58 +00:00

81 lines
2.6 KiB
JavaScript

ServerEvents.recipes((event) => {
global.woodTypes.forEach((wood) => {
let planks_item = ('mod' in wood['planks'] ? wood['planks']['mod'] : wood['mod']) + ':' + wood['planks']['id']
let item_id = 'quark:vertical_' + wood['id'] + '_planks'
if (!(wood['id'] in global.quarkExistingVerticalPlanks)) {
event.shaped(
Item.of(item_id, 1),
[
'P ',
'P ',
'P '
],
{
'P': { 'item': wood['planks']['id'] }
}
).id(item_id)
}
if (!(wood['mod'] in ['minecraft', 'twilightforest'])) {
event.shaped(
'minecraft:chest',
[
'PPP',
'P P',
'PPP'
],
{
'P': { 'item': wood['planks']['id'] }
}
)
event.shaped(
'minecraft:ladder',
[
'S S',
'SPS',
'S S'
],
{
'P': planks_item,
'S': { 'tag': 'forge:rods/wooden' }
}
)
}
if (Platform.isLoaded('create')) {
event.custom({
'type': 'create:cutting',
'ingredients': [
{ 'item': planks_item }
],
'results': [
{
'item': item_id,
'count': 1
}
],
'processingTime': 50
}).id('create:compat/cutting/quark/' + item_id.split(':')[1] + '_from_planks')
}
// if (Platform.isLoaded('chipped') && wood['mod'] != 'minecraft') {
// event.custom({
// 'type': 'chipped:carpenters_table',
// 'tags': ['chipped:' + wood['id'] + '_planks']
// })
// }
})
})
// ServerEvents.tags('block', (event) => {
// global.woodTypes.forEach((wood) => {
// let item_id = 'quark:vertical_' + wood['id'] + '_planks'
// if (Platform.isLoaded('chipped')) {
// event.add('chipped:' + wood['id'] + '_planks', item_id)
// event.add('chipped:' + wood['id'] + '_planks', ('mod' in wood['planks'] ? wood['planks']['mod'] : wood['mod']) + ':' + wood['planks']['id'])
// }
// });
// })