Skip to content

Commit

Permalink
remove "jump" mode from criticals
Browse files Browse the repository at this point in the history
reported in #21
  • Loading branch information
DaMatrix committed Aug 5, 2021
1 parent 43ad203 commit 1a464ee
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 87 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Adapted from The MIT License (MIT)
*
* Copyright (c) 2016-2020 DaPorkchop_
* Copyright (c) 2016-2021 DaPorkchop_
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy,
Expand All @@ -23,8 +23,6 @@
import net.daporkchop.pepsimod.module.ModuleCategory;
import net.daporkchop.pepsimod.module.api.Module;
import net.daporkchop.pepsimod.module.api.ModuleOption;
import net.daporkchop.pepsimod.module.api.OptionCompletions;
import net.daporkchop.pepsimod.util.config.impl.CriticalsTranslator;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.network.NetworkManager;
Expand Down Expand Up @@ -61,14 +59,7 @@ public void init() {

@Override
public ModuleOption[] getDefaultOptions() {
return new ModuleOption[]{new ModuleOption<>(true, "packet", OptionCompletions.BOOLEAN,
(value) -> {
CriticalsTranslator.INSTANCE.packet = value;
return true;
},
() -> {
return CriticalsTranslator.INSTANCE.packet;
}, "Packet")};
return new ModuleOption[0];
}

@Override
Expand All @@ -92,34 +83,14 @@ public void doCrit() {
return;
}

if ((boolean) this.getOptionByName("packet").getValue()) {
double x = player.posX;
double y = player.posY;
double z = player.posZ;
NetworkManager manager = Minecraft.getMinecraft().getConnection().getNetworkManager();
manager.sendPacket(new CPacketPlayer.Position(x, y + 0.0625D, z, true));
manager.sendPacket(new CPacketPlayer.Position(x, y, z, false));
manager.sendPacket(new CPacketPlayer.Position(x, y + 1.1E-5D, z, false));
manager.sendPacket(new CPacketPlayer.Position(x, y, z, false));
} else {
player.motionY = 0.1F;
player.fallDistance = 0.1F;
player.onGround = false;
}
}

@Override
public boolean hasModeInName() {
return true;
}

@Override
public String getModeForName() {
if ((boolean) this.getOptionByName("packet").getValue()) {
return "Packet";
} else {
return "Jump";
}
double x = player.posX;
double y = player.posY;
double z = player.posZ;
NetworkManager manager = Minecraft.getMinecraft().getConnection().getNetworkManager();
manager.sendPacket(new CPacketPlayer.Position(x, y + 0.0625D, z, true));
manager.sendPacket(new CPacketPlayer.Position(x, y, z, false));
manager.sendPacket(new CPacketPlayer.Position(x, y + 1.1E-5D, z, false));
manager.sendPacket(new CPacketPlayer.Position(x, y, z, false));
}

public ModuleCategory getCategory() {
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/net/daporkchop/pepsimod/util/config/Config.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Adapted from The MIT License (MIT)
*
* Copyright (c) 2016-2020 DaPorkchop_
* Copyright (c) 2016-2021 DaPorkchop_
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy,
Expand Down Expand Up @@ -30,7 +30,6 @@
import net.daporkchop.pepsimod.util.config.impl.BedBomberTranslator;
import net.daporkchop.pepsimod.util.config.impl.ClickGUITranslator;
import net.daporkchop.pepsimod.util.config.impl.CpuLimitTranslator;
import net.daporkchop.pepsimod.util.config.impl.CriticalsTranslator;
import net.daporkchop.pepsimod.util.config.impl.CrystalAuraTranslator;
import net.daporkchop.pepsimod.util.config.impl.ESPTranslator;
import net.daporkchop.pepsimod.util.config.impl.ElytraFlyTranslator;
Expand Down Expand Up @@ -64,7 +63,6 @@ public class Config {
registerConfigTranslator(BedBomberTranslator.INSTANCE);
registerConfigTranslator(ClickGUITranslator.INSTANCE);
registerConfigTranslator(CpuLimitTranslator.INSTANCE);
registerConfigTranslator(CriticalsTranslator.INSTANCE);
registerConfigTranslator(CrystalAuraTranslator.INSTANCE);
registerConfigTranslator(ElytraFlyTranslator.INSTANCE);
registerConfigTranslator(EntitySpeedTranslator.INSTANCE);
Expand All @@ -89,6 +87,7 @@ public static void registerConfigTranslator(IConfigTranslator element) {
TRANSLATORS.put(element.name(), element);
}

@SuppressWarnings("deprecation")
public static void loadConfig(String configJson) {
System.out.println("Loading config!");
System.out.println(configJson);
Expand Down

This file was deleted.

0 comments on commit 1a464ee

Please sign in to comment.