Unload dimensions on discon, don't freak out on TE load if dimensions
aren't there
This commit is contained in:
parent
6651559793
commit
7e8b682c23
2 changed files with 7 additions and 5 deletions
|
@ -122,6 +122,7 @@ public class EventHookContainer
|
||||||
if (!PocketManager.isLoaded())
|
if (!PocketManager.isLoaded())
|
||||||
{
|
{
|
||||||
PocketManager.load();
|
PocketManager.load();
|
||||||
|
PocketManager.isConnected = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ public class PocketManager
|
||||||
{
|
{
|
||||||
Point4D source = link.point;
|
Point4D source = link.point;
|
||||||
NewDimData dimension = getDimensionData(source.getDimension());
|
NewDimData dimension = getDimensionData(source.getDimension());
|
||||||
if (dimension.getLink(source.getX(), source.getY(), source.getZ()) == null)
|
if (dimension != null && dimension.getLink(source.getX(), source.getY(), source.getZ()) == null)
|
||||||
dimension.createLink(source, LinkType.CLIENT, 0, link.lock);
|
dimension.createLink(source, LinkType.CLIENT, 0, link.lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ public class PocketManager
|
||||||
{
|
{
|
||||||
Point4D source = link.point;
|
Point4D source = link.point;
|
||||||
NewDimData dimension = getDimensionData(source.getDimension());
|
NewDimData dimension = getDimensionData(source.getDimension());
|
||||||
if (dimension.getLink(source.getX(),source.getY(),source.getZ()) != null)
|
if (dimension != null && dimension.getLink(source.getX(),source.getY(),source.getZ()) != null)
|
||||||
dimension.deleteLink(source.getX(), source.getY(), source.getZ());
|
dimension.deleteLink(source.getX(), source.getY(), source.getZ());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,9 +81,10 @@ public class PocketManager
|
||||||
{
|
{
|
||||||
Point4D source = link.point;
|
Point4D source = link.point;
|
||||||
NewDimData dimension = getDimensionData(source.getDimension());
|
NewDimData dimension = getDimensionData(source.getDimension());
|
||||||
DimLink dLink = dimension.getLink(source);
|
if (dimension != null) {
|
||||||
dLink.lock = link.lock;
|
DimLink dLink = dimension.getLink(source);
|
||||||
|
dLink.lock = link.lock;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue