diff options
| author | Lulonaut <lulonaut@lulonaut.tech> | 2023-07-27 18:12:51 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-27 18:12:51 +0200 |
| commit | 247239132ad481d5ba9d775e723e134ca116837e (patch) | |
| tree | 19ecbb2106b9fa818391fb7ab83d5750d30dac87 /src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java | |
| parent | 2c58c09f12eb4cceeacbb31fcca4804198be140b (diff) | |
| download | notenoughupdates-247239132ad481d5ba9d775e723e134ca116837e.tar.gz notenoughupdates-247239132ad481d5ba9d775e723e134ca116837e.tar.bz2 notenoughupdates-247239132ad481d5ba9d775e723e134ca116837e.zip | |
buttons for guild name & status in PV (#776)
Co-authored-by: nea <nea@nea.moe>
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(); |
