From 92cd1dea0150979b67fbc5a99b1594662c0bf1a7 Mon Sep 17 00:00:00 2001 From: Juraj Vajda Date: Wed, 16 Nov 2022 16:26:46 -0500 Subject: [PATCH] Fix distance measure for scroll --- table.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/table.lua b/table.lua index a94bb3e..694fe78 100644 --- a/table.lua +++ b/table.lua @@ -535,6 +535,7 @@ minetest.register_entity('x_enchanting:table_scroll', { local distance = vector.distance(pos, obj:get_pos()) if distance < shortest_distance then + shortest_distance = distance self._player = obj end end