From 7f9699a1a4714b89abbd9f5567d753f6a7967aff Mon Sep 17 00:00:00 2001 From: Juuxel <6596629+Juuxel@users.noreply.github.com> Date: Sat, 9 May 2020 14:12:37 +0300 Subject: Make WLabel.getTextAt and WText.getTextAt public --- src/main/java/io/github/cottonmc/cotton/gui/widget/WLabel.java | 2 +- src/main/java/io/github/cottonmc/cotton/gui/widget/WText.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main') diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabel.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabel.java index 3889ac2..e14239a 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabel.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabel.java @@ -101,7 +101,7 @@ public class WLabel extends WWidget { @Environment(EnvType.CLIENT) @Nullable - private Text getTextAt(int x, int y) { + public Text getTextAt(int x, int y) { if (isWithinBounds(x, y)) { return MinecraftClient.getInstance().textRenderer.method_27527().method_27489(text, x); } diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WText.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WText.java index 094817c..94bb080 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WText.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WText.java @@ -59,7 +59,7 @@ public class WText extends WWidget { @Environment(EnvType.CLIENT) @Nullable - protected Text getTextAt(int x, int y) { + public Text getTextAt(int x, int y) { TextRenderer font = MinecraftClient.getInstance().textRenderer; int lineIndex = y / font.fontHeight; -- cgit