From 42bcc53ffc46ce8400bfe66fd45d5ae85441d667 Mon Sep 17 00:00:00 2001 From: Buuz135 Date: Sun, 19 Jun 2022 20:39:16 +0200 Subject: [PATCH] Fixed portal screen scrolling --- gradle.properties | 2 +- src/main/java/com/buuz135/portality/gui/PortalsScreen.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 1d1fb0a..c20857b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ modGroup=com.buuz135.portality.Portality -api_version=3.3.4 +api_version=3.3.5 modBaseName=portality forgeVersion=1.12.2-14.23.4.2759 mcpVersion=stable_39 diff --git a/src/main/java/com/buuz135/portality/gui/PortalsScreen.java b/src/main/java/com/buuz135/portality/gui/PortalsScreen.java index 81471b0..6fc33d4 100644 --- a/src/main/java/com/buuz135/portality/gui/PortalsScreen.java +++ b/src/main/java/com/buuz135/portality/gui/PortalsScreen.java @@ -93,7 +93,7 @@ private void addPortalButtons() { tempInformations.sort((o1, o2) -> Boolean.compare(o2.isPrivate(), o1.isPrivate())); if (!textField.getValue().isEmpty()) tempInformations.removeIf(portalInformation -> !portalInformation.getName().toLowerCase().contains(textField.getValue().toLowerCase())); - this.children().removeIf(guiButton -> portalButtons.contains(guiButton)); + this.portalButtons.forEach(this::removeWidget); this.portalButtons.clear(); this.visiblePortalInformations = tempInformations.size(); int pointer = (int) (((tempInformations.size() - 7) * scrolling));