Oh, I have not yet tried this with CME but I think I understand what you mean.BrunoMine wrote:I realized a change in the code
crossbow.luaCode: Select all
76 - self:stop(object:getpos()) 76 + local luaentity = object:get_luaentity() 77 + if luaentity == nil or luaentity.mob_name == nil then 78 + self:stop(object:getpos()) 79 + else 80 + self.object:remove() 81 + end
This code should do exactly the same thing but is slightly more robust.
Code: Select all
local luaentity = object:get_luaentity() or {}
if luaentity.mob_name then
self.object:remove()
else
self:stop(object:getpos())
end
I will try out CME myself when I get a chance and see if I can come up with a cleaner solution.