All checks were successful
continuous-integration/drone/push Build is passing
35 lines
1.0 KiB
JavaScript
35 lines
1.0 KiB
JavaScript
global.quarkExistingVerticalPlanks = [
|
|
'oak',
|
|
'spruce',
|
|
'burch',
|
|
'jungle',
|
|
'acacia',
|
|
'dark_oak',
|
|
'mangrove',
|
|
'cherry',
|
|
'ancient',
|
|
'azalea',
|
|
'blossom'
|
|
]
|
|
|
|
global.verticalPlanks = {}
|
|
|
|
if (Platform.isLoaded('quark')) {
|
|
StartupEvents.registry('block', event => {
|
|
global.woodTypes.forEach((wood) => {
|
|
if (wood['id'] in global.quarkExistingVerticalPlanks) return;
|
|
|
|
let item_id = 'quark:vertical_' + wood['id'] + '_planks'
|
|
global.verticalPlanks[item_id] = event.createCustom(item_id, () => new $Block($Properties.copy($Blocks.OAK_PLANKS)))
|
|
})
|
|
})
|
|
|
|
StartupEvents.registry('item', event => {
|
|
global.woodTypes.forEach((wood) => {
|
|
if (wood['id'] in global.quarkExistingVerticalPlanks) return;
|
|
|
|
let item_id = 'quark:vertical_' + wood['id'] + '_planks'
|
|
event.createCustom(item_id, () => new $BlockItem(global.verticalPlanks[item_id].get(), new $IProperties()))
|
|
})
|
|
})
|
|
} |