forked from mtcontrib/mob_horse
		
	add nil check for ent
This commit is contained in:
		
							
								
								
									
										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) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user