From 15eeb26088656ea4564333bfc385e9882c5cd3d2 Mon Sep 17 00:00:00 2001 From: YoungOnion <39562198+YoungOnionMC@users.noreply.github.com> Date: Sat, 19 Apr 2025 23:09:29 -0600 Subject: [PATCH] update to 1.7.0 --- gradle.properties | 4 +-- .../machine/multiblock/PTERBMachine.java | 7 ++--- .../gtutilities/recipe/UtilRecipes.java | 26 +++++++++---------- .../gtutilities/saveddata/PTERBSavedData.java | 4 +-- .../gtutilities/utils/EnergyUtils.java | 2 +- 5 files changed, 22 insertions(+), 21 deletions(-) diff --git a/gradle.properties b/gradle.properties index aa80253..6d71f93 100644 --- a/gradle.properties +++ b/gradle.properties @@ -22,8 +22,8 @@ org.gradle.jvmargs=-Xmx1G # Dependencies architectury_version=9.2.14 - gtceu_version=1.6.4 - ldlib_version=1.0.34 + gtceu_version=1.7.0-SNAPSHOT + ldlib_version=1.0.39 registrate_version=MC1.20-1.3.11 rhino_version=2001.2.3-build.6 kubejs_version=2001.6.5-build.14 diff --git a/src/main/java/net/neganote/gtutilities/common/machine/multiblock/PTERBMachine.java b/src/main/java/net/neganote/gtutilities/common/machine/multiblock/PTERBMachine.java index af49bab..dcae5f1 100644 --- a/src/main/java/net/neganote/gtutilities/common/machine/multiblock/PTERBMachine.java +++ b/src/main/java/net/neganote/gtutilities/common/machine/multiblock/PTERBMachine.java @@ -109,7 +109,7 @@ public void convertEnergyTick() { FluidStack coolant = coolantHatch.tank.getFluidInTank(0); if (coolant.getFluid() == UtilMaterials.QuantumCoolant.getFluid() && coolant.getAmount() >= coolantDrain) { coolantHatch.tank.handleRecipe(IO.IN, null, - List.of(FluidIngredient.of(coolantDrain, UtilMaterials.QuantumCoolant.getFluid())), null, + List.of(FluidIngredient.of(coolantDrain, UtilMaterials.QuantumCoolant.getFluid())), false); } else { if (!ConfigHolder.INSTANCE.machines.harmlessActiveTransformers) { @@ -196,14 +196,15 @@ public void onStructureFormed() { var handlerIO = handler.getHandlerIO(); // If IO not compatible if (io != IO.BOTH && handlerIO != IO.BOTH && io != handlerIO) continue; - if (handler.getCapability() == EURecipeCapability.CAP && + if (handler.hasCapability(EURecipeCapability.CAP) && handler instanceof IEnergyContainer) { if (handlerIO == IO.IN) { localPowerInput.add(part); } else if (handlerIO == IO.OUT) { localPowerOutput.add(part); } - traitSubscriptions.add(handler.addChangedListener(converterSubscription::updateSubscription)); + handler.subscribe(converterSubscription::updateSubscription); + // traitSubscriptions.add(handler.addChangedListener(converterSubscription::updateSubscription)); } } } diff --git a/src/main/java/net/neganote/gtutilities/recipe/UtilRecipes.java b/src/main/java/net/neganote/gtutilities/recipe/UtilRecipes.java index 851ad68..06ec2de 100644 --- a/src/main/java/net/neganote/gtutilities/recipe/UtilRecipes.java +++ b/src/main/java/net/neganote/gtutilities/recipe/UtilRecipes.java @@ -18,7 +18,7 @@ import static com.gregtechceu.gtceu.common.data.GTBlocks.LASER_PIPES; import static com.gregtechceu.gtceu.common.data.GTRecipeTypes.ASSEMBLER_RECIPES; import static com.gregtechceu.gtceu.common.data.GTRecipeTypes.ASSEMBLY_LINE_RECIPES; -import static com.gregtechceu.gtceu.data.recipe.CraftingComponent.*; +import static com.gregtechceu.gtceu.data.recipe.GTCraftingComponents.*; import static net.neganote.gtutilities.common.item.UtilItems.OMNIBREAKER; import static net.neganote.gtutilities.common.machine.UtilMachines.ENERGY_CONVERTER_64A; @@ -38,12 +38,12 @@ public static void init(Consumer provider) { ASSEMBLY_LINE_RECIPES.recipeBuilder("pterb") .inputItems(GTMultiMachines.ACTIVE_TRANSFORMER) .inputItems(TagPrefix.plate, GTMaterials.Neutronium, 32) - .inputItems(SENSOR.getIngredient(GTValues.UV), 8) - .inputItems(EMITTER.getIngredient(GTValues.UV), 8) - .inputItems(FIELD_GENERATOR.getIngredient(GTValues.UV), 4) + .inputItems(SENSOR.get(GTValues.UV), 8) + .inputItems(EMITTER.get(GTValues.UV), 8) + .inputItems(FIELD_GENERATOR.get(GTValues.UV), 4) .inputItems(CustomTags.UHV_CIRCUITS, 2) .inputItems(TagPrefix.pipeLargeFluid, GTMaterials.Neutronium, 4) - .inputItems(CABLE_QUAD.getIngredient(GTValues.UV), 8) + .inputItems(CABLE_QUAD.get(GTValues.UV), 8) .inputItems(LASER_PIPES[0], 8) .inputFluids(GTMaterials.SolderingAlloy.getFluid(GTValues.L * 32)) .EUt(1_600_000L) @@ -58,10 +58,10 @@ public static void init(Consumer provider) { public static void register64AConverterRecipes(Consumer provider) { for (int tier : GTValues.tiersBetween(GTValues.ULV, GTValues.MAX)) { ASSEMBLER_RECIPES.recipeBuilder("converter_64a_" + GTValues.VN[tier]) - .inputItems(HULL.getIngredient(tier)) - .inputItems(CIRCUIT.getIngredient(tier)) - .inputItems(CABLE_HEX.getIngredient(0), 4) - .inputItems(CABLE_HEX.getIngredient(tier), 16) + .inputItems(HULL.get(tier)) + .inputItems(CIRCUIT.get(tier)) + .inputItems(CABLE_HEX.get(0), 4) + .inputItems(CABLE_HEX.get(tier), 16) .outputItems(ENERGY_CONVERTER_64A[tier]) .EUt(GTValues.VEX[tier]).duration(40) .save(provider); @@ -83,10 +83,10 @@ private static ItemStack getPowerUnit(int tier) { public static void registerOmnitoolRecipe(Consumer provider) { ASSEMBLER_RECIPES.recipeBuilder("omnibreaker") .inputItems(getPowerUnit(UtilConfig.INSTANCE.features.omnibreakerTier)) - .inputItems(CIRCUIT.getIngredient(UtilConfig.INSTANCE.features.omnibreakerTier), 2) - .inputItems(EMITTER.getIngredient(UtilConfig.INSTANCE.features.omnibreakerTier), 1) - .inputItems(CABLE_QUAD.getIngredient(UtilConfig.INSTANCE.features.omnibreakerTier), 3) - .inputItems(MOTOR.getIngredient(UtilConfig.INSTANCE.features.omnibreakerTier), 2) + .inputItems(CIRCUIT.get(UtilConfig.INSTANCE.features.omnibreakerTier), 2) + .inputItems(EMITTER.get(UtilConfig.INSTANCE.features.omnibreakerTier), 1) + .inputItems(CABLE_QUAD.get(UtilConfig.INSTANCE.features.omnibreakerTier), 3) + .inputItems(MOTOR.get(UtilConfig.INSTANCE.features.omnibreakerTier), 2) .outputItems(OMNIBREAKER) .EUt(GTValues.VEX[UtilConfig.INSTANCE.features.omnibreakerTier]).duration(20 * 60) .save(provider); diff --git a/src/main/java/net/neganote/gtutilities/saveddata/PTERBSavedData.java b/src/main/java/net/neganote/gtutilities/saveddata/PTERBSavedData.java index d45fb86..b16629c 100644 --- a/src/main/java/net/neganote/gtutilities/saveddata/PTERBSavedData.java +++ b/src/main/java/net/neganote/gtutilities/saveddata/PTERBSavedData.java @@ -250,7 +250,7 @@ public EnergyContainerList getWirelessEnergyInputs(int freq) { if (machine instanceof LaserHatchPartMachine hatch) { // unfortunately the laser hatch's buffer is private, so I have to do this instead for (var handler : hatch.getRecipeHandlers()) { - if (handler.getCapability() == EURecipeCapability.CAP && + if (handler.hasCapability(EURecipeCapability.CAP) && handler instanceof IEnergyContainer container) { energyContainerList.add(container); } @@ -277,7 +277,7 @@ public EnergyContainerList getWirelessEnergyOutputs(int freq) { if (machine instanceof LaserHatchPartMachine hatch) { // unfortunately the laser hatch's buffer is private, so I have to do this instead for (var handler : hatch.getRecipeHandlers()) { - if (handler.getCapability() == EURecipeCapability.CAP && + if (handler.hasCapability(EURecipeCapability.CAP) && handler instanceof IEnergyContainer container) { energyContainerList.add(container); } diff --git a/src/main/java/net/neganote/gtutilities/utils/EnergyUtils.java b/src/main/java/net/neganote/gtutilities/utils/EnergyUtils.java index 2fee269..3169e05 100644 --- a/src/main/java/net/neganote/gtutilities/utils/EnergyUtils.java +++ b/src/main/java/net/neganote/gtutilities/utils/EnergyUtils.java @@ -21,7 +21,7 @@ public static EnergyContainerList getEnergyListFromMultiParts(List p if (part instanceof LaserHatchPartMachine hatch) { // unfortunately the laser hatch's buffer is private, so I have to do this instead for (var handler : hatch.getRecipeHandlers()) { - if (handler.getCapability() == EURecipeCapability.CAP && + if (handler.hasCapability(EURecipeCapability.CAP) && handler instanceof IEnergyContainer container) { energyContainerList.add(container); }