Major even optimizations.
This commit is contained in:
parent
3fb16f774c
commit
d209a8cf3c
|
@ -1,13 +0,0 @@
|
|||
package dev.resent.event.impl;
|
||||
|
||||
public class EventKey extends Event{
|
||||
public int key;
|
||||
|
||||
public int getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public EventKey(int key) {
|
||||
this.key = key;
|
||||
}
|
||||
}
|
|
@ -9,9 +9,8 @@ import net.minecraft.network.play.server.S19PacketEntityStatus;
|
|||
|
||||
public class ComboCounter extends RenderModule {
|
||||
|
||||
private long lastAttack;
|
||||
public static boolean attacked = false;
|
||||
public int combo = 0;
|
||||
public static int combo = 0;
|
||||
public BooleanSetting tshadow = new BooleanSetting("Text Shadow", "", true);
|
||||
|
||||
public ComboCounter() {
|
||||
|
@ -21,7 +20,6 @@ public class ComboCounter extends RenderModule {
|
|||
Resent.INSTANCE.events().subscribe(EventAttack.class, event -> {
|
||||
if (this.isEnabled()) {
|
||||
attacked = true;
|
||||
lastAttack = System.nanoTime();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -43,10 +41,6 @@ public class ComboCounter extends RenderModule {
|
|||
|
||||
@Override
|
||||
public void draw() {
|
||||
if (mc.thePlayer.hurtTime > 3 || System.nanoTime() - lastAttack >= 3.0E9 && this.enabled) {
|
||||
combo = 0;
|
||||
}
|
||||
|
||||
mc.fontRendererObj.drawString(combo + " Combo", this.x + 2, this.y + 2, -1, tshadow.getValue());
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package dev.resent.module.impl.hud;
|
||||
|
||||
import dev.resent.Resent;
|
||||
import dev.resent.event.impl.EventKey;
|
||||
import dev.resent.module.base.Category;
|
||||
import dev.resent.module.base.Mod;
|
||||
import dev.resent.util.misc.W;
|
||||
|
|
|
@ -23,8 +23,6 @@ import org.apache.commons.lang3.Validate;
|
|||
import com.google.common.collect.Lists;
|
||||
|
||||
import dev.resent.Resent;
|
||||
import dev.resent.event.impl.EventKey;
|
||||
import dev.resent.module.base.ModManager;
|
||||
import dev.resent.ui.mods.ClickGUI;
|
||||
import dev.resent.util.misc.W;
|
||||
import net.lax1dude.eaglercraft.v1_8.Display;
|
||||
|
@ -1327,9 +1325,6 @@ public class Minecraft implements IThreadListener {
|
|||
KeyBinding.onTick(k);
|
||||
}
|
||||
|
||||
EventKey event = new EventKey(k);
|
||||
Resent.INSTANCE.events().post(event);
|
||||
|
||||
if (this.debugCrashKeyPressTime > 0L) {
|
||||
if (getSystemTime() - this.debugCrashKeyPressTime >= 6000L) {
|
||||
throw new ReportedException(new CrashReport("Manually triggered debug crash", new Throwable()));
|
||||
|
|
Loading…
Reference in New Issue
Block a user