Puzzle 1.3.0 - Fix puzzle-splashscreen, update integrations

This commit is contained in:
Motschen
2022-06-06 15:11:51 +02:00
parent fbbfe773a8
commit b95045e21a
15 changed files with 117 additions and 167 deletions

View File

@@ -7,7 +7,7 @@ import net.fabricmc.api.ClientModInitializer;
public class PuzzleCore implements ClientModInitializer {
public final static String version = "Puzzle "+ FabricLoader.getInstance().getModContainer("puzzle").get().getMetadata().getVersion();
public final static String version = "Puzzle "+ (FabricLoader.getInstance().getModContainer("puzzle").isPresent() ? FabricLoader.getInstance().getModContainer("puzzle").get().getMetadata().getVersion() : "Test");
public final static String name = "Puzzle";
public final static String id = "puzzle";
public final static String website = "https://github.com/PuzzleMC/Puzzle";

View File

@@ -13,12 +13,12 @@ public class PuzzleConfig extends MidnightConfig {
@Entry public static boolean checkUpdates = true;
@Entry public static boolean showPuzzleInfo = true;
@Entry public static boolean resourcepackSplashScreen = true;
@Entry public static boolean disableSplashScreenBlend = false;
@Entry public static boolean emissiveTextures = true;
@Entry public static boolean betterSplashScreenBlend = true;
@Entry public static boolean unlimitedRotations = true;
@Entry public static boolean biggerModels = true;
@Entry public static int backgroundColor = 15675965;
@Entry public static int progressBarColor = 16777215;
@Entry public static int progressBarBackgroundColor = 15675965;
@Entry public static int progressFrameColor = 16777215;
}

View File

@@ -1,17 +0,0 @@
package net.puzzlemc.core.util;
import java.awt.*;
public class ColorUtil {
/**
* @credit https://stackoverflow.com/questions/4129666/how-to-convert-hex-to-rgb-using-java
* @param colorStr e.g. "FFFFFF"
* @return
*/
public static Color hex2Rgb(String colorStr) {
return new Color(
Integer.valueOf( colorStr.substring( 0, 2 ), 16 ),
Integer.valueOf( colorStr.substring( 2, 4 ), 16 ),
Integer.valueOf( colorStr.substring( 4, 6 ), 16 ));
}
}