equivalent-exchange-3/src/main/java/com/pahimar/ee3/api/array/AlchemyArrayRegistryProxy.java

43 lines
1 KiB
Java
Raw Normal View History

2015-05-07 19:45:06 +02:00
package com.pahimar.ee3.api.array;
2023-01-03 17:47:36 +01:00
import java.util.SortedSet;
import com.pahimar.ee3.EquivalentExchange3;
import cpw.mods.fml.common.Mod;
2023-01-03 17:47:36 +01:00
public class AlchemyArrayRegistryProxy {
@Mod.Instance("EE3")
private static Object ee3Mod;
2023-01-03 17:47:36 +01:00
public static boolean registerAlchemyArray(AlchemyArray alchemyArray) {
init();
2023-01-03 17:47:36 +01:00
if (ee3Mod != null) {
return EE3Wrapper.ee3mod.getAlchemyArrayRegistry().registerAlchemyArray(
alchemyArray
);
}
return false;
}
2023-01-03 17:47:36 +01:00
public static SortedSet<AlchemyArray> getRegisteredAlchemyArrays() {
init();
2023-01-03 17:47:36 +01:00
if (ee3Mod != null) {
return EE3Wrapper.ee3mod.getAlchemyArrayRegistry().getRegisteredAlchemyArrays(
);
}
return null;
}
2023-01-03 17:47:36 +01:00
private static class EE3Wrapper { private static EquivalentExchange3 ee3mod; }
2023-01-03 17:47:36 +01:00
private static void init() {
if (ee3Mod != null) {
EE3Wrapper.ee3mod = (EquivalentExchange3) ee3Mod;
}
}
}