diff --git a/functions.lua b/functions.lua index 2bcf56c..213189f 100644 --- a/functions.lua +++ b/functions.lua @@ -800,6 +800,7 @@ local rotate = function(digtron_id, axis, player_name) for _, removed_pos in ipairs(removed) do minetest.check_for_falling(removed_pos) end + invalidate_layout_cache(digtron_id) end return true else diff --git a/inventories.lua b/inventories.lua index b902a7b..7704620 100644 --- a/inventories.lua +++ b/inventories.lua @@ -113,7 +113,8 @@ local get_predictive_inventory = function(digtron_id) local existing = predictive_inventory[digtron_id] if existing then return existing end - local predictive_inv = minetest.create_detached_inventory("digtron_predictive_"..digtron_id, detached_inventory_callbacks) + -- Using digtron_id as the player_name parameter to prevent this from being sent on the network to anyone real. + local predictive_inv = minetest.create_detached_inventory("digtron_predictive_"..digtron_id, detached_inventory_callbacks, digtron_id) predictive_inventory[digtron_id] = predictive_inv local source_inv = retrieve_inventory(digtron_id)