Mark localToCanvas methods nullable
These can return null if object is not visible. Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
@@ -79,6 +79,7 @@ public class Perspective
|
|||||||
* @return a {@link Point} on screen corresponding to the position in
|
* @return a {@link Point} on screen corresponding to the position in
|
||||||
* 3D-space
|
* 3D-space
|
||||||
*/
|
*/
|
||||||
|
@Nullable
|
||||||
public static Point localToCanvas(@Nonnull Client client, @Nonnull LocalPoint point, int plane)
|
public static Point localToCanvas(@Nonnull Client client, @Nonnull LocalPoint point, int plane)
|
||||||
{
|
{
|
||||||
return localToCanvas(client, point, plane, 0);
|
return localToCanvas(client, point, plane, 0);
|
||||||
@@ -95,6 +96,7 @@ public class Perspective
|
|||||||
* @return a {@link Point} on screen corresponding to the position in
|
* @return a {@link Point} on screen corresponding to the position in
|
||||||
* 3D-space
|
* 3D-space
|
||||||
*/
|
*/
|
||||||
|
@Nullable
|
||||||
public static Point localToCanvas(@Nonnull Client client, @Nonnull LocalPoint point, int plane, int zOffset)
|
public static Point localToCanvas(@Nonnull Client client, @Nonnull LocalPoint point, int plane, int zOffset)
|
||||||
{
|
{
|
||||||
final int tileHeight = getTileHeight(client, point, plane);
|
final int tileHeight = getTileHeight(client, point, plane);
|
||||||
|
|||||||
Reference in New Issue
Block a user