GregTech
GregTech copied to clipboard
[BUG] Cannot chop down trees with GTCE axes
Describe the bug You can't break trees from the DynamicTrees TFC mod
Versions Forge: 2855 GTCE: 1.17.0 Modpack: TerraFirmaGreg-1.12.2-R2.7.5 Addons: -
Setup + Steps To Reproduce
- Install both mods or install modpack.
- Enter in the world.
- Get yourself a GT axe..
- Try to break tree.
- Nothing happenned.
I also found a problem on GitHub Dynamic trees TFC, but they say that this is a GTCE problem. https://github.com/Gaelmare/dynamictreestfc/issues/31
This looks like it would be relatively simple to fix.
In ToolMetaItem:
@Override
public Set<String> getToolClasses(ItemStack stack)
T metaToolValueItem = getItem(stack);
if (metaToolValueItem != null) {
IToolStats toolStats = metaToolValueItem.getToolStats();
return toolStats.getToolClasses(stack);
}
return Collections.emptySet();
}
In IToolStats:
// Nothing by default
default Set<String> getToolClasses(ItemStack stack) {
return Collections.emptySet();
}
Then implement it for each tool, e.g. in ToolAxe:
private static final Set<String> AXE_TOOL_CLASSES = Collections.singleton("axe");
@Override
public Set<String> getToolClasses(ItemStack stack) {
return AXE_TOOL_CLASSES;
}
It should be easy to figure out the classes for each tool by looking at canMineBlock() There will be some gotchas, e.g. Some have multiple classes, like ToolSaw is both a saw and and an axe. And saws can also be used as shears, but that is handled differently because it is instabreak.
I don't understand much about this, but if you fix it, it will help my modpack a lot :)
The same problem is with the hoe, I can't use the hoe(GT) to plow the TFC land.
I don't understand much about this, but if you fix it, it will help my modpack a lot :)
Fixing it is not the problem. Getting it accepted into the codebase is hard. I still have a major bug fix from over 6 months ago that isn't accepted.
I got it. In this case, we expect. Or there is an option to offer this solution for GTCEu
I outlined the fix above, if they want to implement it in GTCEu they can, but I don't work on forks.
okaay, thanks anyway
Fixing it is not the problem. Getting it accepted into the codebase is hard. I still have a major bug fix from over 6 months ago that isn't accepted.
There are a lot of things going on at any point in this repository, and a limited number of people who have the knowledge and authority to review pull requests. We have to triage issues based on severity and sometimes things take a while to get to.
As for the proposed solution for this issue, based on what the folks over at dynamictreestfc have stated the issue is, this seems like a reasonable approach.