/RayTraceAntiXray

Paper plugin for server-side async multithreaded ray tracing to hide ores that are exposed to air using Paper Anti-Xray engine-mode 1.

Primary LanguageJavaMIT LicenseMIT

RayTraceAntiXray

Paper plugin for server-side async multithreaded ray tracing to hide ores that are exposed to air using Paper Anti-Xray engine-mode 1.

Paper Anti-Xray can't hide ores that are exposed to air in caves for example (see picture below). This plugin is an add-on for Paper Anti-Xray to hide those ores too, using ray tracing to calculate whether or not those ores are visible to players.

RayTraceAntiXray

How to install

  • Download and install Paper 1.20.6. Folia is supported since Minecraft 1.20.1.
  • Enable Paper Anti-Xray using engine-mode: 1.
  • Download and install ProtocolLib.
  • Download and install RayTraceAntiXray. (For older Minecraft versions, browse the update history.)
  • Configure RayTraceAntiXray by editing the file plugins/RayTraceAntiXray/config.yml.
  • See also: Recommended settings.
  • Note that you should restart your server after each of these steps. Don't enable, disable or reload this plugin on a running server under any circumstances (e.g. using /reload, plugin managers, etc.). It won't work properly and will cause issues.

Known issues

  • Depending on the number of players and config settings, this plugin can be resource intensive. I only recommend using it if you have "unused" CPU threads available on your server in order to minimize the impact on the main thread.
  • In principle, the plugin can also hide tile entities. However, even though the blocks themselves are being hidden, the tile entity packets are still being sent, which means that more clever hack clients could bypass this. (Could be fixed in a future release by not sending the tile entity packets until the block is visible.)
  • The culling algorithm is intentionally not 100% accurate for performance and functional reasons. When in doubt, it is assumed that a block is visible. Thus hidden blocks tend to be revealed rather earlier than late, provided that the server isn't overloaded and doesn't lag. Usually, however, this cannot be abused.
  • There is currently no way to reload this plugin.

Demo

RayTraceAntiXray

License

The LICENSE file applies to the source code of this project. Please don't (re)distribute compiled binary versions of this project or derivative works that are directly usable as intended by this project. Shading or using this project as a library for other purposes is permitted.