question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to let command feedback show on server side correctly?

See original GitHub issue

I wrote something like that:

       source.sendFeedback(new TranslatableText("as.command.show_item",
                new TranslatableText(item.getTranslationKey()),
                itemsHelper.getCurrentCount(item),
                itemsHelper.getDefaultCount(item)), false);

But since the server doesn’t have localization, it only prints translation key… image

However, I found that those vanilla command like /give does use translatableText… Not sure how it works.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
yynycommented, Jan 15, 2021

SSTranslatableText is for mods that know they will not be installed on the client

That would be a good use for that library, but for the issue discussed here it would be a hacky non-proper fix.

I think there is a reason here to implement the logic in order to load modded translations on the dedicated server.

I agree with this statement, although evidently it is worded in a confusing way, there should definitely be some built-in way to load the "en_us.json" translation resource file for mods even when on a Dedicated Server, however, there does not need to be an API built-in to fabric for translating text before sending it to the client, for something like that an external library like fabric-languagehack would be sufficient.

1reaction
KrisCriscommented, Nov 10, 2020

@i509VCB This already exists: https://github.com/LoganDark/fabric-languagehack

Love your mod!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Validate Your Server Configuration | Microsoft Learn
Once ServerValidator shows valid results, the logical next step is to try website publishing from the WebMatrix client. Learn more about how we ......
Read more >
Cant run a DropWizard server side properly - Stack Overflow
Dropwizard takes the first command line argument and dispatches it to a matching command. In this case, the commands available is server and...
Read more >
SSH Essentials: Working with SSH Servers, Clients, and Keys
You can output the contents of the key and pipe it into the ssh command. On the remote side, you can ensure that...
Read more >
How To Turn Off Command Feedback Quickly! - PS4, MCPE ...
Today for episode three of our new series teaching people Commands They Need To Know we are going to be going over How...
Read more >
Ping command basics for testing and troubleshooting - Red Hat
I can issue the reboot command and then set up a continuous ping from my laptop to the server. When the ping results...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found