Skip to content

Repository files navigation

eh_main(1)(1)

What is ExtendedHorizons?

ExtendedHorizons is a high-performance view-distance extension plugin for modern Paper/Folia servers.
It renders distant terrain using optimized fake chunks and optional far-player sync, so players can see farther than vanilla without the usual server overhead.

Distant terrain is refreshed from complete snapshots, including lighting and configured anti-xray. Refreshes keep the previous terrain visible until the replacement arrives; they do not send an unload first. Pending or failed refreshes remain tracked so that leaving the view or changing dimensions still clears them. Block edits, explosions, pistons, fluids and growth queue a rebuild of the affected chunk and its light neighbors, coalesced after 100 ms without further edits. Up to 256 chunk invalidations are processed per tick. For changes made without Bukkit events, each player's session also checks up to 64 stored chunk slots per second and selects at most one snapshot older than 30 seconds for refresh. This is a gradual sweep, not a promise that every distant chunk updates within 30 seconds; larger distances and send budgets increase the delay. Plugins making bulk changes can request prompt updates through BulkChunkInvalidationService.queueInvalidationBatch.

With fake-chunks.worldedit.enabled, WorldEdit changes are published after its commit operation completes; FAWE queued edits use a chunk post-processor, including fast edits that bypass per-block extent calls. Both refresh the edited chunks and their light neighbors without unloading visible terrain first. At startup, the log identifies WorldEdit extent or FAWE chunk post-processor registration. FAWE's non-queued root-extent mode may require allowing the fallback extent in FAWE's own configuration; EH logs that case explicitly and does not change FAWE's settings.


Dependencies


How to build

Build this project with this command:

./gradlew shadowJar

The artifact will be generated in build/libs/ExtendedHorizons-{version}.jar ready to use!


For developers

ExtendedHorizons is built entirely with WinterFramework (Guice), so you can inject its services directly or resolve them statically.

Add this to your plugin.yml or paper-plugin.yml:

depend:
  - ExtendedHorizons

Accessing Services

You can access services natively through the Guice Injector provided by WinterFramework:

import me.mapacheee.extendedhorizons.ExtendedHorizonsPlugin;
import me.mapacheee.extendedhorizons.config.ConfigFacade;
import me.mapacheee.extendedhorizons.fakechunks.session.SessionRegistry;
import org.bukkit.plugin.java.JavaPlugin;

ExtendedHorizonsPlugin eh = JavaPlugin.getPlugin(ExtendedHorizonsPlugin.class);

// Retrieve via standard Guice Injector:
SessionRegistry sessionRegistry = eh.getInjector().getInstance(SessionRegistry.class);

// Or via the static helper:
sessionRegistry = ExtendedHorizonsPlugin.getService(SessionRegistry.class);

What you can do through these services:

  • Override view distance: Set a custom radius for specific players dynamically.
    PlayerSession session = sessionRegistry.ensureFor(player, false);
    session.playerOverrideDistance(64); // See up to 64 fake chunks
  • Reset view distance: Clear the custom override and allow the plugin to fall back to world-settings or permissions.
    PlayerSession session = sessionRegistry.get(player.getUniqueId());
    if (session != null) {
        session.resetPlayerOverrideDistance();
    }
  • Read configuration: Access world rules, safe factors, and far-player settings dynamically via configFacade.get().
  • Track Far Players: ExtendedHorizons natively syncs far players. You can read the trackedFarPlayers() from a PlayerSession to see exactly which entities are being simulated locally.

Contribute

To contribute to this project, just follow this steps:

  • Fork repository.
  • Make ur changes.
  • Make sure your changes work.
  • Create a pull request explaining what you've done!

Every contribution is welcome and appreciated!


Support

About

Extend view distance with optimized fake chunks and far-player sync.

Topics

Resources

Stars

68 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages