Fix breaking storage drawers with axe. No update required, at least I think.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
f1a3872550
commit
86a1c29baf
@ -5,5 +5,7 @@ BlockEvents.rightClicked('ags_day_counter:calendar', event => {
|
|||||||
let serverDays = parseInt(event.level.dayTime() / 24000.0);
|
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('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.player.tell(Component.of('You have played ').append(Component.green(playTime)).append(' in-game days.'))
|
||||||
|
|
||||||
|
event.cancel()
|
||||||
return
|
return
|
||||||
});
|
});
|
||||||
@ -1,29 +1,29 @@
|
|||||||
if (Platform.isLoaded("chipped")) {
|
// if (Platform.isLoaded("chipped")) {
|
||||||
ServerEvents.recipes(event => {
|
// ServerEvents.recipes(event => {
|
||||||
event.forEachRecipe({ "mod": "chipped" }, (recipe) => {
|
// event.forEachRecipe({ "mod": "chipped" }, (recipe) => {
|
||||||
if (recipe.getType().getNamespace() == 'chipped') {
|
// if (recipe.getType().getNamespace() == 'chipped') {
|
||||||
let tags = recipe.get('tags')
|
// let tags = recipe.get('tags')
|
||||||
tags.forEach((tag) => {
|
// tags.forEach((tag) => {
|
||||||
let tag_name = tag.split(':')[1]
|
// let tag_name = tag.split(':')[1]
|
||||||
|
|
||||||
Ingredient.of('#' + tag).itemIds.forEach((item) => {
|
// Ingredient.of('#' + tag).itemIds.forEach((item) => {
|
||||||
let item_name = item.split(':')[1]
|
// let item_name = item.split(':')[1]
|
||||||
event.custom({
|
// event.custom({
|
||||||
"type": "create:cutting",
|
// "type": "create:cutting",
|
||||||
"ingredients": [
|
// "ingredients": [
|
||||||
{ "tag": tag }
|
// { "tag": tag }
|
||||||
],
|
// ],
|
||||||
"results": [
|
// "results": [
|
||||||
{
|
// {
|
||||||
"item": item,
|
// "item": item,
|
||||||
"count": 1
|
// "count": 1
|
||||||
}
|
// }
|
||||||
],
|
// ],
|
||||||
"processingTime": 50
|
// "processingTime": 50
|
||||||
}).id('create:compat/cutting/chipped/' + item_name + '_from_' + tag_name)
|
// }).id('create:compat/cutting/chipped/' + item_name + '_from_' + tag_name)
|
||||||
})
|
// })
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
@ -63,3 +63,15 @@ if (Platform.isLoaded('storagedrawers')) {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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)
|
||||||
|
})
|
||||||
|
})
|
||||||
@ -4,6 +4,7 @@ function DirtPathBlock(e, id) {
|
|||||||
.mapColor('dirt')
|
.mapColor('dirt')
|
||||||
.hardness(0.65)
|
.hardness(0.65)
|
||||||
.soundType('grass')
|
.soundType('grass')
|
||||||
|
.tagBlock('minecraft:mineable/shovel')
|
||||||
}
|
}
|
||||||
|
|
||||||
function NetherrackPathBlock(e, id) {
|
function NetherrackPathBlock(e, id) {
|
||||||
|
|||||||
@ -15,11 +15,11 @@ StartupEvents.registry('sound_event', e => {
|
|||||||
StartupEvents.registry('item', e => {
|
StartupEvents.registry('item', e => {
|
||||||
Object.keys(music_list).forEach((key) => {
|
Object.keys(music_list).forEach((key) => {
|
||||||
let value = music_list[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)
|
.song(`skapa:music.${key}`, value)
|
||||||
.displayName("Music Disc")
|
.displayName('Music Disc')
|
||||||
.texture(`skapa:item/music_disc_${key}`)
|
.texture(`skapa:item/music_disc_${key}`)
|
||||||
.tag("creeper_drop_music_discs")
|
.tag('minecraft:creeper_drop_music_discs')
|
||||||
.translationKey(`skapa:item.skapa.music_disc_${key}`)
|
.translationKey(`skapa:item.skapa.music_disc_${key}`)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -4,6 +4,7 @@ StartupEvents.registry('block', event => {
|
|||||||
.fluidTag('minecraft:lava')
|
.fluidTag('minecraft:lava')
|
||||||
.mapColor('color_brown')
|
.mapColor('color_brown')
|
||||||
.tagBlock('minecraft:soul_speed_blocks')
|
.tagBlock('minecraft:soul_speed_blocks')
|
||||||
|
.tagBlock('minecraft:mineable/shovel')
|
||||||
.hardness(0.5)
|
.hardness(0.5)
|
||||||
.soundType('soul_soil')
|
.soundType('soul_soil')
|
||||||
})
|
})
|
||||||
@ -87,6 +87,8 @@ if (Platform.isLoaded('storagedrawers')) {
|
|||||||
'block': event
|
'block': event
|
||||||
.createCustom('storagedrawers:' + id, () => new $BlockStandardDrawers(drawerCount, halfDepth, props))
|
.createCustom('storagedrawers:' + id, () => new $BlockStandardDrawers(drawerCount, halfDepth, props))
|
||||||
.tag('storagedrawers:drawers')
|
.tag('storagedrawers:drawers')
|
||||||
|
.tag('minecraft:mineable/axe'),
|
||||||
|
'trim': false
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -96,17 +98,24 @@ if (Platform.isLoaded('storagedrawers')) {
|
|||||||
'id': id,
|
'id': id,
|
||||||
'block': event
|
'block': event
|
||||||
.createCustom('storagedrawers:' + id, () => new $BlockTrim(props))
|
.createCustom('storagedrawers:' + id, () => new $BlockTrim(props))
|
||||||
|
.tag('minecraft:mineable/axe'),
|
||||||
|
'trim': true
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
StartupEvents.registry('item', event => {
|
StartupEvents.registry('item', event => {
|
||||||
global.storageDrawers.blocks.forEach((block) => {
|
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({
|
global.storageDrawers.items.push({
|
||||||
'id': block['id'],
|
'id': block['id'],
|
||||||
'item': event
|
'item': item
|
||||||
.createCustom('storagedrawers:' + block['id'], () => new $ItemDrawers(block['block'].get(), new $IProperties()))
|
|
||||||
.tag('storagedrawers:drawers')
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user