Minor Change
Autocorrected indentation in PocketManager. I'll be working on changing PocketManager to prevent the risk of creating data for a non-existent dimension through a bad call to getDimensionData().
This commit is contained in:
@@ -49,7 +49,7 @@ public class PocketManager
|
|||||||
// that any link destinations must be real dimensions controlled by PocketManager.
|
// that any link destinations must be real dimensions controlled by PocketManager.
|
||||||
|
|
||||||
public InnerDimData(int id, InnerDimData parent, boolean isPocket, boolean isDungeon,
|
public InnerDimData(int id, InnerDimData parent, boolean isPocket, boolean isDungeon,
|
||||||
IUpdateWatcher<ClientLinkData> linkWatcher)
|
IUpdateWatcher<ClientLinkData> linkWatcher)
|
||||||
{
|
{
|
||||||
super(id, parent, isPocket, isDungeon, linkWatcher);
|
super(id, parent, isPocket, isDungeon, linkWatcher);
|
||||||
}
|
}
|
||||||
@@ -151,29 +151,29 @@ public class PocketManager
|
|||||||
originPoint=this.origin.toPoint3D();
|
originPoint=this.origin.toPoint3D();
|
||||||
}
|
}
|
||||||
return new PackedDimData(this.id, depth, this.packDepth, parentID, this.root().id(), orientation,
|
return new PackedDimData(this.id, depth, this.packDepth, parentID, this.root().id(), orientation,
|
||||||
isDungeon, isFilled,packedDungeon, originPoint, ChildIDs, Links, Tails);
|
isDungeon, isFilled,packedDungeon, originPoint, ChildIDs, Links, Tails);
|
||||||
// FIXME: IMPLEMENTATION PLZTHX
|
// FIXME: IMPLEMENTATION PLZTHX
|
||||||
//I tried
|
//I tried
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class ClientLinkWatcher implements IUpdateWatcher<ClientLinkData>
|
private static class ClientLinkWatcher implements IUpdateWatcher<ClientLinkData>
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public void onCreated(ClientLinkData link)
|
public void onCreated(ClientLinkData link)
|
||||||
{
|
{
|
||||||
Point4D source = link.point;
|
Point4D source = link.point;
|
||||||
NewDimData dimension = getDimensionData(source.getDimension());
|
NewDimData dimension = getDimensionData(source.getDimension());
|
||||||
dimension.createLink(source.getX(), source.getY(), source.getZ(), LinkTypes.CLIENT_SIDE,link.orientation);
|
dimension.createLink(source.getX(), source.getY(), source.getZ(), LinkTypes.CLIENT_SIDE,link.orientation);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDeleted(ClientLinkData link)
|
public void onDeleted(ClientLinkData link)
|
||||||
{
|
{
|
||||||
Point4D source = link.point;
|
Point4D source = link.point;
|
||||||
getDimensionData(source.getDimension()).deleteLink(source);
|
getDimensionData(source.getDimension()).deleteLink(source);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class ClientDimWatcher implements IUpdateWatcher<ClientDimData>
|
private static class ClientDimWatcher implements IUpdateWatcher<ClientDimData>
|
||||||
{
|
{
|
||||||
@@ -582,7 +582,7 @@ public class PocketManager
|
|||||||
//Steven
|
//Steven
|
||||||
DimensionManager.registerDimension(dimensionID, mod_pocketDim.properties.PocketProviderID);
|
DimensionManager.registerDimension(dimensionID, mod_pocketDim.properties.PocketProviderID);
|
||||||
}
|
}
|
||||||
return dimension;
|
return dimension;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static NewDimData getDimensionData(World world)
|
public static NewDimData getDimensionData(World world)
|
||||||
|
|||||||
Reference in New Issue
Block a user