Java Code Examples for net.minecraft.util.StringTranslate

The following examples show how to use net.minecraft.util.StringTranslate. These examples are extracted from open source projects. 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 Project: bartworks   Source File: BartWorksCrossmod.java    License: 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
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
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
private ResourceReloadListener() {
    Injector instance = new Injector(new Injector(StringTranslate.class)
            .getField(Injector.findField(StringTranslate.class, StringTranslate.class)));
    languageList = instance.getField(instance.findField(Map.class));
}