From 279f422d375c32f11179c515e6a4a343ba1716b9 Mon Sep 17 00:00:00 2001 From: HoleFish <1594248739@qq.com> Date: Tue, 23 Jan 2024 15:10:48 +0800 Subject: [PATCH 1/3] Calculate multiplier in a new way Former-commit-id: 248075afe831a1e100aa53933275284094f21d03 --- .../multis/GT_TileEntity_BioVat.java | 27 ++++++++----------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_BioVat.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_BioVat.java index fd1fb049c..9778d5b63 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_BioVat.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_BioVat.java @@ -80,6 +80,7 @@ import gregtech.api.recipe.check.CheckRecipeResultRegistry; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; +import gregtech.api.util.GT_ParallelHelper; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; @@ -258,26 +259,20 @@ protected CheckRecipeResult validateRecipe(@NotNull GT_Recipe recipe) { @NotNull @Override - public CheckRecipeResult process() { - CheckRecipeResult result = super.process(); - if (!result.wasSuccessful()) { - return result; - } - // We already made sure the recipe runs. Now the vat looks for as many "parallels" as it can do - GT_TileEntity_BioVat.this.mExpectedMultiplier = GT_TileEntity_BioVat.this - .getExpectedMultiplier(this.lastRecipe.getFluidOutput(0), true); - GT_TileEntity_BioVat.this.mTimes = 1; - for (int i = 1; i < GT_TileEntity_BioVat.this.mExpectedMultiplier; i++) { - if (GT_TileEntity_BioVat.this.depleteInput(this.lastRecipe.mFluidInputs[0])) { - GT_TileEntity_BioVat.this.mTimes++; - } - } - this.outputFluids[0].amount *= GT_TileEntity_BioVat.this.mTimes; - return result; + protected GT_ParallelHelper createParallelHelper(@NotNull GT_Recipe recipe) { + return super.createParallelHelper(recipeWithMultiplier(recipe)); } }; } + protected GT_Recipe recipeWithMultiplier(GT_Recipe recipe) { + GT_Recipe tRecipe = recipe.copy(); + int multiplier = getExpectedMultiplier(recipe.getFluidOutput(0), true); + tRecipe.mFluidInputs[0].amount *= multiplier; + tRecipe.mFluidOutputs[0].amount *= multiplier; + return tRecipe; + } + @Override protected void setupProcessingLogic(ProcessingLogic logic) { super.setupProcessingLogic(logic); From 7d809c1ff7ec9a2e0d13078f9e8b6436e8427abb Mon Sep 17 00:00:00 2001 From: Martin Robertz Date: Tue, 23 Jan 2024 19:45:17 +0100 Subject: [PATCH 2/3] update bs+deps Former-commit-id: b4d5895ace6a104aa1acb800446cedb453eaac92 --- build.gradle | 27 +++++++++++++++++++++++---- dependencies.gradle | 8 ++++---- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/build.gradle b/build.gradle index 3eb19a269..6274cb255 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -//version: 1704751096 +//version: 1705357285 /* DO NOT CHANGE THIS FILE! Also, you may replace this file at any time if there is an update available. @@ -122,6 +122,7 @@ propertyDefaultIfUnset("modrinthProjectId", "") propertyDefaultIfUnset("modrinthRelations", "") propertyDefaultIfUnset("curseForgeProjectId", "") propertyDefaultIfUnset("curseForgeRelations", "") +propertyDefaultIfUnset("versionPattern", "") propertyDefaultIfUnset("minimizeShadowedDependencies", true) propertyDefaultIfUnset("relocateShadowedDependencies", true) // Deprecated properties (kept for backwards compat) @@ -370,6 +371,7 @@ catch (Exception ignored) { // Pulls version first from the VERSION env and then git tag String identifiedVersion String versionOverride = System.getenv("VERSION") ?: null +boolean checkVersion = false try { // Produce a version based on the tag, or for branches something like 0.2.2-configurable-maven-and-extras.38+43090270b6-dirty if (versionOverride == null) { @@ -388,6 +390,8 @@ try { } } else if (isDirty) { identifiedVersion += "-${branchName}+${gitDetails.gitHash}-dirty" + } else { + checkVersion = true } } else { identifiedVersion = versionOverride @@ -409,6 +413,8 @@ ext { if (identifiedVersion == versionOverride) { out.style(Style.Failure).text('Override version to ').style(Style.Identifier).text(modVersion).style(Style.Failure).println('!\7') +} else if (checkVersion && versionPattern && !(identifiedVersion ==~ versionPattern)) { + throw new GradleException("Invalid version: '$identifiedVersion' does not match version pattern '$versionPattern'") } group = "com.github.GTNewHorizons" @@ -428,18 +434,31 @@ minecraft { for (f in replaceGradleTokenInFile.split(',')) { tagReplacementFiles.add f } + out.style(Style.Info).text('replaceGradleTokenInFile is deprecated! Consider using generateGradleTokenClass.').println() } if (gradleTokenModId) { - injectedTags.put gradleTokenModId, modId + if (replaceGradleTokenInFile) { + injectedTags.put gradleTokenModId, modId + } else { + out.style(Style.Failure).text('gradleTokenModId is deprecated! The field will no longer be generated.').println() + } } if (gradleTokenModName) { - injectedTags.put gradleTokenModName, modName + if (replaceGradleTokenInFile) { + injectedTags.put gradleTokenModName, modName + } else { + out.style(Style.Failure).text('gradleTokenModName is deprecated! The field will no longer be generated.').println() + } } if (gradleTokenVersion) { injectedTags.put gradleTokenVersion, modVersion } if (gradleTokenGroupName) { - injectedTags.put gradleTokenGroupName, modGroup + if (replaceGradleTokenInFile) { + injectedTags.put gradleTokenGroupName, modGroup + } else { + out.style(Style.Failure).text('gradleTokenGroupName is deprecated! The field will no longer be generated.').println() + } } if (enableGenericInjection.toBoolean()) { injectMissingGenerics.set(true) diff --git a/dependencies.gradle b/dependencies.gradle index e8ddbcb9d..ab02a0615 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -1,13 +1,13 @@ // Add your dependencies here dependencies { - api('com.github.GTNewHorizons:GT5-Unofficial:5.09.45.25:dev') - api("com.github.GTNewHorizons:TecTech:5.3.23:dev") + api('com.github.GTNewHorizons:GT5-Unofficial:5.09.45.45:dev') + api("com.github.GTNewHorizons:TecTech:5.3.28:dev") api("com.github.GTNewHorizons:GalacticGregGT5:1.1.0:dev") { exclude group:"com.github.GTNewHorizons", module:"bartworks" } - api("com.github.GTNewHorizons:Avaritia:1.48:dev") - implementation("com.github.GTNewHorizons:TinkersConstruct:1.11.5-GTNH:dev") + api("com.github.GTNewHorizons:Avaritia:1.49:dev") + implementation("com.github.GTNewHorizons:TinkersConstruct:1.11.9-GTNH:dev") compileOnly("TGregworks:TGregworks:1.7.10-GTNH-1.0.24:deobf") {transitive = false} compileOnly("com.github.GTNewHorizons:OpenComputers:1.10.6-GTNH:api") {transitive = false} From 2bbabf778e0592e6673dca9caf159616a6cb664c Mon Sep 17 00:00:00 2001 From: Martin Robertz Date: Sat, 3 Feb 2024 16:48:54 +0100 Subject: [PATCH 3/3] update bs+deps Former-commit-id: 1b8f6ad6a2fd967a63728b4e8869a3676d1fa9aa --- build.gradle | 4 ++-- dependencies.gradle | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 6274cb255..a4236b539 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -//version: 1705357285 +//version: 1706545953 /* DO NOT CHANGE THIS FILE! Also, you may replace this file at any time if there is an update available. @@ -651,7 +651,7 @@ repositories { def mixinProviderGroup = "io.github.legacymoddingmc" def mixinProviderModule = "unimixins" -def mixinProviderVersion = "0.1.13" +def mixinProviderVersion = "0.1.15" def mixinProviderSpecNoClassifer = "${mixinProviderGroup}:${mixinProviderModule}:${mixinProviderVersion}" def mixinProviderSpec = "${mixinProviderSpecNoClassifer}:dev" ext.mixinProviderSpec = mixinProviderSpec diff --git a/dependencies.gradle b/dependencies.gradle index ab02a0615..840c1661f 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -1,13 +1,13 @@ // Add your dependencies here dependencies { - api('com.github.GTNewHorizons:GT5-Unofficial:5.09.45.45:dev') - api("com.github.GTNewHorizons:TecTech:5.3.28:dev") + api('com.github.GTNewHorizons:GT5-Unofficial:5.09.45.58:dev') + api("com.github.GTNewHorizons:TecTech:5.3.30:dev") api("com.github.GTNewHorizons:GalacticGregGT5:1.1.0:dev") { exclude group:"com.github.GTNewHorizons", module:"bartworks" } api("com.github.GTNewHorizons:Avaritia:1.49:dev") - implementation("com.github.GTNewHorizons:TinkersConstruct:1.11.9-GTNH:dev") + implementation("com.github.GTNewHorizons:TinkersConstruct:1.11.11-GTNH:dev") compileOnly("TGregworks:TGregworks:1.7.10-GTNH-1.0.24:deobf") {transitive = false} compileOnly("com.github.GTNewHorizons:OpenComputers:1.10.6-GTNH:api") {transitive = false}