#### `[colorize:<color>:<ratio>`
Colorize the textures with the given color.
`<color>` is specified as a `ColorString`.
`<ratio>` is an int ranging from 0 to 255, and specifies how much of the
color to apply. If ommitted, the alpha will be used.jp wrote:Another texture modifier that may helps you for get rid of lot of redundancy...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
#### `[colorize:<color>:<ratio>`
Colorize the textures with the given color.
`<color>` is specified as a `ColorString`.
`<ratio>` is an int ranging from 0 to 255, and specifies how much of the
color to apply. If ommitted, the alpha will be used.
minetest.register_node("test:node", {
tiles = {"default_stone.png^[colorize:red:120"},
description = "Node test",
groups = {crumbly=3},
})new_corners= {}
new_corners_creative = 0
new_corners.register_corner= function( basename, texture, description, craft_from )
local group_def = {cracky=3, choppy=2, oddly_breakable_by_hand=1, not_in_creative_inventory = new_corners_creative};
minetest.register_node("new_corners:corner_stone_"..basename,{
description = description.." with Stone Corner",
tiles = {
texture.."^([combine:16x16:8,8=default_stone_brick.png)^[transformFX",
texture.."^([combine:16x16:8,8=default_stone_brick.png)^[transformR180",
texture,
"default_stone_brick.png^[transformFXR90^([combine:16x16:8,0="..texture..")^[transformFX",
texture,
"default_stone_brick.png^[transformFXR90^([combine:16x16:8,0="..texture..")",
},
inventory_image = "default_stone_brick.png^[transformFXR90^([combine:16x16:8,0="..texture..")",
wield_image = "default_stone_brick.png^[transformFXR90^([combine:16x16:8,0="..texture..")",
paramtype = "light",
paramtype2 = "facedir",
groups = { cracky=3, oddly_breakable_by_hand=1},
})
minetest.register_node("new_corners:corner_sandstone_"..basename,{
description = description.." with SandStone Corner",
tiles = {
texture.."^([combine:16x16:8,8=default_sandstone_brick.png)^[transformFX",
texture.."^([combine:16x16:8,8=default_sandstone_brick.png)^[transformR180",
texture,
"default_sandstone_brick.png^[transformFXR90^([combine:16x16:8,0="..texture..")^[transformFX",
texture,
"default_sandstone_brick.png^[transformFXR90^([combine:16x16:8,0="..texture..")",
},
inventory_image = "default_sandstone_brick.png^[transformFXR90^([combine:16x16:8,0="..texture..")",
wield_image = "default_sandstone_brick.png^[transformFXR90^([combine:16x16:8,0="..texture..")",
paramtype = "light",
paramtype2 = "facedir",
groups = { cracky=3, oddly_breakable_by_hand=1},
})
minetest.register_node("new_corners:corner_wood_"..basename,{
description = description.." with Wood Corner",
inventory_image = texture.."^[transformR90^([combine:16x16:0,8=default_wood.png)^[transformFXR90",
wield_image = texture.."^[transformR90^([combine:16x16:0,8=default_wood.png)^[transformFXR90",
tiles = {
texture.."^[transformFXR180^([combine:16x16:8,8=default_wood.png)^[transformFX",
texture.."^[transformFXR180^([combine:16x16:8,8=default_wood.png)^[transformR180",
texture,
texture.."^[transformR90^([combine:16x16:0,8=default_wood.png)^[transformFXR90",
texture.."^[transformFY",
texture.."^[transformR90^([combine:16x16:0,8=default_wood.png)^[transformFYR90",
},
groups = group_def,
paramtype = "light",
paramtype2 = "facedir",
})
minetest.register_craft({
output = "new_corners:corner_stone_"..basename.." 4",
recipe = { { "default:stone", craft_from, ""},
{ "default:stone", craft_from, "" },
{ "default:stone", craft_from, ""},
} });
minetest.register_craft({
output = "new_corners:corner_sandstone_"..basename.." 4",
recipe = { { "default:wood", craft_from, ""},
{ "default:wood", craft_from, "" },
{ "default:wood", craft_from, ""},
} });
minetest.register_craft({
output = "new_corners:corner_wood_"..basename.." 4",
recipe = { { "default:sandstone", craft_from, ""},
{ "default:sandstone", craft_from, "" },
{ "default:sandstone", craft_from, ""},
} });
end
--Default mod
new_corners.register_corner( 'brick', 'default_brick.png', 'Bricks', 'default:brick' );
new_corners.register_corner( 'stone_brick', 'default_stone_brick.png', 'Stone Bricks', 'default:stonebrick' );
new_corners.register_corner( 'cobble', 'default_cobble.png', 'Cobble Stone', 'default:cobble' );
new_corners.register_corner( 'stone', 'default_stone.png', 'Stone', 'default:stone' );
new_corners.register_corner( 'wood', 'default_wood.png', 'Wood Planks', 'default:wood' );Don wrote:Looks nice. I will get around to adding your code. I have been busy with other mods. This mod is on my list for updates.
Inocudom wrote:You know, it really is a shame that VanessaE does not add your mods to her Dreambuilder subgame.
Users browsing this forum: No registered users and 17 guests