mirror of
https://github.com/minetest-mods/nether.git
synced 2024-12-28 20:00:30 +01:00
Override mese crystal fragment, use new settings API.
Thanks to Julien Puydt
This commit is contained in:
parent
0b6925f4b1
commit
57b2d30b9e
6
init.lua
6
init.lua
@ -530,13 +530,11 @@ stairs.register_stair_and_slab("brick", "nether:brick",
|
|||||||
|
|
||||||
-- Craftitems
|
-- Craftitems
|
||||||
|
|
||||||
minetest.register_craftitem(":default:mese_crystal_fragment", {
|
minetest.override_craftitem("default:mese_crystal_fragment", {
|
||||||
description = "Mese Crystal Fragment",
|
|
||||||
inventory_image = "default_mese_crystal_fragment.png",
|
|
||||||
on_place = function(stack, _, pt)
|
on_place = function(stack, _, pt)
|
||||||
if pt.under and minetest.get_node(pt.under).name == "default:obsidian" then
|
if pt.under and minetest.get_node(pt.under).name == "default:obsidian" then
|
||||||
local done = make_portal(pt.under)
|
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()
|
stack:take_item()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user