[1.18.2]: Cutting board allows the use of zero-durabiliy tools
LordXerus opened this issue · 2 comments
Description
The cutting board allows usage of zero-durability tools to do recipes successfully. Notable tools include Tinkers' Construct tools or tools that run on FE/RF. These tools remain and can be repaired after they reach zero-durability. In my particular case, I am able to shear leather boots with a broken(presumably zero durability) Tinkers' Construct Kama (which can act as shears).
Steps to reproduce
- Obtain Kama, cutting board, shearable item.
- Attempt to shear the item with zero-durability shear-like tool
- Shear completes successfully
Mod list
[✔️] appleskin-forge-mc1.18.2-2.4.1
[✔️] cofh_core-1.18.2-9.2.1.39
[✔️] comforts-forge-1.18.2-5.0.0.6
[✔️] dyenamics-2.0.0
[✔️] FarmersDelight-1.18.2-1.2.0
[✔️] HammerLib-1.18.2-18.2.16
[✔️] jei-1.18.2-forge-10.2.1.1004
[✔️] Mantle-1.18.2-1.9.45
[✔️] Patchouli-1.18.2-71.1
[✔️] rangedpumps-0.9.2
[✔️] refinedstorage-1.10.5
[✔️] rubidium-0.5.6
[✔️] SolarFluxReborn-1.18.2-18.2.4
[✔️] TConstruct-1.18.2-3.6.4.113
[✔️] thermal_cultivation-1.18.2-9.2.0.16
[✔️] thermal_dynamics-1.18.2-9.2.1b.13
[✔️] thermal_expansion-1.18.2-9.2.0.20
[✔️] thermal_foundation-1.18.2-9.2.0.46
[✔️] thermal_innovation-1.18.2-9.2.0.17
[✔️] thermal_integration-1.18.2-9.2.0.16
[✔️] thermal_locomotion-1.18.2-9.2.0.13
Logs
No response
Forge
- I am using the Forge version of Farmer's Delight
Minimal instance
- I have tested this on a minimal instance
Performance and shader mods
- I have tested this without performance or shader mods
This is a tough one... Although I could definitely add a durability check to Cutting Board actions (which would cover some mods), some of those tool mods implement their own systems, which don't always utilize the Damage NBT value.
I just tested a quick implementation (checking if the tool is equal or above max damage), and it still didn't cover TCon or Thermal Innovation. I assume those tools are using other ways of handling "broken/uncharged" states, which I'm not sure I can consult from my end.
Another alternative is for such mods to "remove" their ToolActions from a broken/uncharged tool; this would make them invalid to cutting recipes.
I'll try contacting the devs to see if there's a way. At the very least, I could add the basic check.
Sorry for not returning to this issue back then!
After analyzing it again, and testing against a few mods with persistent tools and energy tools, I concluded that there isn't much the Cutting Board can do to prevent their usage.
Many of these mods utilize a different parameter aside from NBT Damage to measure their usability states, which the Cutting Board cannot inherently keep track of. I've discussed this with some mod creators, and we agreed that a potentially useful compromise is for "broken/discharged" tools to lose their tool actions, which is what FD checks against.
Mekanism's Atomic Disassembler, for example, does not work on a Cutting Board when depleted, as it loses its tool actions.
As for vanilla tools, there aren't circumstances where they persist. Even if I gave myself a pickaxe with 0 durability, it would instantly break as soon as I used it. The best thing I can do is prevent fully damaged tools from working, but everything else is out of FD's control.
Thanks the report, either way! 👍