mirror of
https://github.com/tacigar/maidroid.git
synced 2024-11-16 07:10:21 +01:00
Merge pull request #174 from Rui-Minetest/patch-1
Add nil check for egg_entity
This commit is contained in:
commit
b574f4495a
|
@ -162,8 +162,10 @@ do -- register egg writer
|
||||||
|
|
||||||
local function on_metadata_inventory_take_from_main(pos)
|
local function on_metadata_inventory_take_from_main(pos)
|
||||||
local egg_entity = get_nearest_egg_entity(pos)
|
local egg_entity = get_nearest_egg_entity(pos)
|
||||||
|
if egg_entity then
|
||||||
egg_entity.object:remove()
|
egg_entity.object:remove()
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
maidroid_tool._aux.register_writer("maidroid_tool:egg_writer", {
|
maidroid_tool._aux.register_writer("maidroid_tool:egg_writer", {
|
||||||
description = "maidroid tool : egg writer",
|
description = "maidroid tool : egg writer",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user