port fps
This commit is contained in:
parent
e08f846d0c
commit
aff1167701
|
@ -1,25 +1,16 @@
|
||||||
package dev.resent.module.impl.hud;
|
package dev.resent.module.impl.hud;
|
||||||
|
|
||||||
|
import dev.resent.annotation.RenderMod;
|
||||||
import dev.resent.module.Theme;
|
import dev.resent.module.Theme;
|
||||||
import dev.resent.module.base.Category;
|
import dev.resent.module.base.Category;
|
||||||
import dev.resent.module.base.RenderModule;
|
import dev.resent.module.base.RenderModule;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
|
||||||
|
@RenderMod(name = "FPS", category = Category.HUD, x = 4, y = 38)
|
||||||
public class FPS extends RenderModule {
|
public class FPS extends RenderModule {
|
||||||
|
|
||||||
public Minecraft mc = Minecraft.getMinecraft();
|
public int getWidth() { return mc.fontRendererObj.getStringWidth(getText()) + 4; }
|
||||||
|
public int getHeight() { return mc.fontRendererObj.FONT_HEIGHT + 4; }
|
||||||
public FPS() {
|
|
||||||
super("FPS", Category.HUD, 4, 14, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getWidth() {
|
|
||||||
return mc.fontRendererObj.getStringWidth(getText()) + 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getHeight() {
|
|
||||||
return mc.fontRendererObj.FONT_HEIGHT + 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getText(){
|
public String getText(){
|
||||||
return "[FPS: " + Minecraft.debugFPS + "]";
|
return "[FPS: " + Minecraft.debugFPS + "]";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user