Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

Commit

Permalink
Implements missing method getFocused
Browse files Browse the repository at this point in the history
Closes #13

Signed-off-by: DeathsGun <deathsgun@protonmail.com>
  • Loading branch information
DeathsGun committed Aug 24, 2021
1 parent a53ecee commit 1bd6ced
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ minecraft_version=1.17.1
yarn_mappings=1.17.1+build.39
loader_version=0.11.6
# Mod Properties
mod_version=1.0.0-alpha
mod_version=1.0.1-alpha
maven_group=xyz.deathsgun
archives_base_name=modmanager
# Dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@
package xyz.deathsgun.modmanager.gui;

import net.minecraft.client.font.TextRenderer;
import net.minecraft.client.gui.Element;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.widget.ButtonWidget;
import net.minecraft.client.gui.widget.TextFieldWidget;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.text.TranslatableText;
import org.jetbrains.annotations.Nullable;
import xyz.deathsgun.modmanager.gui.widget.CategoryListEntry;
import xyz.deathsgun.modmanager.gui.widget.CategoryListWidget;
import xyz.deathsgun.modmanager.gui.widget.ModListEntry;
Expand Down Expand Up @@ -124,6 +126,12 @@ public <E> void updateSelectedEntry(Object widget, E entry) {
}
}

@Nullable
@Override
public Element getFocused() {
return super.getFocused();
}

@SuppressWarnings("unchecked")
@Override
public <E> E getEntry(Object widget) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ private ModVersion getUpdateVersion(String modId, ModMetadata container) throws
latestVersion = version;
}
}
if (latest == null || installedVersion.compareTo(latestVersion) == 0) {
if (latest == null || installedVersion.compareTo(latestVersion) > 0) {
logger.info("No update for {} found!", container.getId());
return null;
}
Expand Down

0 comments on commit 1bd6ced

Please sign in to comment.