Fix weird-looking cactus when held by enderman

This commit is contained in:
Wuzzy 2017-08-23 04:34:06 +02:00
parent 6d84a139d6
commit e2b57327fe
5 changed files with 42 additions and 7 deletions

View file

@ -39,15 +39,21 @@ local create_enderman_textures = function(block_type, itemstring)
local tiles = minetest.registered_nodes[itemstring].tiles
local textures = {}
local last
for i = 1, 6 do
if type(tiles[i]) == "string" then
last = tiles[i]
elseif type(tiles[i]) == "table" then
if tiles[i].name then
last = tiles[i].name
if mobs_mc.enderman_block_texture_overrides[itemstring] then
-- Texture override available? Use these instead!
textures = mobs_mc.enderman_block_texture_overrides[itemstring]
else
-- Extract the texture names
for i = 1, 6 do
if type(tiles[i]) == "string" then
last = tiles[i]
elseif type(tiles[i]) == "table" then
if tiles[i].name then
last = tiles[i].name
end
end
table.insert(textures, last)
end
table.insert(textures, last)
end
return {
"blank.png",