forked from VoxeLibre/VoxeLibre
theorically support enchantments
This commit is contained in:
parent
a3d2761215
commit
132529d8f4
|
@ -31,13 +31,19 @@ local function calculate_color(first, last)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function get_texture_function(texture)
|
local function get_texture_function(texture)
|
||||||
--TODO: add enchantments support
|
|
||||||
local function get_texture(_, itemstack)
|
local function get_texture(_, itemstack)
|
||||||
|
local out
|
||||||
local color = itemstack:get_meta():get_string("color")
|
local color = itemstack:get_meta():get_string("color")
|
||||||
if color == "" or color == nil then
|
if color == "" or color == nil then
|
||||||
return texture
|
out = texture
|
||||||
else
|
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
|
||||||
end
|
end
|
||||||
return get_texture
|
return get_texture
|
||||||
|
|
Loading…
Reference in New Issue