2022-03-22 10:55:30 +06:00
2022-03-21 21:21:22 -05:00
2022-03-22 10:55:30 +06:00
2022-03-19 18:20:28 -05:00
2021-07-05 18:04:30 +00:00
2021-11-26 23:28:54 +06:00

Distant Horizons

A mod that adds a Level of Detail System to Minecraft

What is Distant Horizons?

This mod adds a Level Of Detail (LOD) system to Minecraft.
This implementation renders simplified chunks outside the normal render distance
allowing for an increased view distance without harming performance.

Or in other words: this mod lets you see farther without turning your game into a slide show.
If you want to see a quick demo, check out a video covering the mod here:

Minecraft Level Of Detail (LOD) mod - Alpha 1.5

Versions

Architectury version: 3.4-SNAPSHOT
Java Compiler plugin: Manifold Preprocessor

1.18.2 mods

Forge version: 40.0.18
Fabric version: 0.13.3
Fabric API version: 0.48.0+1.18.2
Modmenu version: 3.1.0

1.18.1 mods

Forge version: 39.1.2
Fabric version: 0.13.3
Fabric API version: 0.46.6+1.18
Modmenu version: 3.0.1

Notes:
This version has been confirmed to work in IDE and Retail Minecraft.
(Retail running forge version 1.18.1-39.0.5 and fabric version 1.18-0.12.12 and 1.18.1-0.13.2)

Source Code Installation

See the Fabric Documentation online for more detailed instructions:
https://fabricmc.net/wiki/tutorial:setup

Prerequisites

If using IntelliJ: 0. Install Manifold plugin

  1. open IDEA and import the build.gradle
  2. refresh the Gradle project in IDEA if required

If using Ecplise: (Note that Eclispe currently 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

This branch support 2 built versions:

  • 1.18.2
  • 1.18.1 (which also runs on 1.18)

To switch between active versions, change mcVer=1.18.? in gradle.properties file.

If running on IDE, to ensure IDE pickup the changed versions, you will need to run a gradle command again to allow gradle to update all the libs. (In IntellJ you will also need to do a gradle sync again if it didn't start it automatically.)

Note: There may be a java.nio.file.FileSystemException thrown on running the command after switching versions. To fix it, either restart your IDE (as your IDE is locking up a file) or use tools like LockHunter to unlock the linked file. (Often a lib file under common\build\lib or forge\build\lib or fabric\build\lib). If anyone knows how to solve this issue please comment to this issue: https://gitlab.com/jeseibel/minecraft-lod-mod/-/issues/233

Compiling

Using GUI

  1. Download the zip of the project and extract it
  2. Download the core from https://gitlab.com/jeseibel/distant-horizons-core and extract into a folder called core
  3. Open a command line in the project folder
  4. Run the command: ./gradlew assemble
  5. Then run command: ./gradlew mergeJars
  6. The compiled jar file will be in the folder Merged

If in terminal:

  1. git clone -b preprocessor_test --recurse-submodules https://gitlab.com/jeseibel/minecraft-lod-mod.git
  2. cd minecraft-lod-mod
  3. ./gradlew assemble
  4. ./gradlew mergeJars
  5. The compiled jar file will be in the folder Merged

Note: You can add the arg: -PmcVer=1.18.? to tell gradle to build a selected MC version instead of having to manually modify the gradle.properties file.

Other commands

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

./gradlew clean to reset everything (this does not affect your code) and then start the process again.

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.

Useful commands

Build only Fabric: ./gradlew fabric:assemble or ./gradlew fabric:build
Build only Forge: ./gradlew fabric:assemble or ./gradlew forge:build
Run the Fabric client (for debugging): ./gradlew fabric:runClient
Run the Forge client (for debugging): ./gradlew forge:runClient

Open Source Acknowledgements

XZ for Java (data compression)
https://tukaani.org/xz/java.html

DHJarMerger (To merge multiple mod versions into one jar)
https://github.com/Ran-helo/DHJarMerger

S
Description
Patch to shard the DH SQLite DB for improved performance on large worlds
Readme 63 MiB
Languages
Java 99.1%
Python 0.3%
Batchfile 0.2%
PowerShell 0.2%
Shell 0.2%