From d63d32b42ba9a8e397b572e17bf7735a0792ab36 Mon Sep 17 00:00:00 2001 From: R3R3R3 <24302636+R3R3R3@users.noreply.github.com> Date: Mon, 10 Feb 2020 19:38:48 +0100 Subject: [PATCH] Override on_punch for poster node definition The signs_api `register_sign`'s default `on_punch` sets a sign's formspec to the sign editor. If we protect a poster and then punch/break it, subsequent attempts to view the poster will briefly cause the the sign editor to display before the actual poster formspec. Small, but annoying. --- signs/nodes.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/signs/nodes.lua b/signs/nodes.lua index b04c463..df3da54 100644 --- a/signs/nodes.lua +++ b/signs/nodes.lua @@ -210,6 +210,9 @@ local models = { on_construct = display_api.on_construct, on_rightclick = display_poster, on_receive_fields = on_receive_fields_poster, + on_punch = function(pos, node, player, pointed_thing) + display_api.update_entities(pos) + end, }, }, label_small = {