Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.6.4] Mob Names on Server Not Right
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 0
saxon564

[1.6.4] Mob Names on Server Not Right

By saxon564, January 19, 2014 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

saxon564    20

saxon564

saxon564    20

  • Diamond Finder
  • saxon564
  • Forge Modder
  • 20
  • 486 posts
Posted January 19, 2014

So some of you may remember that I was having problems with mob names before, which was fixed, but I have come across a problem with servers where if your on a server and the mob kills you it shows the entity.mochickens.<mob>.name as the name on the server.

 

Here is just one line from the code which I have a feeling it has to deal with

LanguageRegistry.instance().addStringLocalization(
            "entity.mochickens.DiamondChicken.name", "Diamond Chicken");

This line is called during the Init phase, I am wondering if this is something I should be doing in a proxy on the server side or what needs to be done. I would like to get it to show the Diamond Chicken name when your on the server instead of the unlocalized name.

 

Also here is the code for when the entity is first registered

EntityRegistry.registerModEntity(EntityDiamondChicken.class,
                                         "DiamondChicken", 500, this, 40, 3, true);

I even made sure the entity registers were before the language registers.

  • Quote

Share this post


Link to post
Share on other sites

Draco18s    2401

Draco18s

Draco18s    2401

  • Reality Controller
  • Draco18s
  • Members
  • 2401
  • 15920 posts
Posted January 19, 2014

Bad modder, no cookie.  Don't use the LanguageRegistry.  Use lang files instead.  So much better.

 

And they're easy, to boot.  Just create a file called en_US.lang inside /assets/lang/ and add whatYouNeedTranslated=what it should be:

 

entity.Artifacts.SpecialArrow.name=Arrow

 

Done!

  • Quote

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Share this post


Link to post
Share on other sites

LexManos    1616

LexManos

LexManos    1616

  • Reality Controller
  • LexManos
  • Forge Code God
  • 1616
  • 8924 posts
Posted January 19, 2014

You should not localize anything on the server.

  • Quote

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Patreon: http://www.patreon.com/lexmanos
Paypal: http://paypal.me/LexManos

BitCoin: 1Q8rWvUNMM2T1ZfDaFeeYQyVXtYoeT6tTn

Share this post


Link to post
Share on other sites

saxon564    20

saxon564

saxon564    20

  • Diamond Finder
  • saxon564
  • Forge Modder
  • 20
  • 486 posts
Posted January 19, 2014

Bad modder, no cookie.

Aww man :-( lol.

Don't use the LanguageRegistry.  Use lang files instead.  So much better.

 

And they're easy, to boot.  Just create a file called en_US.lang inside /assets/lang/ and add whatYouNeedTranslated=what it should be:

 

entity.Artifacts.SpecialArrow.name=Arrow

 

Done!

Do i have to call that in someway or does the game do that itself?

  • Quote

Share this post


Link to post
Share on other sites

Draco18s    2401

Draco18s

Draco18s    2401

  • Reality Controller
  • Draco18s
  • Members
  • 2401
  • 15920 posts
Posted January 19, 2014

Do i have to call that in someway or does the game do that itself?

 

All language files are automatically loaded for you.

  • Quote

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Share this post


Link to post
Share on other sites

saxon564    20

saxon564

saxon564    20

  • Diamond Finder
  • saxon564
  • Forge Modder
  • 20
  • 486 posts
Posted January 20, 2014

ok, thank you for the help.

  • Quote

Share this post


Link to post
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 0
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • diesieben07
      [1.16.4] Smithing table custom recipe use durability

      By diesieben07 · Posted 52 minutes ago

      There is no way to do this. The smithing container is hardcoded to just decrease its inputs and not use the container item (see SmithingTableContainer#func_230301_a_).
    • st4s1k
      [1.16.4] Smithing table custom recipe use durability

      By st4s1k · Posted 1 hour ago

      Hi! How do I make so that when I place in the smithing table a tool and a material, I get another material and decrease the durability of the tool without loosing the tool? I overrided the item container methods but the item is still consumed on craft: @Override public boolean hasContainerItem(ItemStack itemStack) { return true; } @Override public ItemStack getContainerItem(ItemStack itemStack) { if (itemStack.attemptDamageItem(1, random, null)) { itemStack.shrink(1); itemStack.setDamage(0); } return itemStack; } Thanks in advance!
    • diesieben07
      (1.16.2) Making a new capability (3)

      By diesieben07 · Posted 1 hour ago

      So now you just removed the @EventBusSubscriber annotation. I did not tell you to do this.
    • diesieben07
      [1.16.4] How i can open a container by clicking on my mob

      By diesieben07 · Posted 1 hour ago

      Do not use @OnlyIn.   I do not understand this question.
    • diesieben07
      Game crashes while loading world

      By diesieben07 · Posted 1 hour ago

      Please refer to the Optifine downloads page regarding compatibility with Forge.
  • Topics

    • st4s1k
      1
      [1.16.4] Smithing table custom recipe use durability

      By st4s1k
      Started 1 hour ago

    • e2rifia
      14
      (1.16.2) Making a new capability (3)

      By e2rifia
      Started 8 hours ago

    • Klarks
      13
      [1.16.4] How i can open a container by clicking on my mob

      By Klarks
      Started 20 hours ago

    • Rollng
      1
      Game crashes while loading world

      By Rollng
      Started 1 hour ago

    • KEKEL
      1
      I have a problem with chisels and bits mod.

      By KEKEL
      Started 4 hours ago

  • Who's Online (See full list)

    • diesieben07
    • Heinzchen
    • pikadium
    • Danebi
    • jjreason88@gmail.com
    • clermont.holiday
    • BrooksWalkerNelson
    • Chumbanotz
    • Keyko_
    • MistyMarshes
    • FrostyTerror
    • Somonestolemyusername
    • Godis_apan
    • Talp1
    • BirdLady
    • JustAMeanie
    • JeefPeef
    • KEKEL
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.6.4] Mob Names on Server Not Right
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community