diff --git a/dependencies.gradle b/dependencies.gradle index 206826d..980d132 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -1,7 +1,7 @@ // Add your dependencies here dependencies { - api('com.github.GTNewHorizons:TinkersConstruct:1.13.38-GTNH:dev') + api('com.github.GTNewHorizons:TinkersConstruct:1.14.30-GTNH:dev') compileOnly('com.github.GTNewHorizons:Battlegear2:1.4.3:api') {transitive = false} } diff --git a/gradle.properties b/gradle.properties index 12e58d5..b08b67f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -39,10 +39,34 @@ remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/co # `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE. developmentEnvironmentUserName = Developer -# Enables using modern Java syntax (up to version 17) via Jabel, while still targeting JVM 8. -# See https://github.com/bsideup/jabel for details on how this works. +# Enables modern Java syntax support. Valid values: +# - false: No modern syntax, Java 8 only +# - jabel: Jabel syntax-only support, compiles to J8 bytecode +# - jvmDowngrader: Full modern Java via JVM Downgrader (syntax + stdlib APIs) +# - modern: Native modern Java bytecode, no downgrading enableModernJavaSyntax = false +# If set, ignores the above setting and compiles with the given toolchain. This may cause unexpected issues, +# and should *not* be used in most situations. -1 disables this. +# forceToolchainVersion = -1 + +# Target JVM version for JVM Downgrader bytecode downgrading. +# Only used when enableModernJavaSyntax = jvmDowngrader +# downgradeTargetVersion = 8 + +# Comma-separated list of Java versions for multi-release jar support (JVM Downgrader only). +# Classes will be available in META-INF/versions/N/ for each version N in this list. +# Default: "21,25" (J25+ gets native classes, J21-24 gets partial downgrade, J8-20 gets full downgrade). +# jvmDowngraderMultiReleaseVersions = 21,25 + +# Specifies how JVM Downgrader API stubs are provided. Options: +# - shade: Shade minimized stubs into the jar +# - gtnhlib: GTNHLib provides stubs at runtime (adds version constraint) +# - external: Another dependency provides stubs (no constraint, no warning) +# - (empty): Warning reminding you to configure stubs +# Note: 'shade' option requires you to verify license compliance, see: https://github.com/unimined/JvmDowngrader/blob/main/LICENSE.md +# jvmDowngraderStubsProvider = + # Enables injecting missing generics into the decompiled source code for a better coding experience. # Turns most publicly visible List, Map, etc. into proper List, Map types. enableGenericInjection = false @@ -96,7 +120,9 @@ usesMixinDebug = false # Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise. mixinPlugin = -# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail! +# Specify the package that contains all of your Mixins. The package must exist or +# the build will fail. If you have a package property defined in your mixins..json, +# it must match with this or the build will fail. mixinsPackage = # Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin! @@ -151,7 +177,7 @@ modrinthProjectId = # type can be one of [project, version], # and the name is the Modrinth project or version slug/id of the other mod. # Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech -# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true +# Note: UniMixins is automatically set as a required dependency if usesMixins = true. modrinthRelations = # Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens. @@ -172,6 +198,12 @@ curseForgeRelations = # projects. New projects should not use this parameter. # customArchiveBaseName = +# Optional parameter to customize the default working directory used by the runClient* tasks. Relative to the project directory. +# runClientWorkingDirectory = run/client + +# Optional parameter to customize the default working directory used by the runServer* tasks. Relative to the project directory. +# runServerWorkingDirectory = run/server + # Optional parameter to have the build automatically fail if an illegal version is used. # This can be useful if you e.g. only want to allow versions in the form of '1.1.xxx'. # The check is ONLY performed if the version is a git tag. @@ -201,3 +233,6 @@ curseForgeRelations = # This is meant to be set in $HOME/.gradle/gradle.properties. # ideaCheckSpotlessOnBuild = true +# Non-GTNH properties +org.gradle.configuration-cache = true +org.gradle.parallel = true diff --git a/gradle/gradle-daemon-jvm.properties b/gradle/gradle-daemon-jvm.properties new file mode 100644 index 0000000..9004ab4 --- /dev/null +++ b/gradle/gradle-daemon-jvm.properties @@ -0,0 +1,12 @@ +#This file is generated by updateDaemonJvm +toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/df211d3c3eefdc408b462041881bc575/redirect +toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/93aeea858331bd6bb00ba94759830234/redirect +toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/df211d3c3eefdc408b462041881bc575/redirect +toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/93aeea858331bd6bb00ba94759830234/redirect +toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/3426ffcaa54c3f62406beb1f1ab8b179/redirect +toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/f636c800fdb3f9ae33f019dfa048ba72/redirect +toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/df211d3c3eefdc408b462041881bc575/redirect +toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/93aeea858331bd6bb00ba94759830234/redirect +toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/3cd7045fca9a72cd9bc7d14a385e594c/redirect +toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/0ef34dd9312b12d61ba1b8e66126d140/redirect +toolchainVersion=25 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 9bbc975..61285a6 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 37f853b..37f78a6 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index faf9300..adff685 100755 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright © 2015 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -114,7 +114,6 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. @@ -172,7 +171,6 @@ fi # For Cygwin or MSYS, switch paths to Windows format before running java if "$cygwin" || "$msys" ; then APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) JAVACMD=$( cygpath --unix "$JAVACMD" ) @@ -212,8 +210,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" # Stop when "xargs" is not available. diff --git a/gradlew.bat b/gradlew.bat index 9d21a21..c4bdd3a 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -70,11 +70,10 @@ goto fail :execute @rem Setup the command line -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* :end @rem End local scope for the variables with windows NT shell diff --git a/settings.gradle b/settings.gradle index ff436f2..d1af453 100644 --- a/settings.gradle +++ b/settings.gradle @@ -17,7 +17,7 @@ pluginManagement { } plugins { - id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.38' + id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.20' } diff --git a/src/main/java/squeek/tictooltips/TooltipHandler.java b/src/main/java/squeek/tictooltips/TooltipHandler.java index 0ab0dc1..b773bb0 100644 --- a/src/main/java/squeek/tictooltips/TooltipHandler.java +++ b/src/main/java/squeek/tictooltips/TooltipHandler.java @@ -274,7 +274,8 @@ private List getMaterialTooltip(int matID, Item item, ToolCore tool) { } else { if (mat.reinforced() > 0) toolTip.add(mat.style() + StringHelper.getReinforcedString(mat.reinforced())); - if (ToolPartHelper.isRod(item) || ToolPartHelper.isArrowShaft(item)) { + if (ToolPartHelper.isRod(item) || ToolPartHelper.isArrowShaft(item) + || ToolPartHelper.isCrossbowBody(item)) { ArrowShaftMaterial arrowShaftMat = (ArrowShaftMaterial) TConstructRegistry .getCustomMaterial(matID, ArrowShaftMaterial.class); @@ -372,36 +373,34 @@ private List getMaterialTooltip(int matID, Item item, ToolCore tool) { if (!hasTool || ToolHelper.isWeapon(tool)) toolTip.add( StringHelper.getLocalizedString("gui.toolstation3") + ToolPartHelper.getAttackString(mat.attack())); - } else if (ToolPartHelper.isBowLimb(item) || ToolPartHelper.isCrossbowLimb(item) - || ToolPartHelper.isCrossbowBody(item)) { - toolTip.add( - StringHelper.getLocalizedString("gui.toolstation2") - + ToolPartHelper.getDurabilityString(mat.durability())); - BowMaterial bowMat = TConstructRegistry.getBowMaterial(matID); - if (bowMat != null) { - toolTip.add( - StringHelper.getLocalizedString("gui.toolstation6") - + ToolPartHelper.getBowDrawSpeedString(bowMat.drawspeed)); - toolTip.add( - StringHelper.getLocalizedString("gui.toolstation7") - + ToolPartHelper.getArrowSpeedString(bowMat.flightSpeedMax)); - } - } else - if (ToolPartHelper.isBoltPart(item)) { + } else if (ToolPartHelper.isBowLimb(item) || ToolPartHelper.isCrossbowLimb(item)) { + toolTip.add( + StringHelper.getLocalizedString("gui.toolstation2") + + ToolPartHelper.getDurabilityString(mat.durability())); + BowMaterial bowMat = TConstructRegistry.getBowMaterial(matID); + if (bowMat != null) { + toolTip.add( + StringHelper.getLocalizedString("gui.toolstation6") + + ToolPartHelper.getBowDrawSpeedString(bowMat.drawspeed)); toolTip.add( - StringHelper.getLocalizedString("gui.toolstation2") - + ToolPartHelper.getDurabilityString(mat.durability())); + StringHelper.getLocalizedString("gui.toolstation7") + + ToolPartHelper.getArrowSpeedString(bowMat.flightSpeedMax)); + } + } else if (ToolPartHelper.isBoltPart(item)) { + toolTip.add( + StringHelper.getLocalizedString("gui.toolstation2") + + ToolPartHelper.getDurabilityString(mat.durability())); - ArrowMaterial arrowMat = TConstructRegistry.getArrowMaterial(matID); - if (arrowMat != null) { - toolTip.add( - StringHelper.getLocalizedString("gui.toolstation22") - + ToolPartHelper.getBreakChanceString(arrowMat.breakChance)); - toolTip.add( - StringHelper.getLocalizedString("gui.toolstation8") - + ToolPartHelper.getWeightString(arrowMat.mass)); - } + ArrowMaterial arrowMat = TConstructRegistry.getArrowMaterial(matID); + if (arrowMat != null) { + toolTip.add( + StringHelper.getLocalizedString("gui.toolstation22") + + ToolPartHelper.getBreakChanceString(arrowMat.breakChance)); + toolTip.add( + StringHelper.getLocalizedString("gui.toolstation8") + + ToolPartHelper.getWeightString(arrowMat.mass)); } + } // tough bindings and full guards, specifically, count as 'handles' // apparently this is due to them having 3 material cost, but // that is arbitrary, it's not *actually* due to them having 3 material cost