mirror of
https://github.com/minetest-mods/3d_armor.git
synced 2025-07-10 04:00:27 +02:00
Merge branch 'master' of yunohost:mtcontrib/minetest-3d_armor into dev
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user