Topic category: Troubleshooting, bugs, and solutions
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
use ,
4,9
not .
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.
Moving conversation to: https://mcreator.net/tracker/issue/55351