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

User avatar
burli
Member
 
Posts: 1313
Joined: Fri Apr 10, 2015 13:18

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

by burli » Fri Mar 03, 2017 16:30

I want to place books with text in a bookshelf when the map get's generated. Is that possible?
 

User avatar
taikedz
Member
 
Posts: 587
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake

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

by taikedz » Sun Mar 05, 2017 18:30

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
 

User avatar
burli
Member
 
Posts: 1313
Joined: Fri Apr 10, 2015 13:18

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

by burli » Sun Mar 05, 2017 19:06

Mhm, thanks. Will try it. But I think I make a new "scroll" item.
 


Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 13 guests

cron