From 7b1eb7d25c723b1658896c739d60af81f52746b6 Mon Sep 17 00:00:00 2001 From: miozune Date: Thu, 11 May 2023 13:46:12 +0900 Subject: Add cell item for some fluids (#1974) --- build.gradle | 19 ++++++++++++++++--- .../common/items/GT_MetaGenerated_Item_98.java | 15 ++++++++++----- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/build.gradle b/build.gradle index 78ed8d44f0..3fa171e0dd 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -//version: 1683563728 +//version: 1683705740 /* DO NOT CHANGE THIS FILE! Also, you may replace this file at any time if there is an update available. @@ -69,7 +69,7 @@ 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.7' + id 'com.gtnewhorizons.retrofuturagradle' version '1.3.11' } print("You might want to check out './gradlew :faq' if your build fails.\n") @@ -569,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()) { @@ -822,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") diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_98.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_98.java index 32f1d41197..0bf4377668 100644 --- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_98.java +++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_98.java @@ -48,11 +48,16 @@ public class GT_MetaGenerated_Item_98 extends GT_MetaGenerated_Item { * leave a comment mentioning the old ID, so that we don't re-use it for a new fluid. */ public enum FluidCell { - // Next unused ID: 22 + // Next unused ID: 27 // GregTech DRILLING_FLUID(5, "liquid_drillingfluid", CellType.REGULAR), SQUID_INK(6, "squidink", CellType.SMALL), + BLUE_VITRIOL(22, "solution.bluevitriol", CellType.REGULAR), + NICKEL_SULFATE(23, "solution.nickelsulfate", CellType.REGULAR), + GREEN_VITRIOL(24, "solution.greenvitriol", CellType.REGULAR), + INDIUM_CONCENTRATE(25, "indiumconcentrate", CellType.REGULAR), + LEAD_ZINC_SOLUTION(26, "leadzincsolution", CellType.REGULAR), // New Horizons Core Mod UNKNOWN_NUTRIENT_AGAR(7, "unknownnutrientagar", CellType.REGULAR), @@ -119,7 +124,7 @@ public class GT_MetaGenerated_Item_98 extends GT_MetaGenerated_Item { /** * Get a copy of this stack with stack size 1. - * + *

* Always returns non-null stack even if the fluid referenced doesn't exist, so don't assume it's always valid. */ public ItemStack get() { @@ -129,9 +134,9 @@ public class GT_MetaGenerated_Item_98 extends GT_MetaGenerated_Item { /** * Get a copy of this cell WITHOUT copy. - * + *

* Always returns non-null stack even if the fluid referenced doesn't exist, so don't assume it's always valid. - * + *

* Use with caution. */ public ItemStack getNoCopy() { @@ -141,7 +146,7 @@ public class GT_MetaGenerated_Item_98 extends GT_MetaGenerated_Item { /** * Get a copy of this cell with specified stack size. - * + *

* Always returns non-null stack even if the fluid referenced doesn't exist, so don't assume it's always valid. */ public ItemStack get(int aStackSize) { -- cgit