nooo in meteor now

This commit is contained in:
Cloudburst
2021-06-01 13:52:04 +02:00
parent ffb558276e
commit 906d65bdc6
2 changed files with 0 additions and 45 deletions

View File

@@ -1,44 +0,0 @@
package cloudburst.rejects.modules;
import cloudburst.rejects.MeteorRejectsAddon;
import meteordevelopment.orbit.EventHandler;
import minegame159.meteorclient.events.world.TickEvent;
import minegame159.meteorclient.settings.BoolSetting;
import minegame159.meteorclient.settings.Setting;
import minegame159.meteorclient.settings.SettingGroup;
import minegame159.meteorclient.systems.modules.Module;
import net.minecraft.network.packet.c2s.play.ClientCommandC2SPacket;
public class Sneak extends Module {
private final SettingGroup sgGeneral = settings.getDefaultGroup();
private final Setting<Boolean> packet = sgGeneral.add(new BoolSetting.Builder()
.name("packet")
.description("Sneaks using packets")
.defaultValue(false)
.build()
);
public Sneak() {
super (MeteorRejectsAddon.CATEGORY, "sneak", "Sneaks for you");
}
@Override
public void onDeactivate() {
mc.getNetworkHandler().sendPacket(new ClientCommandC2SPacket(mc.player, ClientCommandC2SPacket.Mode.RELEASE_SHIFT_KEY));
mc.options.keySneak.setPressed(false);
mc.player.setSneaking(false);
}
@EventHandler
private void onTick(TickEvent.Post event) {
if (packet.get()) {
if (mc.options.keySneak.isPressed()) mc.options.keySneak.setPressed(false);
mc.getNetworkHandler().sendPacket(new ClientCommandC2SPacket(mc.player, ClientCommandC2SPacket.Mode.PRESS_SHIFT_KEY));
} else {
mc.options.keySneak.setPressed(true);
}
}
}