mirror of
https://github.com/minetest-mods/drawers.git
synced 2024-12-22 20:42:22 +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
|
||||
end
|
||||
local inv = puncher:get_inventory()
|
||||
if inv == nil then
|
||||
return
|
||||
end
|
||||
local spaceChecker = ItemStack(self.itemName)
|
||||
if add_stack then
|
||||
spaceChecker:set_count(spaceChecker:get_stack_max())
|
||||
|
Loading…
Reference in New Issue
Block a user