Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Release 2.11 (#842)
Browse files Browse the repository at this point in the history
Co-authored-by: Marcos Rafael <[email protected]>
Co-authored-by: Léo <[email protected]>
  • Loading branch information
3 people authored Nov 8, 2024
1 parent dcf380c commit 5272ca3
Show file tree
Hide file tree
Showing 20 changed files with 196 additions and 155 deletions.
19 changes: 15 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ dependencies {
exclude module: 'asm-commons'
exclude module: 'slf4j-api'
}
implementation 'org.projectlombok:lombok:1.18.22'
implementation 'org.projectlombok:lombok:1.18.34'
implementation 'org.jetbrains:annotations:24.1.0'
implementation files('libraries/fastutil-core-8.5.14-javadoc.jar')
implementation files('libraries/fastutil-core-8.5.14.jar')
implementation files('libraries/json-20220924.jar')
implementation files('libraries/discord-rpc.jar')

embed files('libraries/fastutil-core-8.5.14.jar')
embed files('libraries/discord-rpc.jar')
embed files('libraries/json-20220924.jar')
embed files('libraries/discord-rpc.jar')
}

processResources {
Expand All @@ -105,9 +105,14 @@ jar {
}) {
exclude 'dummyThing',
'LICENSE.txt',
'LICENSE',
'AUTHORS',
'README.md',
'META-INF/MUMFREY.RSA',
'META-INF/maven/**',
'org/**/*.html'
'org/**/*.html',
'release-timestamp.txt',
'changelog.txt'
}
manifest {
attributes(
Expand All @@ -122,6 +127,12 @@ jar {
}
}

task copyDep(type: Copy){
from configurations.runtimeClasspath
into 'dependencies'
}


reobf {
jar {
mappingType = "SEARGE"
Expand Down
Binary file removed libraries/fastutil-core-8.5.14-javadoc.jar
Binary file not shown.
19 changes: 7 additions & 12 deletions src/main/java/keystrokesmod/mixins/impl/client/MixinMinecraft.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
import keystrokesmod.module.impl.render.Animations;
import keystrokesmod.module.impl.render.FreeLook;
import keystrokesmod.module.impl.render.Watermark;
import keystrokesmod.utility.Reflection;
import keystrokesmod.utility.Utils;
import keystrokesmod.utility.render.BackgroundUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.main.GameConfiguration;
import net.minecraft.client.multiplayer.WorldClient;
import net.minecraft.client.resources.DefaultResourcePack;
import net.minecraft.crash.CrashReport;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.MinecraftForge;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
Expand All @@ -28,14 +28,10 @@
import org.spongepowered.asm.mixin.injection.*;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

import java.io.IOException;
import java.io.InputStream;

import static keystrokesmod.Raven.mc;

@Mixin(value = Minecraft.class, priority = 1001)
public abstract class MixinMinecraft {

@Unique private @Nullable WorldClient raven_XD$lastWorld = null;

@Inject(method = "runTick", at = @At("HEAD"))
Expand Down Expand Up @@ -105,13 +101,12 @@ private void onCrashed(CrashReport crashReport, CallbackInfo ci) {

@Inject(method = "createDisplay", at = @At(value = "RETURN"))
private void onSetTitle(@NotNull CallbackInfo ci) {
Display.setTitle("Raven XD " + Watermark.VERSION);
Display.setTitle("Opai " + Watermark.VERSION);
}



@Redirect(method = "drawSplashScreen", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/resources/DefaultResourcePack;getInputStream(Lnet/minecraft/util/ResourceLocation;)Ljava/io/InputStream;"))
private InputStream modifyConstant(@NotNull DefaultResourcePack instance, ResourceLocation location) throws IOException {
return instance.getInputStream(BackgroundUtils.getLogoPng());
@Inject(method = "<init>", at = @At("RETURN"))
private void onInit(GameConfiguration p_i45547_1_, CallbackInfo ci) {
Reflection.set(Minecraft.class, "field_110444_H", BackgroundUtils.getLogoPng());
Reflection.set(this, "field_152354_ay", BackgroundUtils.getLogoPng());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public void moveFlying(float p_moveFlying_1_, float p_moveFlying_2_, float p_mov
PrePlayerInputEvent prePlayerInput = new PrePlayerInputEvent(p_moveFlying_1_, p_moveFlying_2_, p_moveFlying_3_, RotationHandler.getMovementYaw((Entity) (Object) this));
net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(prePlayerInput);
if (prePlayerInput.isCanceled()) {
ci.cancel();
return;
}
p_moveFlying_1_ = prePlayerInput.getStrafe();
Expand Down
16 changes: 0 additions & 16 deletions src/main/java/keystrokesmod/module/Module.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,6 @@ public Module(String moduleName, Module.category moduleCategory, int keycode, @N
Raven.moduleCounter++;
}

public static @Nullable Module getModule(Class<? extends Module> a) {
Iterator<Module> var1 = ModuleManager.modules.iterator();

Module module;
do {
if (!var1.hasNext()) {
return null;
}

module = var1.next();
} while (module.getClass() != a);

return module;
}

public Module(String name, Module.category moduleCategory) {
this(name, moduleCategory, null);
}
Expand Down Expand Up @@ -275,7 +260,6 @@ public void setBind(int keybind) {
this.keycode = keybind;
}


public enum category {
combat,
movement,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package keystrokesmod.module.impl.exploit.disabler;

import keystrokesmod.event.*;
import keystrokesmod.mixins.impl.network.C0FPacketConfirmTransactionAccessor;
import keystrokesmod.module.impl.exploit.Disabler;
import keystrokesmod.module.impl.exploit.disabler.hypixel.HypixelMotionDisabler;
import keystrokesmod.module.setting.impl.ButtonSetting;
Expand All @@ -20,7 +19,6 @@
public class HypixelDisabler extends SubMode<Disabler> {
public final ModeValue motion;
private final ButtonSetting cancelSprint;
private final ButtonSetting c0f;

public HypixelDisabler(String name, @NotNull Disabler parent) {
super(name, parent);
Expand All @@ -29,7 +27,6 @@ public HypixelDisabler(String name, @NotNull Disabler parent) {
.add(new HypixelMotionDisabler("Enabled", this))
);
this.registerSetting(cancelSprint = new ButtonSetting("Cancel sprint", false));
this.registerSetting(c0f = new ButtonSetting("C0F", false));
}

@Override
Expand Down Expand Up @@ -60,12 +57,4 @@ public void onReceivePacket(@NotNull ReceivePacketEvent event) {
}
}
}

@SubscribeEvent(priority = EventPriority.LOWEST)
public void onSendPacket(@NotNull SendPacketEvent event) {
if (event.getPacket() instanceof C0FPacketConfirmTransaction && c0f.isToggled()) {
final C0FPacketConfirmTransaction packet = (C0FPacketConfirmTransaction) event.getPacket();
((C0FPacketConfirmTransactionAccessor) event.getPacket()).setUid((short) -packet.getUid());
}
}
}
27 changes: 18 additions & 9 deletions src/main/java/keystrokesmod/module/impl/movement/InvMove.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
import static keystrokesmod.module.ModuleManager.*;

public class InvMove extends Module {
public static final String[] MODES = {"Normal", "Blink", "LegitInv", "Hypixel", "None"};
public static final String[] MODES = {"Normal", "Blink", "LegitInv", "Hypixel"};
private final ModeSetting mode;
private final ButtonSetting container;
private final ButtonSetting inventory;
private final ButtonSetting noOpenPacket;
private final ButtonSetting allowSprint;
private final ButtonSetting allowSneak;
Expand All @@ -40,12 +42,15 @@ public InvMove() {
super("InvMove", category.movement);
this.registerSetting(new DescriptionSetting("Allow you move in inventory."));
this.registerSetting(mode = new ModeSetting("Mode", MODES, 0));
this.registerSetting(container = new ButtonSetting("Container", true));
this.registerSetting(inventory = new ButtonSetting("Inventory", true));
this.registerSetting(clickGui = new ButtonSetting("Click gui", true));
this.registerSetting(new DescriptionSetting("Advanced"));
this.registerSetting(noOpenPacket = new ButtonSetting("No open packet", false));
this.registerSetting(allowSprint = new ButtonSetting("Allow sprint", false));
this.registerSetting(allowSprint = new ButtonSetting("Allow sprint", true));
this.registerSetting(allowSneak = new ButtonSetting("Allow sneak", false));
this.registerSetting(chestNameCheck = new ButtonSetting("Chest name check", true));
this.registerSetting(targetNearbyCheck = new ButtonSetting("Target nearby check", true));
this.registerSetting(clickGui = new ButtonSetting("Click gui", true));
}

@SubscribeEvent
Expand Down Expand Up @@ -77,11 +82,8 @@ public void onPreUpdate(PreUpdateEvent event) {
case 3:
MoveUtil.stop();
break;
case 4:
return;
}


doInvMove();
} else {
switch ((int) mode.getInput()) {
Expand All @@ -101,8 +103,15 @@ public void onPreUpdate(PreUpdateEvent event) {
}

private boolean canInvMove() {
return (mc.currentScreen instanceof GuiContainer || (clickGui.isToggled() && mc.currentScreen instanceof ClickGui))
&& nameCheck() && targetNearbyCheck() && !scaffold.isEnabled();
if (!nameCheck() || !targetNearbyCheck() || scaffold.isEnabled())
return false;
if (clickGui.isToggled() && mc.currentScreen instanceof ClickGui)
return true;
if (inventory.isToggled() && mc.currentScreen instanceof GuiInventory)
return true;
if (container.isToggled() && mc.currentScreen instanceof GuiContainer)
return true;
return false;
}

@SubscribeEvent
Expand Down Expand Up @@ -146,7 +155,7 @@ private void doInvMove() {
KeyBinding.setKeyBindState(mc.gameSettings.keyBindBack.getKeyCode(), Keyboard.isKeyDown(mc.gameSettings.keyBindBack.getKeyCode()));
KeyBinding.setKeyBindState(mc.gameSettings.keyBindRight.getKeyCode(), Keyboard.isKeyDown(mc.gameSettings.keyBindRight.getKeyCode()));
KeyBinding.setKeyBindState(mc.gameSettings.keyBindLeft.getKeyCode(), Keyboard.isKeyDown(mc.gameSettings.keyBindLeft.getKeyCode()));
KeyBinding.setKeyBindState(mc.gameSettings.keyBindJump.getKeyCode(), Utils.jumpDown());
KeyBinding.setKeyBindState(mc.gameSettings.keyBindJump.getKeyCode(), Keyboard.isKeyDown(mc.gameSettings.keyBindJump.getKeyCode()));
}

private void noInvMove() {
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/keystrokesmod/module/impl/movement/Speed.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ public boolean noAction() {
return !Utils.nullCheck()
|| ((mc.thePlayer.isInWater() || mc.thePlayer.isInLava())
&& liquidDisable.isToggled())
|| (mc.thePlayer.isSneaking() && sneakDisable.isToggled())
|| scaffold.isEnabled();
|| (mc.thePlayer.isSneaking() && sneakDisable.isToggled());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public AutoHeal() {
this.registerSetting(soup = new ButtonSetting("Soup", false));
this.registerSetting(autoDrop = new ButtonSetting("Auto drop", false, soup::isToggled));
this.registerSetting(minHealth = new SliderSetting("Min health", 10, 0, 20, 1));
this.registerSetting(healDelay = new SliderSetting("Heal delay", 500, 0, 1500, 1));
this.registerSetting(healDelay = new SliderSetting("Heal delay", 500, 0, 8500, 1));
this.registerSetting(startDelay = new SliderSetting("Start delay", 0, 0, 300, 1));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void guiUpdate() {

@SubscribeEvent
public void onRenderContainer(RenderContainerEvent event) {
if (silent.isToggled())
if (silent.isToggled() && ContainerUtils.isChest(customChest.isToggled()))
event.setCanceled(true);
}

Expand Down
Loading

0 comments on commit 5272ca3

Please sign in to comment.