Page 1 of 1

How can I place a written book in a bookshelf by mapgen?

PostPosted: Fri Mar 03, 2017 16:30
by burli
I want to place books with text in a bookshelf when the map get's generated. Is that possible?

Re: How can I place a written book in a bookshelf by mapgen?

PostPosted: Sun Mar 05, 2017 18:30
by taikedz
Not done any proper reasearch or testing, but from the code, it looks like you need to define the book with its metadata in an ItemStack to define the written book

https://github.com/minetest/minetest_ga ... ua#L16-L74

You would then need to add that itemstack to the chest/bookshelf :

https://github.com/minetest/minetest_ga ... 1835-L1840
https://github.com/Sokomine/mg_villages ... _chest.lua

Re: How can I place a written book in a bookshelf by mapgen?

PostPosted: Sun Mar 05, 2017 19:06
by burli
Mhm, thanks. Will try it. But I think I make a new "scroll" item.