Add property to node [Solved]

Post Reply
guideahon
Member
Posts: 37
Joined: Mon Jan 26, 2015 12:49
In-game: guideahon

Add property to node [Solved]

by guideahon » Post

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},
})
Last edited by guideahon on Fri Feb 20, 2015 21:49, edited 1 time in total.

User avatar
rubenwardy
Moderator
Posts: 6978
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: Add property to node

by rubenwardy » Post

You overwrite the whole node, rather than just the group.

Use minetest.override_item()

Code: Select all

minetest.override_item("moreores:mineral_mithril", {
     groups = {cracky=3, xp=1},
})
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

guideahon
Member
Posts: 37
Joined: Mon Jan 26, 2015 12:49
In-game: guideahon

Re: Add property to node

by guideahon » Post

It works!!! Thx rubernwardy, i'll vote you for president!

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests