Skip to content

Commit

Permalink
Fix GT recipes not working after The Great Renaming (#22)
Browse files Browse the repository at this point in the history
Co-authored-by: Caedis <[email protected]>
  • Loading branch information
Mexator and Caedis authored Dec 27, 2024
1 parent e852c84 commit 8aa92d9
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 18 deletions.
22 changes: 11 additions & 11 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
// Add your dependencies here

dependencies {
// compile("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-423-GTNH:dev")
compile("com.github.GTNewHorizons:CodeChickenCore:1.3.6:dev")
compile("com.github.GTNewHorizons:NotEnoughItems:2.6.19-GTNH:dev")
// compile("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-509-GTNH:dev")
compile("com.github.GTNewHorizons:CodeChickenCore:1.4.0:dev")
compile("com.github.GTNewHorizons:NotEnoughItems:2.7.4-GTNH:dev")
// compile("com.github.GTNewHorizons:Baubles:1.0.4:dev")
// compile("com.github.GTNewHorizons:WirelessCraftingTerminal:1.11.6:dev")
// compile("com.github.GTNewHorizons:WirelessCraftingTerminal:1.11.7:dev")

// compileOnly("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.3.21-gtnh:dev") { transitive = false }
// compileOnly("com.github.GTNewHorizons:Avaritiaddons:1.7.1-GTNH:dev") { transitive = false }
// compileOnly("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.4.2-gtnh:dev") { transitive = false }
// compileOnly("com.github.GTNewHorizons:Avaritiaddons:1.8.4-GTNH:dev") { transitive = false }
// compileOnly("com.github.GTNewHorizons:BuildCraftCompat:7.1.17:dev") { transitive = false }
compileOnly('com.github.GTNewHorizons:EnderIO:2.8.17:dev') { transitive = false }
compileOnly("com.github.GTNewHorizons:ForestryMC:4.9.7:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.48.133:dev") { transitive = false }
// compileOnly("com.github.GTNewHorizons:ThaumicEnergistics:1.6.22-GTNH:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:Botania:1.11.3-GTNH:dev") { transitive = false }
compileOnly('com.github.GTNewHorizons:EnderIO:2.9.0:dev') { transitive = false }
compileOnly("com.github.GTNewHorizons:ForestryMC:4.10.0:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.31:dev") { transitive = false }
// compileOnly("com.github.GTNewHorizons:ThaumicEnergistics:1.7.0-GTNH:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:Botania:1.12.2-GTNH:dev") { transitive = false }
compileOnly("com.gregoriust.gregtech:gregtech_1.7.10:6.14.23:dev") { transitive = false }
compileOnly("curse.maven:thaumcraft-nei-plugin-225095:2241913") { transitive = false }
// compileOnly("curse.maven:thermal-expansion-69163:2388759") { transitive = false }
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
7 changes: 5 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
2 changes: 2 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pluginManagement {
}

plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.26'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.30'
}


16 changes: 13 additions & 3 deletions src/main/java/me/towdium/jecalculation/nei/adapter/GregTech.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ public class GregTech implements IAdapter {
isPreRecipeRefactor = false;
} catch (ClassNotFoundException e) {}

Class<?> gtDf = null, gtAL = null;
Class<?> gtAL = null;
try {
gtDf = Class.forName("gregtech.nei.GT_NEI_DefaultHandler");
gtAL = Class.forName("gregtech.nei.GT_NEI_AssLineHandler");
} catch (ClassNotFoundException e) {}
gtDefault = gtDf;

gtDefault = loadDefaultRecipeHandler();
gtAssLine = gtAL;
}

Expand Down Expand Up @@ -168,4 +168,14 @@ private static boolean isStackValid(Object aStack) {
return (aStack instanceof ItemStack) && ((ItemStack) aStack).getItem() != null
&& ((ItemStack) aStack).stackSize >= 0;
}

private static Class<?> loadDefaultRecipeHandler() {
String[] classNames = { "gregtech.nei.GT_NEI_DefaultHandler", "gregtech.nei.GTNEIDefaultHandler" };
for (String name : classNames) {
try {
return Class.forName(name);
} catch (ClassNotFoundException ignored) {}
}
return null;
}
}

0 comments on commit 8aa92d9

Please sign in to comment.