diff --git a/build.gradle b/build.gradle index 9b7da7a..d85dc7e 100644 --- a/build.gradle +++ b/build.gradle @@ -1,15 +1,15 @@ plugins { - id 'fabric-loom' version '1.6-SNAPSHOT' + id 'fabric-loom' version '1.0-SNAPSHOT' id 'maven-publish' } +sourceCompatibility = JavaVersion.VERSION_17 +targetCompatibility = JavaVersion.VERSION_17 + +archivesBaseName = project.archives_base_name version = project.mod_version group = project.maven_group -base { - archivesName = project.archives_base_name -} - repositories { // Add repositories to retrieve artifacts from in here. // You should only use this when depending on other mods because @@ -17,9 +17,11 @@ repositories { // See https://docs.gradle.org/current/userguide/declaring_repositories.html // for more information about repositories. maven { - name "TerraformersMC" url "https://maven.terraformersmc.com/" } + maven { + url "https://github.com/ricksouth/serilum-forge-maven/raw/maven/" + } } dependencies { @@ -43,6 +45,7 @@ processResources { } tasks.withType(JavaCompile).configureEach { + // Minecraft 1.18 (1.18-pre2) upwards uses Java 17. it.options.release = 17 } @@ -51,14 +54,11 @@ java { // if it is present. // If you remove this line, sources will not be generated. withSourcesJar() - - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 } jar { from("LICENSE") { - rename { "${it}_${project.base.archivesName.get()}"} + rename { "${it}_${project.archivesBaseName}"} } } diff --git a/gradle.properties b/gradle.properties index 31d16d1..a9c673e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,8 +4,8 @@ org.gradle.parallel=true # Fabric Properties # check these on https://fabricmc.net/develop - minecraft_version=1.20.3 - yarn_mappings=1.20.3+build.1 + minecraft_version=1.20.2 + yarn_mappings=1.20.2+build.4 loader_version=0.15.10 # Mod Properties @@ -14,5 +14,5 @@ org.gradle.parallel=true archives_base_name=colorful-hex # Dependencies - fabric_api_version=0.91.1+1.20.3 - modmenu_version=9.0.0 + fabric_api_version=0.91.6+1.20.2 + modmenu_version=8.0.1 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e8858b7..84d1f85 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,8 +1,5 @@ -#Mon Apr 29 11:33:46 YEKT 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip -networkTimeout=10000 -validateDistributionUrl=true +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index e50af2a..1b6c787 100644 --- a/gradlew +++ b/gradlew @@ -80,11 +80,14 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit APP_NAME="Gradle" APP_BASE_NAME=${0##*/} +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -190,9 +193,6 @@ if "$cygwin" || "$msys" ; then done fi -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - # Collect all arguments for the java command; # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # shell script including quotes and variable substitutions, so put them in diff --git a/src/main/java/me/syberiak/colorful_hex/ColorfulHEX.java b/src/main/java/me/syberiak/colorful_hex/ColorfulHEX.java index 8a7e8f9..bd97aa1 100644 --- a/src/main/java/me/syberiak/colorful_hex/ColorfulHEX.java +++ b/src/main/java/me/syberiak/colorful_hex/ColorfulHEX.java @@ -48,7 +48,7 @@ public static Text formatHexColorsPart(Text text) { if (part.length() - sharpIndex >= 7 && isHexColor(part.substring(sharpIndex, sharpIndex + 7))) { formattedPart.append(toStyledHexColor(part.substring(sharpIndex, sharpIndex + 7), style)); startIndex += 7; - } else if (part.length() - sharpIndex >= 4 && isHexColor(part.substring(sharpIndex, sharpIndex + 4))) { + } else if (part.length() - sharpIndex >= 4 &&isHexColor(part.substring(sharpIndex, sharpIndex + 4))) { formattedPart.append(toStyledHexColor(part.substring(sharpIndex, sharpIndex + 4), style)); startIndex += 4; } else { @@ -61,7 +61,9 @@ public static Text formatHexColorsPart(Text text) { sharpIndex = part.substring(startIndex).indexOf('#'); } - if (startIndex < part.length()) formattedPart.append(part.substring(startIndex)); + if (startIndex < part.length()) { + formattedPart.append(part.substring(startIndex)); + } return formattedPart; } @@ -77,7 +79,7 @@ public static Text toStyledHexColor(String code, Style style) { code = "#" + r.repeat(2) + g.repeat(2) + b.repeat(2); } - TextColor color = TextColor.parse(code).result().orElseThrow(); + TextColor color = TextColor.parse(code); //.result().orElseThrow(); ClickEvent copyByClick = new ClickEvent(ClickEvent.Action.COPY_TO_CLIPBOARD, text); HoverEvent hintByHover = new HoverEvent(HoverEvent.Action.SHOW_TEXT, Text.literal("Click to copy!")); diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 94bf1c5..2d4b237 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -29,7 +29,7 @@ "depends": { "fabricloader": ">=0.14.11", - "minecraft": ">=1.20.3", + "minecraft": ">=1.19.1 <1.20.3", "java": ">=17", "fabric-api": ">=0.72.0" },