-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementation of AoE Blacklist for Tinker's Construct Tools #121
Conversation
- Created AoEExclusionList class in tconstruct.library.util package - Added config file loading for tool-specific block exclusions - Modified AOEHarvestTool class to check exclusions before breaking blocks - Updated Hammer class to use new exclusion system - Added debug logging for troubleshooting This change allows users to specify blocks that should not be broken by the AoE effect of tools like the Hammer, while still allowing the targeted block to be broken.
- Created AoEExclusionList class in tconstruct.library.util package - Added config file loading for tool-specific block exclusions - Modified AOEHarvestTool class to check exclusions before breaking blocks - Updated Hammer class to use new exclusion system - Added debug logging for troubleshooting This change allows users to specify blocks that should not be broken by the AoE effect of tools like the Hammer, while still allowing the targeted block to be broken.
# Conflicts: # src/main/java/tconstruct/library/tools/AOEHarvestTool.java # src/main/java/tconstruct/library/util/AoEExclusionList.java
Added example formatting for config file. Inlined Variable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good start.
Please make tool names consistent and clean up code.
Also I suggest to extend functionality of the blacklist to allow blacklisting blocks only with specific metadata.
…for caching the name instead of calling the method later on. Changed function call to simply toolName in relation to this.
…ate changes made so other parts still work properly & SpotlesApply
I'm back to say I've (hopefully) addressed all the issues you raised. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job!
In current state this feature works completely fine (tested).
As I said before, it would be nice to have option to blacklist blocks with specific metadata.
I wrote this comment just a second before your last commit. Now feature is complete.
Thank you for work!
@AlexanderChenhall can you make a config in the Modpack repo so we can use this feature. Maybe ask around which blocks should be set as standard |
Before anything there is one more commit. to import java.util.* Should be fixed now. |
Yes sir 🫡 |
This feature would enhance control over tool behavior and can prevent accidental destruction of important blocks, think accidentally breaking a wall of chests with a lumber axe, or destroying your Smeltery Controller when breaking Seared brick blocks.
Key Changes:
Created new class under tconstruct.library.util to handle loading and checking exclusions for AoE tool effects.
Lists are determined by a config (preferably pre-set with desired defaults).
Lists are separated into exclusions lists for individual tools, so a separate blacklist can exist for the hammer, separate from the excavator or lumberaxe.
Updated the AOEHarvestTool class to add a check before breaking blocks via AoE, of course keeps original functionality.
Did the whole gauntlet of gradle tests, no issues. Of course i may have missed something so feel free to have a look and/or reject if there was an oversight or you feel it wouldn't fit within the mod/pack as present.
Example of the config file: