worldpoint: add toWorldArea() function that returns a 1x1 WorldArea of the WorldPoint (#2870)

This commit is contained in:
illumineawake
2020-11-26 12:22:10 +11:00
committed by GitHub
parent 13eb6ef305
commit e2d5b49657

View File

@@ -244,6 +244,16 @@ public class WorldPoint
return worldPoints;
}
/**
* Converts a WorldPoint to a 1x1 WorldArea.
*
* @return Returns a 1x1 WorldArea
*/
public WorldArea toWorldArea()
{
return new WorldArea(x, y, 1, 1, plane);
}
/**
* Rotate the coordinates in the chunk according to chunk rotation
*