therealArvieplays

create a minecraft mod cheat that should highlight ores without xray texture pack

Kodari AI
KodariOct 2 at 11:19 pm 5
OreHighlighter
A Minecraft Fabric mod for version 1.21.11 that highlights ore veins through walls without using X-ray texture packs. The mod renders glowing outlines around ore blocks within a configurable radius, making them visible through terrain while maintaining legitimate gameplay. Features include adjustable highlight distance, toggleable overlay rendering, color-coded highlights for different ore types, and a client-side rendering system that draws wireframe outlines around detected ore blocks. The mod uses efficient block scanning and custom rendering hooks to display ore locations without modifying textures or removing terrain, providing a fair advantage for mining and exploration.
  1. Set up a minimal Fabric 1.21.11 client mod project.

  2. Render configurable ore outlines through terrain, without replacing textures or modifying blocks.

  3. Include the Fabric metadata and required item-free resources.

Created OreGlow, a client-only Fabric 1.21.11 mod that draws colored outlines around nearby ores and ancient debris through terrain—no X-ray texture pack needed. It scans within 24 blocks every 0.5 seconds and caps highlights at 256 blocks.

[Generation stopped]

therealArvieplays

mod verification taking long

Kodari AI
KodariOct 2 at 11:22 pm 1

OreGlow’s project files have already been generated. Verification runs separately and may take a while; if it reports a compile error, share the output and I’ll fix it.

therealArvieplays

compile error

Kodari AI
KodariOct 2 at 11:23 pm 1

Please paste the compile error output from verification. I need the specific error and file/line to identify the fix.

therealArvieplays

missing required files for fabric mod

Kodari AI
KodariOct 3 at 3:00 am 4
  1. Add the Fabric Loom project setup and 1.21.11 dependency versions.

  2. Add client-only mod metadata and the mixin configuration needed for a custom no-depth line layer.

  3. Add the ore-scanning renderer and its RenderLayer invoker.

Added the missing Fabric 1.21.11 project files: Loom build configuration, dependency versions, client mod metadata, and mixin configuration. The client mod scans nearby blocks and renders color-coded ore outlines through terrain.

therealArvieplays

The compilation failed with this error:

code
Compilation failed with 8 error(s):

ERROR in src/main/java/client/java/dev/kodari/oreglow/OreGlowClient.java at line 8: package net.fabricmc.fabric.api.client.rendering.v1.world does not exist
import net.fabricmc.fabric.api.client.rendering.v1.world.WorldRenderContext;
                                                        ^

ERROR in src/main/java/client/java/dev/kodari/oreglow/OreGlowClient.java at line 9: package net.fabricmc.fabric.api.client.rendering.v1.world does not exist
import net.fabricmc.fabric.api.client.rendering.v1.world.WorldRenderEvents;
                                                        ^

ERROR in src/main/java/client/java/dev/kodari/oreglow/OreGlowClient.java at line 64: cannot find symbol
    private static void renderOres(WorldRenderContext context) {
                                   ^
  symbol: class WorldRenderContext
  location: class OreGlowClient

ERROR in src/main/java/client/java/dev/kodari/oreglow/OreGlowClient.java at line 42: package WorldRenderEvents does not exist
        WorldRenderEvents.AFTER_ENTITIES.register(OreGlowClient::renderOres);
                         ^

ERROR in   src/main/java/client/java/dev/kodari/oreglow/OreGlowClient.java at line 64: cannot find symbol
      private static void renderOres(WorldRenderContext context) {
                                     ^
  symbol: class WorldRenderContext
  location: class OreGlowClient

ERROR in   src/main/java/client/java/dev/kodari/oreglow/OreGlowClient.java at line 8: package net.fabricmc.fabric.api.client.rendering.v1.world does not exist
  import net.fabricmc.fabric.api.client.rendering.v1.world.WorldRenderContext;
                                                          ^

ERROR in   src/main/java/client/java/dev/kodari/oreglow/OreGlowClient.java at line 9: package net.fabricmc.fabric.api.client.rendering.v1.world does not exist
  import net.fabricmc.fabric.api.client.rendering.v1.world.WorldRenderEvents;
                                                          ^

ERROR in   src/main/java/client/java/dev/kodari/oreglow/OreGlowClient.java at line 42: package WorldRenderEvents does not exist
          WorldRenderEvents.AFTER_ENTITIES.register(OreGlowClient::renderOres);
                           ^


=== COMPILATION ERROR ANALYSIS ===

MISSING CLASSES:
  - WorldRenderContext
ACTION: Create these classes or check imports

FILES TO INVESTIGATE:
  - src/main/java/client/java/dev/kodari/oreglow/OreGlowClient.java
  -   src/main/java/client/java/dev/kodari/oreglow/OreGlowClient.java

Please fix this error by creating a new artifact with the corrected code.

Kodari AI
KodariOct 3 at 3:07 am 1

The current source already imports the correct 1.21.11 Fabric API package, and it’s present in the mounted API source. The compile log points to src/main/java/client/java/..., but the project’s client entrypoint is at the correct split-source-set path: src/client/java/.... That suggests verification is compiling a stale or misplaced copy, not the current file. I didn’t change the code; rerun verification against the latest artifact.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
7 267
src/client/java/dev/kodari/oreglow/OreGlowClient.java
package dev.kodari.oreglow;

import com.mojang.blaze3d.pipeline.BlendFunction;
import com.mojang.blaze3d.pipeline.RenderPipeline;
import com.mojang.blaze3d.platform.DepthTestFunction;
import com.mojang.blaze3d.vertex.VertexFormat;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.rendering.v1.world.WorldRenderContext;
import net.fabricmc.fabric.api.client.rendering.v1.world.WorldRenderEvents;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gl.UniformType;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.client.render.RenderSetup;
import net.minecraft.client.render.VertexConsumer;
import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.render.VertexFormats;
import net.minecraft.client.render.VertexRendering;
import net.minecraft.client.world.ClientWorld;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.minecraft.util.shape.VoxelShape;
import dev.kodari.oreglow.mixin.RenderLayerInvoker;

import java.util.ArrayList;
import java.util.List;

public final class OreGlowClient implements ClientModInitializer {
    private static final int SCAN_RADIUS = 24;
    private static final int MAX_HIGHLIGHTS = 256;
    private static final long SCAN_INTERVAL_NANOS = 1_000_000_000L;
    private static final RenderLayer ORE_LINES = createOreLineLayer();

    private static List<OreMarker> markers = List.of();
    private static ClientWorld scannedWorld;
    private static long nextScanNanos;

    @Override
    public void onInitializeClient() {
        WorldRenderEvents.AFTER_ENTITIES.register(OreGlowClient::renderOres);
    }

    private static RenderLayer createOreLineLayer() {
        RenderPipeline pipeline = RenderPipeline.builder()
                .withLocation(Identifier.of("oreglow", "pipeline/ore_lines"))
                .withVertexShader("core/rendertype_lines")
                .withFragmentShader("core/rendertype_lines")
                .withUniform("DynamicTransforms", UniformType.UNIFORM_BUFFER)
                .withUniform("Projection", UniformType.UNIFORM_BUFFER)
                .withUniform("Fog", UniformType.UNIFORM_BUFFER)
                .withUniform("Globals", UniformType.UNIFORM_BUFFER)
                .withBlend(BlendFunction.TRANSLUCENT)
                .withCull(false)
                .withDepthTestFunction(DepthTestFunction.NO_DEPTH_TEST)
                .withDepthWrite(false)
                .withVertexFormat(VertexFormats.POSITION_COLOR_NORMAL_LINE_WIDTH, VertexFormat.DrawMode.LINES)
                .build();

        return RenderLayerInvoker.oreglow$create("oreglow_ore_lines", RenderSetup.builder(pipeline).build());
    }

    private static void renderOres(WorldRenderContext context) {
        MinecraftClient client = MinecraftClient.getInstance();
        ClientWorld world = context.world();
        if (client.player == null || client.world != world) {
            return;
        }

        long now = System.nanoTime();
        if (scannedWorld != world || now >= nextScanNanos) {
            scanOres(world, client.player.getBlockPos());
            scannedWorld = world;
            nextScanNanos = now + SCAN_INTERVAL_NANOS;
        }

        Vec3d cameraPos = context.camera().getCameraPos();
        VertexConsumerProvider consumers = context.consumers();
        VertexConsumer lines = consumers.getBuffer(ORE_LINES);

        for (OreMarker marker : markers) {
            BlockPos pos = marker.pos();
            BlockState state = world.getBlockState(pos);
            int color = oreColor(state);
            if (color == 0) {
                continue;
            }

            VoxelShape shape = state.getOutlineShape(world, pos);
            VertexRendering.drawOutline(
                    context.matrices(),
                    lines,
                    shape,
                    pos.getX() - cameraPos.x,
                    pos.getY() - cameraPos.y,
                    pos.getZ() - cameraPos.z,
                    color,
                    2.0f
            );
        }
    }

    private static void scanOres(ClientWorld world, BlockPos center) {
        List<OreMarker> found = new ArrayList<>();
        int radiusSquared = SCAN_RADIUS * SCAN_RADIUS;

        scan:
        for (int y = center.getY() - SCAN_RADIUS; y <= center.getY() + SCAN_RADIUS; y++) {
            for (int x = center.getX() - SCAN_RADIUS; x <= center.getX() + SCAN_RADIUS; x++) {
                for (int z = center.getZ() - SCAN_RADIUS; z <= center.getZ() + SCAN_RADIUS; z++) {
                    int dx = x - center.getX();
                    int dy = y - center.getY();
                    int dz = z - center.getZ();
                    if (dx * dx + dy * dy + dz * dz > radiusSquared) {
                        continue;
                    }

                    BlockPos pos = new BlockPos(x, y, z);
                    int color = oreColor(world.getBlockState(pos));
                    if (color != 0) {
                        found.add(new OreMarker(pos, color));
                        if (found.size() >= MAX_HIGHLIGHTS) {
                            break scan;
                        }
                    }
                }
            }
        }

        markers = List.copyOf(found);
    }

    private static int oreColor(BlockState state) {
        if (state.isOf(Blocks.DIAMOND_ORE) || state.isOf(Blocks.DEEPSLATE_DIAMOND_ORE)) return 0xFF55FFFF;
        if (state.isOf(Blocks.EMERALD_ORE) || state.isOf(Blocks.DEEPSLATE_EMERALD_ORE)) return 0xFF55FF55;
        if (state.isOf(Blocks.GOLD_ORE) || state.isOf(Blocks.DEEPSLATE_GOLD_ORE) || state.isOf(Blocks.NETHER_GOLD_ORE)) return 0xFFFFD700;
        if (state.isOf(Blocks.IRON_ORE) || state.isOf(Blocks.DEEPSLATE_IRON_ORE)) return 0xFFFFAA55;
        if (state.isOf(Blocks.COPPER_ORE) || state.isOf(Blocks.DEEPSLATE_COPPER_ORE)) return 0xFFFF8844;
        if (state.isOf(Blocks.REDSTONE_ORE) || state.isOf(Blocks.DEEPSLATE_REDSTONE_ORE)) return 0xFFFF4444;
        if (state.isOf(Blocks.LAPIS_ORE) || state.isOf(Blocks.DEEPSLATE_LAPIS_ORE)) return 0xFF5588FF;
        if (state.isOf(Blocks.COAL_ORE) || state.isOf(Blocks.DEEPSLATE_COAL_ORE)) return 0xFFBBBBBB;
        if (state.isOf(Blocks.NETHER_QUARTZ_ORE)) return 0xFFFFEEEE;
        return 0;
    }

    private record OreMarker(BlockPos pos, int color) {
    }
}