From 6f5cb85aa7e3741b07da1e7556f86920af212cc3 Mon Sep 17 00:00:00 2001 From: Martin Robertz Date: Fri, 12 May 2023 23:30:28 +0200 Subject: [PATCH] fix https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/13447 undate bs --- build.gradle | 39 +++++++++++++++++-- .../spiteful/avaritia/crafting/Grinder.java | 36 +++++++++++++++++ 2 files changed, 72 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index fee8d0a..3fa171e 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -//version: 1682280358 +//version: 1683705740 /* DO NOT CHANGE THIS FILE! Also, you may replace this file at any time if there is an update available. @@ -69,8 +69,11 @@ plugins { id 'com.diffplug.spotless' version '6.13.0' apply false // 6.13.0 is the last jvm8 supporting version id 'com.modrinth.minotaur' version '2.+' apply false id 'com.matthewprenger.cursegradle' version '1.4.0' apply false - id 'com.gtnewhorizons.retrofuturagradle' version '1.3.2' + id 'com.gtnewhorizons.retrofuturagradle' version '1.3.11' } + +print("You might want to check out './gradlew :faq' if your build fails.\n") + boolean settingsupdated = verifySettingsGradle() settingsupdated = verifyGitAttributes() || settingsupdated if (settingsupdated) @@ -219,6 +222,8 @@ if (enableModernJavaSyntax.toBoolean()) { dependencies { annotationProcessor 'com.github.bsideup.jabel:jabel-javac-plugin:1.0.0' + // workaround for https://github.com/bsideup/jabel/issues/174 + annotationProcessor 'net.java.dev.jna:jna-platform:5.13.0' compileOnly('com.github.bsideup.jabel:jabel-javac-plugin:1.0.0') { transitive = false // We only care about the 1 annotation class } @@ -564,9 +569,10 @@ repositories { def mixinProviderGroup = "io.github.legacymoddingmc" def mixinProviderModule = "unimixins" -def mixinProviderVersion = "0.1.6" +def mixinProviderVersion = "0.1.7.1" def mixinProviderSpecNoClassifer = "${mixinProviderGroup}:${mixinProviderModule}:${mixinProviderVersion}" def mixinProviderSpec = "${mixinProviderSpecNoClassifer}:dev" +ext.mixinProviderSpec = mixinProviderSpec dependencies { if (usesMixins.toBoolean()) { @@ -817,6 +823,18 @@ public abstract class RunHotswappableMinecraftTask extends RunMinecraftTask { } this.classpath(project.java17DependenciesCfg) } + + public void setup(Project project) { + super.setup(project) + if (project.usesMixins.toBoolean()) { + this.extraJvmArgs.addAll(project.provider(() -> { + def mixinCfg = project.configurations.detachedConfiguration(project.dependencies.create(project.mixinProviderSpec)) + mixinCfg.canBeConsumed = false + mixinCfg.transitive = false + enableHotswap ? ["-javaagent:" + mixinCfg.singleFile.absolutePath] : [] + })) + } + } } def runClient17Task = tasks.register("runClient17", RunHotswappableMinecraftTask, Distribution.CLIENT, "runClient") @@ -1252,6 +1270,21 @@ if (!project.getGradle().startParameter.isOffline() && !Boolean.getBoolean('DISA } } +// If you want to add more cases to this task, implement them as arguments if total amount to print gets too large +tasks.register('faq') { + group = 'GTNH Buildscript' + description = 'Prints frequently asked questions about building a project' + + doLast { + print("If your build fails to fetch dependencies, they might have been deleted and replaced by newer " + + "versions.\nCheck if the versions you try to fetch are still on the distributing sites.\n" + + "The links can be found in repositories.gradle and build.gradle:repositories, " + + "not build.gradle:buildscript.repositories - this one is for gradle plugin metadata.\n\n" + + "If your build fails to recognize the syntax of new Java versions, enable Jabel in your " + + "gradle.properties. See how it's done in GTNH ExampleMod/gradle.properties.") + } +} + static URL availableBuildScriptUrl() { new URL("https://raw.githubusercontent.com/GTNewHorizons/ExampleMod1.7.10/master/build.gradle") } diff --git a/src/main/java/fox/spiteful/avaritia/crafting/Grinder.java b/src/main/java/fox/spiteful/avaritia/crafting/Grinder.java index c0a947e..cf133ff 100644 --- a/src/main/java/fox/spiteful/avaritia/crafting/Grinder.java +++ b/src/main/java/fox/spiteful/avaritia/crafting/Grinder.java @@ -396,6 +396,42 @@ public class Grinder { new ItemStack(LudicrousItems.singularity, 1, 4), 1215, new ItemStack(Blocks.quartz_block, 1)); + if (Config.copper && !OreDictionary.getOres("blockCopper").isEmpty()) { + CompressorManager.addOreRecipe(new ItemStack(LudicrousItems.singularity, 1, 5), 3648, "blockCopper"); + catalyst.getInput().add(new ItemStack(LudicrousItems.singularity, 1, 5)); + } + if (Config.tin && !OreDictionary.getOres("blockTin").isEmpty()) { + CompressorManager.addOreRecipe(new ItemStack(LudicrousItems.singularity, 1, 6), 3648, "blockTin"); + catalyst.getInput().add(new ItemStack(LudicrousItems.singularity, 1, 6)); + } + if (Config.lead && !OreDictionary.getOres("blockLead").isEmpty()) { + CompressorManager.addOreRecipe(new ItemStack(LudicrousItems.singularity, 1, 7), 3648, "blockLead"); + catalyst.getInput().add(new ItemStack(LudicrousItems.singularity, 1, 7)); + } + if (Config.silver && !OreDictionary.getOres("blockSilver").isEmpty()) { + CompressorManager.addOreRecipe(new ItemStack(LudicrousItems.singularity, 1, 8), 7296, "blockSilver"); + catalyst.getInput().add(new ItemStack(LudicrousItems.singularity, 1, 8)); + } + if (Config.nickel && !OreDictionary.getOres("blockNickel").isEmpty()) { + CompressorManager.addOreRecipe(new ItemStack(LudicrousItems.singularity, 1, 9), 3648, "blockNickel"); + catalyst.getInput().add(new ItemStack(LudicrousItems.singularity, 1, 9)); + } + if (Config.enderium && !OreDictionary.getOres("blockEnderium").isEmpty()) { + CompressorManager.addOreRecipe(new ItemStack(LudicrousItems.singularity, 1, 10), 608, "blockEnderium"); + catalyst.getInput().add(new ItemStack(LudicrousItems.singularity, 1, 10)); + } + if (Config.steel && !OreDictionary.getOres("blockSteel").isEmpty()) { + catalyst.getInput().add(OreDictionary.getOres("blockSteel")); + } + if (Config.metallurgy && !OreDictionary.getOres("ingotTartarite").isEmpty()) { + catalyst.getInput().add(OreDictionary.getOres("ingotTartarite")); + } + if (Config.numanuma && !OreDictionary.getOres("blockIronCompressed").isEmpty()) { + catalyst.getInput().add(OreDictionary.getOres("blockIronCompressed")); + } + if (Config.darksteel && !OreDictionary.getOres("blockDarkSteel").isEmpty()) { + catalyst.getInput().add(OreDictionary.getOres("blockDarkSteel")); + } if (Config.endStone) ExtremeCraftingManager.getInstance().addExtremeShapedOreRecipe( new ItemStack(LudicrousItems.endest_pearl),