Motherload Mine Updates
This commit is contained in:
@@ -305,6 +305,40 @@ public class WorldPoint
|
||||
return Math.max(Math.abs(getX() - other.getX()), Math.abs(getY() - other.getY()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the straight-line distance between this point and another.
|
||||
* <p>
|
||||
* If the other point is not on the same plane, this method will return
|
||||
* {@link Float#MAX_VALUE}. If ignoring the plane is wanted, use the
|
||||
* {@link #distanceTo2DHypotenuse(WorldPoint)} method.
|
||||
*
|
||||
* @param other other point
|
||||
* @return the straight-line distance
|
||||
*/
|
||||
public float distanceToHypotenuse(WorldPoint other)
|
||||
{
|
||||
if (other.plane != plane)
|
||||
{
|
||||
return Float.MAX_VALUE;
|
||||
}
|
||||
|
||||
return distanceTo2DHypotenuse(other);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the straight-line distance from this point to another point.
|
||||
* <p>
|
||||
* This method disregards the plane value of the two tiles and returns
|
||||
* the simple distance between the X-Z coordinate pairs.
|
||||
*
|
||||
* @param other other point
|
||||
* @return the straight-line distance
|
||||
*/
|
||||
public float distanceTo2DHypotenuse(WorldPoint other)
|
||||
{
|
||||
return (float) Math.hypot(getX() - other.getX(), getY() - other.getY());
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the passed scene coordinates to a world space
|
||||
*/
|
||||
|
||||
@@ -91,6 +91,7 @@ public class WidgetID
|
||||
public static final int BARROWS_REWARD_GROUP_ID = 155;
|
||||
public static final int RAIDS_GROUP_ID = 513;
|
||||
public static final int MOTHERLODE_MINE_GROUP_ID = 382;
|
||||
public static final int MOTHERLODE_MINE_FULL_INVENTORY_GROUP_ID = 229;
|
||||
public static final int EXPERIENCE_DROP_GROUP_ID = 122;
|
||||
public static final int PUZZLE_BOX_GROUP_ID = 306;
|
||||
public static final int LIGHT_BOX_GROUP_ID = 322;
|
||||
|
||||
Reference in New Issue
Block a user