cam72cam / Prospectus

A mincraft mod to aid in finding ores
GNU Lesser General Public License v2.1
3 stars 2 forks source link

Some ores show unlocalized name on server #7

Open EngineerXL opened 6 years ago

EngineerXL commented 6 years ago

You see this: image Is there a way to fix it? Or is it UBC's fault?

alcatrazEscapee commented 6 years ago

After re-downloading the latest build I can't reproduce this. I am inclined to think it is something to the fault of UBC / another interaction. What version (MC, Prospectus, Forge, other mods), other mods, language settings / config changes do you have?

EngineerXL commented 6 years ago

I tested with Forge 2757 and 2760. I have Prospectus 1.8 and UBC Reworked & Fixed 1.2.5 This issue occurs only on server SSP image SMP image

Aang23 commented 6 years ago

This issue is caused by this : String name = stack.getDisplayName(); The "getDisplayName()" method will only return the translated item name on the client side, as the server has no way of knowing what language the client is using, so it returns the unlocalized name. You need to either do it on the client side, or set your message to be translated by the client.

alcatrazEscapee commented 6 years ago

So I fixed that. It can send the stack.getUnlocalizedName() + ".name" as a TextComponentTranslation(). However, UBC still doesn't work correctly, because it has no translation key for its ores. (It does a weird hacky workaround to translate its ores) So I can fix the server issue but it still won't work with UBC ores.

EngineerXL commented 6 years ago

Any way to replace any UBC ore's name with simple ore bame? E.g migmatite gold ore -> gold ore

alcatrazEscapee commented 6 years ago

I don't want to have to add individual exceptions for UBC. I'll look into if there is another way to do this. Soon™

EngineerXL commented 6 years ago

Also I figured out, that this bug occurs with other non-UBified ore. E.g. ContentTweaker ores image