diff --git a/dependencies.gradle b/dependencies.gradle index cb96339..7681e4c 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -34,11 +34,11 @@ * 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:GT5-Unofficial:5.09.51.126:dev'){ transitive = false } + api('com.github.GTNewHorizons:GT5-Unofficial:5.09.51.153:dev') api("com.github.GTNewHorizons:StructureLib:1.4.0:dev") api("net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev") - api("com.github.GTNewHorizons:NotEnoughItems:2.6.51-GTNH:dev") + api("com.github.GTNewHorizons:NotEnoughItems:2.7.29-GTNH:dev") api("com.github.GTNewHorizons:NotEnoughIds:2.1.6:dev") api("com.github.GTNewHorizons:GTNHLib:0.5.22:dev") api("com.github.GTNewHorizons:ModularUI:1.2.17:dev") @@ -63,7 +63,7 @@ dependencies { api("com.github.GTNewHorizons:Avaritia:1.56:dev") api('com.github.GTNewHorizons:Angelica:1.0.0-beta26:api') { transitive = false } - api("com.github.GTNewHorizons:AppleCore:3.3.4:dev") { transitive = false } + //api("com.github.GTNewHorizons:AppleCore:3.3.4:dev") { transitive = false } api("com.github.GTNewHorizons:BuildCraft:7.1.39:dev") { transitive = false } api("com.github.GTNewHorizons:EnderIO:2.8.22:dev") { transitive = true } api("com.github.GTNewHorizons:ForestryMC:4.9.19:dev") { transitive = false } diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatchSlaveHatch.java b/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatchSlaveHatch.java index 27d3279..1e5266d 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatchSlaveHatch.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatchSlaveHatch.java @@ -53,13 +53,23 @@ public class DualInputHatchSlaveHatch allc= ProghatchesUtil.allCircuits(); + + + +reg(0,allc ); ItemList[][] all = new ItemList[][] { { Shape_Mold_Bottle, Shape_Mold_Plate, Shape_Mold_Ingot, Shape_Mold_Casing, Shape_Mold_Gear, Shape_Mold_Gear_Small, Shape_Mold_Credit, Shape_Mold_Nugget, Shape_Mold_Block, Shape_Mold_Ball, Shape_Mold_Bun, Shape_Mold_Bread, Shape_Mold_Baguette, diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/RemoteInputHatch.java b/src/main/java/reobf/proghatches/gt/metatileentity/RemoteInputHatch.java index 7a7d137..575c978 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/RemoteInputHatch.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/RemoteInputHatch.java @@ -207,13 +207,23 @@ private boolean checkBlackList(Optional opt) {// World } public RemoteInputHatch(int id, String name, String nameRegional, int tier) { - super(id, 0, name, nameRegional, tier, reobf.proghatches.main.Config.get("RIH", ImmutableMap.of()) + super(id, 0, name, nameRegional, tier ); Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, id)); } - + String[] desc; +@Override +public String[] getDescription() { + + if(desc==null){ + reobf.proghatches.main.Config.get("RIH", ImmutableMap.of()); + + } + + return desc; +} @SuppressWarnings("unchecked") @Override public void addUIWidgets(Builder builder, UIBuildContext buildContext) { diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/WaterProvider.java b/src/main/java/reobf/proghatches/gt/metatileentity/WaterProvider.java index cf2be84..092b6c2 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/WaterProvider.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/WaterProvider.java @@ -65,7 +65,7 @@ import gregtech.api.metatileentity.implementations.MTEHatch; import gregtech.api.render.TextureFactory; import gregtech.api.util.GTUtility; -import gtPlusPlus.core.util.data.ArrayUtils; + import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import mcp.mobius.waila.api.IWailaConfigHandler; import mcp.mobius.waila.api.IWailaDataAccessor; diff --git a/src/main/java/reobf/proghatches/main/registration/PHRecipes.java b/src/main/java/reobf/proghatches/main/registration/PHRecipes.java index 722fa46..7a5ad9f 100644 --- a/src/main/java/reobf/proghatches/main/registration/PHRecipes.java +++ b/src/main/java/reobf/proghatches/main/registration/PHRecipes.java @@ -52,6 +52,7 @@ import reobf.proghatches.item.ItemProgrammingCircuit; import reobf.proghatches.main.Config; import reobf.proghatches.main.MyMod; +import reobf.proghatches.util.ProghatchesUtil; import tconstruct.smeltery.TinkerSmeltery; import tectech.recipe.TTRecipeAdder; import thaumcraft.common.config.ConfigItems; @@ -389,7 +390,7 @@ public void run() { }); pc0.forEach(s -> { - GregTechAPI.getConfigurationCircuitList(100) + ProghatchesUtil.allCircuits() .stream() .forEach(ss -> { GTValues.RA.stdBuilder() diff --git a/src/main/java/reobf/proghatches/main/registration/ProgHatchCreativeTab.java b/src/main/java/reobf/proghatches/main/registration/ProgHatchCreativeTab.java index da82eac..7fdf05a 100644 --- a/src/main/java/reobf/proghatches/main/registration/ProgHatchCreativeTab.java +++ b/src/main/java/reobf/proghatches/main/registration/ProgHatchCreativeTab.java @@ -12,6 +12,7 @@ import gregtech.api.util.GTUtility; import reobf.proghatches.item.ItemProgrammingCircuit; import reobf.proghatches.main.MyMod; +import reobf.proghatches.util.ProghatchesUtil; import thaumcraft.common.config.ConfigItems; public class ProgHatchCreativeTab extends CreativeTabs { @@ -32,7 +33,7 @@ public void displayAllReleventItems(List p_78018_1_) { p_78018_1_.addAll(Registration.items); p_78018_1_.add(ItemProgrammingCircuit.wrap(null)); - GregTechAPI.getConfigurationCircuitList(100) + ProghatchesUtil.allCircuits() .stream() .map(ItemProgrammingCircuit::wrap) .forEach(p_78018_1_::add); diff --git a/src/main/java/reobf/proghatches/util/ProghatchesUtil.java b/src/main/java/reobf/proghatches/util/ProghatchesUtil.java index 08c3382..42ef370 100644 --- a/src/main/java/reobf/proghatches/util/ProghatchesUtil.java +++ b/src/main/java/reobf/proghatches/util/ProghatchesUtil.java @@ -3,7 +3,9 @@ import static gregtech.api.util.GTUtility.*; import java.io.IOException; +import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; +import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Optional; @@ -339,4 +341,23 @@ public static void handleUse(EntityPlayer player, TileEntity tile, IPriorityHost } + static List allc=new ArrayList<>(); + public static List allCircuits(){ + + if(allc==null){ + try { + allc=(List) GTUtility.class.getDeclaredMethod("getAllIntegratedCircuits").invoke(null); + } catch (Exception e) { + //e.printStackTrace(); + } + } else{ + try { + allc=(List) GregTechAPI.class.getDeclaredMethod("getConfigurationCircuitList",int.class).invoke(null,100); + } catch (Exception e) { + //e.printStackTrace(); + } + } + return allc; + + } }