Need help setting attack speed on pickaxes, hoes, shovels and swords

Status
Fixed
Issue description

I don't know if this is where I'd go to ask for help with something, probably not, just need help with this issue I'm having.

Issue:

I need help setting attack speed on pickaxes, hoes, shovels and swords. I noticed the attack speed and attack damage on default tools aren't always equal at least to the default wooden tools and weapons. I'm currently trying to create my own wooden tools and weapons and I can't edit the attack speed or attack damage of any of them except the axe, at least in the code. I found a way to fix the attack damage through the tool mod editor for the ones i needed to edit, but I also noticed I can't set up a decimal for attack damage in the tool mod editor which i need to do for the shovels.

So my main question or issue is I'm looking for a way to either add attack speed and attack damage to the code, I haven't found a way to do it yet,or I was wondering if there was another way to fix it so I can edit both for my tools and weapons when need be.

Thanks in advance.

If need be I'll upload my mcr file temporarily,just let me know in a reply message. I apologize if I'm not posting this in the right section of the mcreator site, I'm just trying to receive help as soon as possible from anyone who works at mcreator.

Issue comments

I was not able to find a good way to set attack speed of tools too, if I would find it, I would add this to MCreator. I suggest opening a forum topic instead so more people can see it. If we get any good examples on how to do this in code, we will add this to MCreator.

You can increase or decrease Tools attack speed by adding the effect Haste or Mining Fatique when tool in hand tick

by editing the code to 0 as shown: ("hoe", 1, 100, 0, 0, 0)) {

    public mcreator_h(endercave instance) {
        super(instance);
        instance.items.add(() -> new ItemHoe(EnumHelper.addToolMaterial("hoe", 1, 100, 0, 0, 0)) {

 

 

resolts

            1 attack speed

            1 attack damage