Sennen Fernando

make me a Mod that will the generate farlands and could also not normal farlands it should have different stages of farlands like repeating pattern and at the end of the farlands there should be void it should be exciting Epic beautiful and first stage of the Farlands should be Normal Farlands

Kodari AI
KodariNov 2 at 12:38 pm 6
FarlandsOdyssey
FarlandsOdyssey is a Minecraft Fabric mod that transforms the world edge into an epic, multi-stage journey. It generates the classic Normal Farlands with terrain distortion, followed by increasingly surreal stages: Repeating Pattern Farlands with mirrored structures, Fractured Farlands with floating islands, and a final Void Abyss that swallows the world. Each stage features unique block palettes, ambient particles, and dramatic lighting, creating a breathtaking descent into the unknown. Players explore progressively alien landscapes, culminating in a spectacular void edge with falling debris and cosmic effects, delivering an unforgettable end-of-world experience.
  • Add four progressively stranger terrain stages beyond the classic Far Lands distance.

  • End the generated terrain in a void, while leaving the rest of the Overworld unchanged.

Created four Overworld terrain stages beginning at X or Z ±12,550,824: Far Lands-inspired cliffs, repeating lattices, diagonal ridges, and floating islands. The terrain becomes void beyond ±12,678,824.

These are new terrain patterns, not an exact recreation of the original Far Lands. Vanilla structures and features may still appear in the void. Changes apply to newly generated chunks.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
6 137
src/main/java/com/kodari/farlands/mixin/NoiseChunkGeneratorMixin.java
package com.kodari.farlands.mixin;

import com.llamalad7.mixinextras.injector.ModifyReturnValue;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.registry.RegistryKey;
import net.minecraft.world.gen.chunk.ChunkGeneratorSettings;
import net.minecraft.world.gen.chunk.ChunkNoiseSampler;
import net.minecraft.world.gen.chunk.NoiseChunkGenerator;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;

@Mixin(NoiseChunkGenerator.class)
public abstract class NoiseChunkGeneratorMixin {
    private static final int START = 12_550_824;
    private static final int STAGE_LENGTH = 32_000;

    @Shadow
    public abstract boolean matchesSettings(RegistryKey<ChunkGeneratorSettings> settings);

    @ModifyReturnValue(method = "getBlockState", at = @At("RETURN"))
    private BlockState farlands_beyond$terrain(BlockState original, ChunkNoiseSampler sampler,
                                               int x, int y, int z, BlockState state) {
        if (!this.matchesSettings(ChunkGeneratorSettings.OVERWORLD)) {
            return original;
        }

        int distance = Math.max(Math.abs(x), Math.abs(z));
        if (distance < START) {
            return original;
        }
        int stage = (distance - START) / STAGE_LENGTH;
        if (stage >= 4) {
            return Blocks.AIR.getDefaultState();
        }

        double density;
        if (stage == 0) {
            double walls = Math.sin(x * 0.017) + Math.sin(z * 0.017)
                    + 0.55 * Math.sin(x * 0.043 + z * 0.031);
            density = walls + Math.sin(y * 0.041 + x * 0.006) * 0.45 - (y - 90) / 115.0;
        } else if (stage == 1) {
            double lattice = Math.cos(x * Math.PI / 32.0) + Math.cos(z * Math.PI / 32.0);
            density = lattice + Math.cos(y * Math.PI / 32.0) * 0.85 - 0.7;
        } else if (stage == 2) {
            double ridges = Math.cos((x + z) * Math.PI / 48.0)
                    + Math.cos((x - z) * Math.PI / 48.0);
            density = ridges + Math.cos(y * Math.PI / 24.0) * 0.65 - 0.95;
        } else {
            double islands = Math.cos(x * Math.PI / 64.0) + Math.cos(z * Math.PI / 64.0)
                    + Math.cos((x + z) * Math.PI / 96.0) * 0.45;
            density = islands - Math.abs(y - 100) / 32.0 - 1.25;
        }

        if (density <= 0.0) {
            return Blocks.AIR.getDefaultState();
        }
        return Blocks.STONE.getDefaultState();
    }
}