Page 1 of 1

Add property to node [Solved]

PostPosted: Fri Feb 20, 2015 19:50
by guideahon
Hi everyone, im making ores drop xp, to do that, i added the xp=1 group to the node and i added that to my api.lua, with default nodes it works perfect, but for moreores and technic, all i get is making those nodes "unknown", it's strange because with coal, iron, diamond, etc, it works, any idea how can i add the property without touching these mods, only mine?

minetest.register_node(":moreores:mineral_mithril", {
groups = {cracky=3, xp=1},
})

Re: Add property to node

PostPosted: Fri Feb 20, 2015 20:12
by rubenwardy
You overwrite the whole node, rather than just the group.

Use minetest.override_item()

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.override_item("moreores:mineral_mithril", {
     groups = {cracky=3, xp=1},
})

Re: Add property to node

PostPosted: Fri Feb 20, 2015 21:49
by guideahon
It works!!! Thx rubernwardy, i'll vote you for president!