Fix potential NPE when loading a single player world where you were saved in a unloaded dimension. Closes #1575

This commit is contained in:
Lex Manos 2015-01-08 21:42:13 -08:00
parent bca990cc93
commit 5328701219
2 changed files with 8 additions and 1 deletions

View File

@ -66,3 +66,11 @@
{
this.func_147139_a(this.field_71349_l.field_71474_y.field_74318_M);
}
@@ -233,6 +211,7 @@
public EnumDifficulty func_147135_j()
{
+ if (this.field_71349_l.field_71441_e == null) return this.field_71349_l.field_71474_y.field_74318_M; // Fix NPE just in case.
return this.field_71349_l.field_71441_e.func_72912_H().func_176130_y();
}

View File

@ -423,7 +423,6 @@ public class OreDictionary
* Raises the registerOre function in all registered handlers.
*
* @param name The name of the ore
* @param id The ID of the ore
* @param ore The ore's ItemStack
*/
private static void registerOreImpl(String name, ItemStack ore)