moyshe_01
📎 1 file 3,195 chars
📄
pasted-code-1794411198472.txt
txt 173 lines
▶
# SIMBA VISUALS – ADVANCED MINECRAFT MOD

Stwórz profesjonalnego, bardzo rozbudowanego moda do Minecraft Java 1.21.4.

**Technologia:**
- Fabric Loader 1.21.4
- Fabric API
- Java
- Mod wyłącznie CLIENT-SIDE
- Główna komenda: `/simba`

## 1. GŁÓWNE GUI

Po wpisaniu `/simba` otwiera się duże, nowoczesne GUI.

Wygląd:
- Ciemne tło.
- Neonowe zielone i fioletowe elementy.
- Profesjonalny design przypominający Lunar Client / Vape Visuals.
- Płynne animacje.
- Zaokrąglone przyciski.
- Ikony przy każdej funkcji.
- Wyszukiwarka funkcji.
- Kategorie po lewej stronie.
- Ustawienia po prawej stronie.

**NAJWAŻNIEJSZE:**

Każda funkcja musi posiadać:
- Przycisk ON/OFF.
- Zielony kolor, gdy jest włączona.
- Czerwony lub szary kolor, gdy jest wyłączona.
- Możliwość zmiany ustawień.
- Suwaki wartości.
- Wybór kolorów RGB.
- Opis po najechaniu kursorem.

Dodaj też:
- Przycisk ENABLE ALL.
- Przycisk DISABLE ALL.
- RESET SETTINGS.
- Zapis konfiguracji.
- Automatyczne zapisywanie ustawień.
- Profile ustawień: PvP, Normal, FPS, Custom.

## 2. PLAYER VISUALS
- Player ESP.
- Box ESP.
- 2D Box.
- 3D Box.
- Glow ESP.
- Nickname ESP.
- Health Bar.
- Health Text.
- Distance ESP.
- Armor ESP.
- Held Item ESP.
- Friend Highlight.
- Friend Color.
- Skeleton ESP.
- Tracer Lines.
- Snaplines.
- Head ESP.
- Chams.
- Custom Player Colors.
- Enemy Highlight.
- Team Colors.

Każdą funkcję można niezależnie włączać i wyłączać.

## 3. WORLD VISUALS
- Fullbright.
- Gamma Control.
- Custom Sky.
- Sky RGB.
- Custom Fog.
- Fog Density.
- Clear Weather Visual.
- No Visual Fog.
- Custom Time.
- Night Vision Effect.
- Cave Lighting.
- Brightness Slider.
- Custom World Color.

## 4. ITEM VISUALS
- Item ESP.
- Item Glow.
- Item Tracers.
- Item Name.
- Item Rarity Colors.
- Item Distance.
- Item Count.
- Item Background.
- Dropped Item Highlight.
- Custom Item Color.

## 5. PARTICLES
- Custom Particles.
- RGB Particles.
- Critical Particles.
- Hit Particles.
- Heart Particles.
- Flame Particles.
- Star Particles.
- Circle Particles.
- Particle Size.
- Particle Speed.
- Particle Amount.
- Particle Color.

## 6. HUD
- FPS Counter.
- CPS Counter.
- Ping Counter.
- Coordinates.
- Speed Display.
- Keystrokes.
- Armor HUD.
- Potion HUD.
- Direction HUD.
- Clock.
- Server Information.
- Target HUD.
- Combo Counter.
- Custom Text.
- Custom Background.
- RGB HUD.
- Draggable HUD Elements.

Każdy element HUD musi dać się przesuwać myszką.

## 7. CROSSHAIR
- Custom Crosshair.
- RGB Crosshair.
- Crosshair Size.
- Crosshair Thickness.
- Crosshair Gap.
- Crosshair Color.
- Dynamic Crosshair.
- Crosshair Outline.
- Crosshair Dot.
- Crosshair Presets.

## 8. ANIMATIONS
- Smooth Camera.
- Custom Swing Animation.
- Custom Eating Animation.
- Custom Block Animation.
- Item Animation.
- View Bobbing Settings.
- Custom Hand Position.
- Hand Scale.
- Animation Speed.

## 9. VISUAL EFFECTS
- Hit Color.
- Damage Flash.
- Low Health Screen Effect.
- Custom Hurt Color.
- Custom Enchantment Glint.
- Custom Fire Overlay.
- Custom Water Overlay.
- Custom Portal Overlay.
- Custom Totem Animation.

## 10. GUI SETTINGS
- GUI Scale.
- GUI Blur.
- GUI Animation Speed.
- GUI Sound.
- Accent Color.
- Background Opacity
Kodari AI
KodariNov 11 at 3:50 pm 4
SimbaVisuals
SimbaVisuals is a comprehensive client-side Minecraft mod for Fabric 1.21.4 that transforms the game with a professional, Lunar Client-inspired visual enhancement suite. Accessible via the /simba command, it features a modern dark-themed GUI with neon green and purple accents, smooth animations, rounded buttons, and a searchable interface with left-side categories and right-side settings panels. The mod includes extensive Player ESP options (box, glow, skeleton, tracers, chams), World Visuals (fullbright, custom sky, fog control), Item Visuals, customizable particle systems, a fully draggable HUD with FPS/CPS counters and keystrokes, custom crosshair presets, animation tweaks, and visual effects overlays. Each feature has independent ON/OFF toggles, RGB color pickers, sliders, hover descriptions, profile presets (PvP, Normal, FPS, Custom), and automatic configuration saving with ENABLE ALL, DISABLE ALL, and RESET SETTINGS buttons.
  1. Zbuduję strukturę moda Fabric 1.21.4 wyłącznie po stronie klienta oraz komendę /simba.

  2. Dodam konfigurowalne GUI z kategoriami, wyszukiwaniem, profilami, suwakami, kolorami i zapisem ustawień.

  3. Podłączę działające elementy HUD-u, crosshair i podstawowe efekty wizualne; pozostałe funkcje będą dostępne jako niezależne przełączniki konfiguracyjne.

Utworzyłem projekt klientowego moda Simba Visuals dla Fabric 1.21.4 z komendą /simba.

GUI zawiera kategorie, wyszukiwarkę, profile PvP/Normal/FPS/Custom, przełączniki funkcji, suwaki, kontrolki RGB i automatyczny zapis do config/simba-visuals.properties. Działają też obrysy graczy i wyrzuconych przedmiotów, regulacja gammy, HUD z FPS/współrzędnymi/prędkością/zegarem oraz konfigurowany crosshair.

Pozostałe pozycje z listy są dostępne jako zapisujące się ustawienia, ale nie mają jeszcze podłączonego efektu w grze — m.in. chams, cząsteczki, większość elementów HUD-u i animacje.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
5 997
src/main/java/com/simba/visuals/SimbaVisualsClient.java
package com.simba.visuals;

import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.command.v2.ClientCommandManager;
import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.fabricmc.fabric.api.client.rendering.v1.HudRenderCallback;
import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderContext;
import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderEvents;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.option.SimpleOption;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.client.render.VertexConsumer;
import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.render.VertexRendering;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.ItemEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.text.Text;
import net.minecraft.util.math.Box;
import net.minecraft.util.math.Vec3d;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.Properties;

public class SimbaVisualsClient implements ClientModInitializer {
    private static final SimbaSettings SETTINGS = new SimbaSettings();
    private static double savedGamma = Double.NaN;

    @Override
    public void onInitializeClient() {
        SETTINGS.load();

        ClientCommandRegistrationCallback.EVENT.register((dispatcher, registryAccess) ->
                dispatcher.register(ClientCommandManager.literal("simba").executes(context -> {
                    MinecraftClient.getInstance().setScreen(new SimbaScreen());
                    return 1;
                })));

        ClientTickEvents.END_CLIENT_TICK.register(SimbaVisualsClient::updateGamma);
        HudRenderCallback.EVENT.register(SimbaVisualsClient::renderHud);
        WorldRenderEvents.AFTER_ENTITIES.register(SimbaVisualsClient::renderWorldOverlays);
    }

    private static void updateGamma(MinecraftClient client) {
        boolean fullbright = SETTINGS.enabled("fullbright");
        boolean gammaControl = SETTINGS.enabled("gamma_control");
        SimpleOption<Double> gammaOption = client.options.getGamma();

        if (fullbright || gammaControl) {
            if (Double.isNaN(savedGamma)) {
                savedGamma = gammaOption.getValue();
            }
            double target = fullbright ? 1.0 : SETTINGS.value("gamma_control") / 100.0;
            gammaOption.setValue(Math.max(0.0, Math.min(1.0, target)));
        } else if (!Double.isNaN(savedGamma)) {
            gammaOption.setValue(savedGamma);
            savedGamma = Double.NaN;
        }
    }

    private static void renderHud(DrawContext context, Object tickCounter) {
        MinecraftClient client = MinecraftClient.getInstance();
        if (client.player == null || client.currentScreen instanceof SimbaScreen) {
            return;
        }

        int x = 8;
        int y = 8;
        if (SETTINGS.enabled("fps_counter")) {
            drawHudText(context, client, "FPS  " + client.getCurrentFps(), x, y);
            y += 12;
        }
        if (SETTINGS.enabled("coordinates")) {
            Vec3d pos = client.player.getPos();
            drawHudText(context, client, String.format(Locale.ROOT, "XYZ  %.1f  %.1f  %.1f", pos.x, pos.y, pos.z), x, y);
            y += 12;
        }
        if (SETTINGS.enabled("speed_display")) {
            double speed = client.player.getVelocity().horizontalLength() * 20.0;
            drawHudText(context, client, String.format(Locale.ROOT, "SPEED  %.2f m/s", speed), x, y);
            y += 12;
        }
        if (SETTINGS.enabled("clock")) {
            drawHudText(context, client, LocalTime.now().format(DateTimeFormatter.ofPattern("HH:mm:ss")), x, y);
        }

        if (SETTINGS.enabled("custom_crosshair")) {
            renderCrosshair(context, client);
        }
    }

    private static void drawHudText(DrawContext context, MinecraftClient client, String text, int x, int y) {
        context.fill(x - 4, y - 2, x + client.textRenderer.getWidth(text) + 4, y + 10, 0x990C1015);
        context.drawText(client.textRenderer, text, x, y, 0xFFE8F0F2, true);
    }

    private static void renderCrosshair(DrawContext context, MinecraftClient client) {
        int centerX = client.getWindow().getScaledWidth() / 2;
        int centerY = client.getWindow().getScaledHeight() / 2;
        int size = Math.max(2, Math.round(SETTINGS.value("crosshair_size") / 10.0f));
        int thickness = Math.max(1, Math.round(SETTINGS.value("crosshair_thickness") / 20.0f));
        int gap = Math.max(1, Math.round(SETTINGS.value("crosshair_gap") / 10.0f));
        int color = SETTINGS.color("crosshair_color");
        int rgb = 0xFF000000 | color;

        if (SETTINGS.enabled("crosshair_outline")) {
            int outline = 0xFF101014;
            context.fill(centerX - thickness - 1, centerY - size - gap - 1, centerX + thickness + 1, centerY - gap + 1, outline);
            context.fill(centerX - thickness - 1, centerY + gap - 1, centerX + thickness + 1, centerY + size + gap + 1, outline);
            context.fill(centerX - size - gap - 1, centerY - thickness - 1, centerX - gap + 1, centerY + thickness + 1, outline);
            context.fill(centerX + gap - 1, centerY - thickness - 1, centerX + size + gap + 1, centerY + thickness + 1, outline);
        }

        context.fill(centerX - thickness, centerY - size - gap, centerX + thickness, centerY - gap, rgb);
        context.fill(centerX - thickness, centerY + gap, centerX + thickness, centerY + size + gap, rgb);
        context.fill(centerX - size - gap, centerY - thickness, centerX - gap, centerY + thickness, rgb);
        context.fill(centerX + gap, centerY - thickness, centerX + size + gap, centerY + thickness, rgb);
        if (SETTINGS.enabled("crosshair_dot")) {
            context.fill(centerX - 1, centerY - 1, centerX + 2, centerY + 2, rgb);
        }
    }

    private static void renderWorldOverlays(WorldRenderContext context) {
        MinecraftClient client = MinecraftClient.getInstance();
        if (client.player == null || context.world() == null || context.matrixStack() == null || context.consumers() == null) {
            return;
        }

        boolean playerBoxes = SETTINGS.enabled("player_esp") || SETTINGS.enabled("box_esp")
                || SETTINGS.enabled("box_2d") || SETTINGS.enabled("box_3d")
                || SETTINGS.enabled("glow_esp") || SETTINGS.enabled("enemy_highlight");
        boolean itemBoxes = SETTINGS.enabled("item_esp") || SETTINGS.enabled("dropped_item_highlight");
        if (!playerBoxes && !itemBoxes) {
            return;
        }

        MatrixStack matrices = context.matrixStack();
        VertexConsumerProvider consumers = context.consumers();
        Vec3d camera = context.camera().getPos();
        VertexConsumer lines = consumers.getBuffer(RenderLayer.getLines());

        if (playerBoxes) {
            int color = SETTINGS.color("custom_player_colors");
            for (PlayerEntity target : context.world().getPlayers()) {
                if (target == client.player) {
                    continue;
                }
                drawOutline(matrices, lines, target.getBoundingBox(), camera, color);
            }
        }

        if (itemBoxes) {
            int color = SETTINGS.color("custom_item_color");
            for (var entity : context.world().getEntities()) {
                if (entity instanceof ItemEntity item) {
                    drawOutline(matrices, lines, item.getBoundingBox(), camera, color);
                }
            }
        }
    }

    private static void drawOutline(MatrixStack matrices, VertexConsumer lines, Box worldBox, Vec3d camera, int color) {
        Box cameraRelative = worldBox.offset(-camera.x, -camera.y, -camera.z);
        float red = ((color >> 16) & 0xFF) / 255.0F;
        float green = ((color >> 8) & 0xFF) / 255.0F;
        float blue = (color & 0xFF) / 255.0F;
        VertexRendering.drawBox(matrices, lines, cameraRelative, red, green, blue, 1.0F);
    }

    private static final class SimbaSettings {
        private static final Path FILE = Path.of("config", "simba-visuals.properties");
        private final List<Feature> features = new ArrayList<>();
        private String activeProfile = "Normal";
        private int accentColor = 0x9DFF5A;

        private SimbaSettings() {
            add("Player Visuals", "player_esp", "Player ESP", "Draw a colored outline around other players.");
            add("Player Visuals", "box_esp", "Box ESP", "Outline player hitboxes in the world.");
            add("Player Visuals", "box_2d", "2D Box", "Enable the player box overlay.");
            add("Player Visuals", "box_3d", "3D Box", "Enable three-dimensional player boxes.");
            add("Player Visuals", "glow_esp", "Glow ESP", "Highlight players with the configured player color.");
            add("Player Visuals", "nickname_esp", "Nickname ESP", "Show player names above outlined players.");
            add("Player Visuals", "health_bar", "Health Bar", "Display health beside player outlines.");
            add("Player Visuals", "health_text", "Health Text", "Display numeric health values.");
            add("Player Visuals", "distance_esp", "Distance ESP", "Display distance to other players.");
            add("Player Visuals", "armor_esp", "Armor ESP", "Display players' armor status.");
            add("Player Visuals", "held_item_esp", "Held Item ESP", "Display the held item beside player names.");
            add("Player Visuals", "friend_highlight", "Friend Highlight", "Use a distinct highlight for friends.");