From bec5339fc611e9ccdc5e85143b8e95767be9f829 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Thu, 18 Feb 2021 10:39:19 +0100 Subject: [PATCH] Update existing occurences of use_texture_alpha to the Minetest 5.4 convention if the feature is detected --- mods/ITEMS/mcl_core/nodes_base.lua | 8 +++++--- mods/ITEMS/mcl_core/nodes_glass.lua | 2 +- mods/ITEMS/mcl_core/nodes_misc.lua | 2 +- mods/ITEMS/mcl_portals/portal_end.lua | 2 +- mods/ITEMS/mcl_portals/portal_nether.lua | 2 +- mods/ITEMS/xpanes/init.lua | 2 +- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/mods/ITEMS/mcl_core/nodes_base.lua b/mods/ITEMS/mcl_core/nodes_base.lua index 78e2f14956..a20fca6cb3 100644 --- a/mods/ITEMS/mcl_core/nodes_base.lua +++ b/mods/ITEMS/mcl_core/nodes_base.lua @@ -3,11 +3,13 @@ local S = minetest.get_translator("mcl_core") -- Simple solid cubic nodes, most of them are the ground materials and simple building blocks local translucent_ice = minetest.settings:get_bool("mcl_translucent_ice", false) -local ice_drawtype +local ice_drawtype, ice_texture_alpha if translucent_ice then ice_drawtype = "glasslike" + ice_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or true else ice_drawtype = "normal" + ice_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false end mcl_core.fortune_drop_ore = { @@ -820,7 +822,7 @@ minetest.register_node("mcl_core:ice", { tiles = {"default_ice.png"}, is_ground_content = true, paramtype = "light", - use_texture_alpha = translucent_ice, + use_texture_alpha = ice_texture_alpha, stack_max = 64, groups = {handy=1,pickaxey=1, slippery=3, building_block=1, ice=1}, drop = "", @@ -886,7 +888,7 @@ for i=0,3 do tiles = {"mcl_core_frosted_ice_"..i..".png"}, is_ground_content = false, paramtype = "light", - use_texture_alpha = translucent_ice, + use_texture_alpha = ice_texture_alpha, stack_max = 64, groups = {handy=1, frosted_ice=1, slippery=3, not_in_creative_inventory=1, ice=1}, drop = "", diff --git a/mods/ITEMS/mcl_core/nodes_glass.lua b/mods/ITEMS/mcl_core/nodes_glass.lua index 83d2c10656..85bf614f43 100644 --- a/mods/ITEMS/mcl_core/nodes_glass.lua +++ b/mods/ITEMS/mcl_core/nodes_glass.lua @@ -44,7 +44,7 @@ function mcl_core.add_stained_glass(desc, recipeitem, colorgroup, color) tiles = {"mcl_core_glass_"..color..".png"}, paramtype = "light", sunlight_propagates = true, - use_texture_alpha = true, + use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or true, stack_max = 64, -- TODO: Add color to groups groups = {handy=1, glass=1, building_block=1, material_glass=1}, diff --git a/mods/ITEMS/mcl_core/nodes_misc.lua b/mods/ITEMS/mcl_core/nodes_misc.lua index bbfe75668e..3056822449 100644 --- a/mods/ITEMS/mcl_core/nodes_misc.lua +++ b/mods/ITEMS/mcl_core/nodes_misc.lua @@ -40,7 +40,7 @@ minetest.register_node("mcl_core:slimeblock", { }, tiles = {"mcl_core_slime.png"}, paramtype = "light", - use_texture_alpha = true, + use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or true, stack_max = 64, -- According to Minecraft Wiki, bouncing off a slime block from a height off 255 blocks should result in a bounce height of 50 blocks -- bouncy=44 makes the player bounce up to 49.6. This value was chosen by experiment. diff --git a/mods/ITEMS/mcl_portals/portal_end.lua b/mods/ITEMS/mcl_portals/portal_end.lua index 5919ef213c..db0bf0092d 100644 --- a/mods/ITEMS/mcl_portals/portal_end.lua +++ b/mods/ITEMS/mcl_portals/portal_end.lua @@ -66,7 +66,7 @@ minetest.register_node("mcl_portals:portal_end", { drawtype = "nodebox", paramtype = "light", sunlight_propagates = true, - use_texture_alpha = true, + use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or true, walkable = false, diggable = false, pointable = false, diff --git a/mods/ITEMS/mcl_portals/portal_nether.lua b/mods/ITEMS/mcl_portals/portal_nether.lua index d35520015c..3582c0b35c 100644 --- a/mods/ITEMS/mcl_portals/portal_nether.lua +++ b/mods/ITEMS/mcl_portals/portal_nether.lua @@ -131,7 +131,7 @@ minetest.register_node("mcl_portals:portal", { paramtype = "light", paramtype2 = "facedir", sunlight_propagates = true, - use_texture_alpha = true, + use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or true, walkable = false, diggable = false, pointable = false, diff --git a/mods/ITEMS/xpanes/init.lua b/mods/ITEMS/xpanes/init.lua index c17f2cd69d..262ecdcf55 100644 --- a/mods/ITEMS/xpanes/init.lua +++ b/mods/ITEMS/xpanes/init.lua @@ -194,7 +194,7 @@ local pane = function(description, node, append) _doc_items_entry_name = entry_name, _doc_items_longdesc = longdesc, textures = {texture1, texture1, "xpanes_top_glass"..append..".png"}, - use_texture_alpha = true, + use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or true, inventory_image = texture1, wield_image = texture1, sounds = mcl_sounds.node_sound_glass_defaults(),