mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2024-12-23 16:58:30 +01:00
Implemented movement change in <= 1.20.1
This commit is contained in:
parent
26323aac86
commit
a0df65c578
@ -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
|
||||
|
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user