From 577404c8508de4610988ee74911cce3fe601c342 Mon Sep 17 00:00:00 2001 From: unknown <24964441+wsor4035@users.noreply.github.com> Date: Sat, 21 Jan 2023 15:48:24 -0500 Subject: [PATCH] fix https://github.com/mt-mods/plantlife_modpack/issues/38 - add use_texture_alpa param to nodes that have textures with alpa --- bushes/init.lua | 3 +++ dryplants/init.lua | 2 ++ ferns/gianttreefern.lua | 3 +++ ferns/treefern.lua | 1 + molehills/init.lua | 1 + pl_seaweed/init.lua | 1 + pl_sunflowers/init.lua | 1 + pl_waterlilies/init.lua | 1 + trunks/nodes.lua | 4 ++++ youngtrees/init.lua | 1 + 10 files changed, 18 insertions(+) diff --git a/bushes/init.lua b/bushes/init.lua index 715afb1..a24812e 100644 --- a/bushes/init.lua +++ b/bushes/init.lua @@ -51,6 +51,7 @@ for i in pairs(BushBranchCenter) do "bushes_leaves_"..TexNum..".png", "bushes_branches_center_"..TexNum..".png" }, + use_texture_alpha = "clip", node_box = { type = "fixed", fixed = { @@ -93,6 +94,7 @@ for i in pairs(BushBranchSide) do --[[back]] "bushes_branches_center_"..TexNum..".png",-- unless U really want 'em 2 B different --[[front]] "bushes_branches_right_"..TexNum..".png" }, + use_texture_alpha = "clip", node_box = { type = "fixed", fixed = { @@ -129,6 +131,7 @@ for i in pairs(BushLeafNode) do description = S("Bush Leaves @1", Num), drawtype = "allfaces_optional", tiles = {"bushes_leaves_"..Num..".png"}, + use_texture_alpha = "clip", paramtype = "light", groups = { -- MM: Should we add leafdecay? snappy=3, diff --git a/dryplants/init.lua b/dryplants/init.lua index c145ae0..77ca2dd 100644 --- a/dryplants/init.lua +++ b/dryplants/init.lua @@ -130,6 +130,7 @@ minetest.register_node("dryplants:grass", { paramtype = "light", sunlight_propagates = true, tiles = {"dryplants_grass.png"}, + use_texture_alpha = "clip", drawtype = "nodebox", node_box = { type = "fixed", @@ -161,6 +162,7 @@ minetest.register_node("dryplants:hay", { paramtype = "light", sunlight_propagates = true, tiles = {"dryplants_hay.png"}, + use_texture_alpha = "clip", drawtype = "nodebox", node_box = { type = "fixed", diff --git a/ferns/gianttreefern.lua b/ferns/gianttreefern.lua index df8c541..58c8f79 100644 --- a/ferns/gianttreefern.lua +++ b/ferns/gianttreefern.lua @@ -200,6 +200,7 @@ minetest.register_node("ferns:tree_fern_leave_big_end", { paramtype = "light", paramtype2 = "facedir", tiles = { "ferns_tree_fern_leave_big_end.png" }, + use_texture_alpha = "clip", walkable = false, node_box = { type = "fixed", @@ -232,6 +233,7 @@ minetest.register_node("ferns:fern_trunk_big_top", { "ferns_fern_trunk_big_top.png^ferns_tree_fern_leave_big_cross.png", "ferns_fern_trunk_big.png" }, + use_texture_alpha = "clip", node_box = { type = "fixed", -- {left, bottom, front, right, top, back } @@ -269,6 +271,7 @@ minetest.register_node("ferns:fern_trunk_big", { "ferns_fern_trunk_big_top.png", "ferns_fern_trunk_big.png" }, + use_texture_alpha = "clip", node_box = { type = "fixed", fixed = {-1/4, -1/2, -1/4, 1/4, 1/2, 1/4}, diff --git a/ferns/treefern.lua b/ferns/treefern.lua index 45b57ca..43a0db8 100644 --- a/ferns/treefern.lua +++ b/ferns/treefern.lua @@ -147,6 +147,7 @@ minetest.register_node("ferns:fern_trunk", { "ferns_fern_trunk_top.png", "ferns_fern_trunk.png" }, + use_texture_alpha = "clip", node_box = { type = "fixed", fixed = {-1/8, -1/2, -1/8, 1/8, 1/2, 1/8}, diff --git a/molehills/init.lua b/molehills/init.lua index 872e987..aba3d41 100644 --- a/molehills/init.lua +++ b/molehills/init.lua @@ -26,6 +26,7 @@ minetest.register_node("molehills:molehill",{ description = S("Mole Hill"), inventory_image = "molehills_side.png", tiles = { "molehills_dirt.png" }, + use_texture_alpha = "clip", paramtype = "light", selection_box = mh_cbox, collision_box = mh_cbox, diff --git a/pl_seaweed/init.lua b/pl_seaweed/init.lua index 7dd0392..49885d4 100644 --- a/pl_seaweed/init.lua +++ b/pl_seaweed/init.lua @@ -25,6 +25,7 @@ for i in ipairs(algae_list) do "flowers_seaweed"..num..".png", "flowers_seaweed"..num..".png^[transformFY" }, + use_texture_alpha = "clip", inventory_image = "flowers_seaweed_2.png", wield_image = "flowers_seaweed_2.png", sunlight_propagates = true, diff --git a/pl_sunflowers/init.lua b/pl_sunflowers/init.lua index f997da0..6416790 100644 --- a/pl_sunflowers/init.lua +++ b/pl_sunflowers/init.lua @@ -23,6 +23,7 @@ minetest.register_node(":flowers:sunflower", { inventory_image = "flowers_sunflower_inv.png", mesh = "flowers_sunflower.obj", tiles = { "flowers_sunflower.png" }, + use_texture_alpha = "clip", walkable = false, buildable_to = true, is_ground_content = true, diff --git a/pl_waterlilies/init.lua b/pl_waterlilies/init.lua index 94fc3be..57edad3 100644 --- a/pl_waterlilies/init.lua +++ b/pl_waterlilies/init.lua @@ -36,6 +36,7 @@ for i in ipairs(lilies_list) do "flowers_waterlily"..deg2..".png", "flowers_waterlily"..deg2..".png^[transformFY" }, + use_texture_alpha = "clip", inventory_image = "flowers_waterlily.png", wield_image = "flowers_waterlily.png", sunlight_propagates = true, diff --git a/trunks/nodes.lua b/trunks/nodes.lua index 10c1c6e..73cd9a1 100644 --- a/trunks/nodes.lua +++ b/trunks/nodes.lua @@ -24,6 +24,7 @@ for i in pairs(NoDe) do "trunks_twig_"..NR..".png^[transformFY", -- mirror "trunks_twig_6.png" -- empty }, + use_texture_alpha = "clip", paramtype = "light", paramtype2 = "facedir", walkable = false, @@ -88,6 +89,7 @@ for r = 0, 3 do description = S("Moss"), drawtype = "nodebox", tiles = {"trunks_moss.png"..xform}, + use_texture_alpha = "clip", inventory_image = "trunks_moss.png", wield_image = "trunks_moss.png", paramtype = "light", @@ -110,6 +112,7 @@ for r = 0, 3 do tiles = {"trunks_moss_fungus.png"..xform}, inventory_image = "trunks_moss_fungus.png", wield_image = "trunks_moss_fungus.png", + use_texture_alpha = "clip", paramtype = "light", paramtype2 = "wallmounted", sunlight_propagates = true, @@ -376,6 +379,7 @@ for i in pairs(TRuNKS) do --[[back]] MoD.."_"..TRuNK..".png", --[[front]] MoD.."_"..TRuNK..".png" }, + use_texture_alpha = "clip", drawtype = "nodebox", selection_box = {type = "fixed", fixed = roots_cube}, node_box = {type = "fixed", fixed = roots_sheet}, diff --git a/youngtrees/init.lua b/youngtrees/init.lua index 96bcb9a..586b5e4 100644 --- a/youngtrees/init.lua +++ b/youngtrees/init.lua @@ -31,6 +31,7 @@ minetest.register_node("youngtrees:youngtree2_middle",{ description = S("Young Tree 2 (middle)"), drawtype="nodebox", tiles = {"youngtree2branch.png"}, + use_texture_alpha = "clip", inventory_image = "youngtree2branch.png", wield_image = "youngtree2branch.png", paramtype = "light",