Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
reobf committed Feb 24, 2025
1 parent 03291cc commit 6ff0f33
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 11 deletions.
6 changes: 3 additions & 3 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,23 @@ public class DualInputHatchSlaveHatch<T extends MetaTileEntity & IDualInputHatch
// masterY, masterZ are valid

public DualInputHatchSlaveHatch(int aID, String aName, String aNameRegional) {
super(aID, 1, aName, aNameRegional, 6, reobf.proghatches.main.Config.get("DHSH", ImmutableMap.of())
super(aID, 1, aName, aNameRegional, 6

);
Registration.items.add(new ItemStack(GregTechAPI.sBlockMachines, 1, aID));

}

String[] desc;
@Override
public String[] getDescription() {

if(desc==null){
desc=reobf.proghatches.main.Config.get("DHSH", ImmutableMap.of());

}

return desc;
}
public DualInputHatchSlaveHatch(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
super(aName, 1, 6, aDescription, aTextures);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

Expand All @@ -28,11 +29,13 @@
import gregtech.api.metatileentity.implementations.MTEHatch;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GTOreDictUnificator;
import gregtech.api.util.GTUtility;
import reobf.proghatches.block.BlockIOHub;
import reobf.proghatches.gt.metatileentity.util.ICircuitProvider;
import reobf.proghatches.item.ItemProgrammingCircuit;
import reobf.proghatches.main.MyMod;
import reobf.proghatches.main.registration.Registration;
import reobf.proghatches.util.ProghatchesUtil;

public class ProgrammingCircuitProviderPrefabricated extends MTEHatch implements ICircuitProvider {

Expand Down Expand Up @@ -122,7 +125,16 @@ static void init() {
if (init == true) return;
init = true;
System.out.println("init!!!!");
reg(0, GregTechAPI.getConfigurationCircuitList(100));





List<ItemStack> 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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,23 @@ private boolean checkBlackList(Optional<TileEntity> 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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -389,7 +390,7 @@ public void run() {

});
pc0.forEach(s -> {
GregTechAPI.getConfigurationCircuitList(100)
ProghatchesUtil.allCircuits()
.stream()
.forEach(ss -> {
GTValues.RA.stdBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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);
Expand Down
21 changes: 21 additions & 0 deletions src/main/java/reobf/proghatches/util/ProghatchesUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -339,4 +341,23 @@ public static void handleUse(EntityPlayer player, TileEntity tile, IPriorityHost

}

static List<ItemStack> allc=new ArrayList<>();
public static List<ItemStack> allCircuits(){

if(allc==null){
try {
allc=(List<ItemStack>) GTUtility.class.getDeclaredMethod("getAllIntegratedCircuits").invoke(null);
} catch (Exception e) {
//e.printStackTrace();
}
} else{
try {
allc=(List<ItemStack>) GregTechAPI.class.getDeclaredMethod("getConfigurationCircuitList",int.class).invoke(null,100);
} catch (Exception e) {
//e.printStackTrace();
}
}
return allc;

}
}

0 comments on commit 6ff0f33

Please sign in to comment.