Rizzler
📎 1 file 3,311 chars
📄
pasted-code-1787921156067.txt
txt 56 lines
▶
You are an expert Minecraft Java/Fabric developer. Create a complete, fully implemented client-side Fabric mod called "Testing Mod" for Minecraft 1.21.11.

## Technical Specifications
- Mod Name: Testing Mod
- Mod ID: testingmod
- Minecraft Version: 1.21.11
- Mod Loader: Fabric (Fabric Loader 0.18.1+, Fabric API 0.139.5+1.21.11)
- Language: Java 21
- Build Tool: Fabric Loom 1.14

## General Mod & Module Architecture
- Client-Side Only: Enforce client environment so it never crashes dedicated servers.
- Fully Configurable & Toggleable: EVERY module must inherit from a unified Module base class with an enabled state and setting list.
- Mod Menu Keybind:
  - Pressing RIGHT SHIFT opens the custom module GUI (TestingModScreen).
  - Designed with an original, clean custom layout featuring category sidebar navigation (Render, Movement, Misc), smooth hover animations, and a split-pane layout (left: module list with green/red status toggles; right: dynamically selected module's setting controls).

## Required Modules

### 1. Render Category
- EntityESP:
  - Draws a solid red 3D bounding box around every entity within the current active render distance using RenderUtils.
  - Settings: Max Render Distance (Number slider).
- Search (Block ESP):
  - Highlights specific block types (e.g., Diamond Ore, Chests).
  - MUST NOT scan the world every frame; uses Mixins on WorldChunk to cache matching BlockPos coordinates dynamically on chunk load/block update.
  - Settings: Render Distance (Number), Highlight Chests (Boolean), Highlight Ores (Boolean).
- Trajectories:
  - Renders physics flight paths for throwable items (Ender Pearls, Snowballs, Potions) and Bows/Spears.
  - Settings: Line Width (Number), Show Impact Box (Boolean).

### 2. Movement Category
- WebWalk (Cobweb Bypass):
  - Prevents the movement slowdown caused by cobwebs, allowing the player to walk, run, and jump through cobwebs as if they were air or normal ground.
  - Implemented via mixin/hooks on player block velocity multipliers (`Block.onEntityCollision` or movement physics override).
  - Settings: Mode (Fast / Normal Speed), Allow Jumping (Boolean).
- Phase (Block / Door Clip):
  - Modifies player collision bounding box checks to allow phasing through thin blocks, doors, trapdoors, or suffocating blocks under specific conditions.
  - Settings: Mode (Clip / Sand Phase), Distance (Number).

### 3. Profiler & Debug Integration
- Mixin into WorldRenderer to wrap custom entity render passes inside Minecraft's native Profiler (profiler.push("testingmod_entityRenderPass")). Must properly integrate with vanilla Shift+F3 profiler pie chart.

## Directory Structure to Output
Provide complete file content for:
1. gradle.properties & build.gradle (Configured for Fabric 1.21.11)
2. settings.gradle & fabric.mod.json
3. Java source files:
   - ClientMod.java (Entrypoint)
   - Module.java, Category.java, ModuleManager.java
   - Setting system (Setting.java, BooleanSetting.java, NumberSetting.java, ModeSetting.java)
   - TestingModScreen.java (Custom Right-Shift GUI layout)
   - Movement Modules (WebWalk.java, Phase.java)
   - Render Modules (EntityESP.java, Search.java, Trajectories.java)
   - Utilities (RenderUtils.java)
   - Mixins (WorldChunkMixin.java, WorldRendererMixin.java, BlockMixin.java / EntityMixin.java
Kodari AI
KodariAug 28 at 12:53 pm 3
TestingMod
Client-side Fabric utility mod for Minecraft 1.21.11 with a custom module system. Features a Right-Shift GUI with category sidebar navigation and split-pane layout. Includes Render modules (EntityESP with red bounding boxes, Search block highlighting with cached coordinates via WorldChunk mixins, Trajectories physics prediction) and Movement modules (WebWalk cobweb bypass, Phase block clipping). All modules inherit from a unified Module base with toggleable settings, integrated with vanilla profiler for debugging.
  1. Set up the Fabric 1.21.11 project and client-only entrypoints.

  2. Add the module/settings architecture and GUI.

  3. Implement movement and render modules with the required mixins/utilities.

  4. Add resources, build metadata, and mixin configuration.

Created the complete client-side Fabric 1.21.11 “Testing Mod” project with:

  • Fabric Loom 1.14 setup and Java 21 configuration

  • Client-only entrypoint and keybind-driven GUI

  • Module architecture with categories, toggles, and settings

  • Render modules:

    • EntityESP

    • Search block cache ESP

    • Trajectories

  • Movement modules:

    • WebWalk

    • Phase

  • Custom split-pane TestingModScreen

  • World chunk caching and collision mixins

  • World renderer profiler integration

  • Fabric metadata, mixin configuration, and language resources

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
25 994
src/client/java/com/testingmod/ClientMod.java
package com.testingmod;

import com.testingmod.module.ModuleManager;
import com.testingmod.module.render.Search;
import com.testingmod.screen.TestingModScreen;
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.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper;
import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderEvents;
import net.minecraft.client.option.KeyBinding;
import net.minecraft.util.Identifier;
import org.lwjgl.glfw.GLFW;

public final class ClientMod implements ClientModInitializer {
    public static final String MOD_ID = "testingmod";
    private static final KeyBinding.Category KEY_CATEGORY =
            KeyBinding.Category.create(Identifier.of(MOD_ID, "keys"));
    private static KeyBinding openGuiKey;

    @Override
    public void onInitializeClient() {
        ModuleManager.initialize();
        openGuiKey = KeyBindingHelper.registerKeyBinding(
                new KeyBinding("key.testingmod.open_gui", GLFW.GLFW_KEY_RIGHT_SHIFT, KEY_CATEGORY));

        ClientChunkEvents.CHUNK_LOAD.register((world, chunk) -> Search.cacheChunk(chunk));
        ClientTickEvents.END_CLIENT_TICK.register(client -> Search.onWorldTick(client.world));
        ClientTickEvents.END_CLIENT_TICK.register(client -> {
            while (openGuiKey.wasPressed()) {
                if (client.currentScreen == null) {
                    client.setScreen(new TestingModScreen());
                }
            }
        });
        WorldRenderEvents.AFTER_ENTITIES.register(ModuleManager::render);
    }
}