Fix gregtech loader checks, and change Optional hazmat decorators to check if gtnh's gt5 is loaded (#68)

Co-authored-by: __felix__ <134875831+48a3efa65c881ef567345b17f3910e06@users.noreply.github.com>
This commit is contained in:
__felix__and__felix__ authored and GitHub committed 2025-04-24 19:16:11 +02:00
1 parent b7bf08a178
commit 5e504c7c10
3 files changed
+5 -5

No files matched your search

@@ -71,7 +71,7 @@ import thaumcraft.api.nodes.IRevealer;
@Interface(iface = "thaumcraft.api.nodes.IRevealer", modid = "Thaumcraft"),
@Interface(iface = "forestry.api.apiculture.IArmorApiarist", modid = "Forestry"),
@Interface(iface = "forestry.api.core.IArmorNaturalist", modid = "Forestry"),
@Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech") })
@Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech_nh") })
public class DraconicArmor extends ItemArmor implements ISpecialArmor, IConfigurableItem, IInventoryTool, IGoggles,
IVisDiscountGear, IRevealer, IUpgradableItem, ICustomArmor, IArmorNaturalist, IArmorApiarist, IHazardProtector {
@@ -657,7 +657,7 @@ public class DraconicArmor extends ItemArmor implements ISpecialArmor, IConfigur
}
@Override
@Method(modid = "gregtech")
@Method(modid = "gregtech_nh")
public boolean protectsAgainst(ItemStack itemStack, Hazard hazard) {
return IConfigurableItem.ProfileHelper.getBoolean(itemStack, ModHelper.getHazmatArmorConfigKey(hazard), true);
}
@@ -59,7 +59,7 @@ import thaumcraft.api.aspects.Aspect;
@Optional.InterfaceList(
value = { @Optional.Interface(iface = "thaumcraft.api.IVisDiscountGear", modid = "Thaumcraft"),
@Optional.Interface(iface = "thaumcraft.api.IWarpingGear", modid = "Thaumcraft"),
@Optional.Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech") })
@Optional.Interface(iface = "gregtech.api.hazards.IHazardProtector", modid = "gregtech_nh") })
public class WyvernArmor extends ItemArmor implements ISpecialArmor, IConfigurableItem, IInventoryTool, IUpgradableItem,
ICustomArmor, IVisDiscountGear, IWarpingGear, IHazardProtector {
@@ -513,7 +513,7 @@ public class WyvernArmor extends ItemArmor implements ISpecialArmor, IConfigurab
}
@Override
@Optional.Method(modid = "gregtech")
@Optional.Method(modid = "gregtech_nh")
public boolean protectsAgainst(ItemStack itemStack, Hazard hazard) {
return IConfigurableItem.ProfileHelper.getBoolean(itemStack, ModHelper.getHazmatArmorConfigKey(hazard), true);
}
@@ -129,7 +129,7 @@ public class ModHelper {
return isAE2Installed && AE2FItem.isInstance(item);
}
@Optional.Method(modid = "gregtech")
@Optional.Method(modid = "gregtech_nh")
public static String getHazmatArmorConfigKey(Hazard hazard) {
return switch (hazard) {
case ELECTRICAL -> "HazmatElectrical";