Merge branch 'master' into nalc-1.2

This commit is contained in:
2019-05-04 21:26:03 +02:00
9 changed files with 81 additions and 13 deletions

View File

@ -75,8 +75,11 @@ local function update_entity(pos)
local def = stack:get_definition() or {}
local groups = def.groups or {}
if groups["armor_"..element] then
local texture = def.texture or item:gsub("%:", "_")
table.insert(textures, texture..".png")
if def.texture then
table.insert(textures, def.texture)
else
table.insert(textures, item:gsub("%:", "_")..".png")
end
end
end
end
@ -304,7 +307,7 @@ minetest.register_entity("3d_armor_stand:armor_entity", {
pos = nil,
timer = 0,
on_activate = function(self)
local pos = self.object:getpos()
local pos = self.object:get_pos()
if pos then
self.pos = vector.round(pos)
update_entity(pos)