diff --git a/dependencies.gradle b/dependencies.gradle index 0d9156b..1e79e12 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -35,12 +35,12 @@ */ dependencies { annotationProcessor(project(":processor")) - implementation('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-262-GTNH:dev') - implementation('com.github.GTNewHorizons:GT5-Unofficial:5.09.44.36:dev') - implementation("net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev") - implementation("com.github.GTNewHorizons:EnderIO:2.5.2:dev") - implementation("com.github.GTNewHorizons:Botania:1.10.1-GTNH:dev") - implementation("com.github.GTNewHorizons:TinkersConstruct:1.10.6-GTNH:dev") - - runtimeOnlyNonPublishable("com.github.GTNewHorizons:GTplusplus:1.10.17:dev") + compileOnly('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-262-GTNH:dev') + compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.44.36:dev') + compileOnly("com.github.GTNewHorizons:EnderIO:2.5.2:dev") + compileOnly("net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev") + compileOnly("com.github.GTNewHorizons:Botania:1.10.1-GTNH:dev") + compileOnly("com.github.GTNewHorizons:TinkersConstruct:1.10.6-GTNH:dev") + compileOnly("com.github.GTNewHorizons:TinkersMechworks:0.2.17:dev") + compileOnly("com.github.GTNewHorizons:GTplusplus:1.10.17:dev") } diff --git a/src/main/java/com/caedis/duradisplay/DuraDisplay.java b/src/main/java/com/caedis/duradisplay/DuraDisplay.java index 8f93039..66c913b 100644 --- a/src/main/java/com/caedis/duradisplay/DuraDisplay.java +++ b/src/main/java/com/caedis/duradisplay/DuraDisplay.java @@ -19,7 +19,7 @@ acceptedMinecraftVersions = "[1.7.10]", guiFactory = "com.caedis.duradisplay.config.GuiFactory", acceptableRemoteVersions = "*", - dependencies = "required-after:gregtech@[5.09.43.63,);" + " required-after:EnderIO@[2.4.18,);") + dependencies = "after:gregtech@[5.09.43.63,);" + " after:EnderIO@[2.4.18,);") public class DuraDisplay { public static final Logger LOG = LogManager.getLogger(Tags.MODID); diff --git a/src/main/java/com/caedis/duradisplay/overlay/OverlayGadgets.java b/src/main/java/com/caedis/duradisplay/overlay/OverlayGadgets.java index 9238c09..3b014a4 100644 --- a/src/main/java/com/caedis/duradisplay/overlay/OverlayGadgets.java +++ b/src/main/java/com/caedis/duradisplay/overlay/OverlayGadgets.java @@ -51,6 +51,7 @@ Gadgets are items that show UseCount(remain) as default }); addHandler("gregtech.api.items.GT_MetaBase_Item", OverlayGadgets::handleGregtech); addHandler("buildcraft.core.ItemPaintbrush", OverlayGadgets::handleBCBrush); + addHandler("tmechworks.items.SpoolOfWire", OverlayGadgets::handleMechworks); addHandler("ic2.core.item.tool.ItemToolPainter", OverlayDurability::handleDefault); addHandler("WayofTime.alchemicalWizardry.common.items.ScribeTool", OverlayDurability::handleDefault); addHandler("thaumcraft.api.IScribeTools", OverlayDurability::handleDefault); @@ -74,6 +75,15 @@ ConfigDurabilityLike config() { return config; } + private static DurabilityLikeInfo handleMechworks(@NotNull ItemStack stack) { + Item item = stack.getItem(); + assert item != null; + + double max = item.getMaxDamage(); + double current = max - item.getDamage(stack); + return new DurabilityLikeInfo(current, max); + } + @Nullable public static DurabilityLikeInfo handleBCBrush(@NotNull ItemStack stack) { Item item = stack.getItem();