ViaVersion / ViaFabricPlus

Fabric mod to connect to EVERY Minecraft server version (Release, Beta, Alpha, Classic, Snapshots, Bedrock) with QoL fixes to the gameplay

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

yukijoou opened this issue · comments

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)

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

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

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