Minor Change
Rewrote the NewDimData.deleteLink() version that would accept x, y, and z as parameters. There was some redundant code for getting the parameters from a Point4D instance just to create another one to find the target link. Now we pass the source point in directly.
This commit is contained in:
@@ -418,9 +418,8 @@ public abstract class NewDimData
|
|||||||
return (target != null);
|
return (target != null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean deleteLink(int x, int y, int z)
|
public boolean deleteLink(Point4D location)
|
||||||
{
|
{
|
||||||
Point4D location = new Point4D(x, y, z, id);
|
|
||||||
return this.deleteLink(this.getLink(location));
|
return this.deleteLink(this.getLink(location));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -171,9 +171,8 @@ public class PocketManager
|
|||||||
public void onDeleted(ClientLinkData link)
|
public void onDeleted(ClientLinkData link)
|
||||||
{
|
{
|
||||||
Point4D source = link.point;
|
Point4D source = link.point;
|
||||||
NewDimData dimension = getDimensionData(source.getDimension());
|
getDimensionData(source.getDimension()).deleteLink(source);
|
||||||
dimension.deleteLink(source.getX(), source.getY(), source.getZ());
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class ClientDimWatcher implements IUpdateWatcher<ClientDimData>
|
private static class ClientDimWatcher implements IUpdateWatcher<ClientDimData>
|
||||||
|
|||||||
Reference in New Issue
Block a user