Fix book not displaying contents properly

This commit is contained in:
Wuzzy 2019-08-28 22:11:16 +02:00
parent 9d4bc87435
commit f8ecf46736
1 changed files with 3 additions and 3 deletions

View File

@ -16,14 +16,14 @@ minetest.register_craftitem(
on_use = function(itemstack, player, pointed_thing)
local name = player:get_player_name()
local data = minetest.deserialize(itemstack:get_metadata())
local data = itemstack:get_meta()
local title = ""
local text = ""
if data then
text = data.text
title = data.title
text = data:get_string("book:text")
title = data:get_string("book:title")
end
local form = default.ui.get_page("default:notabs")