mirror of
https://codeberg.org/tenplus1/mob_horse.git
synced 2025-01-06 16:00:20 +01:00
add nil check for ent
This commit is contained in:
parent
12e1ca60df
commit
59e3dcdaad
2
init.lua
2
init.lua
@ -147,7 +147,7 @@ local apply_shoes = function(name, itemstack, obj, shoes, speed, jump, reverse)
|
||||
local mob = obj.ref
|
||||
local ent = mob:get_luaentity()
|
||||
|
||||
if ent.name and ent.name == "mob_horse:horse" then
|
||||
if ent and ent.name and ent.name == "mob_horse:horse" then
|
||||
|
||||
if ent.shoed then
|
||||
minetest.add_item(mob:getpos(), ent.shoed)
|
||||
|
Loading…
Reference in New Issue
Block a user