Minetest_game: Can't register new chest from 3rd party mod

Created on 2 Nov 2017  路  5Comments  路  Source: minetest/minetest_game

If I want to call default.register_chest() from an external mod I get the naming convention error, because "default:" is automatically added to the chest name.

So if I want to add a new chest I have to edit the default mod or I have to clone and modify the register_chest() function. Or did I miss something?

Bug

Most helpful comment

Chests should be a separate mod imo

All 5 comments

Chests should be a separate mod imo

If chests should be a separate mod then furnaces have to be moved out of default, too. (But imo an extra file for chests would be enough.)

So, if ":" (that is not on first place) is found in the name, a ":" is added to the front, else "default:" is added.

Does b75a17984a56bb05310bfe575e4ce17509fad43b solve this?

@paramat No, it doesn't. The node name should be freely selectable, so people also could overwrite existing nodes this way, as it's already possible with the regular minetest.register_node function.

I think PR https://github.com/minetest/minetest_game/pull/2643 should fix this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AlexYst picture AlexYst  路  6Comments

TekhnaeRaav picture TekhnaeRaav  路  5Comments

Fixer-007 picture Fixer-007  路  6Comments

paramat picture paramat  路  6Comments

Fixer-007 picture Fixer-007  路  6Comments