Help with code

socramazibi
Member
 
Posts: 81
Joined: Mon Jan 28, 2013 12:29

Help with code

by socramazibi » Mon Feb 04, 2013 13:52

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'},
    }
})
Forgive my English, but it is the translator of google.My Spanish.
My mod:
Pictures wool 1.0 3x5 , Charcoal+Textures , Map
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Mon Feb 04, 2013 14:02

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.
 

socramazibi
Member
 
Posts: 81
Joined: Mon Jan 28, 2013 12:29

by socramazibi » Mon Feb 04, 2013 14:14

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.
Forgive my English, but it is the translator of google.My Spanish.
My mod:
Pictures wool 1.0 3x5 , Charcoal+Textures , Map
 


Return to Minetest General

Who is online

Users browsing this forum: Bing [Bot] and 16 guests