Attack speed variable set incorrectly in latest snapshot MCreator EAP 2019.5 b46321

Started by raziel23x on

Topic category: Troubleshooting, bugs, and solutions

Last seen on 14:32, 26. Mar 2024
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Attack speed variable set incorrectly in latest snapshot MCreator EAP 2019.5 b46321
Tue, 11/26/2019 - 03:09 (edited)

I tried posting this on the bug tracker but it seems we are only allowed to post 1 bug report every 2 days so if you find more then one bug you need to either wait 2 days  each time to post each one or group them together....

 

 

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

Edited by raziel23x on Tue, 11/26/2019 - 03:09
Last seen on 17:18, 11. Feb 2020
Joined Mar 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
use , 4,9 not .
Tue, 11/26/2019 - 09:55

use ,

4,9

not .

Last seen on 14:12, 3. Jun 2023
Joined Nov 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Java uses dots for decimals,…
Tue, 11/26/2019 - 10:25

Java uses dots for decimals, so 4.9 is correct. Anyway, Minecraft automatically adds 4 to attack speed, so -4 becomes 0, 2 becomes 6 and so on.