Jump to content

What's the 1.10.2 equivalent of StatCollector.translateToLocal


Is.M.L

Recommended Posts

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?

Link to comment
Share on other sites

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.

  • Like 1

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.

Link to comment
Share on other sites

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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