Rounded option
This commit is contained in:
parent
cf33e492a4
commit
3b02e08424
|
@ -1,5 +1,11 @@
|
|||
package dev.resent.module;
|
||||
|
||||
import dev.resent.animation.Animation;
|
||||
import dev.resent.animation.impl.DecelerateAnimation;
|
||||
import dev.resent.animation.impl.EaseBackIn;
|
||||
import dev.resent.animation.impl.EaseInOutQuad;
|
||||
import dev.resent.animation.impl.ElasticAnimation;
|
||||
import dev.resent.animation.impl.SmoothStepAnimation;
|
||||
import dev.resent.module.impl.misc.HUD;
|
||||
import dev.resent.util.render.RainbowUtil;
|
||||
|
||||
|
@ -19,8 +25,25 @@ public class Theme {
|
|||
return -1;
|
||||
}
|
||||
|
||||
public static int getId(){
|
||||
switch(HUD.theme.getValue()){
|
||||
public static Animation getAnimation(int id, int ms, int endpoint, float... etc){
|
||||
switch(id){
|
||||
case 1:
|
||||
return new EaseBackIn(ms, endpoint, etc[0]);
|
||||
case 2:
|
||||
return new ElasticAnimation(ms, endpoint, etc[0], etc[1], false);
|
||||
case 3:
|
||||
return new EaseInOutQuad(ms, endpoint);
|
||||
case 4:
|
||||
return new DecelerateAnimation(ms, endpoint);
|
||||
case 5:
|
||||
return new SmoothStepAnimation(ms, endpoint);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static int getFontId(){
|
||||
switch(HUD.fontTheme.getValue()){
|
||||
case "Classic":
|
||||
return 1;
|
||||
case "Rainbow":
|
||||
|
@ -30,6 +53,22 @@ public class Theme {
|
|||
return -1;
|
||||
}
|
||||
|
||||
public static int getAnimationId(){
|
||||
switch(HUD.animationTheme.getValue()){
|
||||
case "Ease back in":
|
||||
return 1;
|
||||
case "Elastic":
|
||||
return 2;
|
||||
case "Ease in out quad":
|
||||
return 3;
|
||||
case "Decelerate":
|
||||
return 4;
|
||||
case "Smooth step":
|
||||
return 5;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static boolean getRounded(){
|
||||
return HUD.round.getValue();
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ public class CPS extends RenderModule {
|
|||
final long time = System.currentTimeMillis();
|
||||
FuncUtils.removeIf(clicks, aLong -> aLong + 1000 < time);
|
||||
|
||||
mc.fontRendererObj.drawString("[CPS: " + clicks.size() + "]", this.x+2, this.y+2, Theme.getFontColor(Theme.getId()), tshadow.getValue());
|
||||
mc.fontRendererObj.drawString("[CPS: " + clicks.size() + "]", this.x+2, this.y+2, Theme.getFontColor(Theme.getFontId()), tshadow.getValue());
|
||||
}
|
||||
|
||||
}
|
|
@ -44,6 +44,6 @@ public class ComboCounter extends RenderModule {
|
|||
if(Minecraft.getMinecraft().thePlayer.hurtTime > 3 && this.enabled){
|
||||
combo = 0;
|
||||
}
|
||||
Minecraft.getMinecraft().fontRendererObj.drawString("["+combo+" Combo]", this.x + 2, this.y + 2, Theme.getFontColor(Theme.getId()), tshadow.getValue());
|
||||
Minecraft.getMinecraft().fontRendererObj.drawString("["+combo+" Combo]", this.x + 2, this.y + 2, Theme.getFontColor(Theme.getFontId()), tshadow.getValue());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ public class FPS extends RenderModule {
|
|||
@Override
|
||||
public void draw() {
|
||||
if (mc.thePlayer != null) {
|
||||
mc.fontRendererObj.drawString(getText(), this.x + 2, this.y + 2, Theme.getFontColor(Theme.getId()), tshadow.getValue());
|
||||
mc.fontRendererObj.drawString(getText(), this.x + 2, this.y + 2, Theme.getFontColor(Theme.getFontId()), tshadow.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,6 @@ public class Health extends RenderModule {
|
|||
|
||||
@Override
|
||||
public void draw() {
|
||||
mc.fontRendererObj.drawString("[" + mc.thePlayer.getHealth() + " Health]", this.x + 2, this.y + 2, Theme.getFontColor(Theme.getId()), tshadow.getValue());
|
||||
mc.fontRendererObj.drawString("[" + mc.thePlayer.getHealth() + " Health]", this.x + 2, this.y + 2, Theme.getFontColor(Theme.getFontId()), tshadow.getValue());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,14 +33,14 @@ public class Info extends RenderModule {
|
|||
//int rot = MathHelper.floor_double(this.mc.thePlayer.rotationYaw*4/360+0.5) & 3;
|
||||
if (mc.thePlayer != null) {
|
||||
drawRect(this.x, this.y, this.x + this.getWidth(), this.y + this.getHeight(), new Color(0, 0, 0, 200).getRGB());
|
||||
mc.fontRendererObj.drawStringWithShadow(" X: " + px, this.x + 5, this.y + 14, Theme.getFontColor(Theme.getId()));
|
||||
mc.fontRendererObj.drawStringWithShadow(" Y: " + py, this.x + 5, this.y + 24, Theme.getFontColor(Theme.getId()));
|
||||
mc.fontRendererObj.drawStringWithShadow(" Z: " + pz, this.x + 5, this.y + 34, Theme.getFontColor(Theme.getId()));
|
||||
mc.fontRendererObj.drawStringWithShadow(" X: " + px, this.x + 5, this.y + 14, Theme.getFontColor(Theme.getFontId()));
|
||||
mc.fontRendererObj.drawStringWithShadow(" Y: " + py, this.x + 5, this.y + 24, Theme.getFontColor(Theme.getFontId()));
|
||||
mc.fontRendererObj.drawStringWithShadow(" Z: " + pz, this.x + 5, this.y + 34, Theme.getFontColor(Theme.getFontId()));
|
||||
if (!direction.getValue()) yes = 6;
|
||||
//if (direction.getVtalue()) {
|
||||
// mc.fontRendererObj.drawStringWithShadow(" Dir: " + Direction.directionsF[rot], this.x+5+mc.fontRendererObj.getStringWidth(" X: " + px), this.y + 14, Theme.getFontColor(Theme.getId()));
|
||||
mc.fontRendererObj.drawStringWithShadow(" Biome: " + mc.theWorld.getBiomeGenForCoords(new BlockPos(px, py, pz)).biomeName, this.x + 5, this.y + 44, Theme.getFontColor(Theme.getId()));
|
||||
//mc.fontRendererObj.drawStringWithShadow(" A: " + MathHelper.floor_double((double)mc.thePlayer.rotationYaw>360 || mc.thePlayer.rotationYaw<-360 ? mc.thePlayer.rotationYaw-360 : mc.thePlayer.rotationYaw) + "°", this.x + mc.fontRendererObj.getStringWidth(" D: N "), this.y + 44, Theme.getFontColor(Theme.getId()));
|
||||
// mc.fontRendererObj.drawStringWithShadow(" Dir: " + Direction.directionsF[rot], this.x+5+mc.fontRendererObj.getStringWidth(" X: " + px), this.y + 14, Theme.getFontColor(Theme.getFontId()));
|
||||
mc.fontRendererObj.drawStringWithShadow(" Biome: " + mc.theWorld.getBiomeGenForCoords(new BlockPos(px, py, pz)).biomeName, this.x + 5, this.y + 44, Theme.getFontColor(Theme.getFontId()));
|
||||
//mc.fontRendererObj.drawStringWithShadow(" A: " + MathHelper.floor_double((double)mc.thePlayer.rotationYaw>360 || mc.thePlayer.rotationYaw<-360 ? mc.thePlayer.rotationYaw-360 : mc.thePlayer.rotationYaw) + "°", this.x + mc.fontRendererObj.getStringWidth(" D: N "), this.y + 44, Theme.getFontColor(Theme.getFontId()));
|
||||
yes = 7;
|
||||
//}
|
||||
|
||||
|
|
|
@ -18,12 +18,12 @@ public class Ping extends RenderModule {
|
|||
public void draw() {
|
||||
int ms = 0;
|
||||
if (mc.isSingleplayer()) {
|
||||
ms = Theme.getFontColor(Theme.getId());
|
||||
ms = Theme.getFontColor(Theme.getFontId());
|
||||
}
|
||||
ms = (int) mc.getCurrentServerData().pingToServer;
|
||||
|
||||
this.setHeight(mc.fontRendererObj.FONT_HEIGHT + 4);
|
||||
this.setWidth(mc.fontRendererObj.getStringWidth("[" + ms + " ms]") + 4);
|
||||
mc.fontRendererObj.drawString("[" + ms + " ms]", this.x + 2, this.y + 2, Theme.getFontColor(Theme.getId()), tshadow.getValue());
|
||||
mc.fontRendererObj.drawString("[" + ms + " ms]", this.x + 2, this.y + 2, Theme.getFontColor(Theme.getFontId()), tshadow.getValue());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,6 +36,6 @@ public class PotCounter extends RenderModule {
|
|||
}
|
||||
}
|
||||
|
||||
mc.fontRendererObj.drawString("[" + potinv + " Pots]", this.x + 2, this.y + 2, Theme.getFontColor(Theme.getId()), tshadow.getValue());
|
||||
mc.fontRendererObj.drawString("[" + potinv + " Pots]", this.x + 2, this.y + 2, Theme.getFontColor(Theme.getFontId()), tshadow.getValue());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ public class ReachDisplay extends RenderModule {
|
|||
|
||||
@Override
|
||||
public void draw() {
|
||||
mc.fontRendererObj.drawStringWithShadow("[" + df2.format(range) + " Blocks]", this.x + 2, this.y + 2, Theme.getFontColor(Theme.getId()));
|
||||
mc.fontRendererObj.drawStringWithShadow("[" + df2.format(range) + " Blocks]", this.x + 2, this.y + 2, Theme.getFontColor(Theme.getFontId()));
|
||||
}
|
||||
|
||||
public void onAttack(Entity e){
|
||||
|
|
|
@ -23,7 +23,7 @@ public class ServerInfo extends RenderModule {
|
|||
}
|
||||
|
||||
public void draw() {
|
||||
mc.fontRendererObj.drawString(getText(), this.x + 2, this.y + 2, Theme.getFontColor(Theme.getId()), tshadow.getValue());
|
||||
mc.fontRendererObj.drawString(getText(), this.x + 2, this.y + 2, Theme.getFontColor(Theme.getFontId()), tshadow.getValue());
|
||||
}
|
||||
|
||||
public String getText() {
|
||||
|
|
|
@ -28,7 +28,7 @@ public class Watermark extends RenderModule {
|
|||
GlStateManager.scale(2f, 2f, 2f);
|
||||
int i = fr.drawString(Resent.NAME + " client", (this.x + 1) / 2, (this.y + 1) / 2, Color.RED.getRGB(), true);
|
||||
GlStateManager.scale(0.5f, 0.5f, 0.5f);
|
||||
fr.drawString(Resent.VERSION + "", (i * 2), this.y + (fr.FONT_HEIGHT * 2 - 7), Theme.getFontColor(Theme.getId()), true);
|
||||
fr.drawString(Resent.VERSION + "", (i * 2), this.y + (fr.FONT_HEIGHT * 2 - 7), Theme.getFontColor(Theme.getFontId()), true);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,11 +8,12 @@ import dev.resent.module.setting.ModeSetting;
|
|||
public class HUD extends Mod{
|
||||
public HUD(){
|
||||
super("Theme", Category.MISC, true);
|
||||
addSetting(theme);
|
||||
addSetting(fontTheme, animationTheme, round);
|
||||
}
|
||||
|
||||
public static final ModeSetting theme = new ModeSetting("Theme", "", "Classic", "Rainbow");
|
||||
public static final ModeSetting fontTheme = new ModeSetting("Font", "", "Classic", "Rainbow");
|
||||
public static final BooleanSetting round = new BooleanSetting("Rounded", "", true);
|
||||
public static final ModeSetting animationTheme = new ModeSetting("Animation", "", "Ease back in", "Ease in out quad", "Elastic", "Smooth step", "Decelerate");
|
||||
//public static final BooleanSetting animated = new BooleanSetting("Animated", "", true);
|
||||
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ public class Sprint extends RenderModule {
|
|||
@Override
|
||||
public void draw() {
|
||||
this.fr = mc.fontRendererObj;
|
||||
if (drawn.getValue()) fr.drawStringWithShadow(getText(), x + 2, y + 2, Theme.getFontColor(Theme.getId()));
|
||||
if (drawn.getValue()) fr.drawStringWithShadow(getText(), x + 2, y + 2, Theme.getFontColor(Theme.getFontId()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue
Block a user