DVex 19

PROJECT: FakeRenderDistance TARGET: Minecraft Java Edition 1.21.11 MOD LOADER: Fabric FABRIC LOADER VERSION: 0.19.3 LANGUAGE: Java TARGET PLATFORM: PojavLauncher on Android ARM64 GPU: PowerVR Rogue GRAPHICS API: OpenGL ES 3.2 through the Pojav rendering environment

==================================================

  1. PROJECT GOAL

==================================================

Create a Fabric client-side Minecraft mod called FakeRenderDistance.

The mod should make the world appear to have a much larger render distance than the game's actual normal render distance.

The visual goal is similar to Distant Horizons, but the implementation must prioritize extremely low performance overhead on low-end Android devices.

The player should be able to see distant terrain, mountains, forests, hills, and other landscape features far beyond the vanilla render distance.

IMPORTANT:

Do not simply increase vanilla render distance.

Do not render every distant block normally.

Do not implement a system that requires a powerful GPU.

Do not claim that performance cost is zero.

Instead, implement a lightweight Level of Detail (LOD) terrain renderer.

==================================================

  1. VANILLA RENDERING

==================================================

Allow Minecraft to render nearby chunks normally.

The player must retain normal rendering for all chunks within the configured vanilla render distance.

Do not replace, modify, or break normal rendering of nearby blocks, entities, particles, or block entities.

Distant terrain should be rendered separately from the normal Minecraft chunk renderer.

Avoid modifying vanilla behavior unnecessarily.

==================================================

  1. DISTANT TERRAIN LOD SYSTEM

==================================================

Implement a simplified distant terrain renderer.

Use the following configurable distance bands:

Band 1:

Vanilla render distance.

Render normal Minecraft chunks.

Band 2:

Approximately 1-16 chunks beyond vanilla render distance.

Use simplified terrain geometry and reduced detail.

Band 3:

Approximately 16-64 chunks beyond vanilla render distance.

Use extremely simplified terrain geometry.

All distances must be configurable.

Do not assume that the player's vanilla render distance is always 6 chunks.

Generate distant terrain from actual Minecraft world terrain data whenever that data is available.

Do not invent terrain that contradicts known terrain height or biome information.

If detailed terrain data is unavailable, use an appropriate fallback instead of crashing.

==================================================

  1. TERRAIN GENERATION

==================================================

Create an efficient system that converts terrain information into simplified meshes.

Possible approaches include:

  • Sampling terrain heights.
  • Generating low-resolution terrain meshes.
  • Merging neighboring terrain surfaces.
  • Reusing mesh data for unchanged terrain.
  • Using biome information to approximate surface

colors.

  • Using a low-resolution texture atlas when useful.

Avoid creating a separate rendered object for every distant block.

Avoid generating millions of individual vertices.

Use chunk-based or region-based mesh storage.

Meshes must support terrain at different heights, including hills, cliffs, mountains, and valleys.

Try to avoid obvious holes and gaps between LOD regions.

Do not attempt to reconstruct inaccessible terrain by reading arbitrary unloaded chunks directly.

Use safe, version-compatible Minecraft APIs to obtain world data.

==================================================

  1. PERFORMANCE REQUIREMENTS

==================================================

The target device is a low-end Android phone with:

  • ARM64 architecture.
  • PowerVR Rogue GPU.
  • OpenGL ES 3.2 graphics environment.
  • Approximately 4 GB of system RAM.
  • Limited CPU and GPU resources.

Prioritize stable frame times and low memory usage.

Implement:

  • Asynchronous terrain processing where safe.
  • A strict limit on terrain generation per tick.
  • A bounded memory cache.
  • Reuse of unchanged meshes.
  • Distance-based reductions in terrain detail.
  • Frustum culling.
  • Distance culling.
  • Efficient buffer reuse.
  • Incremental updates instead of rebuilding

the entire distant terrain every frame.

Do not perform expensive world scans every frame.

Do not allocate large temporary arrays every frame.

Do not create a thread for every chunk.

Do not upload all distant terrain to the GPU again when the player moves a short distance.

Provide configurable limits for:

  • Maximum cached regions.
  • Maximum mesh generation work per tick.
  • Maximum terrain detail.
  • Maximum viewing distance.

If the device becomes overloaded, gracefully reduce distant terrain detail instead of crashing.

==================================================

  1. MOBILE GRAPHICS COMPATIBILITY

==================================================

The mod must work in PojavLauncher.

Do not assume that desktop OpenGL features are available.

Do not require Vulkan.

Do not require compute shaders.

Do not require OpenGL 4.x features.

Do not require geometry shaders.

Do not require tessellation shaders.

Avoid depending on unsupported OpenGL extensions.

Use the graphics capabilities exposed by the actual Pojav rendering backend.

Use Minecraft's existing rendering infrastructure where practical.

Do not create an independent native rendering backend.

Do not assume that OpenGL ES 3.2 automatically makes every desktop OpenGL function available.

If a rendering feature is unsupported, use a compatible fallback.

==================================================

  1. WORLD AND VISUAL COMPATIBILITY

==================================================

Support Minecraft Java 1.21.11.

Aim to support:

  • Overworld terrain.
  • Forests.
  • Plains.
  • Deserts.
  • Mountains.
  • Caves where reliable terrain information exists.
  • Nether terrain if practical.
  • End terrain if practical.

Overworld support is the first priority.

Use biome-aware approximate surface colors.

Avoid rendering distant terrain with completely incorrect colors when biome information is available.

Avoid obvious seams at the edge of vanilla chunks.

Ensure the terrain renderer follows the player's position and camera orientation.

Ensure distant terrain disappears or updates correctly when the world changes.

Handle world unloading, dimension changes, death, respawning, and disconnecting safely.

Never retain world references after their world has been unloaded.

==================================================

  1. IMPORTANT LIMITATIONS

==================================================

This mod must not require Distant Horizons.

Do not copy or reuse Distant Horizons source code.

Do not claim that arbitrary distant terrain can be rendered accurately without obtaining terrain data.

Explain which terrain data is available, how it is obtained, and what happens when it is unavailable.

Do not generate fake terrain that appears to be real terrain when the discrepancy would be obvious.

If a complete implementation is too large, implement a working minimal version first.

==================================================

  1. CONFIGURATION

==================================================

Create an in-game configuration screen or a simple configuration file.

Include settings for:

  • Enable/disable distant terrain.
  • Maximum distant viewing distance.
  • Terrain detail level.
  • Terrain update rate.
  • Maximum cached terrain regions.
  • Biome color approximation.
  • Distant terrain fog.
  • Debug visualization.

Use safe default values for low-end devices.

The mod should fail gracefully if a setting is invalid.

==================================================

  1. DEVELOPMENT REQUIREMENTS

==================================================

Use the official Fabric development environment.

Use Minecraft 1.21.11 mappings and APIs that actually exist for this version.

Target Fabric Loader 0.19.3.

Determine a compatible Fabric API version instead of assuming one.

Use Java versions compatible with the target Minecraft version and Pojav runtime.

Inspect the actual Minecraft rendering APIs before implementing mixins.

Do not invent Minecraft classes, methods, mappings, or rendering hooks.

Keep mixins minimal and document their purpose.

Avoid fragile mixins into methods that change frequently between Minecraft versions.

Provide complete source code and all required Gradle project files.

Include:

  • settings.gradle
  • build.gradle
  • gradle.properties
  • fabric.mod.json
  • Java source files
  • Mixin configuration, if required
  • Default configuration
  • README with installation instructions

The project must compile into a working Fabric mod JAR.

Do not stop after generating pseudocode.

Do not leave important methods empty.

Do not use TODO placeholders for essential features.

Do not claim successful compilation unless the build has actually completed successfully.

==================================================

  1. IMPLEMENTATION PHASES

==================================================

PHASE 1:

Create a minimal Fabric mod that loads correctly on Minecraft Java 1.21.11 in PojavLauncher.

PHASE 2:

Implement terrain data collection and a small, working distant terrain mesh.

PHASE 3:

Implement distance-based LOD and mesh caching.

PHASE 4:

Optimize performance and memory usage.

PHASE 5:

Add configuration and compatibility fallbacks.

PHASE 6:

Build the JAR and test it.

After every phase:

  • Compile the project.
  • Fix compilation errors.
  • Check Minecraft method signatures.
  • Inspect relevant crash logs.
  • Continue only when the previous phase works.

FINAL DELIVERABLE:

A complete, compilable Fabric mod project with working source code, build instructions, and a resulting JAR file.

Prioritize a functional prototype over an enormous implementation that cannot compile.

Kodari AI
KodariOct 21 at 11:27 am 9
FakeRenderDistance
Fabric client-side mod for Minecraft 1.21.11 that renders distant terrain beyond vanilla render distance using a lightweight Level of Detail (LOD) system. It samples actual world terrain data to generate simplified meshes at multiple distance bands, with biome-aware surface colors and configurable detail levels. Optimized for low-end Android devices via PojavLauncher, it uses asynchronous terrain processing, bounded memory caches, frustum culling, and incremental mesh updates to maintain stable frame times. Includes in-game configuration for viewing distance, detail, update rate, and debug visualization. Falls back gracefully when terrain data is unavailable or device resources are constrained.

Implementation plan:

  1. Build a Fabric 1.21.11 client mod skeleton with compatible project metadata.

  2. Capture only already-loaded terrain into bounded region snapshots, processing a limited amount each tick.

  3. Render cached, coarse surface meshes as a separate LOD pass with configurable distances and fallback behavior.

  4. Add safe defaults, configuration, and installation/limitations documentation.

Created the Fabric client mod project with Gradle files, Minecraft 1.21.11 metadata, a client entrypoint, configuration, and README.

The prototype keeps vanilla nearby rendering intact. It samples surface height and color only from chunks the client has already loaded, builds coarse LOD meshes on a bounded background worker, and keeps them in a configurable LRU cache. It uses an opaque depth-writing render layer and does not require Vulkan or custom graphics extensions.

Limitations: It cannot show terrain the client has never received; cached terrain is surface-only, so caves, overhangs, foliage, and other fine details are not reconstructed. Culling uses a conservative horizontal view check rather than the full vanilla frustum. Rendering still has performance and memory costs, with low-end defaults.

No compilation result or verified JAR is claimed. To build and download it in Kodari: click Compile in the top bar (on phone, ⋮ → Compile Project), click Compile in the window, then download the successful build.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
README.md
settings.gradle
Code
10 708
src/client/java/com/kodari/fakerenderdistance/FakeRenderDistanceClient.java
package com.kodari.fakerenderdistance;

import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientChunkEvents;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.world.chunk.WorldChunk;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.nio.file.Path;

public final class FakeRenderDistanceClient implements ClientModInitializer {
    static final String MOD_ID = "fakerenderdistance";
    static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);

    @Override
    public void onInitializeClient() {
        Config config = Config.load(Path.of("config", MOD_ID + ".properties"));
        TerrainManager terrainManager = new TerrainManager(config);
        MinecraftClient client = MinecraftClient.getInstance();

        ClientTickEvents.END_CLIENT_TICK.register(terrainManager::tick);
        ClientChunkEvents.CHUNK_LOAD.register((world, chunk) -> {
            if (world == client.world) {
                terrainManager.onChunkLoaded(world, chunk);
            }
        });
        registerWorldRenderCallback(terrainManager);

        LOGGER.info("FakeRenderDistance initialized; settings are in config/{}.properties", MOD_ID);
    }

    private static void registerWorldRenderCallback(TerrainManager terrainManager) {
        try {
            Class<?> eventsClass = Class.forName("net.fabricmc.fabric.api.client.rendering.v1.world.WorldRenderEvents");
            Class<?> contextClass = Class.forName("net.fabricmc.fabric.api.client.rendering.v1.world.WorldRenderContext");
            Class<?> callbackClass = Class.forName(eventsClass.getName() + "$AfterEntities");
            Object event = eventsClass.getField("AFTER_ENTITIES").get(null);
            Method consumersMethod = contextClass.getMethod("consumers");
            Object callback = Proxy.newProxyInstance(callbackClass.getClassLoader(), new Class<?>[]{callbackClass}, (proxy, method, arguments) -> {
                if (arguments != null && arguments.length == 1) {
                    try {
                        terrainManager.render((VertexConsumerProvider) consumersMethod.invoke(arguments[0]));
                    } catch (ReflectiveOperationException exception) {
                        LOGGER.error("Could not access the world-render consumers", exception);
                    }
                }
                return null;
            });
            Class<?> eventClass = Class.forName("net.fabricmc.fabric.api.event.Event");
            eventClass.getMethod("register", Object.class).invoke(event, callback);
        } catch (ReflectiveOperationException | LinkageError exception) {
            LOGGER.error("Could not register the distant terrain render callback", exception);
        }
    }
}