Override mese crystal fragment, use new settings API.

Thanks to Julien Puydt
This commit is contained in:
Auke Kok 2017-12-19 21:39:29 -08:00
parent 0b6925f4b1
commit 57b2d30b9e

View File

@ -530,13 +530,11 @@ stairs.register_stair_and_slab("brick", "nether:brick",
-- Craftitems
minetest.register_craftitem(":default:mese_crystal_fragment", {
description = "Mese Crystal Fragment",
inventory_image = "default_mese_crystal_fragment.png",
minetest.override_craftitem("default:mese_crystal_fragment", {
on_place = function(stack, _, pt)
if pt.under and minetest.get_node(pt.under).name == "default:obsidian" then
local done = make_portal(pt.under)
if done and not minetest.setting_getbool("creative_mode") then
if done and not minetest.settings:get_bool("creative_mode") then
stack:take_item()
end
end