Player skins: Adjust inventory preview image, too

This commit is contained in:
Wuzzy 2019-03-05 01:50:51 +01:00
parent a4d40560c3
commit 2c5038ad05
6 changed files with 59 additions and 32 deletions

View file

@ -70,10 +70,22 @@ function mcl_player.player_set_model(player, model_name)
player_model[name] = model_name
end
function mcl_player.player_set_textures(player, textures)
function mcl_player.player_set_textures(player, textures, preview)
local name = player:get_player_name()
player_textures[name] = textures
player:set_properties({textures = textures,})
if preview then
player:set_attribute("mcl_player:preview", preview)
end
end
function mcl_player.player_get_preview(player)
local preview = player:get_attribute("mcl_player:preview")
if not preview then
return "player.png"
else
return preview
end
end
function mcl_player.player_set_animation(player, anim_name, speed)