AntiBreak
Type of change
- [ ] Bug fix
- [X] New feature
Description
Splits AutoTool's Anti Break settings into its own module. This lets you prevent tool breakage without requiring AutoTool swapping being on (I personally dislike it).
Added features:
- Optionally prevent hitting
- Lets you break shrubs even with an almost broken tool
It also still works with AutoTool, it wont switch to an almost broken tool.
How Has This Been Tested?
Thoroughly tested wahoo
Checklist:
- [X] My code follows the style guidelines of this project.
- [X] I have added comments to my code in more complex areas.
- [X] I have tested the code in both development and production environments.
Good feature.
any reason why this hasnt been merged
I haven't tried your PR, but it looks like the anti-break module wont work with items like bows, tridents or shears since those items use right click. It also looks like interactions like stripping wood with an axe, shearing a pumpkin, or flint and steel wouldn't be stopped, and those items would break.
To make certain that absolutely everything is accounted for, you would need support for these three events: InteractItemEvent (bow, crossbow, trident, fishing rod, carrot on stick, shield, flint and steel?) InteractEntityEvent (shearing sheeps/snow golems, brushing armadillos) InteractBlockEvent (stripping wood w. axe, stripping wax w. axe, shearing pumpkins, brushing suspicious sand)
If you fix that- the modules Auto Fish, Auto Shearer, Flamethrower, all have Anti Break settings that can be removed and replaced with anti break module support instead
@RacoonDog
also this PR resolves #2255