diff options
Diffstat (limited to 'src/main/java/io')
5 files changed, 9 insertions, 9 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java index 9c13927..1a8c326 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java @@ -65,7 +65,7 @@ public class CottonClientScreen extends Screen implements TextHoverRendererScree } if (getTitle() != null) { - font.draw(getTitle().asFormattedString(), left, top, description.getTitleColor()); + textRenderer.draw(getTitle().asFormattedString(), left, top, description.getTitleColor()); } } @@ -222,6 +222,6 @@ public class CottonClientScreen extends Screen implements TextHoverRendererScree @Override public void renderTextHover(Text text, int x, int y) { - renderComponentHoverEffect(text, x, y); + renderTextHoverEffect(text, x, y); } } diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java index dc6c87f..9bc0452 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java @@ -84,13 +84,13 @@ public class CottonInventoryScreen<T extends CottonCraftingController> extends C public boolean keyPressed(int ch, int keyCode, int modifiers) { //System.out.println("Key " + Integer.toHexString(ch)+" "+Integer.toHexString(keyCode)); if (ch==GLFW.GLFW_KEY_ESCAPE) { - this.minecraft.player.closeContainer(); + this.client.player.closeContainer(); return true; } else { //if (super.keyPressed(ch, keyCode, modifiers)) return true; if (description.getFocus()==null) { if (MinecraftClient.getInstance().options.keyInventory.matchesKey(ch, keyCode)) { - this.minecraft.player.closeContainer(); + this.client.player.closeContainer(); return true; } return false; @@ -197,7 +197,7 @@ public class CottonInventoryScreen<T extends CottonCraftingController> extends C } if (getTitle() != null) { - font.draw(getTitle().asFormattedString(), x, y, description.getTitleColor()); + textRenderer.draw(getTitle().asFormattedString(), x, y, description.getTitleColor()); } } @@ -235,6 +235,6 @@ public class CottonInventoryScreen<T extends CottonCraftingController> extends C @Override public void renderTextHover(Text text, int x, int y) { - renderComponentHoverEffect(text, x, y); + renderTextHoverEffect(text, x, y); } } diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/TextHoverRendererScreen.java b/src/main/java/io/github/cottonmc/cotton/gui/client/TextHoverRendererScreen.java index c99b325..d09df6f 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/client/TextHoverRendererScreen.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/client/TextHoverRendererScreen.java @@ -3,7 +3,7 @@ package io.github.cottonmc.cotton.gui.client; import net.minecraft.text.Text; /** - * Implemented by LibGui screens to access {@code Screen.renderComponentHoverEffect()}. + * Implemented by LibGui screens to access {@code Screen.renderTextHoverEffect()}. */ public interface TextHoverRendererScreen { void renderTextHover(Text text, int x, int y); diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ModMenuSupport.java b/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ModMenuSupport.java index 5a7e236..aa69c53 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ModMenuSupport.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ModMenuSupport.java @@ -19,7 +19,7 @@ public class ModMenuSupport implements ModMenuApi { public Function<Screen, ? extends Screen> getConfigScreenFactory() { return screen -> new CottonClientScreen(new TranslatableText("options.libgui.libgui_settings"), new ConfigGui(screen)) { public void onClose() { - this.minecraft.openScreen(screen); + this.client.openScreen(screen); } protected void init() { 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 f09c263..43cd3a9 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 @@ -57,7 +57,7 @@ public class WLabel extends WWidget { if (hoveredText != null) { Screen screen = MinecraftClient.getInstance().currentScreen; if (screen != null) { - screen.handleComponentClicked(hoveredText); + screen.handleTextClick(hoveredText); } } } |