help a little

User avatar
Boomboomcreeper
Member
 
Posts: 22
Joined: Sun Oct 07, 2012 15:09

help a little

by Boomboomcreeper » Wed Oct 10, 2012 10:35

can i change something in init lua to make the sandstone to have sandstone.png and sandstone_top.png????
Minetest VS Minecraft
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Wed Oct 10, 2012 10:55

At around line 791 of minetest_game/mods/default/init.lua there is a definition for the sandstone node. In that definition there is a line that reads:

tiles = {"default_sandstone.png"},

This sets the textures used on the sandstone block. Change this line to read something like:

tiles = {"default_sandstone.png^default_sandstone_top.png", "default_sandstone.png" },

(don't forget the trailing comma)

In the tiles={} field, the first quoted string is the top texture, the second is the bottom, then right, left, back and front in that order. One quoted string for each side.

The way I wrote it here, the first quoted string is the old texture with yours composited on top of it - that's what the caret ^ does. The purpose of this is to make sure at least the old texture is drawn if your new one isn't found. The second quoted string of course is the old texture that was there before. Since I didn't write in strings for the other four sides, that last one will be used in their place.

If you draw your top texture solid, it'll just replace the old one entirely - but make sure you have a transparency channel, even if the whole image is opaque (otherwise, your image will not be used at all).
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 7 guests

cron