diff --git a/kubejs/server_scripts/calendar.js b/kubejs/server_scripts/calendar.js index 3f44c09..d9e5794 100644 --- a/kubejs/server_scripts/calendar.js +++ b/kubejs/server_scripts/calendar.js @@ -5,5 +5,7 @@ BlockEvents.rightClicked('ags_day_counter:calendar', event => { let serverDays = parseInt(event.level.dayTime() / 24000.0); event.player.tell(Component.of('Today is day ').append(Component.green(serverDays)).append('.')) event.player.tell(Component.of('You have played ').append(Component.green(playTime)).append(' in-game days.')) + + event.cancel() return }); \ No newline at end of file diff --git a/kubejs/server_scripts/create_chipped_compat.js b/kubejs/server_scripts/create_chipped_compat.js index 1c23b0c..f4ea4b6 100644 --- a/kubejs/server_scripts/create_chipped_compat.js +++ b/kubejs/server_scripts/create_chipped_compat.js @@ -1,29 +1,29 @@ -if (Platform.isLoaded("chipped")) { - ServerEvents.recipes(event => { - event.forEachRecipe({ "mod": "chipped" }, (recipe) => { - if (recipe.getType().getNamespace() == 'chipped') { - let tags = recipe.get('tags') - tags.forEach((tag) => { - let tag_name = tag.split(':')[1] +// if (Platform.isLoaded("chipped")) { +// ServerEvents.recipes(event => { +// event.forEachRecipe({ "mod": "chipped" }, (recipe) => { +// if (recipe.getType().getNamespace() == 'chipped') { +// let tags = recipe.get('tags') +// tags.forEach((tag) => { +// let tag_name = tag.split(':')[1] - Ingredient.of('#' + tag).itemIds.forEach((item) => { - let item_name = item.split(':')[1] - event.custom({ - "type": "create:cutting", - "ingredients": [ - { "tag": tag } - ], - "results": [ - { - "item": item, - "count": 1 - } - ], - "processingTime": 50 - }).id('create:compat/cutting/chipped/' + item_name + '_from_' + tag_name) - }) - }) - } - }) - }) -} \ No newline at end of file +// Ingredient.of('#' + tag).itemIds.forEach((item) => { +// let item_name = item.split(':')[1] +// event.custom({ +// "type": "create:cutting", +// "ingredients": [ +// { "tag": tag } +// ], +// "results": [ +// { +// "item": item, +// "count": 1 +// } +// ], +// "processingTime": 50 +// }).id('create:compat/cutting/chipped/' + item_name + '_from_' + tag_name) +// }) +// }) +// } +// }) +// }) +// } \ No newline at end of file diff --git a/kubejs/server_scripts/storagedrawers.js b/kubejs/server_scripts/storagedrawers.js index ea137d0..de6b423 100644 --- a/kubejs/server_scripts/storagedrawers.js +++ b/kubejs/server_scripts/storagedrawers.js @@ -62,4 +62,16 @@ if (Platform.isLoaded('storagedrawers')) { .id(trim_id) }) }) -} \ No newline at end of file +} + +LootJS.modifiers((event) => { + event.enableLogging() + + global.storageDrawers.drawerTypes.forEach((drawerType) => { + let trim_id = 'storagedrawers:' + drawerType['name'] + '_trim' + event + .addBlockLootModifier(trim_id) + .survivesExplosion() + .addLoot(trim_id) + }) +}) \ No newline at end of file diff --git a/kubejs/startup_scripts/morepaths.js b/kubejs/startup_scripts/morepaths.js index 4cebed8..a0fa7ec 100644 --- a/kubejs/startup_scripts/morepaths.js +++ b/kubejs/startup_scripts/morepaths.js @@ -4,6 +4,7 @@ function DirtPathBlock(e, id) { .mapColor('dirt') .hardness(0.65) .soundType('grass') + .tagBlock('minecraft:mineable/shovel') } function NetherrackPathBlock(e, id) { diff --git a/kubejs/startup_scripts/music_discs.js b/kubejs/startup_scripts/music_discs.js index b22768d..c74c846 100644 --- a/kubejs/startup_scripts/music_discs.js +++ b/kubejs/startup_scripts/music_discs.js @@ -15,11 +15,11 @@ StartupEvents.registry('sound_event', e => { StartupEvents.registry('item', e => { Object.keys(music_list).forEach((key) => { let value = music_list[key] - e.create(`skapa:music_disc_${key}`, "music_disc") + e.create(`skapa:music_disc_${key}`, 'music_disc') .song(`skapa:music.${key}`, value) - .displayName("Music Disc") + .displayName('Music Disc') .texture(`skapa:item/music_disc_${key}`) - .tag("creeper_drop_music_discs") + .tag('minecraft:creeper_drop_music_discs') .translationKey(`skapa:item.skapa.music_disc_${key}`) }) }) \ No newline at end of file diff --git a/kubejs/startup_scripts/soul_soil_farmland.js b/kubejs/startup_scripts/soul_soil_farmland.js index 7dc712c..5f4d030 100644 --- a/kubejs/startup_scripts/soul_soil_farmland.js +++ b/kubejs/startup_scripts/soul_soil_farmland.js @@ -4,6 +4,7 @@ StartupEvents.registry('block', event => { .fluidTag('minecraft:lava') .mapColor('color_brown') .tagBlock('minecraft:soul_speed_blocks') + .tagBlock('minecraft:mineable/shovel') .hardness(0.5) .soundType('soul_soil') }) \ No newline at end of file diff --git a/kubejs/startup_scripts/storagedrawers.js b/kubejs/startup_scripts/storagedrawers.js index 35e671d..f31dc8e 100644 --- a/kubejs/startup_scripts/storagedrawers.js +++ b/kubejs/startup_scripts/storagedrawers.js @@ -87,6 +87,8 @@ if (Platform.isLoaded('storagedrawers')) { 'block': event .createCustom('storagedrawers:' + id, () => new $BlockStandardDrawers(drawerCount, halfDepth, props)) .tag('storagedrawers:drawers') + .tag('minecraft:mineable/axe'), + 'trim': false }) }) }) @@ -96,17 +98,24 @@ if (Platform.isLoaded('storagedrawers')) { 'id': id, 'block': event .createCustom('storagedrawers:' + id, () => new $BlockTrim(props)) + .tag('minecraft:mineable/axe'), + 'trim': true }) }) }) StartupEvents.registry('item', event => { global.storageDrawers.blocks.forEach((block) => { + let item = event + .createCustom('storagedrawers:' + block['id'], () => new $ItemDrawers(block['block'].get(), new $IProperties())) + + if (!(block['trim'])) { + item = item.tag('storagedrawers:drawers') + } + global.storageDrawers.items.push({ 'id': block['id'], - 'item': event - .createCustom('storagedrawers:' + block['id'], () => new $ItemDrawers(block['block'].get(), new $IProperties())) - .tag('storagedrawers:drawers') + 'item': item }) }) })