Fix typo/crash

This commit is contained in:
NO11 2022-03-23 18:30:34 +00:00
parent aeff7cf1a4
commit 63a156c30c

View file

@ -196,7 +196,7 @@ local function spawn_banner_entity(pos, hanging, itemstack)
local imeta = itemstack:get_meta() local imeta = itemstack:get_meta()
local layers_raw = imeta:get_string("layers") local layers_raw = imeta:get_string("layers")
local layers = minetest.deserialize(layers_raw) local layers = minetest.deserialize(layers_raw)
local colorid = mcl_banners.color_reverse[itemstack:get_name()] local colorid = mcl_banners.color_reverse(itemstack:get_name())
banner:get_luaentity():_set_textures(colorid, layers) banner:get_luaentity():_set_textures(colorid, layers)
local mname = imeta:get_string("name") local mname = imeta:get_string("name")
if mname and mname ~= "" then if mname and mname ~= "" then