In 1.8.x compatibility, crouching near the side of a 1-block gap lets you fall
yukijoou opened this issue · comments
General Information
Bug Description
When using 1.8.x compatibility, crouching near the side of a 1-block gap lets you fall down, when it should prevent you from doing so.
Testing on servers that support 1.8.x and later versions, the issue doesn't occur on later versions.
Steps to Reproduce
- Join mc.hypixel.net
- Go to the Bedwars lobby (
/lobby bedwars
) - Try crouching off one of the slightly raised areas left or right of the spawnpoint
Expected Behavior
Crouching should not make you fall off >1 block gaps (I don't know the exact cutoff point)
Hi, thanks for reporting!
Can you make a video of the issue? I don't really understand it.
Hi!
When crouching, I'm able to fall off one block high ledges, as you can see here:
ViaFabricPlus.1.8.x.crouch.bug.mp4
I believe this would be the related function, which is probably missing a case for 1.8 and possibly other versions:
@Redirect(method = "adjustMovementForSneaking", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerEntity;getStepHeight()F"))
private float modifyStepHeight1_10(PlayerEntity instance) {
if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_10)) {
return 1.0F;
} else {
return instance.getStepHeight();
}
}
Thanks for reporting, should be fixed in the latest dev build:
https://ci.viaversion.com/view/Platforms/job/ViaFabricPlus/