register_decoration not working

User avatar
eduardomezencio
Member
 
Posts: 73
Joined: Tue Sep 08, 2015 17:48
GitHub: eduardomezencio

register_decoration not working

by eduardomezencio » Sun Sep 13, 2015 05:43

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)
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: register_decoration not working

by TenPlus1 » Sun Sep 13, 2015 07:25

make sure the map you are using a v7 map when you add decorations...
 

User avatar
eduardomezencio
Member
 
Posts: 73
Joined: Tue Sep 08, 2015 17:48
GitHub: eduardomezencio

Re: register_decoration not working

by eduardomezencio » Sun Sep 13, 2015 13:53

Yes, I'm trying this code with v7
 


Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 9 guests