Page 1 of 1

register_decoration not working

PostPosted: Sun Sep 13, 2015 05:43
by eduardomezencio
I'm trying to create a simple mod where a new block will spawn above dirt and sand... I'm trying to use a code similar to what I found in the wiki in my init.lua, but it does not work. Nothing appears when the map is generated.

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_decoration({
   deco_type = "simple",
   place_on = {"default:dirt", "default:dirt_with_grass", "default:sand"},
   sidelen = 16,
   fill_ratio = 0.1,
   decoration = "whatever:whatever", -- I tried lots of different blocks here
})


What is wrong here? (I know nothing about modding.. this is my first attempt. Hitherto, the only thing I was able to do successfully was to create a custom node)

Re: register_decoration not working

PostPosted: Sun Sep 13, 2015 07:25
by TenPlus1
make sure the map you are using a v7 map when you add decorations...

Re: register_decoration not working

PostPosted: Sun Sep 13, 2015 13:53
by eduardomezencio
Yes, I'm trying this code with v7