* Update to 1.21.3 part 1 Don't expect it to work anytime soon. * Update to 1.21.3 part 2 * Gradle 8.8 -> 8.12 * Working Build 1.21.3 Had to revert gradle to 8.10 due to unforseen issues. * Removed Unused Imports * Small rendering fixes (hopefully) * 1.21.4 port * Use Utils.canUpdate in AutoCraft * Intellij code fixes --------- Co-authored-by: crazymoose77756 <ryanrogo064@gmail.com> Co-authored-by: SByte <stormybytes@gmail.com>
42 lines
1.4 KiB
Java
42 lines
1.4 KiB
Java
package anticope.rejects.modules;
|
|
|
|
import anticope.rejects.MeteorRejectsAddon;
|
|
import anticope.rejects.events.OffGroundSpeedEvent;
|
|
import meteordevelopment.meteorclient.events.world.TickEvent;
|
|
import meteordevelopment.meteorclient.mixininterface.IVec3d;
|
|
import meteordevelopment.meteorclient.settings.DoubleSetting;
|
|
import meteordevelopment.meteorclient.settings.Setting;
|
|
import meteordevelopment.meteorclient.settings.SettingGroup;
|
|
import meteordevelopment.meteorclient.systems.modules.Module;
|
|
import meteordevelopment.orbit.EventHandler;
|
|
|
|
public class Jetpack extends Module {
|
|
private final SettingGroup sgGeneral = settings.getDefaultGroup();
|
|
|
|
private final Setting<Double> jetpackSpeed = sgGeneral.add(new DoubleSetting.Builder()
|
|
.name("jetpack-speed")
|
|
.description("How fast while ascending.")
|
|
.defaultValue(0.42)
|
|
.min(0)
|
|
.sliderMax(1)
|
|
.build()
|
|
);
|
|
|
|
public Jetpack() {
|
|
super(MeteorRejectsAddon.CATEGORY, "jetpack", "Flies as if using a jetpack.");
|
|
}
|
|
|
|
@EventHandler
|
|
private void onTick(TickEvent.Pre event) {
|
|
if (mc.options.jumpKey.isPressed()) {
|
|
((IVec3d) mc.player.getVelocity()).meteor$setY(jetpackSpeed.get());
|
|
}
|
|
}
|
|
|
|
@EventHandler
|
|
private void onOffGroundSpeed(OffGroundSpeedEvent event) {
|
|
event.speed = mc.player.getMovementSpeed() * jetpackSpeed.get().floatValue();
|
|
}
|
|
}
|
|
|