From 0842a36aa6f4a45a10a3ec1182dedcec1d4aac61 Mon Sep 17 00:00:00 2001 From: jordan4ibanez Date: Thu, 8 Apr 2021 14:28:07 -0400 Subject: [PATCH] Fix extreme mesecons/redstone crashing at world border --- mods/ITEMS/REDSTONE/mesecons/internal.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mods/ITEMS/REDSTONE/mesecons/internal.lua b/mods/ITEMS/REDSTONE/mesecons/internal.lua index 7986c2908b..78d675e47f 100644 --- a/mods/ITEMS/REDSTONE/mesecons/internal.lua +++ b/mods/ITEMS/REDSTONE/mesecons/internal.lua @@ -483,6 +483,12 @@ function mesecon.turnoff(pos, link) for _, r in ipairs(mesecon.rule2meta(f.link, mesecon.rules.mcl_alldirs_spread)) do local np = vector.add(f.pos, r) local n = mesecon.get_node_force(np) + + if not n then + mcl_explosions.explode(f.pos, 10) + return + end + if mesecon.is_receptor_on(n.name) then local receptorrules = mesecon.receptor_get_rules(n) for _, rr in pairs(receptorrules) do