NucleoidMC / Server-Translations

MIT License
42 stars 20 forks source link

Disconnection reason doesn't translate #20

Closed NikitaCartes closed 2 years ago

NikitaCartes commented 2 years ago

example

I made the littlest mod that reproduce that bug: https://github.com/NikitaCartes-forks/TranslationBugExample

Basically it's just:

@Mixin(PlayerManager.class)
public abstract class PlayerManagerMixin {

    @Inject(method = "checkCanJoin(Ljava/net/SocketAddress;Lcom/mojang/authlib/GameProfile;)Lnet/minecraft/text/Text;", at = @At("HEAD"), cancellable = true)
    private void checkCanJoin(SocketAddress socketAddress, GameProfile profile, CallbackInfoReturnable<Text> cir) {
        TranslatableText returnText = new TranslatableText("text.bugexample.bugexample");
        cir.setReturnValue(returnText);
    }
}
thecatcore commented 2 years ago

This should be fixed in newer versions I think

NikitaCartes commented 2 years ago

I updated my mod to 1.18.2 but it's still doesn't translated