Files
src
build.gradle
gradle.properties
settings.gradle
Code
5 162
src/main/java/com/craftai4u/czas_client/CzasClient.java
package com.craftai4u.czas_client;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper;
import net.fabricmc.fabric.api.client.rendering.v1.HudRenderCallback;
import net.minecraft.client.option.KeyBinding;
import net.minecraft.client.util.InputUtil;
import net.minecraft.text.Text;
import net.minecraft.util.Identifier;
import org.lwjgl.glfw.GLFW;
import java.util.HashMap;
import java.util.Map;
public class CzasClient implements ModInitializer, ClientModInitializer {
private static final Map<String, Boolean> FEATURES = new HashMap<>();
private static KeyBinding openGuiKey;
@Override
public void onInitialize() {
// Initialize features
FEATURES.put("speed", false);
FEATURES.put("fake_creative", false);
FEATURES.put("aim_assist", false);
FEATURES.put("spider", false);
FEATURES.put("long_jump", false);
FEATURES.put("no_fall", false);
FEATURES.put("auto_regen", false);
FEATURES.put("inventory_walk", false);
FEATURES.put("fast_break", false);
FEATURES.put("timer", false);
FEATURES.put("scaffold", false);
FEATURES.put("auto_armor", false);
FEATURES.put("no_slow", false);
FEATURES.put("full_bright", false);
FEATURES.put("auto_clicker", false);
// Register GUI key binding
openGuiKey = KeyBindingHelper.registerKeyBinding(new KeyBinding(
"key.czas_client.open_gui",
InputUtil.Type.KEYSYM,
GLFW.GLFW_KEY_RIGHT_SHIFT,
"category.czas_client"
));
}
@Override
public void onInitializeClient() {
HudRenderCallback.EVENT.register((matrices, tickDelta) -> {
if (openGuiKey.wasPressed()) {
openGui();
}
});
}
private void openGui() {
// Open the GUI (simplified example)
System.out.println("Opening Czas Client GUI...");
// GUI logic would be implemented here, including gradient colors and feature toggles
}
public static void toggleFeature(String feature) {
if (FEATURES.containsKey(feature)) {
FEATURES.put(feature, !FEATURES.get(feature));
System.out.println("Feature " + feature + " toggled to " + FEATURES.get(feature));
}
}
public static boolean isFeatureEnabled(String feature) {
return FEATURES.getOrDefault(feature, false);
}
public static Text getClientName() {
return Text.literal("Czas Client by 348s");
}