mirror of
https://github.com/minetest-mods/drawers.git
synced 2024-11-09 16:33:44 +01:00
Fix nil inv bug
This should in theory fix the bug caused by other mobs or nodes punching a drawer.
This commit is contained in:
parent
d972c830fc
commit
8fd4be6567
@ -180,6 +180,9 @@ core.register_entity("drawers:visual", {
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
local inv = puncher:get_inventory()
|
local inv = puncher:get_inventory()
|
||||||
|
if inv == nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
local spaceChecker = ItemStack(self.itemName)
|
local spaceChecker = ItemStack(self.itemName)
|
||||||
if add_stack then
|
if add_stack then
|
||||||
spaceChecker:set_count(spaceChecker:get_stack_max())
|
spaceChecker:set_count(spaceChecker:get_stack_max())
|
||||||
|
Loading…
Reference in New Issue
Block a user