From f7d51645593600df14e1e693442e5e0d95d63c03 Mon Sep 17 00:00:00 2001 From: wsor4035 <24964441+wsor4035@users.noreply.github.com> Date: Sat, 28 Dec 2024 22:34:54 -0500 Subject: [PATCH] fix https://github.com/mt-mods/homedecor_modpack/issues/88 - improve usage of use_texture_alpha to improve client rendering (#89) --- homedecor_bathroom/init.lua | 1 - homedecor_doors_and_gates/init.lua | 29 ++++++++++++++++------- homedecor_lighting/init.lua | 3 --- homedecor_roofing/init.lua | 2 +- homedecor_tables/coffeetable.lua | 2 +- homedecor_tables/endtable.lua | 2 +- homedecor_tables/misc.lua | 6 ++--- homedecor_windows_and_treatments/init.lua | 2 +- lavalamp/init.lua | 1 - 9 files changed, 27 insertions(+), 21 deletions(-) diff --git a/homedecor_bathroom/init.lua b/homedecor_bathroom/init.lua index cd2e1e5e..14f726dd 100644 --- a/homedecor_bathroom/init.lua +++ b/homedecor_bathroom/init.lua @@ -239,7 +239,6 @@ homedecor.register("toilet_open", { selection_box = toilet_sbox, collision_box = toilet_cbox, drop = "homedecor:toilet", - use_texture_alpha = "blend", groups = {cracky=3, dig_stone = 2}, _sound_def = { key = "node_sound_stone_defaults", diff --git a/homedecor_doors_and_gates/init.lua b/homedecor_doors_and_gates/init.lua index 84356de0..28146472 100644 --- a/homedecor_doors_and_gates/init.lua +++ b/homedecor_doors_and_gates/init.lua @@ -19,6 +19,7 @@ local door_list = { sounds = default.node_sound_wood_defaults(), sound_open = "homedecor_door_open", sound_close = "homedecor_door_close", + use_texture_alpha = "opaque", }, { name = "exterior_fancy", @@ -26,25 +27,29 @@ local door_list = { sounds = default.node_sound_wood_defaults(), sound_open = "homedecor_door_open", sound_close = "homedecor_door_close", - mesh = "homedecor_door_fancy" + mesh = "homedecor_door_fancy", + use_texture_alpha = "blend", }, { name = "french_oak", description = S("French door, Oak-colored"), sounds = default.node_sound_glass_defaults(), - mesh = "homedecor_door_french" + mesh = "homedecor_door_french", + use_texture_alpha = "blend", }, { name = "french_mahogany", description = S("French door, Mahogany-colored"), sounds = default.node_sound_glass_defaults(), - mesh = "homedecor_door_french" + mesh = "homedecor_door_french", + use_texture_alpha = "blend", }, { name = "french_white", description = S("French door, White"), sounds = default.node_sound_glass_defaults(), - mesh = "homedecor_door_french" + mesh = "homedecor_door_french", + use_texture_alpha = "blend", }, { name = "basic_panel", @@ -52,6 +57,7 @@ local door_list = { sounds = default.node_sound_wood_defaults(), sound_open = "homedecor_door_open", sound_close = "homedecor_door_close", + use_texture_alpha = "opaque", }, { name = "wrought_iron", @@ -59,7 +65,8 @@ local door_list = { sounds = default.node_sound_metal_defaults(), sound_open = "doors_steel_door_open", sound_close = "doors_steel_door_close", - mesh = "homedecor_door_wrought_iron" + mesh = "homedecor_door_wrought_iron", + use_texture_alpha = "clip", }, { name = "carolina", @@ -67,6 +74,7 @@ local door_list = { sounds = default.node_sound_wood_defaults(), sound_open = "homedecor_door_open", sound_close = "homedecor_door_close", + use_texture_alpha = "blend", }, { name = "woodglass", @@ -74,19 +82,22 @@ local door_list = { sounds = default.node_sound_wood_defaults(), sound_open = "homedecor_door_open", sound_close = "homedecor_door_close", - mesh = "homedecor_door_wood_glass_3" + mesh = "homedecor_door_wood_glass_3", + use_texture_alpha = "clip", }, { name = "closet_mahogany", description = S("Mahogany Closet Door"), sounds = default.node_sound_wood_defaults(), - mesh = "homedecor_door_closet" + mesh = "homedecor_door_closet", + use_texture_alpha = "clip", }, { name = "closet_oak", description = S("Oak Closet Door"), sounds = default.node_sound_wood_defaults(), - mesh = "homedecor_door_closet" + mesh = "homedecor_door_closet", + use_texture_alpha = "clip", }, } @@ -99,7 +110,7 @@ local function generate_door(def) local default_settings = { tiles = {{ name = "homedecor_door_" .. def.name .. ".png", backface_culling = true }}, inventory_image = "homedecor_door_" .. def.name .. "_inv.png", - use_texture_alpha = "blend", + use_texture_alpha = def.use_texture_alpha or "blend", groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, mesecons = { effector = { diff --git a/homedecor_lighting/init.lua b/homedecor_lighting/init.lua index adcc3559..ac7b11c5 100644 --- a/homedecor_lighting/init.lua +++ b/homedecor_lighting/init.lua @@ -488,7 +488,6 @@ for brightness_level = 0, 14 do description = S("Ground Lantern/Light"), mesh = "homedecor_ground_lantern.obj", tiles = { gen_ls_tex_yellow, "homedecor_generic_metal_wrought_iron.png" }, - use_texture_alpha = "blend", inventory_image = "homedecor_ground_lantern_inv.png", wield_image = "homedecor_ground_lantern_inv.png", groups = {snappy=3, not_in_creative_inventory = nici, dig_glass=1}, @@ -515,7 +514,6 @@ for brightness_level = 0, 14 do description = S("Hanging Lantern/Light"), mesh = "homedecor_hanging_lantern.obj", tiles = { "homedecor_generic_metal_wrought_iron.png", gen_ls_tex_yellow }, - use_texture_alpha = "blend", inventory_image = "homedecor_hanging_lantern_inv.png", wield_image = "homedecor_hanging_lantern_inv.png", groups = {snappy=3, not_in_creative_inventory = nici, dig_glass=1}, @@ -951,7 +949,6 @@ for _, light_brightn_name in ipairs({"off", "on"}) do gen_ls_tex_yellow, "homedecor_generic_metal_wrought_iron.png" }, - use_texture_alpha = "blend", inventory_image = "homedecor_wall_lamp_inv.png", groups = {snappy=3, not_in_creative_inventory = nici, dig_glass=1}, light_source = onflag and (minetest.LIGHT_MAX - 3) or nil, diff --git a/homedecor_roofing/init.lua b/homedecor_roofing/init.lua index 123f12bd..54993f58 100644 --- a/homedecor_roofing/init.lua +++ b/homedecor_roofing/init.lua @@ -159,7 +159,7 @@ homedecor_roofing.register_slope = function(modname, subname, recipeitem, groups paramtype2 = "facedir", selection_box = slope_cbox, collision_box = slope_cbox, - use_texture_alpha = "blend", + use_texture_alpha = "clip", groups = groups, is_ground_content = false, _mcl_hardness=1.6, diff --git a/homedecor_tables/coffeetable.lua b/homedecor_tables/coffeetable.lua index 16af01e8..70a69d02 100644 --- a/homedecor_tables/coffeetable.lua +++ b/homedecor_tables/coffeetable.lua @@ -57,7 +57,7 @@ minetest.register_node(":lrfurn:coffeetable", { }, paramtype = "light", paramtype2 = "facedir", - use_texture_alpha = "blend", + use_texture_alpha = "clip", groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, axey=5}, is_ground_content = false, _mcl_hardness=1.6, diff --git a/homedecor_tables/endtable.lua b/homedecor_tables/endtable.lua index e772d4a8..57494c31 100644 --- a/homedecor_tables/endtable.lua +++ b/homedecor_tables/endtable.lua @@ -15,7 +15,7 @@ minetest.register_node(":lrfurn:endtable", { }, paramtype = "light", paramtype2 = "facedir", - use_texture_alpha = "blend", + use_texture_alpha = "clip", groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, axey=5}, is_ground_content = false, _mcl_hardness=1.6, diff --git a/homedecor_tables/misc.lua b/homedecor_tables/misc.lua index 1cf74504..f38419b6 100644 --- a/homedecor_tables/misc.lua +++ b/homedecor_tables/misc.lua @@ -34,7 +34,7 @@ for _, t in ipairs(leg_materials) do inventory_image = "homedecor_table_legs_"..name..".png", wield_image = "homedecor_table_legs_"..name..".png", walkable = false, - use_texture_alpha = "blend", + use_texture_alpha = "clip", groups = {snappy=3, dig_tree=2}, _sound_def = { key = "node_sound_wood_defaults", @@ -79,7 +79,7 @@ for i, mat in ipairs(tabletop_materials) do 'blank.png', }, wield_image = 'homedecor_'..m..'_table_'..shape..'_inv.png', - use_texture_alpha = "blend", + use_texture_alpha = "clip", groups = { snappy = 3, dig_tree=2 }, _sound_def = { key = s, @@ -117,7 +117,7 @@ for i, mat in ipairs(tabletop_materials) do 'homedecor_'..m..'_table_edges.png', "homedecor_table_legs_"..leg_mat..".png", }, - use_texture_alpha = "blend", + use_texture_alpha = "clip", groups = { snappy = 3, dig_tree=2 }, _sound_def = { key = s diff --git a/homedecor_windows_and_treatments/init.lua b/homedecor_windows_and_treatments/init.lua index d65ff5a2..e8941c3b 100644 --- a/homedecor_windows_and_treatments/init.lua +++ b/homedecor_windows_and_treatments/init.lua @@ -12,7 +12,7 @@ homedecor.register("window_quartered", { "homedecor_window_quartered.png", "homedecor_window_quartered.png" }, - use_texture_alpha = "blend", + use_texture_alpha = "clip", groups = {snappy=3, dig_glass=2}, _sound_def = { key = "node_sound_glass_defaults", diff --git a/lavalamp/init.lua b/lavalamp/init.lua index 72a3171f..d2954922 100644 --- a/lavalamp/init.lua +++ b/lavalamp/init.lua @@ -22,7 +22,6 @@ minetest.register_node("lavalamp:lavalamp", { }, }, }, - use_texture_alpha = "blend", inventory_image = "lavalamp_lamp_inv.png", paramtype = "light", paramtype2 = "color",