Skip to content

Commit

Permalink
fix mt-mods#88 - improve usage of use_texture_alpha to improve client…
Browse files Browse the repository at this point in the history
… rendering (mt-mods#89)
  • Loading branch information
wsor4035 authored Dec 29, 2024
1 parent ecbedd7 commit f7d5164
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 21 deletions.
1 change: 0 additions & 1 deletion homedecor_bathroom/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
29 changes: 20 additions & 9 deletions homedecor_doors_and_gates/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,74 +19,85 @@ 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",
description = S("Fancy Wood/Glass Door"),
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",
description = S("Basic white panel Door"),
sounds = default.node_sound_wood_defaults(),
sound_open = "homedecor_door_open",
sound_close = "homedecor_door_close",
use_texture_alpha = "opaque",
},
{
name = "wrought_iron",
description = S("Wrought Iron Gate/Door"),
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",
description = S("Wooden Carolina door"),
sounds = default.node_sound_wood_defaults(),
sound_open = "homedecor_door_open",
sound_close = "homedecor_door_close",
use_texture_alpha = "blend",
},
{
name = "woodglass",
description = S("Wooden door with glass insert, type 3"),
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",
},
}

Expand All @@ -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 = {
Expand Down
3 changes: 0 additions & 3 deletions homedecor_lighting/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand All @@ -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},
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion homedecor_roofing/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion homedecor_tables/coffeetable.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion homedecor_tables/endtable.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions homedecor_tables/misc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion homedecor_windows_and_treatments/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion lavalamp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ minetest.register_node("lavalamp:lavalamp", {
},
},
},
use_texture_alpha = "blend",
inventory_image = "lavalamp_lamp_inv.png",
paramtype = "light",
paramtype2 = "color",
Expand Down

0 comments on commit f7d5164

Please sign in to comment.