Skip to content
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

[BUG] Cannot chop down trees with GTCE axes #1704

Open
Exzept1on opened this issue Aug 6, 2021 · 8 comments
Open

[BUG] Cannot chop down trees with GTCE axes #1704

Exzept1on opened this issue Aug 6, 2021 · 8 comments
Labels
status: unverified type: bug Something isn't working

Comments

@Exzept1on
Copy link

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

  1. Install both mods or install modpack.
  2. Enter in the world.
  3. Get yourself a GT axe..
  4. Try to break tree.
  5. Nothing happenned.

I also found a problem on GitHub Dynamic trees TFC, but they say that this is a GTCE problem.
Gaelmare/dynamictreestfc#31

@Exzept1on Exzept1on added status: unverified type: bug Something isn't working labels Aug 6, 2021
@warjort
Copy link
Contributor

warjort commented Aug 7, 2021

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.

@Exzept1on
Copy link
Author

I don't understand much about this, but if you fix it, it will help my modpack a lot :)

@Exzept1on
Copy link
Author

Exzept1on commented Aug 7, 2021

The same problem is with the hoe, I can't use the hoe(GT) to plow the TFC land.

@warjort
Copy link
Contributor

warjort commented Aug 7, 2021

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.

@Exzept1on
Copy link
Author

I got it. In this case, we expect. Or there is an option to offer this solution for GTCEu

@warjort
Copy link
Contributor

warjort commented Aug 7, 2021

I outlined the fix above, if they want to implement it in GTCEu they can, but I don't work on forks.

@Exzept1on
Copy link
Author

okaay, thanks anyway

@Exaxxion
Copy link
Collaborator

Exaxxion commented Aug 8, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: unverified type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants