mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-13 17:04:24 +00:00
Add null check for each manual and change the localtions of pics.
This commit is contained in:
1 parent
7565c83441
commit
50a485b14d
4 files changed
+27
-11
No files matched your search
@@ -46,23 +46,39 @@ public class TProxyClient extends TProxyCommon
|
||||
public void readManuals ()
|
||||
{
|
||||
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
|
||||
String CurrentLanguage = Minecraft.getMinecraft().getLanguageManager().getCurrentLanguage().getLanguageCode();
|
||||
|
||||
String CurrentLanguage = Minecraft.getMinecraft().getLanguageManager().getCurrentLanguage().getLanguageCode();
|
||||
Document diary_cl = readManual("/assets/tinker/manuals/" + CurrentLanguage +"/diary.xml", dbFactory);
|
||||
Document volume1_cl = readManual("/assets/tinker/manuals/" + CurrentLanguage + "/firstday.xml", dbFactory);
|
||||
Document volume2_cl = readManual("/assets/tinker/manuals/" + CurrentLanguage + "/materials.xml", dbFactory);
|
||||
Document smelter_cl = readManual("/assets/tinker/manuals/" + CurrentLanguage + "/smeltery.xml", dbFactory);
|
||||
|
||||
diary = readManual("/assets/tinker/manuals/" + CurrentLanguage +"/diary.xml", dbFactory);
|
||||
volume1 = readManual("/assets/tinker/manuals/" + CurrentLanguage + "/firstday.xml", dbFactory);
|
||||
volume2 = readManual("/assets/tinker/manuals/" + CurrentLanguage + "/materials.xml", dbFactory);
|
||||
smelter = readManual("/assets/tinker/manuals/" + CurrentLanguage + "/smeltery.xml", dbFactory);
|
||||
|
||||
if(diary == null || volume1 == null || volume2 == null || smelter == null)
|
||||
{
|
||||
diary = readManual("/assets/tinker/manuals/en_US/diary.xml", dbFactory);
|
||||
volume1 = readManual("/assets/tinker/manuals/en_US/firstday.xml", dbFactory);
|
||||
volume2 = readManual("/assets/tinker/manuals/en_US/materials.xml", dbFactory);
|
||||
smelter = readManual("/assets/tinker/manuals/en_US/smeltery.xml", dbFactory);
|
||||
}
|
||||
|
||||
if(diary_cl != null)
|
||||
{
|
||||
diary = diary_cl;
|
||||
}
|
||||
|
||||
if(volume1_cl != null)
|
||||
{
|
||||
volume1 = volume1_cl;
|
||||
}
|
||||
|
||||
if(volume2_cl != null)
|
||||
{
|
||||
volume2 = volume2_c1;
|
||||
}
|
||||
|
||||
if(smelter_cl != null)
|
||||
{
|
||||
smelter = smelter_cl;
|
||||
}
|
||||
|
||||
initManualIcons();
|
||||
initManualIcons();
|
||||
initManualRecipes();
|
||||
initManualPages();
|
||||
manualData = new ManualInfo();
|
||||
@@ -133,4 +149,4 @@ public class TProxyClient extends TProxyCommon
|
||||
ArmorProxyClient.armorExtended.recalculateHealth(mc.thePlayer, TPlayerStats.get(mc.thePlayer));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user