1
0
mirror of https://github.com/Sokomine/cottages.git synced 2024-09-27 06:50:33 +02:00

override anvil entity if cottages anvil is enabled

This commit is contained in:
flux 2022-10-18 08:25:26 -07:00
parent 77346267d7
commit cc6ee4f56c
No known key found for this signature in database
GPG Key ID: 9333B27816848A15

View File

@ -63,3 +63,21 @@ else
end,
})
end
if minetest.registered_entities["anvil:item"] then
-- luacheck: globals minetest
minetest.registered_entities["anvil:item"].on_activate = function(self)
if self.object then
self.object:remove()
end
end
else
minetest.register_entity(":anvil:item", {
on_activate = function(self)
if self.object then
self.object:remove()
end
end
})
end