Added Feature from issue 762 (#803)
* Added Feature from issue 762 * Changelog * Spelling * Done * Update CHANGELOG.md * Implemented Changes
This commit is contained in:
parent
3ea69265b8
commit
b9e6fc2382
5 changed files with 36 additions and 9 deletions
|
@ -6,6 +6,8 @@ This changelog only contains the changes that are unreleased. For changes for in
|
||||||
## 3.4.31.3
|
## 3.4.31.3
|
||||||
|
|
||||||
### New Features
|
### New Features
|
||||||
|
|
||||||
|
- New open resources button to visit minecraft.jar for modding purposes
|
||||||
- Servers will now be started using kitty, allacritty or gnome-terminal, if x-terminal-emulator or exo-open aren't present
|
- Servers will now be started using kitty, allacritty or gnome-terminal, if x-terminal-emulator or exo-open aren't present
|
||||||
- Support NeoForge loader for Modrinth and MultiMC import
|
- Support NeoForge loader for Modrinth and MultiMC import
|
||||||
|
|
||||||
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
1
gradle/wrapper/gradle-wrapper.properties
vendored
1
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -2,5 +2,6 @@ distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|
12
gradlew
vendored
12
gradlew
vendored
|
@ -85,9 +85,6 @@ done
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||||
|
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
|
|
||||||
|
@ -133,10 +130,13 @@ location of your Java installation."
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
JAVACMD=java
|
JAVACMD=java
|
||||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
if ! command -v java >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
Please set the JAVA_HOME variable in your environment to match the
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
location of your Java installation."
|
location of your Java installation."
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
# Increase the maximum file descriptors if we can.
|
||||||
|
@ -197,6 +197,10 @@ if "$cygwin" || "$msys" ; then
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
# Collect all arguments for the java command;
|
# Collect all arguments for the java command;
|
||||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||||
# shell script including quotes and variable substitutions, so put them in
|
# shell script including quotes and variable substitutions, so put them in
|
||||||
|
|
|
@ -85,9 +85,18 @@ public class InstanceCard extends CollapsiblePanel implements RelocalizationList
|
||||||
private final JButton editButton = new JButton(GetText.tr("Edit Mods"));
|
private final JButton editButton = new JButton(GetText.tr("Edit Mods"));
|
||||||
private final JButton serversButton = new JButton(GetText.tr("Servers"));
|
private final JButton serversButton = new JButton(GetText.tr("Servers"));
|
||||||
private final JButton openWebsite = new JButton(GetText.tr("Open Website"));
|
private final JButton openWebsite = new JButton(GetText.tr("Open Website"));
|
||||||
private final JButton openButton = new JButton(GetText.tr("Open Folder"));
|
|
||||||
private final JButton settingsButton = new JButton(GetText.tr("Settings"));
|
private final JButton settingsButton = new JButton(GetText.tr("Settings"));
|
||||||
|
|
||||||
|
private final JPopupMenu openPopupMenu = new JPopupMenu();
|
||||||
|
private final JMenuItem openResourceMenuItem = new JMenuItem(GetText.tr("Open Resources"));
|
||||||
|
private final DropDownButton openButton = new DropDownButton(GetText.tr("Open Folder"), openPopupMenu, true,
|
||||||
|
new MouseAdapter() {
|
||||||
|
@Override
|
||||||
|
public void mousePressed(MouseEvent e) {
|
||||||
|
OS.openFileExplorer(instance.getRoot());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
private final JPopupMenu playPopupMenu = new JPopupMenu();
|
private final JPopupMenu playPopupMenu = new JPopupMenu();
|
||||||
private final JMenuItem playOnlinePlayMenuItem = new JMenuItem(GetText.tr("Play Online"));
|
private final JMenuItem playOnlinePlayMenuItem = new JMenuItem(GetText.tr("Play Online"));
|
||||||
private final JMenuItem playOfflinePlayMenuItem = new JMenuItem(GetText.tr("Play Offline"));
|
private final JMenuItem playOfflinePlayMenuItem = new JMenuItem(GetText.tr("Play Offline"));
|
||||||
|
@ -203,6 +212,7 @@ public class InstanceCard extends CollapsiblePanel implements RelocalizationList
|
||||||
bottom.add(this.getHelpButton);
|
bottom.add(this.getHelpButton);
|
||||||
|
|
||||||
setupPlayPopupMenus();
|
setupPlayPopupMenus();
|
||||||
|
setupOpenPopupMenus();
|
||||||
setupButtonPopupMenus();
|
setupButtonPopupMenus();
|
||||||
|
|
||||||
// check it can be exported
|
// check it can be exported
|
||||||
|
@ -270,6 +280,16 @@ public class InstanceCard extends CollapsiblePanel implements RelocalizationList
|
||||||
playPopupMenu.add(playOfflinePlayMenuItem);
|
playPopupMenu.add(playOfflinePlayMenuItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setupOpenPopupMenus() {
|
||||||
|
openResourceMenuItem.addActionListener(e -> {
|
||||||
|
DialogManager.okDialog().setTitle(GetText.tr("Reminder"))
|
||||||
|
.setContent(GetText.tr("You may not distribute ANY resources."))
|
||||||
|
.setType(DialogManager.WARNING).show();
|
||||||
|
OS.openFileExplorer(instance.getMinecraftJarLibraryPath());
|
||||||
|
});
|
||||||
|
openPopupMenu.add(openResourceMenuItem);
|
||||||
|
}
|
||||||
|
|
||||||
private void setupButtonPopupMenus() {
|
private void setupButtonPopupMenus() {
|
||||||
if (instance.showGetHelpButton()) {
|
if (instance.showGetHelpButton()) {
|
||||||
if (instance.getDiscordInviteUrl() != null) {
|
if (instance.getDiscordInviteUrl() != null) {
|
||||||
|
@ -501,7 +521,6 @@ public class InstanceCard extends CollapsiblePanel implements RelocalizationList
|
||||||
String.format("%s/%s?utm_source=launcher&utm_medium=button&utm_campaign=instance_v2_button",
|
String.format("%s/%s?utm_source=launcher&utm_medium=button&utm_campaign=instance_v2_button",
|
||||||
Constants.SERVERS_LIST_PACK, instance.getSafePackName())));
|
Constants.SERVERS_LIST_PACK, instance.getSafePackName())));
|
||||||
this.openWebsite.addActionListener(e -> OS.openWebBrowser(instance.getWebsiteUrl()));
|
this.openWebsite.addActionListener(e -> OS.openWebBrowser(instance.getWebsiteUrl()));
|
||||||
this.openButton.addActionListener(e -> OS.openFileExplorer(instance.getRoot()));
|
|
||||||
this.settingsButton.addActionListener(e -> {
|
this.settingsButton.addActionListener(e -> {
|
||||||
Analytics.trackEvent(AnalyticsEvent.forInstanceEvent("instance_settings", instance));
|
Analytics.trackEvent(AnalyticsEvent.forInstanceEvent("instance_settings", instance));
|
||||||
new InstanceSettingsDialog(instance);
|
new InstanceSettingsDialog(instance);
|
||||||
|
@ -716,6 +735,7 @@ public class InstanceCard extends CollapsiblePanel implements RelocalizationList
|
||||||
this.serversButton.setText(GetText.tr("Servers"));
|
this.serversButton.setText(GetText.tr("Servers"));
|
||||||
this.openWebsite.setText(GetText.tr("Open Website"));
|
this.openWebsite.setText(GetText.tr("Open Website"));
|
||||||
this.openButton.setText(GetText.tr("Open Folder"));
|
this.openButton.setText(GetText.tr("Open Folder"));
|
||||||
|
this.openResourceMenuItem.setText(GetText.tr("Open Resources"));
|
||||||
this.settingsButton.setText(GetText.tr("Settings"));
|
this.settingsButton.setText(GetText.tr("Settings"));
|
||||||
|
|
||||||
this.normalBackupMenuItem.setText(GetText.tr("Normal Backup"));
|
this.normalBackupMenuItem.setText(GetText.tr("Normal Backup"));
|
||||||
|
|
Loading…
Reference in a new issue