Merged
Conversation
…overed. Needs some more testing but first blush is 100x improvement for proximity hiding
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feature Add
Gaze Check for ProximityHider (experimental).
Description
X-ray is an inherent problem in Minecraft due to the protocol design. Orebfuscator uses two large tools to combat and correct this flawed design. "Block obfuscation" which hides normal blocks which are fully covered, but does not well address "entities". Hence "Proximity Hider" -- which hides tile entities unless you are "proximate" or nearby.
One big failure of this proximity hider, however, is it doesn't care if you can actually see the tile entity or not, using only distance to determine visibility or not. So, x-ray remains a highly viable vector when "raiding" as it is difficult and unnatural for players to hide their chests and other valuables sufficiently to eliminate remote visibility without a full comprehension of the server's Proximity Hider config.
This feature makes a best-effort attempt to trade a little performance for a far superior protection. Using at most 14 "rays", it tests to see if the player's "eye location" has an unobscured line of sight to the tile entity in question. It uses fast AABB type "raytracing" math so that tile entities that are fully obscured (buried underground completely -- all 26 "connected" sides) will remain obscured even if the player is very proximate.
This should allow fully achieving the promise of Proximity hider, where x-ray users cannot discover without normal effort the location of buried chests and other containers simply by getting nearby -- they now need a clear line of sight.
Configuration changes
Add the
UseFastGazeCheck: truedirective to yourProximityHiderconfiguration sections in the worlds you want to activate it on.Otherwise, it leverages the transparent block settings you've already defined, so no other configuration is necessary.
Known Issues
If a tile entity is only "capped" -- e.g. buried on all sides but there is just a single block on top of it -- due to the specifics of the ray traversal computations, these tile entities are still vulnerable to exposure. Simply ensure that all 26 "surrounding" blocks are fully non-transparent to address this. E.g. fully burying a chest underground by at least one full block should fully protect it.
Performance is a concern. This adds up to 14 "ray traversals" per person per proximity hid item, updated at your proximity hider normal update frequency on player full-block movement. We would love feedback on performance and impact.