From 8fd4be6567a09823d0c8a844e06d524f8d19480e Mon Sep 17 00:00:00 2001 From: isaiah658 Date: Sun, 5 May 2019 07:21:46 -0500 Subject: [PATCH] Fix nil inv bug This should in theory fix the bug caused by other mobs or nodes punching a drawer. --- lua/visual.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/visual.lua b/lua/visual.lua index 8079e39..2843574 100755 --- a/lua/visual.lua +++ b/lua/visual.lua @@ -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())