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:
SenseiKiwi 2014-07-10 18:25:41 -04:00
parent 85ff28298e
commit b197237dfd
2 changed files with 3 additions and 5 deletions
src/main/java/StevenDimDoors/mod_pocketDim/core

View file

@ -418,9 +418,8 @@ public abstract class NewDimData
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));
}

View file

@ -171,9 +171,8 @@ public class PocketManager
public void onDeleted(ClientLinkData link)
{
Point4D source = link.point;
NewDimData dimension = getDimensionData(source.getDimension());
dimension.deleteLink(source.getX(), source.getY(), source.getZ());
}
getDimensionData(source.getDimension()).deleteLink(source);
}
}
private static class ClientDimWatcher implements IUpdateWatcher<ClientDimData>