Bps mod
This commit is contained in:
parent
06b76c070d
commit
837c29de11
58348
javascript/classes.js
58348
javascript/classes.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -5,8 +5,37 @@ import java.util.List;
|
|||
import java.util.stream.Collectors;
|
||||
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.impl.hud.*;
|
||||
import dev.resent.module.impl.misc.*;
|
||||
import dev.resent.module.impl.hud.ArmorHud;
|
||||
import dev.resent.module.impl.hud.BPS;
|
||||
import dev.resent.module.impl.hud.CPS;
|
||||
import dev.resent.module.impl.hud.ComboCounter;
|
||||
import dev.resent.module.impl.hud.FPS;
|
||||
import dev.resent.module.impl.hud.Freelook;
|
||||
import dev.resent.module.impl.hud.Hitboxes;
|
||||
import dev.resent.module.impl.hud.Info;
|
||||
import dev.resent.module.impl.hud.KeyStrokes;
|
||||
import dev.resent.module.impl.hud.PotCounter;
|
||||
import dev.resent.module.impl.hud.PotionHUD;
|
||||
import dev.resent.module.impl.hud.ReachDisplay;
|
||||
import dev.resent.module.impl.misc.Animations;
|
||||
import dev.resent.module.impl.misc.AutoGG;
|
||||
import dev.resent.module.impl.misc.AutoRespawn;
|
||||
import dev.resent.module.impl.misc.Cape;
|
||||
import dev.resent.module.impl.misc.ClearChat;
|
||||
import dev.resent.module.impl.misc.Cosmetics;
|
||||
import dev.resent.module.impl.misc.CrystalOptimizer;
|
||||
import dev.resent.module.impl.misc.DynamicFOV;
|
||||
import dev.resent.module.impl.misc.FPSB;
|
||||
import dev.resent.module.impl.misc.Fullbright;
|
||||
import dev.resent.module.impl.misc.HUD;
|
||||
import dev.resent.module.impl.misc.MinimalViewBobbing;
|
||||
import dev.resent.module.impl.misc.NoParticles;
|
||||
import dev.resent.module.impl.misc.NoRain;
|
||||
import dev.resent.module.impl.misc.NoSwingDelay;
|
||||
import dev.resent.module.impl.misc.Scoreboard;
|
||||
import dev.resent.module.impl.misc.SelfNametag;
|
||||
import dev.resent.module.impl.misc.Sprint;
|
||||
import dev.resent.module.impl.misc.TabGui;
|
||||
|
||||
public class ModManager {
|
||||
|
||||
|
@ -42,9 +71,11 @@ public class ModManager {
|
|||
public static TabGui tabGui = new TabGui();
|
||||
public static SelfNametag selfNametag = new SelfNametag();
|
||||
public static Cape cape = new Cape();
|
||||
public static BPS bps = new BPS();
|
||||
|
||||
public ModManager() {
|
||||
//Hud
|
||||
register(bps);
|
||||
register(cape);
|
||||
register(selfNametag);
|
||||
register(cosmetics);
|
||||
|
|
28
src/main/java/dev/resent/module/impl/hud/BPS.java
Normal file
28
src/main/java/dev/resent/module/impl/hud/BPS.java
Normal file
|
@ -0,0 +1,28 @@
|
|||
package dev.resent.module.impl.hud;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
|
||||
import dev.resent.annotation.RenderModule;
|
||||
import dev.resent.module.base.Mod.Category;
|
||||
import dev.resent.module.base.RenderMod;
|
||||
import dev.resent.ui.Theme;
|
||||
|
||||
@RenderModule(name = "BPS", category = Category.HUD, x = 4, y = 16)
|
||||
public class BPS extends RenderMod{
|
||||
|
||||
public int getWidth() { return mc.fontRendererObj.getStringWidth(getText()) + 4;}
|
||||
public int getHeight(){ return 13; }
|
||||
|
||||
public double getBPS() {
|
||||
return mc.thePlayer.getDistance(mc.thePlayer.lastTickPosX, mc.thePlayer.lastTickPosY, mc.thePlayer.lastTickPosZ) * (mc.timer.ticksPerSecond * mc.timer.timerSpeed);
|
||||
}
|
||||
|
||||
public String getText(){
|
||||
return "BPS: " + new DecimalFormat("0.##").format(getBPS());
|
||||
}
|
||||
@Override
|
||||
public void draw(){
|
||||
drawString(getText(), x+2, y+2, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
|
||||
}
|
||||
|
||||
}
|
|
@ -197,7 +197,7 @@ public class Minecraft implements IThreadListener {
|
|||
public int displayWidth;
|
||||
public int displayHeight;
|
||||
private boolean field_181541_X = false;
|
||||
private Timer timer = new Timer(20.0F);
|
||||
public Timer timer = new Timer(20.0F);
|
||||
public WorldClient theWorld;
|
||||
public RenderGlobal renderGlobal;
|
||||
private RenderManager renderManager;
|
||||
|
@ -1689,6 +1689,9 @@ public class Minecraft implements IThreadListener {
|
|||
this.thePlayer = null;
|
||||
}
|
||||
|
||||
ModManager.scoreboard.setEnabled(true);
|
||||
ModManager.fpsb.setEnabled(true);
|
||||
this.gameSettings.loadOptions();
|
||||
System.gc();
|
||||
this.systemTime = 0L;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ import net.minecraft.client.Minecraft;
|
|||
*/
|
||||
public class Timer {
|
||||
|
||||
float ticksPerSecond;
|
||||
public float ticksPerSecond;
|
||||
private double lastHRTime;
|
||||
public int elapsedTicks;
|
||||
public float renderPartialTicks;
|
||||
|
|
Loading…
Reference in New Issue
Block a user