Closed U5B closed 2 years ago
can you explain why this is the right fix with some reference on minecraft code or some other implementation ?
can you explain why this is the right fix with some reference on minecraft code or some other implementation ?
Sorry for not getting back to you sooner. WhoTho didn't respond and I thought he did. Fandom says that it is 20% multiplied by the effect level. https://minecraft.fandom.com/wiki/Speed 0.2 'effect.level' instead of 1.2 'effect.level'
Fandom says 15% 'effect.level' 0.15 'effect.level' instead of 0.85 * 'effect.level'
Math.max is used with 0 because past level 7, slowness makes your speed basically 0 unless you are jumping.
Would much rather see an explanation from the Minecraft physics implementation than Fandom
Would much rather see an explanation from the Minecraft physics implementation than Fandom
I cannot find where the speed and slowness effects are calculated in the source, only jump height.
Found jump height here client/net/minecraft/world/entity/LivingEntity.java
in function jumpFromGround()
EDIT: here is a different wiki source https://www.mcpk.wiki/wiki/Status_Effects but evidence from Minecraft source would be better, I JUST CAN'T FIND IT
That's sort of my point, those wikis might be outdated or just copying one another and wrong. If we don't fully understand the behavior, we shouldn't implement it on a rumor. If there's a discrepancy that needs to be fixed it needs to be linked to a section of Minecraft physics source that we're currently not handling. This way everyone can review and concur that the PR matches the behavior of vanilla.
Thank you for the input. From the Minecraft source, it uses attributes modifiers for effects instead of the effect levels themselves I will make a PR trying to implement attributes later.
https://github.com/PrismarineJS/mineflayer/issues/2241#issuecomment-939384631