Tetra

Tetra

12M Downloads

Support for Ensorcellation 'True Shot' Enchantment

ACE1337x opened this issue ยท 6 comments

commented

Bug Report

Observed Behaviour

The True Shot enchant from Ensorcellation does not function when applied to a Tetra bow.

Expected Behaviour
When the enchant is applied, the arrow is supposed to gain increased velocity and accuracy as well as pierce 1 enemy for each enchantment level (True Shot II should pierce 2 enemies)

Minimal setup needed to reproduce

Steps to reproduce
Line up 3 Target dummies
Enchant bow with True Shot II
Fire arrow at them, the arrow should be faster, more accurate, and should pierce the first 2 dummies

commented

So it's possible to apply the enchantment but it does not function?

commented

that is correct

commented

I'm seeing the same behavior with Ensorcellation's Excavating enchant. I've converted a pre-enchanted shovel and the enchant is still on the item, but not actually working.

I'm assuming this is the same issue so I'm commenting here. Let me know if you'd rather I open a new issue instead, @mickelus.

commented

I can't do much in terms of getting the ensorcellation enchantments to work, I'm guessing that they check if the item use extends the vanilla bow class which the tetra bow does not. Same goes for the excavating enchantment.

Your best bet is to open an issue on their issue tracker.

commented

Seems like this is the offending part of the CoFH mod for the excavating part at least

    public static boolean validAreaEffectMiningItem(ItemStack stack) {

        return stack.getCapability(AREA_EFFECT_ITEM_CAPABILITY).isPresent() || stack.getItem() instanceof ToolItem;
    }

From here https://github.com/KingLemming/1.15/blob/26e46150c9b603d5ff8ff1893fa2a58bb64c5ff8/CoFHCore/src/main/java/cofh/core/util/helpers/AreaEffectHelper.java#L38

commented

Talked about this on the CoFH discord, and KingLemming mentioned he felt the cleanest way to handle this compat would be to add the CapabilityAreaEffect that CoFHCore provides to the tetra tools. The check wouldn't then need to check if the tetra tool is ToolItem.

I haven't done much with capabilities myself so will need to look into it, but @mickelus would you accept a pr for this change?