net.minecraft.util.StringTranslate Java Examples

The following examples show how to use net.minecraft.util.StringTranslate. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BartWorksCrossmod.java    From bartworks with MIT License 5 votes vote down vote up
@Mod.EventHandler
public void onFMLServerStart(FMLServerStartingEvent event) {
    if (LoaderReference.miscutils)
        for (Object s : RadioHatchCompat.TranslateSet){
            StringTranslate.inject(new ReaderInputStream(new StringReader((String) s)));
        }
}
 
Example #2
Source File: ReflectionUtil.java    From NOVA-Core with GNU Lesser General Public License v3.0 5 votes vote down vote up
public static StringTranslate getStringTranslateInstance() {
	try {
		Field field = getField(StringTranslate.class, ObfuscationConstants.STRINGTRANSLATE_INSTANCE);
		return (StringTranslate) field.get(null);
	} catch (IllegalAccessException ex) {
		Game.logger().error("could not get string translator");
		return null;
	}
}
 
Example #3
Source File: ReflectionUtil.java    From NOVA-Core with GNU Lesser General Public License v3.0 5 votes vote down vote up
public static StringTranslate getStringTranslateInstance() {
	try {
		Field field = getField(StringTranslate.class, ObfuscationConstants.STRINGTRANSLATE_INSTANCE);
		return (StringTranslate) field.get(null);
	} catch (IllegalAccessException ex) {
		Game.logger().error("could not get string translator");
		return null;
	}
}
 
Example #4
Source File: ResourceReloadListener.java    From Gadomancy with GNU Lesser General Public License v3.0 4 votes vote down vote up
private ResourceReloadListener() {
    Injector instance = new Injector(new Injector(StringTranslate.class)
            .getField(Injector.findField(StringTranslate.class, StringTranslate.class)));
    languageList = instance.getField(instance.findField(Map.class));
}