Patched molten vents + switch to openloader + default keybinds + book fixes + include less jars + kubejs stuff + incontrol
This commit is contained in:
27
pack/kubejs/server_scripts/tome.js
Normal file
27
pack/kubejs/server_scripts/tome.js
Normal file
@@ -0,0 +1,27 @@
|
||||
const tome = Item.of('akashictome:tome', '{"akashictome:data":{alexscaves:{Count:1b,id:"alexscaves:cave_book"},botania:{Count:1b,id:"botania:lexicon"},hexcasting:{Count:1b,id:"patchouli:guide_book",tag:{"patchouli:book":"hexcasting:thehexbook"}},patchouli:{Count:1b,id:"patchouli:guide_book",tag:{"patchouli:book":"patchouli:pwb_guide"}}}}')
|
||||
|
||||
ServerEvents.recipes(recipes => {
|
||||
recipes.shapeless(
|
||||
tome,
|
||||
[ 'minecraft:stick' ]
|
||||
)
|
||||
})
|
||||
|
||||
const givenTomeAdvancement = "pwb:guide"
|
||||
|
||||
LootJS.modifiers(event => {
|
||||
event
|
||||
.addLootTypeModifier(LootType.CHEST)
|
||||
.playerPredicate(player => {
|
||||
let advancement = player.server.getAdvancement(givenTomeAdvancement).advancement
|
||||
let hasNotFound = !player.advancements.getOrStartProgress(advancement).done
|
||||
|
||||
if(hasNotFound) {
|
||||
player.unlockAdvancement(givenTomeAdvancement)
|
||||
}
|
||||
|
||||
return hasNotFound
|
||||
})
|
||||
.addLoot(tome)
|
||||
.addLoot('origins:orb_of_origin')
|
||||
})
|
||||
Reference in New Issue
Block a user