Attack speed variable set incorrectly

Published by raziel23x on
Status
Fixed
Issue description

I have posted this in the forums and it has not been fixed in the latest version as well so posting this report here for the latest build and going to reference the forum post

https://mcreator.net/forum/55076/attack-speed-variable-set-incorrectly-latest-snapshot-mcreator-eap-20195-b46321

Here is the issue i wanted to set the attack speed to 4.9 but when i look at the code mcreator sets it to 

 

}, 3, -4.9F, new Item.Properties().group(ItemGroup.COMBAT)) {
        }.setRegistryName("plasticsword"));

which when loaded into the game sets the attack speed to -0.9

 

If i make changes to this and change

}, 3, -4.9F, new Item.Properties().group(ItemGroup.COMBAT)) {
        }.setRegistryName("plasticsword"));

 

to 

 

}, 3, 4.9F, new Item.Properties().group(ItemGroup.COMBAT)) {
        }.setRegistryName("plasticsword"));

and save and then run minecraft again the calculations are incorrect in settings the attack speed which will set it to attack speed of 8.9

 

but if i set it to 

}, 3, 0.9F, new Item.Properties().group(ItemGroup.COMBAT)) {
        }.setRegistryName("plasticsword"));

and save and then run minecraft again it finally is set correctly to the attack speed of 4.9 like i originally want it to be set

 

Here are a few screen shots to show what is going on

https://imgur.com/a/BLJMV8Q

Issue comments