Prevented 'overworld not loaded' crash, temp fix

This commit is contained in:
StevenRS11
2013-06-25 09:15:19 -04:00
parent 5b53399432
commit 60972eab21
2 changed files with 10 additions and 1 deletions

View File

@@ -18,7 +18,7 @@ public class RiftGenerator implements IWorldGenerator
public static final int MAX_CLUSTER_GENERATION_CHANCE = 10000;
private static final int CLUSTER_GROWTH_CHANCE = 80;
private static final int MAX_CLUSTER_GROWTH_CHANCE = 100;
private static final int MIN_RIFT_Y = 21;
private static final int MIN_RIFT_Y = 4;
private static final int MAX_RIFT_Y = 250;
private static final int CHUNK_LENGTH = 16;
private static final int GATEWAY_RADIUS = 4;
@@ -42,6 +42,11 @@ public class RiftGenerator implements IWorldGenerator
return;
}
if(dimHelper.getWorld(0)==null)
{
return;
}
int x, y, z;
int attempts;
int blockID;

View File

@@ -906,6 +906,10 @@ public class dimHelper extends DimensionManager
public LinkData createPocket(LinkData link , boolean isGoingDown, boolean isRandomRift)
{
DDProperties properties = DDProperties.instance();
if(dimHelper.getWorld(0)==null)
{
return link;
}
if (dimHelper.getWorld(link.locDimID) == null)
{