mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-17 19:15:24 +00:00
Remove genetics-main dependency from extrabees and extratrees
This commit is contained in:
1 parent
7d88eb7ebb
commit
9fe388beee
105 files changed
+759
-511
No files matched your search
@@ -1,39 +1,14 @@
|
||||
package binnie.genetics.api;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
||||
import binnie.genetics.api.acclimatiser.IAcclimatiserManager;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import binnie.genetics.api.analyst.IAnalystManager;
|
||||
|
||||
public class GeneticsApi {
|
||||
private static Collection<IAnalystPagePlugin> analystPagePlugins = new ArrayList<>();
|
||||
private static Collection<IProducePlugin> producePlugins = new ArrayList<>();
|
||||
|
||||
@Nullable
|
||||
public static IAcclimatiserManager acclimatiserManager;
|
||||
|
||||
public static void registerAnalystPagePlugin(IAnalystPagePlugin<?> analystPageFactory) {
|
||||
analystPagePlugins.add(analystPageFactory);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static <T extends IIndividual> IAnalystPagePlugin<T> getAnalystPagePlugin(T individual) {
|
||||
for (IAnalystPagePlugin plugin : analystPagePlugins) {
|
||||
if (plugin.handles(individual)) {
|
||||
//noinspection unchecked
|
||||
return plugin;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void registerProducePlugin(IProducePlugin producePlugin) {
|
||||
producePlugins.add(producePlugin);
|
||||
}
|
||||
|
||||
public static Collection<IProducePlugin> getProducePlugins() {
|
||||
return Collections.unmodifiableCollection(producePlugins);
|
||||
}
|
||||
public static IAnalystManager analystManager;
|
||||
}
|
||||
Reference in new issue
Block a user