diff options
7 files changed, 14 insertions, 14 deletions
diff --git a/gradle.properties b/gradle.properties index 8f6ed64..781874b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,9 +3,9 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/use - minecraft_version=1.16.2-pre1 - yarn_mappings=1.16.2-pre1+build.13 - loader_version=0.9.0+build.204 + minecraft_version=1.16.2-rc2 + yarn_mappings=1.16.2-rc2+build.1 + loader_version=0.9.1+build.205 # Mod Properties mod_version = 3.0.0 @@ -13,6 +13,6 @@ org.gradle.jvmargs=-Xmx1G archives_base_name = LibGui # Dependencies - fabric_version=0.16.3+build.390-1.16 + fabric_version=0.17.1+build.394-1.16 jankson_version=3.0.1+j1.2.0 modmenu_version=1.14.5+build.30 diff --git a/src/main/java/io/github/cottonmc/cotton/gui/SyncedGuiDescription.java b/src/main/java/io/github/cottonmc/cotton/gui/SyncedGuiDescription.java index 2215d4b..fee04f1 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/SyncedGuiDescription.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/SyncedGuiDescription.java @@ -152,7 +152,7 @@ public class SyncedGuiDescription extends ScreenHandler implements GuiDescriptio ItemStack curSlotStack = slot.getStack(); if (!curSlotStack.isEmpty() && canStacksCombine(toInsert, curSlotStack) && slot.canTakeItems(player)) { int combinedAmount = curSlotStack.getCount() + toInsert.getCount(); - int maxAmount = Math.min(toInsert.getMaxCount(), slot.getMaxStackAmount()); + int maxAmount = Math.min(toInsert.getMaxCount(), slot.getMaxItemCount()); if (combinedAmount <= maxAmount) { toInsert.setCount(0); curSlotStack.setCount(combinedAmount); @@ -172,8 +172,8 @@ public class SyncedGuiDescription extends ScreenHandler implements GuiDescriptio private boolean insertIntoEmpty(ItemStack toInsert, Slot slot) { ItemStack curSlotStack = slot.getStack(); if (curSlotStack.isEmpty() && slot.canInsert(toInsert)) { - if (toInsert.getCount() > slot.getMaxStackAmount()) { - slot.setStack(toInsert.split(slot.getMaxStackAmount())); + if (toInsert.getCount() > slot.getMaxItemCount()) { + slot.setStack(toInsert.split(slot.getMaxItemCount())); } else { slot.setStack(toInsert.split(toInsert.getCount())); } 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 6adf34e..01b0c70 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 @@ -50,7 +50,7 @@ public class CottonClientScreen extends Screen implements TextHoverRendererScree @Override public void init(MinecraftClient client, int screenWidth, int screenHeight) { super.init(client, screenWidth, screenHeight); - client.keyboard.enableRepeatEvents(true); + client.keyboard.setRepeatEvents(true); description.addPainters(); reposition(screenWidth, screenHeight); @@ -59,7 +59,7 @@ public class CottonClientScreen extends Screen implements TextHoverRendererScree @Override public void removed() { super.removed(); - this.client.keyboard.enableRepeatEvents(false); + this.client.keyboard.setRepeatEvents(false); } /** 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 e69755d..210470d 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 @@ -63,7 +63,7 @@ public class CottonInventoryScreen<T extends SyncedGuiDescription> extends Handl @Override public void init(MinecraftClient client, int screenWidth, int screenHeight) { super.init(client, screenWidth, screenHeight); - client.keyboard.enableRepeatEvents(true); + client.keyboard.setRepeatEvents(true); description.addPainters(); @@ -73,7 +73,7 @@ public class CottonInventoryScreen<T extends SyncedGuiDescription> extends Handl @Override public void removed() { super.removed(); - this.client.keyboard.enableRepeatEvents(false); + this.client.keyboard.setRepeatEvents(false); } /** 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 7cc76e9..5c85c1a 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 @@ -133,7 +133,7 @@ public class WLabel extends WWidget { @Nullable public Style getTextStyleAt(int x, int y) { if (isWithinBounds(x, y)) { - return MinecraftClient.getInstance().textRenderer.getTextHandler().trimToWidth(text, x); + return MinecraftClient.getInstance().textRenderer.getTextHandler().getStyleAt(text, x); } return null; } 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 ec66a03..8cd9871 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 @@ -77,7 +77,7 @@ public class WText extends WWidget { if (lineIndex >= 0 && lineIndex < wrappedLines.size()) { OrderedText line = wrappedLines.get(lineIndex); - return font.getTextHandler().method_30876(line, x); + return font.getTextHandler().getStyleAt(line, x); } return null; diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WWidget.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WWidget.java index faa0355..789560a 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WWidget.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WWidget.java @@ -362,7 +362,7 @@ public class WWidget { return; Screen screen = MinecraftClient.getInstance().currentScreen; - screen.renderTooltip(matrices, builder.lines, tX+x, tY+y); + screen.renderOrderedTooltip(matrices, builder.lines, tX+x, tY+y); } /** |