The optimization intercepts Leylines' existing hasLeylineDischarge() check and caches its result for the current client game tick.
-
Reuses the result across rendered frames.
-
Rechecks when the next game tick arrives.
-
Resets the cache when the player or world changes.
-
Preserves Leylines' original spell-detection logic.
-
Doesn't disable Leylines or change its intended gameplay mechanics.

