Jugger Bern

Hi kannst du mir ein client für machen das so ähnlich ist wie labymod 4 nür das es FoxyMod heißt

Kodari AI
KodariNov 13 at 9:15 pm 3
FoxyModClient
FoxyModClient is a Minecraft Fabric mod client for version 1.26.2, inspired by LabyMod 4. It provides a modern, customizable HUD with modules for coordinates, FPS, CPS, and server information. Features include a sleek settings GUI, toggleable modules with keybind support, and a clean, animated overlay. The client enhances gameplay with performance optimizations, customizable colors, and a user-friendly interface designed for both casual and competitive players.
  1. Fabric-26.2-Grundgerüst für FoxyMod anlegen.

  2. Ein owo-ui-Menü mit Umschaltern und einer Taste zum Öffnen ergänzen.

  3. Einblendbares HUD mit FPS, Koordinaten und Tastenanzeige hinzufügen.

  4. Metadaten, Übersetzungen und owo-lib-Abhängigkeit einrichten.

FoxyMod ist als Fabric-26.2-Client-Mod angelegt: Rechte Umschalttaste öffnet das Menü mit Schaltern für FPS, Koordinaten und Tastenanzeige. Das HUD erscheint links oben; Menü und Mod sind auf Deutsch und Englisch verfügbar. Die Schalter gelten aktuell nur bis zum Neustart.

Das ist eine erste FoxyMod-Grundlage, kein vollständiger Funktionsumfang von LabyMod 4.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
manifest.kod
settings.gradle
Code
9 285
src/client/java/com/foxy/mod/client/FoxyModClient.java
package com.foxy.mod.client;

import com.mojang.blaze3d.platform.InputConstants;
import io.wispforest.owo.ui.component.LabelComponent;
import io.wispforest.owo.ui.component.UIComponents;
import io.wispforest.owo.ui.container.FlowLayout;
import io.wispforest.owo.ui.container.UIContainers;
import io.wispforest.owo.ui.core.Color;
import io.wispforest.owo.ui.core.Insets;
import io.wispforest.owo.ui.core.Positioning;
import io.wispforest.owo.ui.core.Sizing;
import io.wispforest.owo.ui.core.Surface;
import io.wispforest.owo.ui.core.UIComponent;
import io.wispforest.owo.ui.hud.Hud;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.fabricmc.fabric.api.client.keymapping.v1.KeyMappingHelper;
import net.minecraft.client.KeyMapping;
import net.minecraft.client.Minecraft;
import net.minecraft.client.player.LocalPlayer;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.Identifier;

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

public final class FoxyModClient implements ClientModInitializer {
	private static final Identifier HUD_ID = Identifier.fromNamespaceAndPath("foxymod", "main_hud");

	public static boolean showFps = true;
	public static boolean showCoordinates = true;
	public static boolean showKeystrokes = true;

	private static KeyMapping openMenuKey;
	private static LabelComponent fpsLabel;
	private static LabelComponent coordinatesLabel;
	private static LabelComponent keystrokesLabel;

	@Override
	public void onInitializeClient() {
		openMenuKey = KeyMappingHelper.registerKeyMapping(
				new KeyMapping("key.foxymod.open_menu", InputConstants.KEY_RSHIFT, KeyMapping.Category.MISC)
		);
		Hud.add(HUD_ID, FoxyModClient::createHud);
		ClientTickEvents.END_CLIENT_TICK.register(FoxyModClient::onClientTick);
	}

	private static UIComponent createHud() {
		FlowLayout panel = UIContainers.verticalFlow(Sizing.content(), Sizing.content());
		panel.gap(3);
		panel.padding(Insets.of(6));
		panel.surface(Surface.flat(0xC90C1420).and(Surface.outline(0xFF344257)));
		panel.positioning(Positioning.absolute(8, 8));

		LabelComponent title = UIComponents.label(Component.literal("FOXYMOD"));
		title.color(Color.ofRgb(0xFF8A65));
		title.shadow(true);
		panel.child(title);

		fpsLabel = UIComponents.label(Component.literal(""));
		coordinatesLabel = UIComponents.label(Component.literal(""));
		keystrokesLabel = UIComponents.label(Component.literal(""));
		panel.child(fpsLabel);
		panel.child(coordinatesLabel);
		panel.child(keystrokesLabel);
		return panel;
	}

	private static void onClientTick(Minecraft client) {
		if (openMenuKey.consumeClick()) {
			client.gui.setScreen(new FoxyModScreen());
		}

		setLabel(fpsLabel, showFps ? "FPS: " + client.getFps() : "");

		LocalPlayer player = client.player;
		if (player == null) {
			setLabel(coordinatesLabel, "");
			setLabel(keystrokesLabel, "");
			return;
		}

		setLabel(coordinatesLabel, showCoordinates
				? String.format(Locale.ROOT, "XYZ: %.1f / %.1f / %.1f", player.getX(), player.getY(), player.getZ())
				: "");

		if (!showKeystrokes) {
			setLabel(keystrokesLabel, "");
			return;
		}

		List<String> pressedKeys = new ArrayList<>(6);
		if (client.options.keyUp.isDown()) pressedKeys.add("W");
		if (client.options.keyLeft.isDown()) pressedKeys.add("A");
		if (client.options.keyDown.isDown()) pressedKeys.add("S");
		if (client.options.keyRight.isDown()) pressedKeys.add("D");
		if (client.options.keyJump.isDown()) pressedKeys.add("SPACE");
		if (client.options.keySprint.isDown()) pressedKeys.add("SPRINT");
		setLabel(keystrokesLabel, "Keys: " + (pressedKeys.isEmpty() ? "—" : String.join("  ", pressedKeys)));
	}

	private static void setLabel(LabelComponent label, String value) {
		if (label != null && !label.text().getString().equals(value)) {
			label.text(Component.literal(value));
		}
	}
}