Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In 1.8.x compatibility, crouching near the side of a 1-block gap lets you fall #401

Closed
yukijoou opened this issue Apr 29, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@yukijoou
Copy link

General Information

ViaVersion dump

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

  1. Join mc.hypixel.net
  2. Go to the Bedwars lobby (/lobby bedwars)
  3. 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)

@yukijoou yukijoou added the bug Something isn't working label Apr 29, 2024
@FlorianMichael
Copy link
Member

Hi, thanks for reporting!
Can you make a video of the issue? I don't really understand it.

@yukijoou
Copy link
Author

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();
        }
    }

@ src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinPlayerEntity.java:159-166

@RaphiMC
Copy link
Member

RaphiMC commented May 18, 2024

Thanks for reporting, should be fixed in the latest dev build:
https://ci.viaversion.com/view/Platforms/job/ViaFabricPlus/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants