From b19c712453a5e1585b3c0efd1cca0129975e5dac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20P=C3=A9rez-Cerezo?= Date: Sun, 1 Dec 2019 12:37:59 +0100 Subject: ups String has to be completely composed of color code, to avoid texture injection --- advtrains_train_jre231/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advtrains_train_jre231/init.lua b/advtrains_train_jre231/init.lua index 973361e..757d641 100644 --- a/advtrains_train_jre231/init.lua +++ b/advtrains_train_jre231/init.lua @@ -10,7 +10,7 @@ local function jr_set_livery(self, puncher, itemstack,data) local meta = itemstack:get_meta() local color = meta:get_string("paint_color") local alpha = tonumber(meta:get_string("alpha")) - if color and color:find("#%x%x%x%x%x%x") then + if color and color:find("^#%x%x%x%x%x%x$") then data.livery = self.base_texture.."^("..self.base_livery.."^[colorize:"..color..":255)" -- livery texture has no own texture.... self:set_textures(data) end -- cgit v1.2.3