diff options
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java index 7f607ab7..052ea33f 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java @@ -2112,6 +2112,10 @@ public class Utils { top <= y && y < top + height; } + public static boolean isWithinRect(int x, int y, Rectangle rectangle) { + return isWithinRect(x, y, rectangle.getLeft(), rectangle.getTop(), rectangle.getWidth(), rectangle.getHeight()); + } + public static int getNumberOfStars(ItemStack stack) { if (stack != null && stack.hasTagCompound()) { NBTTagCompound tag = stack.getTagCompound(); |
