Almost Unified

Almost Unified

29M Downloads

Unify anvil repair

Trent2087 opened this issue ยท 4 comments

commented

Describe the feature/addition!

Unify repairIngredients

Why would like to see this feature/addition?

repairIngredient currently is not unified. So while if you unify to Modern industrialization, Tech Reborn and IndRev tools/armors can be crafted with MI ingots, they cannot be repaired with those ingots.

commented

What is repairIngredients? Could you provide more context than just the bare minimum so we actually know what the issue is? Are you talking about the vanilla repairing mechanic with an anvil?

commented

yes the vanilla anvil repairing system
repairIngredient is part of toolTier and armorTier. An iron pickaxe can be repaired by an iron ingot. but when mods make their own tiers, for like bronze, they specify their own ingot.
BRONZE(2, 500, 3.5f, 2.5f, 12, { Ingredient.ofItems(IRItemRegistry.BRONZE_INGOT()) }),
https://github.com/GabrielOlvH/Industrial-Revolution/blob/012a1b83f39ab50a10d03ef3c1a8e2651e517053/src/main/kotlin/me/steven/indrev/tools/IRToolMaterial.kt#L19

So when you we unify to a different ingot, it won't repair in an anvil. Only this will IRItemRegistry.BRONZE_INGOT 
commented

I think I found a proper way to implement this. It might not work with all mods tho especially when they create a custom tool or armor class, override the repair method, and don't call super.

Due to the current security issue on CurseForge, the release might be delayed for a bit. If you want to give this a test (because I don't have the time to test this myself), here is the Fabric version.
I made sure it's not infected with the current malware spreading. Almost Reliable is not affected so far and I built this JAR locally. If you still have security concerns, that's fine and I will test it out later myself.

Since GitHub doesn't accept JAR files, I uploaded it as ZIP. Be sure to rename it back from .zip to .jar in order to test it.
almostunified-fabric-1.19.2-0.4.4.zip

commented

Works! Awesome. Thanks!