Skip to content

Commit

Permalink
Revert "1.20.3 compatibility"
Browse files Browse the repository at this point in the history
This reverts commit 1a04b55.
  • Loading branch information
SyberiaK committed Apr 29, 2024
1 parent 77d3efb commit 305d5ce
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 26 deletions.
20 changes: 10 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
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
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// 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 {
Expand All @@ -43,6 +45,7 @@ processResources {
}

tasks.withType(JavaCompile).configureEach {
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
it.options.release = 17
}

Expand All @@ -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}"}
}
}

Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
5 changes: 1 addition & 4 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
8 changes: 4 additions & 4 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions src/main/java/me/syberiak/colorful_hex/ColorfulHEX.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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;
}
Expand All @@ -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!"));

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down

0 comments on commit 305d5ce

Please sign in to comment.