Skip to content
Merged

Dev #27

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/client/java/dev/thoq/RyeClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,43 +18,39 @@

import dev.thoq.command.CommandBuilder;
import dev.thoq.command.CommandRepository;
import dev.thoq.command.impl.BindCommand;
import dev.thoq.command.impl.ConfigCommand;
import dev.thoq.command.impl.SettingsCommand;
import dev.thoq.command.impl.ToggleCommand;
import dev.thoq.command.impl.*;
import dev.thoq.config.KeybindManager;
import dev.thoq.event.EventBus;
import dev.thoq.module.ModuleBuilder;
import dev.thoq.module.ModuleRepository;
import dev.thoq.module.impl.combat.AttackDelayModule;
import dev.thoq.module.impl.combat.killaura.KillauraModule;
import dev.thoq.module.impl.movement.StrafeModule;
import dev.thoq.module.impl.movement.HighJumpModule;
import dev.thoq.module.impl.movement.*;
import dev.thoq.module.impl.utility.antivoid.AntiVoidModule;
import dev.thoq.module.impl.utility.disabler.DisablerModule;
import dev.thoq.module.impl.world.TickBaseModule;
import dev.thoq.module.impl.movement.flight.FlightModule;
import dev.thoq.module.impl.combat.VelocityModule;
import dev.thoq.module.impl.movement.longjump.LongJumpModule;
import dev.thoq.module.impl.movement.ScaffoldModule;
import dev.thoq.module.impl.movement.speed.SpeedModule;
import dev.thoq.module.impl.world.NukerModule;
import dev.thoq.module.impl.combat.ReachModule;
import dev.thoq.module.impl.utility.fastplace.FastPlaceModule;
import dev.thoq.module.impl.utility.nofall.NoFallModule;
import dev.thoq.module.impl.movement.JumpCooldownModule;
import dev.thoq.module.impl.movement.SprintModule;
import dev.thoq.module.impl.visual.*;
import dev.thoq.module.impl.world.TimerModule;
import dev.thoq.module.impl.visual.clickgui.ClickGUIModule;
import dev.thoq.module.impl.visual.esp.ESPModule;
import dev.thoq.utilities.misc.IconLoader;
import dev.thoq.utilities.misc.RyeConstants;
import dev.thoq.utilities.render.Theme;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.util.InputUtil;
import net.minecraft.util.TimeHelper;
import net.minecraft.util.math.Vec3d;
import org.apache.logging.log4j.Logger;
import org.lwjgl.glfw.GLFW;
Expand Down Expand Up @@ -152,7 +148,10 @@ private static void initializeModules() {
new AmbienceModule(),
new DiscordRPCModule(),
new DisablerModule(),
new CapeModule()
new CapeModule(),
new AntiGravityModule(),
new AntiVoidModule(),
new TargetStrafeModule()
);
}

Expand All @@ -162,7 +161,8 @@ private static void initializeCommands() {
new ToggleCommand(),
new ConfigCommand(),
new BindCommand(),
new SettingsCommand()
new SettingsCommand(),
new VClipCommand()
);
}

Expand Down
66 changes: 66 additions & 0 deletions src/client/java/dev/thoq/command/impl/VClipCommand.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/*
* Copyright (c) Rye Client 2024-2025.
*
* This file belongs to Rye Client,
* an open-source Fabric injection client.
* Rye GitHub: https://github.com/RyeClient/rye-v1.git
*
* THIS PROJECT DOES NOT HAVE A WARRANTY.
*
* Rye (and subsequently, its files) are all licensed under the MIT License.
* Rye should have come with a copy of the MIT License.
* If it did not, you may obtain a copy here:
* MIT License: https://opensource.org/license/mit
*
*/

package dev.thoq.command.impl;

import com.mojang.brigadier.arguments.StringArgumentType;
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import com.mojang.brigadier.context.CommandContext;
import dev.thoq.command.AbstractCommand;
import dev.thoq.utilities.misc.ChatUtility;
import net.minecraft.client.MinecraftClient;
import net.minecraft.server.command.CommandManager;
import net.minecraft.server.command.ServerCommandSource;

public class VClipCommand extends AbstractCommand {
public VClipCommand() {
super("vclip");
}

@Override
protected void build(LiteralArgumentBuilder<ServerCommandSource> builder) {
builder
.then(CommandManager.argument("distance", StringArgumentType.word())
.executes(context -> {
String distanceStr = StringArgumentType.getString(context, "distance");
try {
int distance = Integer.parseInt(distanceStr);
teleport(distance);
return 1;
} catch(NumberFormatException e) {
return 0;
}
}))
.executes(this::usage);
}

private int usage(CommandContext<ServerCommandSource> serverCommandSourceCommandContext) {
ChatUtility.sendInfo("Usage: .vclip <distance>");
return 1;
}

private static void teleport(int distance) {
MinecraftClient mc = MinecraftClient.getInstance();

if(mc.player == null) return;

double x = mc.player.getPos().x;
double y = mc.player.getPos().y + distance;
double z = mc.player.getPos().z;

mc.player.setPosition(x, y, z);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package dev.thoq.mixin.client.ui;

import dev.thoq.RyeClient;
import dev.thoq.utilities.misc.RyeConstants;
import dev.thoq.utilities.render.ColorUtility;
import dev.thoq.utilities.render.TextRendererUtility;
import net.minecraft.client.gui.*;
Expand All @@ -42,18 +43,30 @@ public void onHudRender(DrawContext context, int mouseX, int mouseY, float delta

@Redirect(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/LogoDrawer;draw(Lnet/minecraft/client/gui/DrawContext;IF)V"))
private void renderRyeLogo(LogoDrawer logoDrawer, DrawContext context, int width, float alpha) {
// don't draw the minecraft logo

String text = "Rye";
int x = context.getScaledWindowWidth() / 2 - TextRendererUtility.getXlTextWidth(text) / 2;
int y = Math.round(context.getScaledWindowHeight() / 4.5f);
String versionText = RyeConstants.VERSION;

int tX = context.getScaledWindowWidth() / 2 - TextRendererUtility.getXlTextWidth(text) / 2;
int tY = Math.round(context.getScaledWindowHeight() / 4.5f);

int vX = tX + TextRendererUtility.getXlTextWidth(text);
int vY = tY - TextRendererUtility.getXlTextHeight() * 3;

TextRendererUtility.renderXlText(
context,
text,
ColorUtility.Colors.WHITE,
x,
y,
tX,
tY,
false
);

TextRendererUtility.renderText(
context,
versionText,
ColorUtility.Colors.WHITE,
vX,
vY,
false
);
}
Expand All @@ -64,8 +77,7 @@ private void replaceVersionText(DrawContext context, net.minecraft.client.font.T

// we ignore demo and modded

// I think I want to stop this
// its cleaner
// I think I want to stop this-its cleaner
// context.drawTextWithShadow(textRenderer, ryeVersion, x, y, color);
}

Expand Down
19 changes: 19 additions & 0 deletions src/client/java/dev/thoq/module/SubModule.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright (c) Rye Client 2024-2025.
*
* This file belongs to Rye Client,
* an open-source Fabric injection client.
* Rye GitHub: https://github.com/RyeClient/rye-v1.git
*
* THIS PROJECT DOES NOT HAVE A WARRANTY.
*
* Rye (and subsequently, its files) are all licensed under the MIT License.
* Rye should have come with a copy of the MIT License.
* If it did not, you may obtain a copy here:
* MIT License: https://opensource.org/license/mit
*
*/

package dev.thoq.module;

import dev.thoq.RyeClient;
Expand Down Expand Up @@ -26,6 +42,7 @@ public void onEnable() {
}

public void onDisable() {
reset();
RyeClient.getEventBus().unsubscribe(this);
}

Expand All @@ -36,4 +53,6 @@ public void addSettings(final Setting<?>... settings) {
}
}

public void reset() {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ public class KillauraModule extends Module {

private final ModeSetting attackMode = new ModeSetting("AttackMode", "Attack mode", "Single", "Single", "Switch", "Multi");
private final ModeSetting targetMode = new ModeSetting("Target", "Target types", "Players", "Players", "Passive", "Hostile", "All");
private final NumberSetting<Double> swingDistance = new NumberSetting<>("SwingDistance", "Distance to start swinging", 4.5, 3.0, 1000.0);
private final NumberSetting<Double> reach = new NumberSetting<>("Reach", "Distance to actually attack from", 4.0, 3.0, 1000.0);
private final NumberSetting<Double> swingDistance = new NumberSetting<>("SwingDistance", "Distance to start swinging", 4.5, 3.0, 6.0);
private final NumberSetting<Double> reach = new NumberSetting<>("Reach", "Distance to actually attack from", 3.0, 3.0, 6.0);
private final NumberSetting<Integer> cps = new NumberSetting<>("CPS", "Attacks per second", 12, 1, 20);
private final BooleanSetting noHitDelay = new BooleanSetting("NoHitDelay", "Remove attack delay", false);
private final BooleanSetting raycast = new BooleanSetting("Raycast", "Check line of sight to target", true);
Expand Down Expand Up @@ -511,6 +511,30 @@ private void stopBlocking() {
isBlocking = false;
}

/**
* Get the current attack mode for Target Strafe integration
* @return Current attack mode
*/
public String getAttackMode() {
return attackMode.getValue();
}

/**
* Get the current target for Target Strafe integration
* @return Current target entity
*/
public Entity getCurrentTarget() {
return currentTarget;
}

/**
* Check if the module has valid targets
* @return true if there are valid targets
*/
public boolean hasTargets() {
return !targets.isEmpty();
}

@Override
protected void onEnable() {
if(mc.player != null) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* Copyright (c) Rye Client 2024-2025.
*
* This file belongs to Rye Client,
* an open-source Fabric injection client.
* Rye GitHub: https://github.com/RyeClient/rye-v1.git
*
* THIS PROJECT DOES NOT HAVE A WARRANTY.
*
* Rye (and subsequently, its files) are all licensed under the MIT License.
* Rye should have come with a copy of the MIT License.
* If it did not, you may obtain a copy here:
* MIT License: https://opensource.org/license/mit
*
*/

package dev.thoq.module.impl.movement;

import dev.thoq.event.IEventListener;
import dev.thoq.event.impl.MotionEvent;
import dev.thoq.module.Module;
import dev.thoq.module.ModuleCategory;
import dev.thoq.utilities.player.TimerUtility;

public class AntiGravityModule extends Module {
public AntiGravityModule() {
super("AntiGravity", "Anti-Gravity", "Makes you feel like you're on the moon", ModuleCategory.MOVEMENT);
}

@SuppressWarnings("unused")
private final IEventListener<MotionEvent> motionEvent = event -> {
if(mc.player == null) return;

if(event.isPre()) {
if(mc.player.isOnGround())
TimerUtility.setTimerSpeed(0.97);
else
TimerUtility.setTimerSpeed(0.87658);
}
};

@Override
public void onDisable() {
if(mc.player == null) return;

TimerUtility.resetTimer();
}
}
Loading