
Node Information on_punch [punchinfo]
- Licence: Code: MIT (see LICENSE), Media: CC-BY-SA 3.0
- GitHub Repository
- Download
- YouTube Video
- Dependencies: None.
The concept of PunchInfo is very simple, whenever a player left-clicks (i.e. punches) a node, information about that node is shown. This information includes the description, itemstring, top texture, light emission level, drawtype, and groups. The HUD is removed after 2 seconds (configurable in minetest.conf with punchnode.hud_show_time, integer). This can also be configured per-player via the chatcommand.
If you find the HUD to be too big, it can be configured to one of three sizes in minetest.conf with punchnode.hud_size. The HUD size can be set to one of three integers, 1, 2, or 3 (2 is default).
Chatcommand
The HUD can be managed and customized per-player with the /punchinfo command. This single command accepts several parameters, as seen below.
clear: Clears custom configuration for the player (show time, size, etc...)
get <key>: Gets HUD information (e.g. size)
enable: Enables the PunchInfo HUD
disable: Disables the PunchInfo HUD
time <integer>: Sets the time before the HUD is hidden
size <integer>: Sets the HUD size to 1, 2, or 3