Skip to content

DistantHorizonsSupportPumpkin ​v0.1.1

This unofficial integration lets Java players use Distant Horizons with terrain from your Pumpkin server.

See the plugin guide and API reference on the documentation site.

Installation ​

Download distant-horizons-support-pumpkin.wasm from the plugin's GitHub release, put it in your server's plugins/ folder, and restart Pumpkin. On the first load, a full restart lets Pumpkin ask for the plugin's permissions; hot reload cannot prompt for them.

Permissions ​

Pumpkin asks you to approve these on the server console when it loads the plugin. It skips the question when the [plugins] table in pumpkin.toml lists all of them in allowed_permissions or sets ask_permission_confirmation = false. Pumpkin remembers your answer and asks again after the plugin file or this list changes.

PermissionWhy
fs.read.dataRead settings and cached LOD terrain.
fs.write.dataWrite settings and persist captured LOD terrain.
http.outboundCheck Pumpkin Market for plugin updates.

Commands ​

CommandDescriptionPermissionDefault access
/dhs statusShow connected DH clients and pending requestsDistantHorizonsSupportPumpkin:command.dhs.statusoperators (level 3)
/dhs cache statusShow memory and disk cache usageDistantHorizonsSupportPumpkin:command.dhs.cache.statusoperators (level 3)
/dhs cache clearClear both cache tiersDistantHorizonsSupportPumpkin:command.dhs.cache.clearoperators (level 3)
/dhs cache memory clearClear the in-memory cacheDistantHorizonsSupportPumpkin:command.dhs.cache.memory.clearoperators (level 3)
/dhs cache disk clearClear the disk cacheDistantHorizonsSupportPumpkin:command.dhs.cache.disk.clearoperators (level 3)
/dhs cache recover <x> <z>Back up and rebuild one cached LOD section from loaded terrain at block coordinatesDistantHorizonsSupportPumpkin:command.dhs.cache.recoveroperators (level 3)
/dhs mapShow cached LOD sections at your position or block coordinates (default radius 4; maximum 16,384 sections)DistantHorizonsSupportPumpkin:command.dhs.mapoperators (level 3)
/dhs map <radius>Show cached LOD sections at your position or block coordinates (default radius 4; maximum 16,384 sections)DistantHorizonsSupportPumpkin:command.dhs.mapoperators (level 3)
/dhs map <x> <z>Show cached LOD sections at your position or block coordinates (default radius 4; maximum 16,384 sections)DistantHorizonsSupportPumpkin:command.dhs.mapoperators (level 3)
/dhs map <x> <z> <radius>Show cached LOD sections at your position or block coordinates (default radius 4; maximum 16,384 sections)DistantHorizonsSupportPumpkin:command.dhs.mapoperators (level 3)
/dhs generateForce-build LOD sections at your position or block coordinates (default radius 0; maximum radius 31 sections; at most 4,096 sections per request)DistantHorizonsSupportPumpkin:command.dhs.generateoperators (level 3)
/dhs generate <radius>Force-build LOD sections at your position or block coordinates (default radius 0; maximum radius 31 sections; at most 4,096 sections per request)DistantHorizonsSupportPumpkin:command.dhs.generateoperators (level 3)
/dhs generate <x> <z>Force-build LOD sections at your position or block coordinates (default radius 0; maximum radius 31 sections; at most 4,096 sections per request)DistantHorizonsSupportPumpkin:command.dhs.generateoperators (level 3)
/dhs generate <x> <z> <radius>Force-build LOD sections at your position or block coordinates (default radius 0; maximum radius 31 sections; at most 4,096 sections per request)DistantHorizonsSupportPumpkin:command.dhs.generateoperators (level 3)

Configuration ​

Settings live in plugins/data/DistantHorizonsSupportPumpkin/config.toml. The plugin creates the file if needed, adds settings from the schema and removes settings no longer defined there. Values for existing settings are preserved.

OptionTypeDefaultDescription
support.server_keystring""Optional globally unique server key. Empty uses the client connection address.
support.render_distanceinteger128Maximum LOD request radius in chunks, limited by the world border.
support.generation_requests_per_secondinteger20Maximum terrain generation requests per second advertised to each DH client. DH uses this for pacing and concurrency; pending_requests also caps it.
support.sync_requests_per_secondinteger50Maximum cached LOD synchronization requests per second advertised to each DH client. DH uses this for pacing and concurrency; pending_requests also caps it.
support.requests_per_playerinteger2Maximum active terrain captures per player. Misses waiting for a slot and cached responses bypass this limit.
support.pending_requestsinteger16Maximum in-flight DH requests and queued responses across all players.
support.blocks_per_tickinteger8192Maximum block samples per server tick across all LOD requests. Actual work adapts to server MSPT.
support.packets_per_tickinteger2Maximum transfer packets for newly captured LODs per server tick across all players.
support.cached_requests_per_tickinteger8Maximum LOD cache lookups per server tick across all players. The same number separately limits terrain availability checks for requests the cache cannot answer.
support.cached_packets_per_tickinteger64Maximum transfer packets for cached LODs per server tick across all players.
support.memory_cache_entriesinteger512Maximum LOD sections cached in memory. Set to 0 to disable; any negative value means unlimited.
support.memory_cache_mbinteger64Maximum megabytes of LOD data cached in memory; memory_cache_entries also applies. A complex section can take about 1 MB.
support.disk_cache_entriesinteger4096Maximum LOD sections cached on disk. Set to 0 to disable; any negative value means unlimited.
support.refresh_secondsinteger30Rebuild cached sections after this age when all their chunks are loaded.
worlds."<world>".heightintegernoneWorld height in blocks above its minimum Y.
worlds."<world>".sample_biomes_3dbooleanfalseSample the biome at every captured height instead of using the surface biome for the whole column. Adds one world lookup per sampled block.
A fresh install gets this file:
toml
# DistantHorizonsSupportPumpkin configuration.
# Changes apply after a server restart. Invalid files are left untouched.

# Distant Horizons Support limits.
[support]

# Optional globally unique server key. Empty uses the client connection address.
server_key = ""

# Maximum LOD request radius in chunks, limited by the world border.
render_distance = 128

# Maximum terrain generation requests per second advertised to each DH client. DH uses this for
# pacing and concurrency; pending_requests also caps it.
generation_requests_per_second = 20

# Maximum cached LOD synchronization requests per second advertised to each DH client. DH uses this
# for pacing and concurrency; pending_requests also caps it.
sync_requests_per_second = 50

# Maximum active terrain captures per player. Misses waiting for a slot and cached responses bypass
# this limit.
requests_per_player = 2

# Maximum in-flight DH requests and queued responses across all players.
pending_requests = 16

# Maximum block samples per server tick across all LOD requests. Actual work adapts to server MSPT.
blocks_per_tick = 8192

# Maximum transfer packets for newly captured LODs per server tick across all players.
packets_per_tick = 2

# Maximum LOD cache lookups per server tick across all players. The same number separately limits
# terrain availability checks for requests the cache cannot answer.
cached_requests_per_tick = 8

# Maximum transfer packets for cached LODs per server tick across all players.
cached_packets_per_tick = 64

# Maximum LOD sections cached in memory. Set to 0 to disable; any negative value means unlimited.
memory_cache_entries = 512

# Maximum megabytes of LOD data cached in memory; memory_cache_entries also applies. A complex
# section can take about 1 MB.
memory_cache_mb = 64

# Maximum LOD sections cached on disk. Set to 0 to disable; any negative value means unlimited.
disk_cache_entries = 4096

# Rebuild cached sections after this age when all their chunks are loaded.
refresh_seconds = 30

# Per-world terrain capture settings. Vanilla dimensions use their standard heights; unknown
# dimensions require a height override.
#
# [worlds."world"]
# height = 384  # World height in blocks above its minimum Y.
# sample_biomes_3d = false  # Sample the biome at every captured height instead of using the surface biome for the whole column. Adds one world lookup per sampled block.

Compatibility and terrain ​

Targets Distant Horizons 3.3.4, using network protocol 16 on Java Edition. Bedrock players do not open DH sessions. Install the Distant Horizons client mod separately. A client using another DH protocol is disconnected with an incompatibility message. DH sessions open only in worlds whose names are at most 150 characters of ASCII letters, digits, _ and -, optionally split by one : as in minecraft:overworld. In other worlds the plugin logs a warning and the client gets no LODs. The protocol format follows Distant Horizons core 3.3.4.

The plugin builds LOD sections of 64 × 64 blocks, which covers 16 server chunks. It captures a section only while all 16 chunks are loaded, and it cannot load or generate distant chunks. A request for unloaded terrain stays pending and retries with exponential backoff until the chunks load or the client cancels it. Loaded terrain that contains only air is valid and gets cached. By default, each column uses its surface biome. Set sample_biomes_3d = true under [worlds."<world>"] to sample cave and other vertical biomes. This adds one biome lookup for each sampled block. Blocks placed or broken by players, crop growth and fire spread invalidate the affected cached sections. Other world changes can stay cached until the next refresh when the pinned Pumpkin API does not report their exact world and position. A section holds at most 131072 material segments, and a transfer packet carries at most 30000 data bytes. When a client sets a bandwidth limit, the plugin sizes each fragment, including its 13-byte protocol envelope, to fit in 20 seconds of credit. The credit bucket holds at most one full 30013-byte fragment message.

How it works ​

The plugin answers Distant Horizons requests from terrain that Pumpkin has loaded. It captures materials, caves, biomes and lighting, then stores each section in a memory cache and a disk cache with separate limits. Disk entries survive restarts, and cached sections are still sent after their chunks unload. Because the plugin can't load or generate chunks, an area gets LODs once players or a chunk-loading tool have brought it into range.

  • Setup guide: client compatibility, installation and first start.
  • Manage the LOD cache: the cache map, capturing an area ahead of time, rebuilding a wrong section and clearing the cache.
  • Troubleshooting: disconnects, pending requests, old terrain and reading /dhs status.
  • PumpkinPIE placeholders: DH session and cache values for scoreboards and chat.

Attribution and license ​

This is an unofficial Pumpkin adaptation of the Distant Horizons server plugin, originally developed by Jim C K Flaten and the upstream contributors. It is not an official Distant Horizons Team release or endorsed by that team.

Protocol code that follows upstream implementations retains its upstream copyright notices. This plugin is licensed under GPL-3.0-or-later. The separate @pumpkin-plugins/terrain package is MIT-licensed and contains protocol-neutral terrain capture and work-budget code; it does not include the DH codec or DTO encoder. The protocol format follows the Distant Horizons core linked in the generated compatibility section, Copyright (C) 2020 James Seibel, originally under LGPL-3.0-only. The initial server-plugin reference revision is 56a01110579b94c9946130092500c00df7c31925.

pumpkin-plugins documentation