Page 1 of 1

Help with code

PostPosted: Mon Feb 04, 2013 13:52
by socramazibi
Hello, I'm making a mod of charcoal, everything works, but the problem is that when I leave in the soil behaves like a block, not like ordinary coal. A little help please.

thanks

Sorry, I've noticed that there is a mod of charcoal without textures.

But equally, I could say that I do wrong??

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.register_node("charcoal:charcoal", {
    description = "Charcoal",
    tiles = {"charcoal.png"},
})

minetest.register_craft({
    type = "fuel",
    recipe = "charcoal:charcoal",
    burntime = 50,
})

minetest.register_craft({
    type = "cooking",
    recipe = "default:tree",
    output = "charcoal:charcoal",
})

minetest.register_craft({
    output = 'default:torch 4',
    recipe = {
        {'charcoal:charcoal'},
        {'default:stick'},
    }
})

PostPosted: Mon Feb 04, 2013 14:02
by PilzAdam
1st: This should go into Modding General.
2nd: Use minetest.register_craftitem instead of minetest.register_node. And change
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
tiles = {"charcoal.png"},
to
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
inventory_image = "charcoal.png",

See the normal coal in the init.lua of default mod as an example.

PostPosted: Mon Feb 04, 2013 14:14
by socramazibi
PilzAdam wrote:1st: This should go into Modding General.
2nd: Use minetest.register_craftitem instead of minetest.register_node. And change
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
tiles = {"charcoal.png"},
to
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
inventory_image = "charcoal.png",

See the normal coal in the init.lua of default mod as an example.


Thanks for everything.