Skip to content

Commit

Permalink
Add tinker's mechworks Spool of Wire + remove hard deps (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
Caedis authored Oct 13, 2023
1 parent 9bf7fa5 commit c1514a2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
16 changes: 8 additions & 8 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
2 changes: 1 addition & 1 deletion src/main/java/com/caedis/duradisplay/DuraDisplay.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/com/caedis/duradisplay/overlay/OverlayGadgets.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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();
Expand Down

0 comments on commit c1514a2

Please sign in to comment.