From dee2de81a55d6c887791ec3c963f8796ed56130d Mon Sep 17 00:00:00 2001 From: Maksim Date: Sun, 6 Sep 2020 16:57:54 +0200 Subject: [PATCH] [1.11.2] Player_api: improve wieldview --- files/player_api/wieldview.lua | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/files/player_api/wieldview.lua b/files/player_api/wieldview.lua index 26fd5c8..0e10be5 100644 --- a/files/player_api/wieldview.lua +++ b/files/player_api/wieldview.lua @@ -20,16 +20,18 @@ minetest.after(1, function() def.drawtype == "liquid" or def.drawtype:sub(1, 8) == "allfaces" or def.drawtype:sub(1, 5) == "glass") then - if not def.tiles[3] ~= "" and type(def.tiles[3]) == "string" then - wield_cubes[name] = def.tiles[1] - else + if def.tiles[3] ~= "" and type(def.tiles[3]) == "string" then wield_cubes[name] = def.tiles[3] + else + wield_cubes[name] = def.tiles[1] end else - if not def.tiles[3] ~= "" and type(def.tiles[3]) == "string" then - wield_tiles[name] = def.tiles[1] - else + if (def.tiles[6] ~= "" and type(def.tiles[6]) == "string") then + wield_tiles[name] = def.tiles[6] + elseif (def.tiles[3] ~= "" and type(def.tiles[3]) == "string") then wield_tiles[name] = def.tiles[3] + else + wield_tiles[name] = def.tiles[1] end end end