-- Add node and update
minetest.env:add_node(pos, newnode)
- -- Set metadata owner
- if def.metadata_name ~= "" then
- minetest.env:get_meta(pos):set_owner(placer:get_player_name())
- end
-
-- Run script hook
local _, callback
for _, callback in ipairs(minetest.registered_on_placenodes) do
diggable = true,
climbable = false,
buildable_to = false,
- metadata_name = "",
liquidtype = "none",
liquid_alternative_flowing = "",
liquid_alternative_source = "",
buildable_to = false,
drop = "",
-- alternatively drop = { max_items = ..., items = { ... } }
- metadata_name = "",
liquidtype = "none",
liquid_alternative_flowing = "",
liquid_alternative_source = "",
groups = {choppy=2,dig_immediate=2},
legacy_wallmounted = true,
sounds = default.node_sound_defaults(),
+ on_construct = function(pos)
+ --local n = minetest.env:get_node(pos)
+ local meta = minetest.env:get_meta(pos)
+ meta:set_string("formspec", "hack:sign_text_input")
+ meta:set_string("infotext", "\"${text}\"")
+ end,
})
minetest.register_node("default:chest", {