Removed new sanity check logging in <= 1.20.1

This commit is contained in:
FlorianMichael 2023-09-23 17:46:08 +02:00
parent e02ca49137
commit 71f619013d
No known key found for this signature in database
GPG Key ID: C2FB87E71C425126

View File

@ -110,6 +110,11 @@ public abstract class MixinClientPlayNetworkHandler {
return ProtocolHack.getTargetVersion().isNewerThanOrEqualTo(VersionEnum.r1_19_3);
}
@WrapWithCondition(method = "onChatMessage", at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;error(Ljava/lang/String;Ljava/lang/Object;)V", remap = false))
public boolean removeError() {
return ProtocolHack.getTargetVersion().isNewerThanOrEqualTo(VersionEnum.r1_20_2);
}
@Redirect(method = "onServerMetadata", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/packet/s2c/play/ServerMetadataS2CPacket;isSecureChatEnforced()Z"))
public boolean removeSecureChatWarning(ServerMetadataS2CPacket instance) {
return instance.isSecureChatEnforced() || VisualSettings.INSTANCE.disableSecureChatWarning.isEnabled();