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);
|
||||
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
|
||||
});
|
||||
@ -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)
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
// 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)
|
||||
// })
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
// }
|
||||
@ -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')
|
||||
.hardness(0.65)
|
||||
.soundType('grass')
|
||||
.tagBlock('minecraft:mineable/shovel')
|
||||
}
|
||||
|
||||
function NetherrackPathBlock(e, id) {
|
||||
|
||||
@ -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}`)
|
||||
})
|
||||
})
|
||||
@ -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')
|
||||
})
|
||||
@ -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
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user