Open TheAimless opened 6 months ago
Can you run /iih
or /mt hand
and post a screenshot of the tool's NBT data?
or even better, use /mt hand
and click the text to copy it to your clipboard and paste it here
Here you go:
I have done some testing and have only been able to reproduce this with Tinkers Gregworks installed. I'm unsure exactly why it happens but it might be ModTGregRepair and ModToolRepair clashing in some way.
Attached is an NEI bookmark containing a lumber axe that with TGregworks installed requires 3 netherrack to fully repair and adding a 4th or 5th netherrack lowers the durability. Without TGregworks installed this requires 6 netherrack to fully repair which could be related to the issue.
I'm unsure exactly why it happens but it might be ModTGregRepair and ModToolRepair clashing in some way.
I looked into this a bit and agree to this conclusion. (Also: Confirming this is still present in current Nightly 2024-09-05)
Both Repair Modification handlers are registered into itemModifiers and processed after each other (ModToolRepair
first)
This actually leads to tool repairing generally giving more durability than intended - Both Repair Modifier handlers run, calculate the durability to restore, and repair the tool.
In the calculateIfNecessary
function, both Repair handlers make sure that no more than half of the repair value of the items would be wasted due to the tool not having that much missing durability.
Thus, if the ModToolRepair
(which runs first) repairs the tool to near-full durability, the ModTGregRepair
will not run, so the tool is only repaired by one of the two handlers which roughly halves the amount that the tool is repaired by.
The correct thing here would probably be to just disable the normal tinkers ModToolRepair
. (ModTGregRepair
seems to include some explicit support for repairing with GT materials? Not sure why this is required as ModToolRepair
seems to be able to repair tools using GT materials fine by using TConstructRegistry.customMaterials
)
Note that this bugfix would reduce the amount of durability restored by half, making Tinkers tool repairs twice as expensive, which may be a considerable balance change.
I'd say that bugfix is worth it despite the balance change, GTNH has been playing easy mode Tinker's for 3+ 8 years now.
If need be we can always add an easy mode repair in Tinker' proper.
Your GTNH Discord Username
theaimless
Your Pack Version
2.5.0
Your Server
SP
Java Version
Java 17
Type of Server
None
Your Expectation
More material should return 100 durability.
The Reality
Fixing the tool with more material sometimes causes the tool to have lower resulting durability.
Your Proposal
Add an overflow check for Tinkers Tools.
Final Checklist