Make more blocks have world-aligned textures
|
@ -1099,3 +1099,23 @@ function mcl_util.is_it_christmas()
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Get tile (texture) for a block that supports world-alignment
|
||||||
|
local world_aligned = minetest.settings:get_bool("mcl_world_aligned_textures", false)
|
||||||
|
function mcl_util.get_texture(name, scale)
|
||||||
|
local nscale
|
||||||
|
if scale == nil then
|
||||||
|
nscale = 5
|
||||||
|
else
|
||||||
|
nscale = scale
|
||||||
|
end
|
||||||
|
if world_aligned then
|
||||||
|
return {
|
||||||
|
name = name.."_world.png",
|
||||||
|
align_style = "world",
|
||||||
|
scale = nscale
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return name..".png"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
|
@ -12,17 +12,7 @@ else
|
||||||
ice_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false
|
ice_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false
|
||||||
end
|
end
|
||||||
|
|
||||||
local world_aligned_grass = minetest.settings:get_bool("mcl_world_aligned_grass_texture", false)
|
local get_texture = mcl_util.get_texture
|
||||||
local grass_block_top_texture
|
|
||||||
if world_aligned_grass then
|
|
||||||
grass_block_top_texture = {
|
|
||||||
name = "mcl_core_grass_block_top_sheet.png",
|
|
||||||
align_style = "world",
|
|
||||||
scale = 5
|
|
||||||
}
|
|
||||||
else
|
|
||||||
grass_block_top_texture = "mcl_core_grass_block_top.png"
|
|
||||||
end
|
|
||||||
|
|
||||||
mcl_core.fortune_drop_ore = {
|
mcl_core.fortune_drop_ore = {
|
||||||
discrete_uniform_distribution = true,
|
discrete_uniform_distribution = true,
|
||||||
|
@ -36,7 +26,7 @@ minetest.register_node("mcl_core:stone", {
|
||||||
description = S("Stone"),
|
description = S("Stone"),
|
||||||
_doc_items_longdesc = S("One of the most common blocks in the world, almost the entire underground consists of stone. It sometimes contains ores. Stone may be created when water meets lava."),
|
_doc_items_longdesc = S("One of the most common blocks in the world, almost the entire underground consists of stone. It sometimes contains ores. Stone may be created when water meets lava."),
|
||||||
_doc_items_hidden = false,
|
_doc_items_hidden = false,
|
||||||
tiles = {"default_stone.png"},
|
tiles = {get_texture("default_stone")},
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1},
|
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1},
|
||||||
|
@ -246,7 +236,7 @@ minetest.register_node("mcl_core:stone_with_diamond", {
|
||||||
minetest.register_node("mcl_core:stonebrick", {
|
minetest.register_node("mcl_core:stonebrick", {
|
||||||
description = S("Stone Bricks"),
|
description = S("Stone Bricks"),
|
||||||
_doc_items_longdesc = doc.sub.items.temp.build,
|
_doc_items_longdesc = doc.sub.items.temp.build,
|
||||||
tiles = {"default_stone_brick.png"},
|
tiles = {get_texture("default_stone_brick")},
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = {pickaxey=1, stone=1, stonebrick=1, building_block=1, material_stone=1},
|
groups = {pickaxey=1, stone=1, stonebrick=1, building_block=1, material_stone=1},
|
||||||
sounds = mcl_sounds.node_sound_stone_defaults(),
|
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||||||
|
@ -306,7 +296,7 @@ minetest.register_node("mcl_core:stone_smooth", {
|
||||||
minetest.register_node("mcl_core:granite", {
|
minetest.register_node("mcl_core:granite", {
|
||||||
description = S("Granite"),
|
description = S("Granite"),
|
||||||
_doc_items_longdesc = S("Granite is an igneous rock."),
|
_doc_items_longdesc = S("Granite is an igneous rock."),
|
||||||
tiles = {"mcl_core_granite.png"},
|
tiles = {get_texture("mcl_core_granite", 3)},
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1},
|
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1},
|
||||||
|
@ -330,7 +320,7 @@ minetest.register_node("mcl_core:granite_smooth", {
|
||||||
minetest.register_node("mcl_core:andesite", {
|
minetest.register_node("mcl_core:andesite", {
|
||||||
description = S("Andesite"),
|
description = S("Andesite"),
|
||||||
_doc_items_longdesc = S("Andesite is an igneous rock."),
|
_doc_items_longdesc = S("Andesite is an igneous rock."),
|
||||||
tiles = {"mcl_core_andesite.png"},
|
tiles = {get_texture("mcl_core_andesite", 3)},
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1},
|
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1},
|
||||||
|
@ -354,7 +344,7 @@ minetest.register_node("mcl_core:andesite_smooth", {
|
||||||
minetest.register_node("mcl_core:diorite", {
|
minetest.register_node("mcl_core:diorite", {
|
||||||
description = S("Diorite"),
|
description = S("Diorite"),
|
||||||
_doc_items_longdesc = S("Diorite is an igneous rock."),
|
_doc_items_longdesc = S("Diorite is an igneous rock."),
|
||||||
tiles = {"mcl_core_diorite.png"},
|
tiles = {get_texture("mcl_core_diorite", 3)},
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1},
|
groups = {pickaxey=1, stone=1, building_block=1, material_stone=1},
|
||||||
|
@ -382,7 +372,7 @@ minetest.register_node("mcl_core:dirt_with_grass", {
|
||||||
_doc_items_hidden = false,
|
_doc_items_hidden = false,
|
||||||
paramtype2 = "color",
|
paramtype2 = "color",
|
||||||
tiles = {
|
tiles = {
|
||||||
grass_block_top_texture,
|
get_texture("mcl_core_grass_block_top"),
|
||||||
{ name="default_dirt.png", color="white" },
|
{ name="default_dirt.png", color="white" },
|
||||||
{ name="default_dirt.png^mcl_dirt_grass_shadow.png", color="white" }
|
{ name="default_dirt.png^mcl_dirt_grass_shadow.png", color="white" }
|
||||||
},
|
},
|
||||||
|
@ -732,7 +722,7 @@ minetest.register_node("mcl_core:brick_block", {
|
||||||
-- Original name: “Bricks”
|
-- Original name: “Bricks”
|
||||||
description = S("Brick Block"),
|
description = S("Brick Block"),
|
||||||
_doc_items_longdesc = S("Brick blocks are a good building material for building solid houses and can take quite a punch."),
|
_doc_items_longdesc = S("Brick blocks are a good building material for building solid houses and can take quite a punch."),
|
||||||
tiles = {"default_brick.png"},
|
tiles = {get_texture("default_brick")},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = {pickaxey=1, building_block=1, material_stone=1},
|
groups = {pickaxey=1, building_block=1, material_stone=1},
|
||||||
|
|
|
@ -256,12 +256,12 @@ mcl_buckets_use_select_box (Buckets use select box) bool false
|
||||||
# See also: https://github.com/minetest/minetest/issues/95
|
# See also: https://github.com/minetest/minetest/issues/95
|
||||||
mcl_translucent_ice (Translucent ice) bool false
|
mcl_translucent_ice (Translucent ice) bool false
|
||||||
|
|
||||||
# Whether the top texture of grass blocks should be world-aligned. If enabled,
|
# Whether the textures should be world-aligned for variations. If enabled,
|
||||||
# grass top texture will be a sheet of 5x5 tiles with pre-defined "random"
|
# some textures will be using sheets of 5x5 varied tiles with pre-defined
|
||||||
# displacement and rotation, spanning across 5 blocks.
|
# "random" displacement and rotation, spanning across 5 blocks.
|
||||||
#
|
#
|
||||||
# This might put some load on the GPU by making it work with a bigger texture.
|
# This might put some load on the GPU by making it work with bigger textures.
|
||||||
mcl_world_aligned_grass_texture (World-aligned grass texture) bool false
|
mcl_world_aligned_textures (World-aligned textures) bool false
|
||||||
|
|
||||||
# Whether to generate fallen logs in some biomes.
|
# Whether to generate fallen logs in some biomes.
|
||||||
# They might not always look pretty and have strange overhangs.
|
# They might not always look pretty and have strange overhangs.
|
||||||
|
|
After Width: | Height: | Size: 860 B |
After Width: | Height: | Size: 754 B |
After Width: | Height: | Size: 417 B |
After Width: | Height: | Size: 874 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 425 B |
After Width: | Height: | Size: 351 B |
After Width: | Height: | Size: 464 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |