zyrox_playz

Create a custom Fabric client-side Minecraft mod (Java, 1.20+) focused on FPS optimization and Discord logging.

Requirements:

The mod should optimize game performance automatically (reduce particles, lower animation load, optimize settings where possible).

It should read the player’s current FPS using MinecraftClient.getCurrentFps().

It should detect the player’s username.

Every 60 seconds, it should send a message to a Discord webhook containing:

Player username Current FPS Minecraft version Use clean, production-ready Java code.

Include full project structure (build.gradle, fabric.mod.json, main class).

Use proper Fabric API event listeners (ClientTickEvents).

Make sure the mod runs safely and does not violate Minecraft or Discord policies.

Add comments explaining each part of the code.

Also provide setup instructions for compiling and building the mod JAR.

Kodari AI
KodariFeb 23 at 5:01 pm 14,472 (v2)

I’ll create a comprehensive client-side Fabric mod for FPS optimization and Discord logging.

PerformanceMonitor
A client-side Fabric mod that automatically optimizes Minecraft performance through particle reduction, animation optimization, and intelligent settings management. Monitors and logs real-time FPS metrics, player username, and Minecraft version to Discord webhooks every 60 seconds. Provides transparent performance tracking while maintaining game stability and respecting API rate limits.

Complete! 🚀

I’ve created a production-ready Fabric 1.21.4 client-side mod with all requested features:

✅ Key Features Implemented:

  1. FPS Optimization Engine

    • Particle reduction via Mixin (50% default, configurable)

    • View/simulation distance auto-optimization

    • Animation load reduction (view bobbing, distortion effects)

    • Smart FPS capping

  2. Discord Webhook Integration

    • Reports every 60 seconds (configurable)

    • Reads FPS via MinecraftClient.getCurrentFps()

    • Detects player username automatically

    • Color-coded embeds (green/yellow/red based on FPS)

    • Rate limiting protection (2s minimum between requests)

  3. Safety & Compliance

    • Client-side only (no server dependencies)

    • Respects Discord API rate limits

    • Non-intrusive optimizations

    • Fully configurable—disable anything unwanted

📦 Project Structure:

  • build.gradle - Gradle build configuration

  • fabric.mod.json - Mod metadata

  • PerformanceMonitorClient.java - Main entry point

  • FPSTracker.java - 60-second interval Discord reporter

  • DiscordWebhook.java - HTTP webhook sender with rate limiting

  • PerformanceOptimizer.java - Auto-optimization engine

  • ConfigManager.java - JSON configuration handler

  • ParticleManagerMixin.java - Particle reduction via Mixin

🛠️ Build Instructions:

Shell
# Windows
gradlew.bat build

# Linux/macOS
./gradlew build

# Output: build/libs/performance-monitor-1.0.0.jar

⚙️ Setup Steps:

  1. Build the mod using Gradle

  2. Install Fabric Loader + Fabric API

  3. Copy JAR to .minecraft/mods/

  4. Configure Discord webhook in config/performance-monitor.json

  5. Set enableDiscordLogging: true

  6. Restart Minecraft

The mod is fully documented with README.md and SETUP.txt files included for end users!

zyrox_playz

Where is my mod

Kodari AI
KodariFeb 23 at 5:03 pm 4,929 (v2)

Your Performance Monitor mod is located in this project structure:

Main Mod Code

src/main/java/com/performancemonitor/

  • PerformanceMonitorClient.java - Main client initializer

  • FPSTracker.java - FPS tracking system

  • PerformanceOptimizer.java - Performance optimization logic

  • ConfigManager.java - Configuration management

  • DiscordWebhook.java - Discord webhook integration

  • mixin/ParticleManagerMixin.java - Particle system mixin

Resources

src/main/resources/

  • fabric.mod.json - Mod metadata

  • performancemonitor.mixins.json - Mixin configuration

  • assets/performancemonitor/icon.png - Mod icon

Build Files

  • build.gradle - Build configuration

  • gradle.properties - Gradle properties

  • settings.gradle - Gradle settings

After Building

When you run ./gradlew build, the compiled mod JAR will appear in: build/libs/ (not currently visible because the mod hasn’t been built yet)

Would you like me to:

  1. Read the mod files to see what functionality you have?

  2. Check if there are any issues with the current setup?

  3. Help you build/test the mod?

zyrox_playz

Mod file do

Kodari AI
KodariFeb 23 at 5:03 pm 4,313 (v2)

I’ll read the existing mod files to see what needs to be done.

I can see your Fabric 1.21.4 performance monitor mod is mostly complete. Let me fix the duplicate content issue in PerformanceMonitorClient.java and ensure everything is production-ready.

Your Fabric 1.21.4 Performance Monitor mod is complete and ready with:

  • FPS tracking with Discord webhook reporting

  • Auto-optimization of video settings (view distance, simulation distance, FPS cap)

  • Particle reduction system via Mixin

  • JSON configuration file

  • Full Fabric 1.21.4 compliance (Java 21, Loader 0.16.9, API 0.114.0, Loom 1.9)

Fixed duplicate content in PerformanceMonitorClient.java - the mod is now production-ready.

Kodari can make mistakes. Review important code before using.
Files
gradle
src
.gitignore
build.gradle
gradle.properties
gradlew
gradlew.bat
README.md
settings.gradle
SETUP.txt
Code
18 938
src/main/java/com/performancemonitor/PerformanceMonitorClient.java
package com.performancemonitor;

import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@Environment(EnvType.CLIENT)
public class PerformanceMonitorClient implements ClientModInitializer {
    public static final String MOD_ID = "performancemonitor";
    public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);

    @Override
    public void onInitializeClient() {
        LOGGER.info("Performance Monitor initializing...");

        ConfigManager.loadConfig();
        
        PerformanceOptimizer.initialize();
        
        FPSTracker fpsTracker = new FPSTracker();
        ClientTickEvents.END_CLIENT_TICK.register(fpsTracker::tick);
        
        LOGGER.info("Performance Monitor initialized successfully!");
    }
}