Add glide module
This commit is contained in:
committed by
Cloudburst
parent
5157a76442
commit
7360b44502
@@ -51,6 +51,7 @@
|
|||||||
- Coord Logger (World events from [JexClient](https://github.com/DustinRepo/JexClient-main/blob/main/src/main/java/me/dustin/jex/feature/mod/impl/misc/CoordFinder.java))
|
- Coord Logger (World events from [JexClient](https://github.com/DustinRepo/JexClient-main/blob/main/src/main/java/me/dustin/jex/feature/mod/impl/misc/CoordFinder.java))
|
||||||
- Custom Packets
|
- Custom Packets
|
||||||
- Ghost Mode (Taken from an [unmerged PR](https://github.com/MeteorDevelopment/meteor-client/pull/1932))
|
- Ghost Mode (Taken from an [unmerged PR](https://github.com/MeteorDevelopment/meteor-client/pull/1932))
|
||||||
|
- Glide (Ported from [Wurst](https://github.com/Wurst-Imperium/Wurst7/tree))
|
||||||
- InteractionMenu (Ported from [BleachHack](https://github.com/BleachDrinker420/BleachHack/pull/211))
|
- InteractionMenu (Ported from [BleachHack](https://github.com/BleachDrinker420/BleachHack/pull/211))
|
||||||
- Lavacast
|
- Lavacast
|
||||||
- NewChunks (Ported from [BleackHack](https://github.com/BleachDrinker420/BleachHack/blob/master/BleachHack-Fabric-1.17/src/main/java/bleach/hack/module/mods/NewChunks.java))
|
- NewChunks (Ported from [BleackHack](https://github.com/BleachDrinker420/BleachHack/blob/master/BleachHack-Fabric-1.17/src/main/java/bleach/hack/module/mods/NewChunks.java))
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ public class MeteorRejectsAddon extends MeteorAddon {
|
|||||||
modules.add(new CoordLogger());
|
modules.add(new CoordLogger());
|
||||||
modules.add(new CustomPackets());
|
modules.add(new CustomPackets());
|
||||||
modules.add(new GhostMode());
|
modules.add(new GhostMode());
|
||||||
|
modules.add(new Glide());
|
||||||
modules.add(new InteractionMenu());
|
modules.add(new InteractionMenu());
|
||||||
modules.add(new Lavacast());
|
modules.add(new Lavacast());
|
||||||
modules.add(new NewChunks());
|
modules.add(new NewChunks());
|
||||||
|
|||||||
64
src/main/java/anticope/rejects/modules/Glide.java
Normal file
64
src/main/java/anticope/rejects/modules/Glide.java
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
package anticope.rejects.modules;
|
||||||
|
|
||||||
|
import anticope.rejects.MeteorRejectsAddon;
|
||||||
|
import meteordevelopment.meteorclient.events.world.TickEvent;
|
||||||
|
import meteordevelopment.meteorclient.settings.*;
|
||||||
|
import meteordevelopment.meteorclient.systems.modules.Module;
|
||||||
|
import meteordevelopment.orbit.EventHandler;
|
||||||
|
import net.minecraft.client.network.ClientPlayerEntity;
|
||||||
|
import net.minecraft.util.math.Box;
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
|
||||||
|
|
||||||
|
public class Glide extends Module {
|
||||||
|
private final SettingGroup sgGeneral = settings.getDefaultGroup();
|
||||||
|
|
||||||
|
public final Setting<Double> fallSpeed = sgGeneral.add(new DoubleSetting.Builder()
|
||||||
|
.name("fall-speed")
|
||||||
|
.description("Fall speed.")
|
||||||
|
.defaultValue(0.125)
|
||||||
|
.min(0.005)
|
||||||
|
.sliderRange(0.005, 0.25)
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
|
||||||
|
public final Setting<Double> moveSpeed = sgGeneral.add(new DoubleSetting.Builder()
|
||||||
|
.name("move-speed")
|
||||||
|
.description("Horizontal movement factor.")
|
||||||
|
.defaultValue(1.2)
|
||||||
|
.min(1)
|
||||||
|
.sliderRange(1, 5)
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
|
||||||
|
public final Setting<Double> minHeight = sgGeneral.add(new DoubleSetting.Builder()
|
||||||
|
.name("min-height")
|
||||||
|
.description("Won't glide when you are too close to the ground.")
|
||||||
|
.defaultValue(0)
|
||||||
|
.min(0)
|
||||||
|
.sliderRange(0, 2)
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
|
||||||
|
public Glide() {
|
||||||
|
super(MeteorRejectsAddon.CATEGORY, "glide", "Yeehaw!");
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
private void onTick(TickEvent.Post event) {
|
||||||
|
ClientPlayerEntity player = mc.player;
|
||||||
|
Vec3d v = player.getVelocity();
|
||||||
|
|
||||||
|
if(player.isOnGround() || player.isTouchingWater() || player.isInLava() || player.isClimbing() || v.y >= 0) return;
|
||||||
|
|
||||||
|
if(minHeight.get() > 0)
|
||||||
|
{
|
||||||
|
Box box = player.getBoundingBox();
|
||||||
|
box = box.union(box.offset(0, -minHeight.get(), 0));
|
||||||
|
if(!mc.world.isSpaceEmpty(box)) return;
|
||||||
|
}
|
||||||
|
|
||||||
|
player.setVelocity(v.x, Math.max(v.y, -fallSpeed.get()), v.z);
|
||||||
|
player.airStrafingSpeed *= moveSpeed.get();
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user