Skip to content

Commit

Permalink
Unlock bed usage from quest instead of crafting it
Browse files Browse the repository at this point in the history
This is for the same reasons as the crafting table change. Most importantly: all players in a guild can use beds after one player crafts one.
  • Loading branch information
lonevox committed Jul 16, 2024
1 parent ae77a78 commit 2412696
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@
"collection": "AUTOMATIC"
}
},
"rewards": {},
"rewards": {
"crafted_bed": {
"title": "Unlock ability to use beds",
"command": "kubejs stages add @s crafted_bed",
"type": "heracles:command"
}
},
"display": {
"subtitle": {
"text": ""
Expand Down Expand Up @@ -40,7 +46,7 @@
"settings": {
"showDependencyArrow": true,
"repeatable": false,
"autoClaimRewards": false,
"autoClaimRewards": true,
"individual_progress": false,
"hidden": "LOCKED",
"unlockNotification": false
Expand Down
2 changes: 1 addition & 1 deletion kubejs/server_scripts/BlockEvents.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ BlockEvents.rightClicked(event => {
event.getPlayer().displayClientMessage(Component.literal("Complete the Introduction quest chapter to be able to use this!").red(), true)
event.cancel()
} else if (event.block.tags.contains(new ResourceLocation('beds')) && !event.getPlayer().stages.has('crafted_bed')) {
event.getPlayer().displayClientMessage(Component.literal("Craft a bed to be able to use this!").red(), true)
event.getPlayer().displayClientMessage(Component.literal('Complete the "On the Floor No-More" quest to be able to use this!').red(), true)
event.cancel()
}
})

0 comments on commit 2412696

Please sign in to comment.