File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
src/main/java/com/cleanroommc/modularui Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ public void onRichTooltip(RichTooltipEvent.Pre event) {
7272 }
7373
7474 @ SubscribeEvent
75- public static void onThemeTooltip (ReloadThemeEvent .Pre event ) {
75+ public void onThemeTooltip (ReloadThemeEvent .Pre event ) {
7676 IThemeApi .get ().registerTheme (testTheme );
7777 }
7878}
Original file line number Diff line number Diff line change @@ -758,7 +758,9 @@ public static int ofJson(JsonElement jsonElement) {
758758 if (jsonElement .isJsonPrimitive ()) {
759759 String colorString = jsonElement .getAsString ();
760760 if (colorString .isEmpty ()) return WHITE .main ;
761- if (colorString .charAt (0 ) == '0' || colorString .charAt (0 ) == '#' ) {
761+ char c = colorString .charAt (0 );
762+ // a normal int string
763+ if (Character .isDigit (c ) || c == '-' || c == '#' ) {
762764 int color = (int ) (long ) Long .decode (colorString ); // bruh
763765 if (color != 0 && getAlpha (color ) == 0 ) {
764766 return withAlpha (color , 255 );
You can’t perform that action at this time.
0 commit comments