From d2954c52773faa86e3a414250b8a9f5acd04c787 Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Wed, 24 Mar 2021 19:47:25 +0100 Subject: Get rid of most 5.4.0 texture warnings This commit also shortens the lua_tube.lua code a bit --- tube_registration.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tube_registration.lua') diff --git a/tube_registration.lua b/tube_registration.lua index c530cbf..a77154a 100644 --- a/tube_registration.lua +++ b/tube_registration.lua @@ -26,6 +26,11 @@ local texture_mt = { end } +-- This will remove any semi-transparent pixels +-- because that is still buggy in Minetest, force this as default +local texture_alpha_mode = minetest.features.use_texture_alpha_string_modes + and "clip" or true + local register_one_tube = function(name, tname, dropname, desc, plain, noctrs, ends, short, inv, special, connects, style) noctrs = noctrs or default_noctrs setmetatable(noctrs, texture_mt) @@ -82,6 +87,7 @@ local register_one_tube = function(name, tname, dropname, desc, plain, noctrs, e description = tubedesc, drawtype = "nodebox", tiles = outimgs, + use_texture_alpha = texture_alpha_mode, sunlight_propagates = true, inventory_image = iimg, wield_image = iimg, -- cgit v1.2.3