Artisan Worktables 1.12

Artisan Worktables 1.12

3M Downloads

[1.12.2][1.1.3] Tinkers Tools

codetaylor opened this issue ยท 1 comments

commented

Doesn't work properly with Tinker's tools.

Tinkers tools don't match the recipe requirements if they have any damage. Full durability tools work fine.

commented

We can't use itemStack.isItemEqualIgnoreDurability(tool) to compare the tools because apparently Tinker's tools don't set the max durability on the tool (?) which causes that check to fail because it thinks the item can't be damaged. Instead, we assume the item being used has durability and just compare items.

    public boolean isItemEqualIgnoreDurability(ItemStack stack)
    {
        if (!this.isItemStackDamageable())
        {
            // damaged Tinker's tools get compared here instead of below
            return this.isItemEqual(stack);
        }
        else
        {
            return !stack.isEmpty() && this.item == stack.item;
        }
    }