Add oversimplified version of No Chat Reports
This has no player-friendly UI whatsoever, doesn't work on enforce-secure-profile servers, and has had very limited testing. In exchange, it costs virtually nothing to maintain.
This commit is contained in:
parent
5fe5a484a3
commit
feaf363fd8
|
|
@ -0,0 +1,17 @@
|
|||
package org.embeddedt.modernfix.common.mixin.feature.remove_chat_signing;
|
||||
|
||||
import net.minecraft.client.multiplayer.chat.ChatTrustLevel;
|
||||
import org.embeddedt.modernfix.annotation.ClientOnlyMixin;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
@Mixin(ChatTrustLevel.class)
|
||||
@ClientOnlyMixin
|
||||
public class ChatTrustLevelMixin {
|
||||
@Inject(method = "evaluate", at = @At("HEAD"), cancellable = true)
|
||||
private static void alwaysShowSecure(CallbackInfoReturnable<ChatTrustLevel> cir) {
|
||||
cir.setReturnValue(ChatTrustLevel.SECURE);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package org.embeddedt.modernfix.common.mixin.feature.remove_chat_signing;
|
||||
|
||||
import net.minecraft.client.multiplayer.ProfileKeyPairManager;
|
||||
import org.embeddedt.modernfix.annotation.ClientOnlyMixin;
|
||||
import org.embeddedt.modernfix.core.config.Option;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Overwrite;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
@Mixin(ProfileKeyPairManager.class)
|
||||
@ClientOnlyMixin
|
||||
public class ProfileKeyPairManagerMixin {
|
||||
/**
|
||||
* @author embeddedt
|
||||
* @reason never use the key pair
|
||||
*/
|
||||
@Overwrite
|
||||
private CompletableFuture<Optional<?>> readOrFetchProfileKeyPair(Optional<?> optional) {
|
||||
return CompletableFuture.completedFuture(Optional.empty());
|
||||
}
|
||||
}
|
||||
|
|
@ -173,6 +173,7 @@ public class ModernFixEarlyConfig {
|
|||
.put("mixin.feature.integrated_server_watchdog", true)
|
||||
.put("mixin.perf.faster_item_rendering", false)
|
||||
.put("mixin.feature.spam_thread_dump", false)
|
||||
.put("mixin.feature.remove_chat_signing", false)
|
||||
.put("mixin.feature.snapshot_easter_egg", true)
|
||||
.put("mixin.feature.warn_missing_perf_mods", true)
|
||||
.put("mixin.feature.spark_profile_launch", false)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user