1
0
Fork 0

theorically support enchantments

This commit is contained in:
AFCMS 2022-05-01 01:53:51 +02:00
parent a3d2761215
commit 132529d8f4
Signed by untrusted user: AFCMS
GPG Key ID: 8720389A25B652E3
1 changed files with 9 additions and 3 deletions

View File

@ -31,13 +31,19 @@ local function calculate_color(first, last)
end
local function get_texture_function(texture)
--TODO: add enchantments support
local function get_texture(_, itemstack)
local out
local color = itemstack:get_meta():get_string("color")
if color == "" or color == nil then
return texture
out = texture
else
return texture.."^[multiply:"..color
out = texture.."^[multiply:"..color
end
if mcl_enchanting.is_enchanted(itemstack) then
return out.."^"..mcl_enchanting.overlay
else
return out
end
end
return get_texture