I'm working on a small adventure map for friend and I'm curious if there is a possibility to fill a chest with book with specific text everytime the player opens this chest? Mc 1.13.2 vanilla
Make a trapped chest with the contents you want, like the book, and hide it somewhere under ground, maybe in a clump of bedrock just in case. Make a command block that
/clones it to the location where you want the players to find it; make it activate on redstone impulse, power it through redstone from the trapped chest through a redstone torch, so it fires when the chest is closed. That way the chest whenever a player closes it, gets replaced with a copy of the 'secure' chest, including its contents - like the book.