Added an options to disable online game complete check

This commit is contained in:
huangyuhui
2016-04-25 23:09:56 +08:00
parent deebadef3a
commit 47f5bf1ea5
10 changed files with 130 additions and 74 deletions

View File

@@ -29,7 +29,7 @@ import org.jackhuang.hellominecraft.launcher.core.service.IMinecraftService;
import org.jackhuang.hellominecraft.launcher.core.version.AssetIndexDownloadInfo;
import org.jackhuang.hellominecraft.launcher.core.version.MinecraftVersion;
import org.jackhuang.hellominecraft.util.MessageBox;
import org.jackhuang.hellominecraft.util.func.Function;
import org.jackhuang.hellominecraft.util.func.BiFunction;
import org.jackhuang.hellominecraft.util.logging.HMCLog;
import org.jackhuang.hellominecraft.util.tasks.Task;
import org.jackhuang.hellominecraft.util.tasks.TaskWindow;
@@ -209,8 +209,8 @@ public class MinecraftAssetService extends IMinecraftAssetService {
return virtualRoot;
}
public final Function<MinecraftVersion, String> ASSET_PROVIDER_IMPL = t -> {
if (!checkAssetsExistance(t.getAssetsIndex()))
public final BiFunction<MinecraftVersion, Boolean, String> ASSET_PROVIDER_IMPL = (t, allow) -> {
if (allow && !checkAssetsExistance(t.getAssetsIndex()))
if (MessageBox.Show(C.i18n("assets.no_assets"), MessageBox.YES_NO_OPTION) == MessageBox.YES_OPTION)
TaskWindow.execute(downloadAssets(t));
return reconstructAssets(t.getAssetsIndex()).getAbsolutePath();

View File

@@ -96,10 +96,12 @@ public class GameLauncher {
if (file != null)
FileUtils.cleanDirectoryQuietly(file);
HMCLog.log("Detecting libraries...");
launchingStateChangedEvent.execute(LaunchingState.DownloadingLibraries);
if (!downloadLibrariesEvent.execute(service.download().getDownloadLibraries(loader.getMinecraftVersion())))
throw new GameException("Failed to download libraries");
if (!options.isNotCheckGame()) {
HMCLog.log("Detecting libraries...");
launchingStateChangedEvent.execute(LaunchingState.DownloadingLibraries);
if (!downloadLibrariesEvent.execute(service.download().getDownloadLibraries(loader.getMinecraftVersion())))
throw new GameException("Failed to download libraries");
}
HMCLog.log("Unpacking natives...");
launchingStateChangedEvent.execute(LaunchingState.DecompressingNatives);

View File

@@ -30,7 +30,7 @@ public class LaunchOptions {
private String name, versionName, javaArgs, minecraftArgs, maxMemory, permSize, width, height, serverIp, wrapper;
private String proxyHost, proxyPort, proxyUser, proxyPass, javaDir, launchVersion, type, precalledCommand;
private boolean fullscreen, noJVMArgs;
private boolean fullscreen, noJVMArgs, notCheckGame;
private JdkVersion java;
private File gameDir;
private GameDirType gameDirType;
@@ -222,4 +222,12 @@ public class LaunchOptions {
public void setType(String type) {
this.type = type;
}
public boolean isNotCheckGame() {
return notCheckGame;
}
public void setNotCheckGame(boolean notCheckGame) {
this.notCheckGame = notCheckGame;
}
}

View File

@@ -21,7 +21,6 @@ import java.io.File;
import java.io.IOException;
import java.util.List;
import org.jackhuang.hellominecraft.util.StrUtils;
import org.jackhuang.hellominecraft.util.func.Function;
import org.jackhuang.hellominecraft.util.logging.HMCLog;
import org.jackhuang.hellominecraft.util.system.IOUtils;
import org.jackhuang.hellominecraft.util.system.OS;
@@ -30,6 +29,7 @@ import org.jackhuang.hellominecraft.launcher.core.auth.UserProfileProvider;
import org.jackhuang.hellominecraft.launcher.core.version.MinecraftLibrary;
import org.jackhuang.hellominecraft.launcher.core.version.MinecraftVersion;
import org.jackhuang.hellominecraft.launcher.core.service.IMinecraftService;
import org.jackhuang.hellominecraft.util.func.BiFunction;
/**
*
@@ -57,7 +57,7 @@ public class MinecraftLoader extends AbstractMinecraftLoader {
String[] splitted = StrUtils.tokenize(version.minecraftArguments);
String game_assets = assetProvider.apply(version);
String game_assets = assetProvider.apply(version, !options.isNotCheckGame());
for (String t : splitted) {
t = t.replace("${auth_player_name}", lr.getUserName());
@@ -96,13 +96,13 @@ public class MinecraftLoader extends AbstractMinecraftLoader {
}
}
private final Function<MinecraftVersion, String> DEFAULT_ASSET_PROVIDER = t -> {
private final BiFunction<MinecraftVersion, Boolean, String> DEFAULT_ASSET_PROVIDER = (t, allow) -> {
return new File(service.baseDirectory(), "assets").getAbsolutePath();
};
private Function<MinecraftVersion, String> assetProvider = DEFAULT_ASSET_PROVIDER;
private BiFunction<MinecraftVersion, Boolean, String> assetProvider = DEFAULT_ASSET_PROVIDER;
public void setAssetProvider(Function<MinecraftVersion, String> assetProvider) {
public void setAssetProvider(BiFunction<MinecraftVersion, Boolean, String> assetProvider) {
if (assetProvider == null)
this.assetProvider = DEFAULT_ASSET_PROVIDER;
else

View File

@@ -75,6 +75,8 @@ public final class Config implements Cloneable {
public transient final EventHandler<IAuthenticator> authChangedEvent = new EventHandler<>(this);
public Theme getTheme() {
if (theme >= Theme.values().length)
theme = 0;
return Theme.values()[theme];
}

View File

@@ -41,7 +41,7 @@ public class VersionSetting {
private String javaArgs, minecraftArgs, maxMemory, permSize, width, height;
private String javaDir, precalledCommand, serverIp, java, wrapper;
private boolean fullscreen, noJVMArgs;
private boolean fullscreen, noJVMArgs, notCheckGame;
/**
* 0 - Close the launcher when the game starts.<br/>
@@ -265,6 +265,15 @@ public class VersionSetting {
propertyChanged.execute("serverIp");
}
public boolean isNotCheckGame() {
return notCheckGame;
}
public void setNotCheckGame(boolean notCheckGame) {
this.notCheckGame = notCheckGame;
propertyChanged.execute("notCheckGame");
}
public LaunchOptions createLaunchOptions(File gameDir) {
LaunchOptions x = new LaunchOptions();
x.setFullscreen(isFullscreen());
@@ -280,6 +289,7 @@ public class VersionSetting {
x.setType(Main.shortTitle());
x.setVersionName(Main.shortTitle());
x.setNoJVMArgs(isNoJVMArgs());
x.setNotCheckGame(isNotCheckGame());
x.setPermSize(getPermSize());
x.setPrecalledCommand(getPrecalledCommand());
x.setProxyHost(Settings.getInstance().getProxyHost());

View File

@@ -42,7 +42,7 @@
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="btnIncludeMinecraft" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="916" max="32767" attributes="0"/>
<EmptySpace pref="577" max="32767" attributes="0"/>
</Group>
</Group>
</Group>
@@ -63,7 +63,7 @@
</Group>
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<EmptySpace pref="576" max="32767" attributes="0"/>
<EmptySpace pref="447" max="32767" attributes="0"/>
<Component id="btnIncludeMinecraft" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
@@ -122,7 +122,7 @@
<Component id="lblDimensionX" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="txtHeight" min="-2" pref="100" max="-2" attributes="0"/>
<EmptySpace pref="402" max="32767" attributes="0"/>
<EmptySpace pref="63" max="32767" attributes="0"/>
<Component id="chkFullscreen" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="1" attributes="0">
@@ -195,7 +195,7 @@
<Component id="lblDimension" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="txtWidth" alignment="3" min="-2" pref="26" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="228" max="32767" attributes="0"/>
<EmptySpace pref="99" max="32767" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="btnDownloadAllAssets" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="btnCleanGame" alignment="3" min="-2" max="-2" attributes="0"/>
@@ -388,16 +388,6 @@
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="txtWrapperLauncher" alignment="0" max="32767" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="lblPrecalledCommand1" min="-2" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
<Component id="txtPrecalledCommand" alignment="0" max="32767" attributes="0"/>
<Component id="txtServerIP" alignment="0" max="32767" attributes="0"/>
<Group type="102" alignment="1" attributes="0">
@@ -408,21 +398,33 @@
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="txtJavaArgs" pref="664" max="32767" attributes="0"/>
<Component id="txtJavaArgs" pref="325" max="32767" attributes="0"/>
<Component id="txtMinecraftArgs" max="32767" attributes="0"/>
<Component id="txtPermSize" alignment="1" max="32767" attributes="0"/>
</Group>
</Group>
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="lblPrecalledCommand" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="lblServerIP" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="txtWrapperLauncher" alignment="0" max="32767" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="lblPrecalledCommand1" min="-2" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="chkNoJVMArgs" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<Component id="chkDontCheckGame" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="lblPrecalledCommand" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="lblServerIP" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
</Group>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -456,8 +458,11 @@
<Component id="lblServerIP" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="txtServerIP" min="-2" pref="26" max="-2" attributes="0"/>
<EmptySpace pref="168" max="32767" attributes="0"/>
<Component id="chkNoJVMArgs" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="39" max="32767" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="chkNoJVMArgs" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="chkDontCheckGame" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
@@ -551,6 +556,16 @@
<EventHandler event="focusLost" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="txtWrapperLauncherFocusLost"/>
</Events>
</Component>
<Component class="javax.swing.JCheckBox" name="chkDontCheckGame">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/jackhuang/hellominecraft/lang/I18N.properties" key="advancedsettings.dont_check_game_completeness" replaceFormat="C.i18n(&quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="itemStateChanged" listener="java.awt.event.ItemListener" parameters="java.awt.event.ItemEvent" handler="chkDontCheckGameItemStateChanged"/>
</Events>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="pnlModManagement">
@@ -586,7 +601,7 @@
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Component id="jScrollPane1" pref="889" max="32767" attributes="0"/>
<Component id="jScrollPane1" pref="550" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="btnRemoveMod" max="32767" attributes="0"/>
@@ -594,7 +609,7 @@
</Group>
</Group>
<Group type="102" alignment="1" attributes="0">
<Component id="lblModInfo" pref="985" max="32767" attributes="0"/>
<Component id="lblModInfo" pref="646" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
@@ -609,7 +624,7 @@
<Component id="btnRemoveMod" min="-2" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
<Component id="jScrollPane1" pref="428" max="32767" attributes="0"/>
<Component id="jScrollPane1" pref="299" max="32767" attributes="0"/>
</Group>
<EmptySpace min="-2" max="-2" attributes="0"/>
<Component id="lblModInfo" min="-2" max="-2" attributes="0"/>

View File

@@ -292,6 +292,7 @@ public final class GameSettingsPanel extends AnimatedPanel implements DropTarget
txtServerIP = new javax.swing.JTextField();
lblPrecalledCommand1 = new javax.swing.JLabel();
txtWrapperLauncher = new javax.swing.JTextField();
chkDontCheckGame = new javax.swing.JCheckBox();
pnlModManagement = new AnimatedPanel();
pnlModManagementContent = new javax.swing.JPanel();
jScrollPane1 = new javax.swing.JScrollPane();
@@ -451,7 +452,7 @@ public final class GameSettingsPanel extends AnimatedPanel implements DropTarget
.addComponent(lblDimensionX)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtHeight, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 402, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 63, Short.MAX_VALUE)
.addComponent(chkFullscreen))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlSettingsLayout.createSequentialGroup()
.addComponent(txtMaxMemory)
@@ -508,7 +509,7 @@ public final class GameSettingsPanel extends AnimatedPanel implements DropTarget
.addComponent(lblDimensionX, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(lblDimension)
.addComponent(txtWidth, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 228, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 99, Short.MAX_VALUE)
.addGroup(pnlSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(btnDownloadAllAssets)
.addComponent(btnCleanGame))
@@ -573,39 +574,46 @@ public final class GameSettingsPanel extends AnimatedPanel implements DropTarget
}
});
chkDontCheckGame.setText(C.i18n("advancedsettings.dont_check_game_completeness")); // NOI18N
chkDontCheckGame.addItemListener(new java.awt.event.ItemListener() {
public void itemStateChanged(java.awt.event.ItemEvent evt) {
chkDontCheckGameItemStateChanged(evt);
}
});
javax.swing.GroupLayout pnlAdvancedSettingsLayout = new javax.swing.GroupLayout(pnlAdvancedSettings);
pnlAdvancedSettings.setLayout(pnlAdvancedSettingsLayout);
pnlAdvancedSettingsLayout.setHorizontalGroup(
pnlAdvancedSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(pnlAdvancedSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(pnlAdvancedSettingsLayout.createSequentialGroup()
.addGroup(pnlAdvancedSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtWrapperLauncher)
.addGroup(pnlAdvancedSettingsLayout.createSequentialGroup()
.addComponent(lblPrecalledCommand1)
.addGap(0, 0, Short.MAX_VALUE)))
.addContainerGap())
.addComponent(txtPrecalledCommand)
.addComponent(txtServerIP)
.addGroup(pnlAdvancedSettingsLayout.createSequentialGroup()
.addGroup(pnlAdvancedSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(lblPrecalledCommand)
.addComponent(lblServerIP))
.addGap(0, 716, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlAdvancedSettingsLayout.createSequentialGroup()
.addGroup(pnlAdvancedSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(lblMinecraftArgs)
.addComponent(lblPermSize)
.addComponent(lblJavaArgs))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(pnlAdvancedSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtJavaArgs)
.addComponent(txtMinecraftArgs)
.addComponent(txtPermSize, javax.swing.GroupLayout.Alignment.TRAILING))))
.addComponent(txtPrecalledCommand)
.addComponent(txtServerIP)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlAdvancedSettingsLayout.createSequentialGroup()
.addGroup(pnlAdvancedSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(lblMinecraftArgs)
.addComponent(lblPermSize)
.addComponent(lblJavaArgs))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(pnlAdvancedSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtJavaArgs, javax.swing.GroupLayout.DEFAULT_SIZE, 325, Short.MAX_VALUE)
.addComponent(txtMinecraftArgs)
.addComponent(txtPermSize, javax.swing.GroupLayout.Alignment.TRAILING)))
.addGroup(pnlAdvancedSettingsLayout.createSequentialGroup()
.addContainerGap()
.addComponent(chkNoJVMArgs)
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(pnlAdvancedSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtWrapperLauncher)
.addGroup(pnlAdvancedSettingsLayout.createSequentialGroup()
.addComponent(lblPrecalledCommand1)
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(pnlAdvancedSettingsLayout.createSequentialGroup()
.addContainerGap()
.addComponent(chkNoJVMArgs)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(chkDontCheckGame))
.addGroup(pnlAdvancedSettingsLayout.createSequentialGroup()
.addGroup(pnlAdvancedSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(lblPrecalledCommand)
.addComponent(lblServerIP))
.addGap(0, 0, Short.MAX_VALUE)))
.addContainerGap())
);
pnlAdvancedSettingsLayout.setVerticalGroup(
pnlAdvancedSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@@ -634,8 +642,10 @@ public final class GameSettingsPanel extends AnimatedPanel implements DropTarget
.addComponent(lblServerIP)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtServerIP, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 168, Short.MAX_VALUE)
.addComponent(chkNoJVMArgs)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 39, Short.MAX_VALUE)
.addGroup(pnlAdvancedSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(chkNoJVMArgs)
.addComponent(chkDontCheckGame))
.addContainerGap())
);
@@ -679,13 +689,13 @@ public final class GameSettingsPanel extends AnimatedPanel implements DropTarget
pnlModManagementContentLayout.setHorizontalGroup(
pnlModManagementContentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(pnlModManagementContentLayout.createSequentialGroup()
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 889, Short.MAX_VALUE)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 550, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(pnlModManagementContentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(btnRemoveMod, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(btnAddMod, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlModManagementContentLayout.createSequentialGroup()
.addComponent(lblModInfo, javax.swing.GroupLayout.DEFAULT_SIZE, 985, Short.MAX_VALUE)
.addComponent(lblModInfo, javax.swing.GroupLayout.DEFAULT_SIZE, 646, Short.MAX_VALUE)
.addContainerGap())
);
pnlModManagementContentLayout.setVerticalGroup(
@@ -697,7 +707,7 @@ public final class GameSettingsPanel extends AnimatedPanel implements DropTarget
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnRemoveMod)
.addGap(0, 0, Short.MAX_VALUE))
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 428, Short.MAX_VALUE))
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 299, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(lblModInfo))
);
@@ -914,7 +924,7 @@ public final class GameSettingsPanel extends AnimatedPanel implements DropTarget
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(btnIncludeMinecraft)
.addContainerGap(916, Short.MAX_VALUE)))
.addContainerGap(577, Short.MAX_VALUE)))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@@ -930,7 +940,7 @@ public final class GameSettingsPanel extends AnimatedPanel implements DropTarget
.addContainerGap())
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap(576, Short.MAX_VALUE)
.addContainerGap(447, Short.MAX_VALUE)
.addComponent(btnIncludeMinecraft)
.addContainerGap()))
);
@@ -1160,6 +1170,11 @@ public final class GameSettingsPanel extends AnimatedPanel implements DropTarget
Settings.getLastProfile().getSelectedVersionSetting().setWrapper(txtWrapperLauncher.getText());
}//GEN-LAST:event_txtWrapperLauncherFocusLost
private void chkDontCheckGameItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_chkDontCheckGameItemStateChanged
if (!isLoading)
Settings.getLastProfile().getSelectedVersionSetting().setNotCheckGame(chkDontCheckGame.isSelected());
}//GEN-LAST:event_chkDontCheckGameItemStateChanged
// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="Load">
void prepareVersionSetting(VersionSetting profile) {
@@ -1175,6 +1190,7 @@ public final class GameSettingsPanel extends AnimatedPanel implements DropTarget
txtPrecalledCommand.setText(profile.getPrecalledCommand());
txtServerIP.setText(profile.getServerIp());
chkNoJVMArgs.setSelected(profile.isNoJVMArgs());
chkDontCheckGame.setSelected(profile.isNotCheckGame());
chkFullscreen.setSelected(profile.isFullscreen());
cboLauncherVisibility.setSelectedIndex(profile.getLauncherVisibility().ordinal());
cboRunDirectory.setSelectedIndex(profile.getGameDirType().ordinal());
@@ -1325,6 +1341,7 @@ public final class GameSettingsPanel extends AnimatedPanel implements DropTarget
private javax.swing.JComboBox cboProfiles;
private javax.swing.JComboBox cboRunDirectory;
private javax.swing.JComboBox cboVersions;
private javax.swing.JCheckBox chkDontCheckGame;
private javax.swing.JCheckBox chkFullscreen;
private javax.swing.JCheckBox chkNoJVMArgs;
private javax.swing.JScrollPane jScrollPane1;

View File

@@ -413,3 +413,4 @@ wizard.steps=\u6b65\u9aa4
lang=\u7b80\u4f53\u4e2d\u6587
lang.default=\u8ddf\u968f\u7cfb\u7edf\u8bed\u8a00
advancedsettings.dont_check_game_completeness=\u4e0d\u68c0\u67e5\u6e38\u620f\u5b8c\u6574\u6027

View File

@@ -24,6 +24,7 @@ import java.security.MessageDigest
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'findbugs'
//sourceCompatibility = '1.7'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'