Attack Speed does nothing

Published by Idiocide on
Status
Resolved
Issue description

I am trying to make a sword with a custom Attack Speed, and I'm having issues.

Changing the number does nothing.

I have set it everywhere from 0 to 999, and the item in-game still has an Attack Speed of 1.6, as is the default with all vanilla swords. I've tried looking at the code directly, but it seems to be updating properly to reflect the new value (setting the speed to -1.5 for an Attack Speed of 3.5, etc.), much to my confusion. I've even tried making multiple swords, identical except for having varying Attack Speeds, and they all come out to have an Attack Speed of 1.6. Nothing I've tried has worked.

I haven't been able to find anything in the issue tracker or on any forum post that describes a similar issue, so I'm sorry if this has been addressed before but I cannot find it.

Issue comments

For future reference (for anyone else wanting to making custom speed swords), I managed to circumvent the issue by making the "Sword" a Special tool, and adjusting it's stats accordingly. The only issue with that solution is that in Creative, the sword can still break blocks, but I don't think it's a major one.

Custom type tool is based from item so Minecraft system can not pick it up as a specific tool type and offer more enchantments.

They base from normal item too as basing from the bow would have some undesiderd consequences.

I might consider adding this, or even better figure out how to apply new enhancement types to items.