mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2024-11-21 11:46:49 +01:00
Ported all* fixes now.
*MilkBucketMixin needs special treatment
This commit is contained in:
parent
49fa8d049e
commit
d32b2851c9
@ -231,15 +231,14 @@ public abstract class MixinClientPlayNetworkHandler extends ClientCommonNetworkH
|
||||
}
|
||||
}
|
||||
|
||||
// TODO UPDATE-1.21.3
|
||||
// @Redirect(method = "onEntityPosition", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/Entity;updateTrackedPositionAndAngles(DDDFFI)V"))
|
||||
// private void cancelSmallChanges(Entity instance, double x, double y, double z, float yaw, float pitch, int interpolationSteps) {
|
||||
// if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_16_1) && Math.abs(instance.getX() - x) < 0.03125 && Math.abs(instance.getY() - y) < 0.015625 && Math.abs(instance.getZ() - z) < 0.03125) {
|
||||
// instance.updateTrackedPositionAndAngles(instance.getX(), instance.getY(), instance.getZ(), yaw, pitch, ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_15_2) ? 0 : interpolationSteps);
|
||||
// } else {
|
||||
// instance.updateTrackedPositionAndAngles(x, y, z, yaw, pitch, interpolationSteps);
|
||||
// }
|
||||
// }
|
||||
@Redirect(method = "setPosition", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/Entity;updateTrackedPositionAndAngles(DDDFFI)V"))
|
||||
private static void cancelSmallChanges(Entity instance, double x, double y, double z, float yaw, float pitch, int interpolationSteps) {
|
||||
if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_16_1) && Math.abs(instance.getX() - x) < 0.03125 && Math.abs(instance.getY() - y) < 0.015625 && Math.abs(instance.getZ() - z) < 0.03125) {
|
||||
instance.updateTrackedPositionAndAngles(instance.getX(), instance.getY(), instance.getZ(), yaw, pitch, ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_15_2) ? 0 : interpolationSteps);
|
||||
} else {
|
||||
instance.updateTrackedPositionAndAngles(x, y, z, yaw, pitch, interpolationSteps);
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "onGameJoin", at = @At("RETURN"))
|
||||
private void initPlayerListFix(GameJoinS2CPacket packet, CallbackInfo ci) {
|
||||
|
Loading…
Reference in New Issue
Block a user