This PR fixes the case where blocks are given target outlines when player's current gamemode is Spectator mode.
Block targetability is determined in function returning targeted block position. Returning nil value in aforementioned function naturally prevents rendering of block outline in worldRenderer main render loop (no block position data available).
Initial approach was to use computed variable in worldRender, however, proposed solution seemed much more elegant (single thread-safe player data fetch).
Fixes #137
Type of change
Please delete options that are not relevant.
[x] Bug fix (non-breaking change which fixes an issue)
Checklist:
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation comments
Description
This PR fixes the case where blocks are given target outlines when player's current gamemode is Spectator mode.
Block targetability is determined in function returning targeted block position. Returning
nil
value in aforementioned function naturally prevents rendering of block outline inworldRenderer
mainrender
loop (no block position data available).Initial approach was to use computed variable in
worldRender
, however, proposed solution seemed much more elegant (single thread-safe player data fetch).Fixes #137
Type of change
Please delete options that are not relevant.
Checklist: