mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2024-11-24 12:15:41 +01:00
Move idle packet fix to VV
This commit is contained in:
parent
141c1b00ef
commit
004579125a
@ -84,9 +84,6 @@ public abstract class MixinClientPlayerEntity extends AbstractClientPlayerEntity
|
|||||||
@Shadow
|
@Shadow
|
||||||
protected abstract void sendSneakingPacket();
|
protected abstract void sendSneakingPacket();
|
||||||
|
|
||||||
@Shadow
|
|
||||||
private boolean lastHorizontalCollision;
|
|
||||||
|
|
||||||
@WrapWithCondition(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerEntity;sendSneakingPacket()V"))
|
@WrapWithCondition(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerEntity;sendSneakingPacket()V"))
|
||||||
private boolean sendSneakingAfterSprinting(ClientPlayerEntity instance) {
|
private boolean sendSneakingAfterSprinting(ClientPlayerEntity instance) {
|
||||||
return ProtocolTranslator.getTargetVersion().newerThanOrEqualTo(ProtocolVersion.v1_21_2);
|
return ProtocolTranslator.getTargetVersion().newerThanOrEqualTo(ProtocolVersion.v1_21_2);
|
||||||
@ -99,16 +96,6 @@ public abstract class MixinClientPlayerEntity extends AbstractClientPlayerEntity
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Redirect(method = "sendMovementPackets", at = @At(value = "FIELD", target = "Lnet/minecraft/client/network/ClientPlayerEntity;lastHorizontalCollision:Z", ordinal = 0))
|
|
||||||
private boolean removeHorizontalCollisionFromOnGroundCheck(ClientPlayerEntity instance) {
|
|
||||||
// Since it doesn't exist in older versions, we need to exclude it from the check to prevent bad packets
|
|
||||||
if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_21)) {
|
|
||||||
return this.horizontalCollision;
|
|
||||||
} else {
|
|
||||||
return this.lastHorizontalCollision;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@WrapWithCondition(method = "tickMovement", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerEntity;jump()V"))
|
@WrapWithCondition(method = "tickMovement", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerEntity;jump()V"))
|
||||||
private boolean dontJumpBeforeFlying(ClientPlayerEntity instance) {
|
private boolean dontJumpBeforeFlying(ClientPlayerEntity instance) {
|
||||||
return ProtocolTranslator.getTargetVersion().newerThanOrEqualTo(ProtocolVersion.v1_20_5);
|
return ProtocolTranslator.getTargetVersion().newerThanOrEqualTo(ProtocolVersion.v1_20_5);
|
||||||
|
Loading…
Reference in New Issue
Block a user