diff --git a/src/main/java/me/ramidzkh/mekae2/integration/emi/ChemicalIngredientConverter.java b/src/main/java/me/ramidzkh/mekae2/integration/emi/ChemicalIngredientConverter.java index 2d22df2..6142f59 100644 --- a/src/main/java/me/ramidzkh/mekae2/integration/emi/ChemicalIngredientConverter.java +++ b/src/main/java/me/ramidzkh/mekae2/integration/emi/ChemicalIngredientConverter.java @@ -14,7 +14,6 @@ public final class ChemicalIngredientConverter implements EmiStackConverter { @Override public Class getKeyType() { - // It doesn't really matter, AE2 only checks that no two converters have the same type. return Chemical.class; } diff --git a/src/main/java/me/ramidzkh/mekae2/integration/jade/AMJadePlugin.java b/src/main/java/me/ramidzkh/mekae2/integration/jade/AMJadePlugin.java index 2fe8a70..e2d7b51 100644 --- a/src/main/java/me/ramidzkh/mekae2/integration/jade/AMJadePlugin.java +++ b/src/main/java/me/ramidzkh/mekae2/integration/jade/AMJadePlugin.java @@ -3,12 +3,12 @@ import net.minecraft.resources.ResourceLocation; import mekanism.api.MekanismAPI; +import snownee.jade.api.BlockAccessor; import snownee.jade.api.IWailaClientRegistration; import snownee.jade.api.IWailaPlugin; import snownee.jade.api.WailaPlugin; -import appeng.helpers.InterfaceLogicHost; -import appeng.helpers.patternprovider.PatternProviderLogicHost; +import appeng.api.AECapabilities; /** * Plugin to remove the mekanism-added chemical handler lines for interfaces and pattern providers. @@ -22,10 +22,13 @@ public class AMJadePlugin implements IWailaPlugin { @Override public void registerClient(IWailaClientRegistration registration) { registration.addTooltipCollectedCallback((box, accessor) -> { - var target = accessor.getTarget(); + if (accessor instanceof BlockAccessor block) { + var cap = AECapabilities.GENERIC_INTERNAL_INV.getCapability(block.getLevel(), block.getPosition(), + block.getBlockState(), block.getBlockEntity(), block.getSide()); - if (target instanceof InterfaceLogicHost || target instanceof PatternProviderLogicHost) { - box.getTooltip().remove(CHEMICAL); + if (cap != null) { + box.getTooltip().remove(CHEMICAL); + } } }); }