fixed upgrade crash

This commit is contained in:
StevenRS11 2013-06-13 15:44:11 -04:00
parent 28119d129d
commit 558f2915b9

View file

@ -25,6 +25,7 @@ import net.minecraft.world.World;
import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.chunk.storage.ExtendedBlockStorage;
import net.minecraftforge.common.ChestGenHooks;
import StevenDimDoors.mod_pocketDim.helpers.DungeonHelper;
import StevenDimDoors.mod_pocketDim.helpers.dimHelper;
import StevenDimDoors.mod_pocketDim.helpers.yCoordHelper;
@ -77,8 +78,17 @@ public class SchematicLoader
public void init(LinkData link)
{
String filePath = dimHelper.dimList.get(link.destDimID).dungeonGenerator.schematicPath;
String filePath;
if(dimHelper.dimList.get(link.destDimID).dungeonGenerator!=null)
{
filePath = dimHelper.dimList.get(link.destDimID).dungeonGenerator.schematicPath;
}
else
{
dimHelper.dimList.get(link.destDimID).dungeonGenerator=mod_pocketDim.dungeonHelper.weightedDungeonGenList.get(this.rand.nextInt(mod_pocketDim.dungeonHelper.weightedDungeonGenList.size()));
filePath = dimHelper.dimList.get(link.destDimID).dungeonGenerator.schematicPath;
}
this.schematic=filePath;
try
{