mirror of
https://github.com/xiaozhou233/OrangeX-Client.git
synced 2026-12-05 13:05:52 +08:00
[Feat] NoJumpDelay
This commit is contained in:
1 parent
dfd8775658
commit
270d259294
2 files changed
+41
No files matched your search
@@ -4,6 +4,7 @@ import cn.xiaozhou233.orangex.OrangeX;
|
||||
import cn.xiaozhou233.orangex.event.impl.EventKey;
|
||||
import cn.xiaozhou233.orangex.module.impl.fun.Derp;
|
||||
import cn.xiaozhou233.orangex.module.impl.misc.Test;
|
||||
import cn.xiaozhou233.orangex.module.impl.movement.NoJumpDelay;
|
||||
import cn.xiaozhou233.orangex.module.impl.render.*;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
|
||||
@@ -31,6 +32,8 @@ public class ModuleManager {
|
||||
register(new Test());
|
||||
|
||||
register(new Derp());
|
||||
|
||||
register(new NoJumpDelay());
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package cn.xiaozhou233.orangex.module.impl.movement;
|
||||
|
||||
import cn.xiaozhou233.orangex.event.impl.EventLoop;
|
||||
import cn.xiaozhou233.orangex.module.Module;
|
||||
import cn.xiaozhou233.orangex.module.ModuleCategory;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
public class NoJumpDelay extends Module {
|
||||
private static Field jumpTicksField;
|
||||
|
||||
static {
|
||||
try {
|
||||
jumpTicksField = EntityLivingBase.class.getDeclaredField("jumpTicks");
|
||||
jumpTicksField.setAccessible(true);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public NoJumpDelay() {
|
||||
super("NoJumpDelay", ModuleCategory.MOVEMENT);
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onEventLoop(EventLoop event) {
|
||||
if (mc.thePlayer == null) return;
|
||||
|
||||
try {
|
||||
jumpTicksField.setInt(mc.thePlayer, 0);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user