Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

What's the 1.10.2 equivalent of StatCollector.translateToLocal

Featured Replies

Posted

I'm trying to learn by studying other mods (I chose Botania as an example). In it's source, imports the Buildcraft's API (there's no BC for 1.10.2). Botania doesn't have Buildcraft's API in its repository. I'm guessing it does some gradle magic to make the imports work. Since I'm not a gradle mage myself, I put Buildcraft's API in my file system so it will show in my project, but it's an outdated version of it (because there isn't one for 1.10.2). I've been correcting a lot of easy stuff in the API's source code, but I don't know how to correct this one. I have this line:

StatCollector.translateToLocal(getTag());

But it seems there's no StatCollectorclass; not in the package in the import statement (net.minecraft.util.StatCollector) and not anywhere else (eclipse has no suggestions). How do I fix that line to make it work for 1.10.2?

The 1.10-final branch Botania does have the Buildcraft API in src/api/java.

 

StatCollector was renamed to  net.minecraft.util.text.translation.I18n. This is deprecated because translation should be handled on the client using the net.minecraft.client.resources.I18n class or by sending a TextComponentTranslation.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

  • Author

Man! I'm lost in all this github and gradle and all that stuff... Thank you!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.