Skip to content

Commit 63fba55

Browse files
committed
V 1.0.1 Hotfix
Hot fix for some simple bugs
1 parent 196e337 commit 63fba55

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

src/main/java/Method/Client/module/combat/CrystalRender.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public void setup() {
3737
setmgr.add(NoSpin = new Setting("NoSpin", this, false));
3838
}
3939

40-
@Subscribe
40+
@Override
4141
public void onToggle() {
4242
ModEnderCrystal.Toggle();
4343
}

src/main/java/Method/Client/utils/visual/ColorUtils.java

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,27 @@ public class ColorUtils {
1010

1111
public static Color rainbow() {
1212
long offset = 999999999999L;
13-
float hue = (float) (System.nanoTime() + offset) / 1.0E10f % 1.0f;
14-
return new Color((int) Long.parseLong(Integer.toHexString(Color.HSBtoRGB(hue, 1.0f, 1.0f)), 16));
13+
float hue = Math.abs((float) (System.nanoTime() + offset) / 1.0E10f % 1.0f);
14+
int color = Color.HSBtoRGB(hue, 1.0f, 1.0f);
15+
return new Color(color);
1516
}
1617

1718
public static Color wave(double wave, double satur, double bright) {
18-
float hue = (float) (System.nanoTime()) / 1.0E10f % 1.0f;
19+
float hue = Math.abs((float) (System.nanoTime()) / 1.0E10f % 1.0f);
1920
hue = (float) (hue + (wave / 10));
2021
int color = Color.HSBtoRGB(hue, (float) satur, (float) bright);
2122
return new Color(color);
2223
}
2324

25+
2426
public static Color randomColor(boolean nice) {
2527
if (nice)
26-
return Color.getHSBColor(new Random().nextFloat(), (float) ThreadLocalRandom.current().nextDouble(0.6, 0.8), 0.9f);
28+
return Color.getHSBColor(new Random().nextFloat(), (float) ThreadLocalRandom.current().nextDouble(0.5, 0.7), (float) ThreadLocalRandom.current().nextDouble(0.6, 0.8));
2729
else
2830
return new Color((int) (Math.random() * 0x1000000));
2931
}
3032

33+
3134
public static void glColor(int color) {
3235
GlStateManager.color((float) (color >> 16 & 255) / 255F, (float) (color >> 8 & 255) / 255F, (float) (color & 255) / 255F, (float) (color >> 24 & 255) / 255F);
3336
}
@@ -43,9 +46,10 @@ static public float colorcalc(int c, int location) {
4346
public static int rainbow(double saturation, double brightness, double alpha) {
4447
long offset = 999999999999L;
4548
float fade = 1.0f;
46-
float hue2 = (float) (System.nanoTime() + offset) / 1.0E10f % 1.0f;
47-
long color = Long.parseLong(Integer.toHexString(Color.HSBtoRGB(hue2, (float) saturation, (float) brightness)), 16);
48-
Color c = new Color((int) color);
49+
float hue2 = Math.abs((float) (System.nanoTime() + offset) / 1.0E10f % 1.0f);
50+
int rgbColor = Color.HSBtoRGB(hue2, (float) saturation, (float) brightness);
51+
Color c = new Color(rgbColor);
4952
return new Color((float) c.getRed() / 255.0f * fade, (float) c.getGreen() / 255.0f * fade, (float) c.getBlue() / 255.0f * fade, (float) alpha).getRGB();
5053
}
54+
5155
}

0 commit comments

Comments
 (0)