TPH's Adaptive Crosshair

Description

HEAVILY INSPIRED BY SURV'S ADAPTIVE CROSSHAIR (https://content.luanti.org/packages/SURV/adaptive_crosshair/) and intends to do the same things. Basically wanted to do my own rendition of it and see how well I'd do lol

Depends on https://content.luanti.org/packages/TPH/tph_wielditem/ for detecting wielded item changes

Shows whether or not held item is:

  • edible
  • a weapon (sword)
  • a ranged weapon (bows, guns if they have the proper groups)
  • tool (a part of registered_tools)

Shows whether or not a pointed thing is:

  • an entity (even for players or tamed)
  • dropped item
  • node
  • falling node
  • liquid (if holding liquids_pointable item)
  • formspec (nodes that have formspec functions such as the chest)

If held item has a tool_capabilities with a groupcaps (basically most tools including the hand), and if pointing at a node with groups - it will show a checkmark or cross depending on whether or not your tool is adequate for the job

TODO:

  • set up a system for events and callbacks (e.g. callback for a node being pointed at and off, maybe even an on_step)
  • show a mouse icon depending on if node or item can be clicked with
  • permit custom type (image relating to wield item) and pointable (image relating to what is being pointed at) mechanics
  • maybe see about using entity armour groups with tool capabilities???
  • option to turn off and on the crosshair

Reviews

Review

Do you recommend this mod?

  • No reviews, yet.

Releases

1.0

Download

Luanti 5.5+

2025-12-25 01:58 UTC

1.0 - Initial Release 🔗

Types (wielded item):

  • Non-Special (not a tool or edible)
  • Edible
  • Weapon (Melee)
  • Ranged Weapon (Bow, Gun)
  • Tool

Pointables (what we're pointing at):

  • Nothing/Null (pointing at air or unknown node)
  • Node
  • Falling Node
  • Entity
  • Entity (Tamed)
  • Entity (Player)
  • Dropped Item
  • Liquid (if holding liquids_pointable = true)
  • "Formspec" (e.g. chests - has functions for formspec interactions)

Has a checkmark (green) or cross (red) above if a tool_capabilities and groupcaps is detected in wielded tool and if pointing at a node with groups

All releases