-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
3 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
...org/embeddedt/modernfix/common/mixin/feature/remove_chat_signing/ChatTrustLevelMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...eddedt/modernfix/common/mixin/feature/remove_chat_signing/ProfileKeyPairManagerMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters