From 3bcf3b5f2f37a7b1268c6a072671934666852017 Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 28 Jan 2015 21:47:50 +0100 Subject: [PATCH] use on_destruct instead of after_dig_node to clean up the cache entry to avoid any leaking during worldediting --- autocrafter.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/autocrafter.lua b/autocrafter.lua index 2ccdba6..40d7c4c 100644 --- a/autocrafter.lua +++ b/autocrafter.lua @@ -251,6 +251,8 @@ minetest.register_node("pipeworks:autocrafter", { after_place_node = pipeworks.scan_for_tube_objects, after_dig_node = function(pos) pipeworks.scan_for_tube_objects(pos) + end, + on_destruct = function(pos) autocrafterCache[minetest.hash_node_position(pos)] = nil end, allow_metadata_inventory_put = function(pos, listname, index, stack, player)