1
0
Fork 0
mirror of https://gitlab.com/distant-horizons-team/distant-horizons.git synced 2025-12-10 13:32:57 +00:00
This is a mod that adds a Level Of Detail (LOD) system to Minecraft. This implementation renders simplified chunks outside of the normal render distance allowing for an increased render distance without harming performance.
Find a file
2025-12-10 07:28:39 -06:00
.gitlab/issue_templates change the default issue template 2025-12-09 21:15:20 -06:00
.run remove pmcVer from forge runClient 2025-01-03 14:47:18 -06:00
buildSrc/src/main/java Allow native relocator to run on freebsd 2025-09-20 15:58:19 -05:00
common Fix pre MC 1.21.11 compiling 2025-12-10 07:28:39 -06:00
coreSubProjects@8f0930fa02 Allow world gen limits on singleplayer 2025-12-10 07:09:44 -06:00
fabric Fix pre MC 1.21.11 compiling 2025-12-10 07:28:39 -06:00
forge replace and simplify WorldGenThreadCheck 2025-11-22 09:25:55 -06:00
gradle/wrapper Add neoforge 1.21.5 2025-03-29 16:11:04 -05:00
neoforge add support for MC 1.21.11 2025-12-09 21:15:09 -06:00
relocate_natives Clear up the comment a bit 2025-04-27 21:48:28 +05:00
testScripts Add test scripts folder 2024-09-10 06:52:21 -05:00
versionProperties add support for MC 1.21.11 2025-12-09 21:15:09 -06:00
.dockerignore Local docker compile 2023-08-12 22:05:29 +00:00
.editorconfig Update .editorconfig 2025-11-26 13:55:47 -06:00
.gitattributes Now uses Architectury and added Forge support 2021-12-09 06:14:30 +00:00
.gitignore remove python dependency for building with correct sqlite natives 2025-04-27 00:13:24 +05:00
.gitlab-ci.yml add support for MC 1.21.11 2025-12-09 21:15:09 -06:00
.gitmodules Fix pointing to the wrong core sub-module 2023-07-11 19:41:44 -05:00
build.gradle add support for MC 1.21.11 2025-12-09 21:15:09 -06:00
buildAll fix build-all scripts 2025-06-30 07:46:18 -05:00
buildAll.bat fix build-all scripts 2025-06-30 07:46:18 -05:00
code_of_conduct.md Update James' contact in the code_of_conduct 2023-06-14 20:18:07 -05:00
compile.sh Local docker compile 2023-08-12 22:05:29 +00:00
contributing.md Updated to new git url 2023-12-12 19:28:41 +10:30
Dockerfile Local docker compile 2023-08-12 22:05:29 +00:00
gradle.properties add support for MC 1.21.11 2025-12-09 21:15:09 -06:00
gradlew Updated gradle (and its wrapper), and fabric and architectury loom 2023-12-12 17:56:44 +10:30
gradlew.bat Updated gradle (and its wrapper), and fabric and architectury loom 2023-12-12 17:56:44 +10:30
LICENSE-LOGOS.txt Add new logos 2024-09-22 17:19:00 -05:00
LICENSE.LESSER.txt Change the license from GPL to LGPL 2022-04-24 15:29:03 -05:00
LICENSE.txt Make LICENSE.txt uppercase 2021-07-05 18:04:30 +00:00
license_header.txt Remove year range from licensing headers 2025-01-11 21:27:25 -06:00
Readme.md Updated readme to use the new DH links 2024-11-09 14:40:00 +00:00
settings.gradle Replace 1.21.9 with 1.21.10 2025-10-10 07:35:37 -05:00

See farther without turning your game into a slide show.


What is Distant Horizons?

Distant Horizons is a mod which implements a Level of Detail system to Minecraft.
This allows for far greater render distances without harming performance by gradually lowering the quality of distant terrain.

Below is a video demonstrating the system:

Distant Horizons - Alpha 2.0


Minecraft and Library Versions

This branch supports the following versions of Minecraft:

1.20.4, 1.20.3 (Default)

Fabric: 0.15.1
Fabric API: 0.91.2+1.20.4
Forge: 49.0.30
NeoForge: 118-beta
Parchment: 1.20.2:2023.12.10
Modmenu: 9.0.0-pre.1

1.20.2

Fabric: 0.14.24
Fabric API: 0.90.4+1.20.2
Forge: 48.0.13
Parchment: 1.20.1:2023.09.03
Modmenu: 8.0.0

1.20.1, 1.20

Fabric: 0.14.24
Fabric API: 0.90.4+1.20.1
Forge: 47.2.1
Parchment: 1.20.1:2023.09.03
Modmenu: 7.2.2

1.19.4

Fabric: 0.14.24
Fabric API: 0.87.1+1.19.4
Forge: 45.2.4
Parchment: 1.19.4:2023.06.26
Modmenu: 6.3.1

1.19.2

Fabric: 0.14.24
Fabric API: 0.76.1+1.19.2
Forge: 43.3.2
Parchment: 1.19.2:2022.11.27
Modmenu: 4.2.0-beta.2

1.18.2

Fabric: 0.14.24
Fabric API: 0.76.0+1.18.2
Forge: 40.2.10
Parchment: 1.18.2:2022.11.06
Modmenu: 3.2.5

1.17.1, 1.17

Fabric: 0.14.24
Fabric API: 0.46.1+1.17
Forge: 37.1.1
Parchment: 1.17.1:2021.12.12
Modmenu: 2.0.14

1.16.5, 1.16.4

Fabric: 0.14.24
Fabric API: 0.42.0+1.16
Forge: 36.2.39
Parchment: 1.16.5:2022.03.06
Modmenu: 1.16.22

Versions no longer supported

  • 1.18.1, 1.18
  • 1.19.1, 1.19
  • 1.19.3

Plugin and Library versions

Gradle: 8.5
Fabric loom: 1.4-SNAPSHOT
Architectury loom (Forge gradle replacement): 1.4-SNAPSHOT
Sponge vanilla gradle: 0.2.1-SNAPSHOT
Java Preprocessor plugin: Manifold Preprocessor


Source Code Installation

Prerequisites

If using IntelliJ:

  1. Install the Manifold plugin
  2. Open IDEA and import the build.gradle
  3. Refresh the Gradle project in IDEA if required

If using Eclipse: (Note that Eclipse doesn't support Manifold's preprocessor!)

  1. Run the command: ./gradlew geneclipseruns
  2. Run the command: ./gradlew eclipse
  3. Make sure eclipse has the JDK 17 installed. (This is needed so that eclipse can run minecraft)
  4. Import the project into eclipse

Switching Versions

To switch between different Minecraft versions, change mcVer=1.? in the gradle.properties file.

If running in an IDE, to ensure the IDE noticed the version change, run any gradle command to refresh gradle.
In IntelliJ, you will also need to do a gradle sync if it didn't happen automatically.


Compiling

Prerequisites:

  • JDK 17 or newer

From the File Explorer:

  1. Download and extract the project zip
  2. Download the core from https://gitlab.com/distant-horizons-team/distant-horizons-core and extract into a folder called coreSubProjects
  3. Open a terminal emulator in the project folder (On Windows you can type cmd in the title bar)
  4. Run the commands: ./gradlew assemble (You may need to use a .\ on Windows)
  5. Merge the jars with ./gradlew mergeJars
  6. The compiled jar file will be in the folder Merged

From the command line:

  1. git clone --recurse-submodules https://gitlab.com/distant-horizons-team/distant-horizons.git
  2. cd distant-horizons
  3. ./gradlew assemble
  4. ./gradlew mergeJars
  5. The compiled jar file will be in the folder Merged

Run tests with: ./gradlew test

Note: You can add the argument -PmcVer=? to tell gradle to build a selected MC version instead of having to modify the gradle.properties file.
For example: ./gradlew assemble -PmcVer=1.18.2


Compiling with Docker

./compile <version>

You can also locally compile the DH jars without a Java environment by using Docker. Where <version> is the version of Minecraft to compile for (ie 1.20.1), or the keyword all. See Versions for a list of all supported values.


Other commands

./gradlew --refresh-dependencies to refresh local dependencies.

./gradlew clean to delete any compiled code.


Note to self

The Minecraft source code is NOT added to your workspace in an editable way. Minecraft is treated like a normal Library. Sources are there for documentation and research purposes only.

Source code uses Mojang mappings & Parchment mappings.

To generate the source code run ./gradlew genSources
If your IDE fails to auto-detect the source jars when browsing Minecraft classes; manually select the JAR file ending with -sources.jar when prompted by your IDE.
(In IntelliJ it's at the top where it says "choose sources" when browsing a Minecraft class)


Other Useful commands

Run the standalone jar: ./gradlew run
Build the standalone jar: ./gradlew core:build
Only build Fabric: ./gradlew fabric:assemble or ./gradlew fabric:build
Only build Forge: ./gradlew forge:assemble or ./gradlew forge:build
Run the Fabric client (for debugging): ./gradlew fabric:runClient
Run the Forge client (for debugging): ./gradlew forge:runClient

To build all versions: ./buildAll (all builds will end up in the Merged folder)


Open Source Acknowledgements

Forgix (To merge multiple mod versions into one jar) [Formerly DHJarMerger]
https://github.com/PacifistMC/Forgix

LZ4 for Java (data compression)
https://github.com/lz4/lz4-java

NightConfig for JSON & TOML (config handling)
https://github.com/TheElectronWill/night-config

SVG Salamander for SVG support (not being used atm)
https://github.com/blackears/svgSalamander

sqlite-jdbc
https://github.com/xerial/sqlite-jdbc