From 7bfd1425df34c4ceba1d62a6a947b993beb699bc Mon Sep 17 00:00:00 2001 From: Lucas Niewohner Date: Sun, 29 Dec 2024 14:34:19 -0600 Subject: [PATCH] Attempting (unsuccessfully) to update to GTNH2.7.1 mod versions --- dependencies.gradle | 18 +++++++++--------- gradlew | 2 +- .../nerd/dumpers/GTDefaultRecipeDumper.java | 10 +++++----- .../stack_serialization/RecipeDumpContext.java | 11 +++-------- 4 files changed, 18 insertions(+), 23 deletions(-) diff --git a/dependencies.gradle b/dependencies.gradle index ab6fed4..0d0b54c 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -34,15 +34,15 @@ * For more details, see https://docs.gradle.org/8.0.1/userguide/java_library_plugin.html#sec:java_library_configurations_graph */ dependencies { - api('com.github.GTNewHorizons:CodeChickenLib:1.2.0:dev') - api('com.github.GTNewHorizons:CodeChickenCore:1.2.0:dev') - api("com.github.GTNewHorizons:NotEnoughItems:2.5.3-GTNH:dev") - api('com.github.GTNewHorizons:GT5-Unofficial:5.09.44.110:dev') + api('com.github.GTNewHorizons:CodeChickenCore:1.3.10:dev') +// api('com.github.CoFH:cofhcore:3.1.4-329:dev') + api("com.github.GTNewHorizons:NotEnoughItems:2.6.52-GTNH:dev") + api('com.github.GTNewHorizons:Hodgepodge:2.5.86:dev') + api('com.github.GTNewHorizons:GT5-Unofficial:5.09.50.111:dev') // Random Extra deps for testing with more items - api('com.github.GTNewHorizons:GTplusplus:1.10.54:dev') - api('com.github.GTNewHorizons:GTNHLib:0.0.13:dev') - api('com.github.GTNewHorizons:TinkersConstruct:1.10.13-GTNH:dev') - api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-292-GTNH:dev') - +// api('com.github.GTNewHorizons:GTNHLib:0.5.23:dev') +// api('com.github.GTNewHorizons:TinkersConstruct:1.12.16-GTNH:dev') +// api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-482-GTNH:dev') +// } diff --git a/gradlew b/gradlew index 1aa94a4..d80a4ef 100644 --- a/gradlew +++ b/gradlew @@ -11,7 +11,7 @@ # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or `implied. # See the License for the specific language governing permissions and # limitations under the License. # diff --git a/src/main/java/com/hermanoid/nerd/dumpers/GTDefaultRecipeDumper.java b/src/main/java/com/hermanoid/nerd/dumpers/GTDefaultRecipeDumper.java index 637898e..f3990c8 100644 --- a/src/main/java/com/hermanoid/nerd/dumpers/GTDefaultRecipeDumper.java +++ b/src/main/java/com/hermanoid/nerd/dumpers/GTDefaultRecipeDumper.java @@ -11,8 +11,8 @@ import codechicken.nei.recipe.ICraftingHandler; import gregtech.api.enums.Materials; -import gregtech.api.util.GT_Recipe; -import gregtech.nei.GT_NEI_DefaultHandler; +import gregtech.api.util.GTRecipe; +import gregtech.nei.GTNEIDefaultHandler; public class GTDefaultRecipeDumper extends BaseRecipeDumper { @@ -23,7 +23,7 @@ public class GTDefaultRecipeDumper extends BaseRecipeDumper { "owners" ); - private static final List badTypes = ImmutableList.of(GT_NEI_DefaultHandler.class, Materials.class); + private static final List badTypes = ImmutableList.of(GTNEIDefaultHandler.class, Materials.class); private Gson gson; @Override @@ -35,8 +35,8 @@ public void setContext(RecipeDumpContext context) { @Override public JsonElement dump(ICraftingHandler handler, int recipeIndex) { - GT_NEI_DefaultHandler gthandler = (GT_NEI_DefaultHandler) handler; - GT_Recipe recipe = ((GT_NEI_DefaultHandler.CachedDefaultRecipe) gthandler.arecipes.get(recipeIndex)).mRecipe; + GTNEIDefaultHandler gthandler = (GTNEIDefaultHandler) handler; + GTRecipe recipe = ((GTNEIDefaultHandler.CachedDefaultRecipe) gthandler.arecipes.get(recipeIndex)).mRecipe; try { return gson.toJsonTree(recipe); } catch (Exception e) { diff --git a/src/main/java/com/hermanoid/nerd/stack_serialization/RecipeDumpContext.java b/src/main/java/com/hermanoid/nerd/stack_serialization/RecipeDumpContext.java index 140f8cc..988d9a0 100644 --- a/src/main/java/com/hermanoid/nerd/stack_serialization/RecipeDumpContext.java +++ b/src/main/java/com/hermanoid/nerd/stack_serialization/RecipeDumpContext.java @@ -1,12 +1,7 @@ package com.hermanoid.nerd.stack_serialization; import java.lang.reflect.Type; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; +import java.util.*; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -25,7 +20,7 @@ import codechicken.nei.util.NBTJson; import gregtech.api.enums.Materials; -import gregtech.common.fluid.GT_Fluid; +import gregtech.common.fluid.GTFluid; public class RecipeDumpContext { @@ -87,7 +82,7 @@ public JsonObject fluidToDetailedJson(Fluid src) { // but for non-GT_Fluids, we'll have to specify it to un-anonymize this beeswax. JsonObject fluid; if (src.getClass() - .equals(GT_Fluid.class)) { + .equals(GTFluid.class)) { fluid = (JsonObject) gson.toJsonTree(src); } else { fluid = (JsonObject) gson.toJsonTree(src, fluidType);