From 247239132ad481d5ba9d775e723e134ca116837e Mon Sep 17 00:00:00 2001 From: Lulonaut Date: Thu, 27 Jul 2023 18:12:51 +0200 Subject: buttons for guild name & status in PV (#776) Co-authored-by: nea --- src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java') 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(); -- cgit