Update APIs (#130)

* Add an API to allow other mods to blacklist fluids from this mod.

* Removed Thaumic Energistics config setting. This will be handled by
Thaumic Energistic's side (which also happens to have a config setting).

* Added an API that allows for blacklisting fluids from either the storage
or the display individually.

* Prevent blacklisted fluids from being discretized

* Update API usage

- use AE2's new API

- use ThE's config setting for aspect -> gas

* spotlessApply

---------

Co-authored-by: GitHub GTNH Actions <unknown>
This commit is contained in:
firenooandGitHub GTNH Actions authored and GitHub committed 2023-05-20 19:46:37 +02:00
1 parent 14853a2481
commit f87b76347e
19 files changed
+237 -79

No files matched your search

@@ -40,8 +40,6 @@ public final class ModAndClassUtil {
public static boolean isBeSubstitutionsButton;
public static Class<?> essentiaGas;
@SuppressWarnings("all")
public static void init() {
@@ -115,17 +113,10 @@ public final class ModAndClassUtil {
isV2 = false;
}
try {
Field filters = Class.forName("appeng.client.me.ItemRepo").getDeclaredField("filters");
if (filters == null) isTypeFilter = false;
Class<?> filter = Class.forName("appeng.core.features.registries.ItemDisplayRegistry");
isTypeFilter = true;
} catch (ClassNotFoundException | NoSuchFieldException e) {
isTypeFilter = false;
}
try {
essentiaGas = Class.forName("thaumicenergistics.common.fluids.GaseousEssentia");
} catch (ClassNotFoundException e) {
essentiaGas = null;
isTypeFilter = false;
}
if (Loader.isModLoaded("gregtech") && !Loader.isModLoaded("gregapi")) GT5 = true;