Implemented movement change in <= 1.20.1

This commit is contained in:
FlorianMichael 2023-09-24 04:00:23 +02:00
parent 26323aac86
commit a0df65c578
No known key found for this signature in database
GPG Key ID: C2FB87E71C425126
2 changed files with 9 additions and 3 deletions

View File

@ -40,9 +40,6 @@ import org.apache.logging.log4j.Logger;
import java.io.File;
/*
* TODO | Port
* - Entity passenger points and heights/offsets are completely broken across all entities
*
* TODO | General
* - Check if relevant for protocol translation: TakeItemEntityPacket isEmpty case (1.20 -> 1.20.1 change)
* - Window interactions in <= 1.16.5 has changed and can be detected by the server

View File

@ -185,6 +185,15 @@ public abstract class MixinClientPlayerEntity extends AbstractClientPlayerEntity
return MathHelper.inverseSqrt(x);
}
@Redirect(method = "tickMovement", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerEntity;hasVehicle()Z", ordinal = 0))
public boolean removeVehicleRequirement(ClientPlayerEntity instance) {
if (ProtocolHack.getTargetVersion().isOlderThanOrEqualTo(VersionEnum.r1_20tor1_20_1)) {
return false;
}
return instance.hasVehicle();
}
@Override
public boolean isCreative() {
if (ProtocolHack.getTargetVersion().isOlderThanOrEqualTo(VersionEnum.r1_7_6tor1_7_10)) {