I'm fairly new to using command blocks for more advanced usage. I'm currently making a horror survival map with lore in written books. The player will be able to take these books with them as they progress. However, if they die, I'd like the written books of lore to be safely transferred back into its starting chest. That is the preferred idea. If that's not an option then is there a way to allow players to read the books but not take them?
I'm fairly new to using command blocks for more advanced usage. I'm currently making a horror survival map with lore in written books. The player will be able to take these books with them as they progress. However, if they die, I'd like the written books of lore to be safely transferred back into its starting chest. That is the preferred idea. If that's not an option then is there a way to allow players to read the books but not take them?
Once they die, just clear the book in their inventory, then either using clone, blockdata or setblock reset the chest.
Or you can detect their score from scoreboard criteria stat.useItem.minecraft.written_book
Once this score goes to 1, it means player had read the book, whether they just open the first page or read the whole thing...,
clear their book and place the book back to the chest (clone,blockdata,setblock...)
Great, and here is some of the commands that you may need to do that:
/clear
/clone
/blockdata
/setblock
/scoreboard objectives add (criteria: stat.useItem.minecraft.written_book, deathCount)
/scoreboard objectives setdisplay
/scoreboard players set/remove/reset
https://minecraft.gamepedia.com/Commands
https://minecraft.gamepedia.com/Scoreboard
I'm going to have to do a bit a reading because I don't know a thing about any of that but now I have a place to start. Thank you!